silent_shard_sdk library

Classes

CloudClient
CloudClient use to bridge the sdk with cloud node using web socket client.
DklsEncryptionKey
A class that represents a Dkls encryption key.
DklsKeyshare
DklsKeyshare represents local part of a distributed key
DklsMessageSigner
DklsMessageSignerBase
DklsSigningKey
EcdsaM2MSignSession
Represents both parties key generation/rotation sequence and encapsulates communication with cloud node.
EcdsaSession
The EcdsaSession class offers APIs that facilitate easy access to Multi-Party Computation (MPC) functionalities.
Ed25519
EddsaSession
The EddsaSession class offers APIs that facilitate easy access to Multi-Party Computation (MPC) functionalities.
LegacyKeyshare
Party one keyshare (part of distributed key).
SchnorrEncryptionKey
A class that represents a Schnorr encryption key.
SchnorrKeyshare
SchnorrSigningKey
SessionConfig
Session congiuration for the EcdsaSession or EddsaSession.
SimpleStorageClient
Simple storage client that implements the StorageClientInterface interface. It is used to store the keyshares in the run time memory in simple list. This enables quick integration with the SDK, but it is not recommended for production use.
StorageClientInterface<T extends StorageKeyshare>
Interface for the storage client. T is the type of the keyshare, default is StorageKeyshare.
StorageKeyshare
StorageKeyshare is a class that represents a keyshare in the storage.
WebSocketClient
Default WebSocketClient used for socket connection. To use the default WebSocketClient, extends the class and override the required functions.
WebSocketClientInterface
Interface used to create WebSocketClient.

Enums

DklsErrorCode
KeyshareType
KeyType
Protocol
Protocol is duo or trio, depending on the setup. duo for the two party setup, one party is cloud node and other is mobile app. trio for the three party setup, two parties are cloud nodes and one is mobile app.
StorageDomain

Extensions

StorageDomainX on StorageDomain

Functions

createEcdsaM2MSession({required CloudClient cloudClient, StorageClientInterface<StorageKeyshare>? storageClient, DklsMessageSignerBase? signer, Protocol protocol = Protocol.duo}) Future<EcdsaM2MSession>
createEcdsaSession({required CloudClient cloudClient, required String cloudVerifyingKeyHex, required StorageClientInterface<StorageKeyshare> storageClient, DklsMessageSignerBase? signer, Protocol protocol = Protocol.duo}) Future<EcdsaSession>
ecdsaDuoKeyExport({required DklsKeyshare keyshare, required String serverEncrptedKeyshare, required String serverEncryptionPublicKey, required DklsEncryptionKey clientEncryptionKeys}) String
Export(Duo) both parties Ekey by merging them and create a private key.
ecdsaDuoVerifyBackup({required String backup, required DklsKeyshare keyshare, required String rsaPublicKeyPem, required String label}) bool
Verify backup(Duo) of the ECDSA keyshare to make sure that you are good to use keyshare.
eddsaDuoKeyExport({required SchnorrKeyshare keyshare, required String serverEncrptedKeyshare, required String serverEncryptionPublicKey, required SchnorrEncryptionKey clientEncryptionKeys}) Future<String>
Export(Duo) both parties key by merging them and create a private key.
eddsaDuoVerifyBackup({required SchnorrKeyshare keyshare, required String backup, required String rsaPublicKey, required String label}) Future<bool>
Verify backup(Duo) of the EdDSA keyshare to make sure that you are good to use keyshare.
getRandomBytes(int size) Uint8List
isKeyshareLatest(Uint8List keyshareBytes) → dynamic
Checks if the keyshare is latest.
schnorrSdkInit() Future<void>

Exceptions / Errors

DklsError