com.swmansion.starknet.provider.rpc.JsonRpcResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of starknet Show documentation
Show all versions of starknet Show documentation
Starknet SDK for JVM languages
The newest version!
package com.swmansion.starknet.provider.rpc
import com.swmansion.starknet.data.serializers.JsonRpcErrorSerializer
import com.swmansion.starknet.data.types.StarknetResponse
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
internal data class JsonRpcResponse(
@SerialName("id")
val id: Int,
@SerialName("jsonrpc")
val jsonRpc: String,
@SerialName("result")
val result: T? = null,
@SerialName("error")
val error: JsonRpcError? = null,
)
@Serializable(with = JsonRpcErrorSerializer::class)
internal data class JsonRpcError(
@SerialName("code")
val code: Int,
@SerialName("message")
val message: String,
@SerialName("data")
val data: String? = null,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy