Signer
class
Signer
Class that signs BIP-322 signature using a private key.
Reference: https://github.com/LegReq/bip0322-signatures/blob/master/BIP0322_signing.ipynb
Methods
signAsync
signAsync(signerOrKey: string | Buffer | Signer, address: string, message: string, network: Network): Promise
Sign a BIP-322 signature from P2WPKH, P2SH-P2WPKH, and single-key-spend P2TR address and its corresponding private key.
Parameters:
signerOrKey: string | Buffer | Signer
address: string
Address to be signing the message
message: string
message_challenge to be signed by the address
network: Network
Network that the address is located, defaults to the Bitcoin mainnet
Returns:
PromiseBIP-322 simple signature, encoded in base-64
