duoInitiator

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.

Return

a DuoSession ready for MPC operations.

Parameters

messageSigner

your Ed25519-capable MessageSigner, backed by secure key storage (Android Keystore, Apple Secure Enclave, HSM).

cloudVerifyingKey

the peer's verifying key, hex-encoded.

websocketConfig

the WebSocket endpoint configuration.

storageClient

where the SDK persists keyshares and reconciliation state.

See also

for implementing the identity key.

for the available operations.


fun duoInitiator(messageSigner: MessageSigner, cloudVerifyingKey: String, networkClient: SilentShardWebsocketClient<DuoNetworkAction>, storageClient: StorageClient): DuoSession

Creates an initiating DuoSession over the default WebSocket transport, reusing a SilentShardWebsocketClient you construct and own — for example to share one client across sessions and com.silencelaboratories.silentshard.network.NetworkClient.close it yourself.

Return

a DuoSession ready for MPC operations.

Parameters

messageSigner
cloudVerifyingKey

the peer's verifying key, hex-encoded.

networkClient

the WebSocket client to use; you own its lifetime.

storageClient

where the SDK persists keyshares.


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

Creates an initiating DuoSession over a custom transport.

Supply your own NetworkClient to route protocol traffic through a different transport, together with a DuoNetworkActionProvider that maps each protocol step onto that transport's actions.

Return

a DuoSession ready for MPC operations.

Parameters

messageSigner
cloudVerifyingKey

the peer's verifying key, hex-encoded.

storageClient

where the SDK persists keyshares.

networkClient

your transport implementation.

actionProvider

maps protocol steps to network actions for networkClient.