sign
suspend fun sign(roomUuid: String, secretShare: BIP340SecretShare, msg: ByteArray, derivationPath: IntArray, tweak: BIP340Tweak?): BIP340Signature
Signs a message using BIP340 and multi-party computation.
This function requires threshold number of parties to participate in the signing. Like Schnorr signatures in general, in BIP340 there's no need to hash the message before signing.
This supports BIP-341 Taproot tweaking by supplying the tweak value from the BIP-341 Taproot specification: Let t = hash_TapTweak(p || km). If t ≥ order of secp256k1, fail. Let Q = P + int(t)G.
Return
The signature of the message, which can be verified using the public key
Parameters
room Uuid
The UUID of the signing room
secret Share
The secret share to be used for signing
msg
The message to be signed as a byte array
derivation Path
The BIP-32 non-hardened derivation path to use for signing
tweak
The tweak to be used for signing (32 bytes as hex string)