@imikailoby/sats
Version:
Tiny non-custodial Bitcoin SDK (TS) — keys, addresses, PSBT, provider chain
12 lines (11 loc) • 369 B
TypeScript
/**
* Builds P2WPKH address and scriptPubKey for the given public key.
* @param pubkey - compressed public key buffer
* @param testnet - when true, builds testnet address
* @returns address and scriptPubKey hex
* @throws AddressError
*/
export declare function p2wpkhAddress(pubkey: Buffer, testnet?: boolean): {
address: string;
scriptPubKey: string;
};