UNPKG

@bitgo/utxo-lib

Version:

Client-side Bitcoin JavaScript library

25 lines 1.11 kB
import { Network } from '../networks'; import { ECPairInterface } from '@bitgo/secp256k1'; /** * Create an ECPair from the raw private key bytes * @param {Buffer} buffer - Private key for the ECPair. Must be exactly 32 bytes. * @param {Object} [network] - Network for the ECPair. Defaults to bitcoin. * @return {ECPair} */ export declare function privateKeyBufferToECPair(buffer: Buffer, network?: Network): ECPairInterface; /** * Get the private key as a 32 bytes buffer. If it is smaller than 32 bytes, pad it with zeros * @param {ECPair} ecPair * @return Buffer 32 bytes */ export declare function privateKeyBufferFromECPair(ecPair: ECPairInterface): Buffer; /** * Converts an extended key from one network to another by updating its version bytes. * * Handles both public and private keys, allowing conversion between networks like * Bitcoin Mainnet and Testnet. * * @returns The extended key with the updated network version. */ export declare function convertExtendedKeyNetwork(extendedKey: string, fromNetwork: Network, targetNetwork: Network): string; //# sourceMappingURL=keyutil.d.ts.map