UNPKG

@btc-vision/transaction

Version:

OPNet transaction library allows you to create and sign transactions for the OPNet network.

67 lines 2.38 kB
/** * BIP (Bitcoin Improvement Proposal) derivation path standards * * These define standardized derivation paths for different address types * in hierarchical deterministic (HD) wallets. * * @see https://github.com/bitcoin/bips */ export declare enum BIPStandard { /** * BIP44: Multi-Account Hierarchy for Deterministic Wallets * * Path: m/44'/coin_type'/account'/change/address_index * Original standard for P2PKH (legacy) addresses * Widely used by wallets like Unisat for all address types * * @see https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki */ BIP44 = 44, /** * BIP49: Derivation scheme for P2WPKH-nested-in-P2SH based accounts * * Path: m/49'/coin_type'/account'/change/address_index * For wrapped SegWit addresses (P2SH-P2WPKH starting with '3') * * @see https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki */ BIP49 = 49, /** * BIP84: Derivation scheme for P2WPKH based accounts * * Path: m/84'/coin_type'/account'/change/address_index * For native SegWit addresses (P2WPKH starting with 'bc1q') * DEFAULT for this library * * @see https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki */ BIP84 = 84, /** * BIP86: Derivation scheme for P2TR based accounts * * Path: m/86'/coin_type'/account'/change/address_index * For Taproot addresses (P2TR starting with 'bc1p') * * @see https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki */ BIP86 = 86 } /** * Get a human-readable description of a BIP standard * * @param standard - The BIP standard * @returns A description of the standard and its typical use case */ export declare function getBIPDescription(standard: BIPStandard): string; /** * Build a derivation path for a given BIP standard * * @param standard - The BIP standard to use * @param coinType - The coin type (0 for mainnet, 1 for testnet/regtest) * @param account - The account index * @param change - The change index (0 for receiving, 1 for change) * @param addressIndex - The address index * @returns The full derivation path */ export declare function buildBIPPath(standard: BIPStandard, coinType: number, account: number, change: number, addressIndex: number): string; //# sourceMappingURL=BIPStandard.d.ts.map