Skip to Content

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

Constructor

constructor
Signer(): Signer

Returns:

Signer

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:

Promise
BIP-322 simple signature, encoded in base-64

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help