commonMain.com.funkatronics.rpccore.RpcResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpc-core-jvm Show documentation
Show all versions of rpc-core-jvm Show documentation
Multiplatform JSON RPC Library using Kotlin Serialization
package com.funkatronics.rpccore
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonElement
interface RpcResponse {
val result: R?
val error: RpcError?
val id: String?
val jsonrpc: String
}
typealias DefaultRpcResponse = RpcResponse
@Serializable
data class RpcError(val code: Int, val message: String)
@Serializable
open class Rpc20Response(
override val result: R? = null,
override val error: RpcError? = null,
override val id: String? = null
) : RpcResponse {
override val jsonrpc = "2.0"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy