sign

suspend fun sign(roomUuid: RoomUUID, secretShare: EcdsaSecretShare, msgHash: MessageHash, derivationPath: IntArray): EcdsaSignature

Signs a message using ECDSA and multi-party computation.

This function requires threshold number of parties to participate in the signing. Unlike Schnorr-based signatures, ECDSA requires the message to be hashed before signing. You should use a secure hash function like SHA-256 to create the msgHash parameter.

Return

The signature of the message, which can be verified using the public key

Parameters

roomUuid

The UUID of the signing room

secretShare

The secret share to be used for signing

msgHash

The hash of the message to be signed as a MessageHash object

derivationPath

The BIP-32 non-hardened derivation path to use for signing