/**
* @file bip32.ts
* @description BIP32 Path Handling for Bitcoin Wallets
*
* This file provides utility functions to handle BIP32 paths,
* which are commonly used in hierarchical deterministic (HD) wallets.
* It includes functions to convert BIP32 paths to and from different formats,
* extract components from extended public keys (xpubs), manipulate path elements,
* and derive child public keys locally (for non-hardened derivation).
*/
///
///
export declare function pathElementsToBuffer(paths: number[]): Buffer;
export declare function bip32asBuffer(path: string): Buffer;
export declare function pathArrayToString(pathElements: number[]): string;
export declare function pathStringToArray(path: string): number[];
export declare function pubkeyFromXpub(xpub: string): Buffer;
export declare function getXpubComponents(xpub: string): {
chaincode: Buffer;
pubkey: Buffer;
version: number;
};
export declare function hardenedPathOf(pathElements: number[]): number[];
/**
* Derives a child public key from a parent public key using BIP32 non-hardened derivation.
* This allows deriving child keys locally without device interaction.
*
* @param parentPubkey - The parent compressed public key (33 bytes)
* @param parentChaincode - The parent chaincode (32 bytes)
* @param index - The child index (must be non-hardened, i.e., < 0x80000000)
* @returns The derived child public key and chaincode
* @throws Error if attempting hardened derivation or invalid inputs
*/
export declare function deriveChildPublicKey(parentPubkey: Buffer, parentChaincode: Buffer, index: number): {
pubkey: Buffer;
chaincode: Buffer;
};
//# sourceMappingURL=bip32.d.ts.map