Перейти к содержанию

Spatium SDK > SpatiumProtocol

SpatiumProtocol

open class SpatiumProtocol(val crypto: Crypto, val transport: TransportDriver, val timeout: UInt?) : ProtocolKotlin

SpatiumProtocol Constructor

Parameters

androidJvm

crypto software or hardware crupto module to perform computations with
transport message passing implementation, be it socket, HTTP(S) or other means of communication
timeout (optional) per-message request timeout, after which a procedure is dropped
validateMessage (optional) external transaction validator

Constructors

SpatiumProtocol [androidJvm]
constructor(crypto: Crypto, transport: TransportDriver, timeout: UInt?)

Properties

Name Summary
crypto [androidJvm]
val crypto: Crypto
timeout [androidJvm]
val timeout: UInt?
transport [androidJvm]
open val transport: TransportDriver

Functions

Name Summary
getEcdsaPublicKey [androidJvm]
open suspend override fun getEcdsaPublicKey(secretId: String, syncSessionId: String): String
Get a compound public key from an already performed synchronisation session
getEddsaPublicKey [androidJvm]
open suspend override fun getEddsaPublicKey(secretId: String, syncSessionId: String): String
Get a compound public key from an already performed synchronisation session
off [androidJvm]
open override fun off()
Unsubscribe from server-side events
on [androidJvm]
open override fun on(validateMessage: (message: String, signatureToken: String) -> Boolean)
Subscribe to server-side events
removeDistributedEcdsaKey [androidJvm]
open suspend override fun removeDistributedEcdsaKey(secretId: String, syncSessionId: String)
Remove an already performed synchronisation session from storage
removeDistributedEddsaKey [androidJvm]
open suspend override fun removeDistributedEddsaKey(secretId: String, syncSessionId: String)
Remove an already performed synchronisation session from storage
signEcdsaMessage [androidJvm]
open suspend override fun signEcdsaMessage(secretId: String, syncSessionId: String, signSessionId: String, message: String, signatureToken: String): EcdsaSignature
Generate distributed ECDSA signature for a given message
signEddsaMessage [androidJvm]
open suspend override fun signEddsaMessage(secretId: String, syncSessionId: String, signSessionId: String, message: String, signatureToken: String): EddsaSignature
Generate distributed EDDSA signature for a given message
syncDistributedEcdsaKey [androidJvm]
open suspend override fun syncDistributedEcdsaKey(secretId: String, syncSessionId: String, curve: EcdsaCurve, derivationCoin: UInt, derivationAccount: UInt): String
Perform distributed key synchronisation procedure
syncDistributedEddsaKey [androidJvm]
open suspend override fun syncDistributedEddsaKey(secretId: String, syncSessionId: String, curve: EddsaCurve, derivationCoin: UInt, derivationAccount: UInt): String
Perform distributed key synchronisation procedure