Taproot

Two-party Taproot — BIP-340 Schnorr over secp256k1, the scheme behind Bitcoin Taproot (P2TR) key-path spends.

Construct a session with duoInitiator and drive it through DuoSession. The stateless helpers inherited from SilentShard operate on secp256k1 keyshares; note that deriveChildPublicKey is address-side only — a Taproot signing run takes no chain path.

Types

Link copied to clipboard

Internal test key provider for testing purposes ONLY.

Functions

Link copied to clipboard
open suspend override 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
fun duoInitiator(messageSigner: MessageSigner, cloudVerifyingKey: String, networkClient: DuoNetworkClient, storageClient: StorageClient): DuoSession

Creates an initiating DuoSession over the default WebSocket transport, reusing a DuoNetworkClient you construct and own.

fun duoInitiator(messageSigner: MessageSigner, cloudVerifyingKey: String, websocketConfig: WebsocketConfig, storageClient: StorageClient): DuoSession

Creates a DuoSession as the initiating party, over the default WebSocket transport. The recommended entry point for most integrations.

fun duoInitiator(messageSigner: MessageSigner, cloudVerifyingKey: String, storageClient: StorageClient, networkClient: NetworkClient, actionProvider: DuoNetworkActionProvider): DuoSession

Creates an initiating DuoSession over a custom transport.

Link copied to clipboard

Generates a keypair used to encrypt a keyshare export.

Link copied to clipboard
open suspend override 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
open suspend override fun getKeysharePublicKey(keyshare: ByteArray): Result<ByteArray>

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