sign

fun sign(data: ByteArray, privateKey: PrivateKey): ByteVector64

Sign data with a private key, using RCF6979 deterministic signatures

Return

a (r, s) ECDSA signature pair

Parameters

data

data to sign

privateKey

private key. If you are using bitcoin "compressed" private keys make sure to only use the first 32 bytes of the key (there is an extra "1" appended to the key)


fun sign(data: ByteVector32, privateKey: PrivateKey): ByteVector64