/// /** * Static builder for handling the parsing of Bip44 Paths. * * BIP44 is a particular application of BIP43. * It defines a hierarchy for deterministic wallets based on BIP32, * and the purpose scheme described in BIP43. * * A Bip44 path defines the following levels: * - m / purpose' / coin_type' / account' / change / address_index * * https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki * https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki * https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki * * @example const bip44Bytes = Bip44Path.fromString("44'/111'/0'/0/0").toBytes() * @example const bip44Bytes = Bip44Path.fromString("44'/111'/0'").toBytes() * @example const bip44Bytes = Bip44Path.fromString("m/44'/111'/0'/0/0").toBytes() */ export declare class Bip44Path { private static readonly HARDENING; private static readonly REGEXP_VALID_BIP44; private _elements; /** * Private constructor. * Ensures precondition that 'fromString' is called before 'toBytes'. * * @param {number[]} elements a bip44 path as an array of elements */ private constructor(); /** * Parses a Bip44 path-string, storing the path as elements, * and returns a Bip44Path instance. * * Elements are stored as a 4-byte/uint32 Big-Endian-packed number array. * * @param {string} path a bip44 path as a string * @throws {Error} if the path-string is null * @throws {Error} if the path formatting is invalid * @returns {Bip44Path} a new instance containing parsed path elements */ static fromString(path: string): Bip44Path; /** * Parses and stores a Bip44 Path-string as an array of elements to the 'Bip44Path' instance. * * @param {string} path a bip44 path as a string * @throws {Error} if the path-string is null * @throws {Error} if the path-string has a length of '0' * @returns {Bip44Path} a new instance containing parsed path elements */ protected static pathToElements(path: string): Bip44Path; /** * Get the bytes of a Parsed Bip44 Element Array. * * @returns {Buffer} a buffer of bytes representing the path * @throws {Error} if the internal bip44 element array has a length of '0' * @returns {Buffer} a byte buffer of parsed bip44 path elements */ toBytes(): Buffer; } export { Bip44Path as Path };