preSign

suspend fun preSign(keyId: String): Result<ByteArray>

Precomputes the message-independent part of a signature for fast finalization. ECDSA only — the native EdDSA and Taproot libraries expose no presign session, so on those algorithms this throws UnsupportedOperationException.

Runs the expensive three-party work ahead of time; once the message is known, preSignFinal turns the result into a full signature with far less latency. Each pre-signature is single-use — generate a fresh one per signature.

Return

the pre-signature bytes, to pass to preSignFinal.

Parameters

keyId

the hex-encoded keyId to precompute against; the SDK reads the share from its StorageClient.

See also

to finalize with a message.