SilentShard

sealed interface SilentShard

Entry point for two-party threshold signatures.

SilentShard constructs DuoSessions and exposes the stateless helpers that operate on a keyshare's bytes. Choose the curve family through its objects:

  • ECDSA — secp256k1 signatures (Bitcoin, Ethereum, EVM chains).

  • EdDSA — Ed25519 signatures (Solana, Stellar, and similar).

Constructing a session

Create a session with ECDSA.duoInitiator / EdDSA.duoInitiator. You supply a MessageSigner (your hardware-backed identity key), the peer's verifying key, a transport, and a StorageClient the SDK uses to persist keyshares.

val session = SilentShard.ECDSA.duoInitiator(
messageSigner = myMessageSigner,
cloudVerifyingKey = peerVerifyingKeyHex,
websocketConfig = WebsocketConfig(url = "wss://your-server.example.com"),
storageClient = myStorageClient,
)
val keyId = session.keygen().getOrThrow()

Session operations vs. stateless helpers

DuoSession operations are addressed by keyId and never expose keyshare bytes. The helpers here are the deliberate exception: getKeyshareKeyId, getKeysharePublicKey, and deriveChildPublicKey take the keyshare bytes you read from your own StorageClient, and run locally with no network I/O.

See also

for the operations available on a session.

for the identity-key contract you implement.

Inheritors

Types

Link copied to clipboard

Two-party ECDSA over secp256k1 — Bitcoin, Ethereum, and other EVM chains.

Link copied to clipboard

Two-party EdDSA over Ed25519 — Solana, Stellar, and other Ed25519 chains.

Functions

Link copied to clipboard
abstract suspend fun deriveChildPublicKey(keyshare: ByteArray, derivationPath: String): Result<ByteArray>

Derives a child public key via BIP32 hierarchical-deterministic derivation, producing many addresses from one keyshare. Runs locally.

Link copied to clipboard

Generates a keypair used to encrypt a keyshare export.

Link copied to clipboard
abstract suspend fun getKeyshareKeyId(keyshare: ByteArray): Result<ByteArray>

Computes the keyId of a keyshare — a deterministic identifier derived from its public key. This is the same value DuoSession.keygen and DuoSession.import return. Runs locally.

Link copied to clipboard
abstract suspend fun getKeysharePublicKey(keyshare: ByteArray): Result<ByteArray>

Extracts the public key from a keyshare, for deriving addresses or verifying signatures. Runs locally.