UNPKG

lotus-sdk

Version:

Central repository for several classes of tools for integrating with, and building for, the Lotusia ecosystem

78 lines 2.79 kB
import { PrivateKey } from './privatekey.js'; import { PublicKey } from './publickey.js'; import { Network } from './networks.js'; import { HDPublicKey } from './hdpublickey.js'; export interface HDPrivateKeyData { xprivkey?: string; network?: Network; depth?: number; parentFingerPrint?: Buffer; childIndex?: number; chainCode?: Buffer; privateKey?: PrivateKey; } export interface HDPrivateKeyObject { xprivkey: string; network: string; depth: number; parentFingerPrint: string; childIndex: number; chainCode: string; privateKey: string; } export interface HDPrivateKeyBuffers { version: Buffer; depth: Buffer; parentFingerPrint: Buffer; childIndex: Buffer; chainCode: Buffer; privateKey: Buffer; checksum?: Buffer; xprivkey?: Buffer; } export declare class HDPrivateKey { readonly privateKey: PrivateKey; readonly network: Network; readonly depth: number; readonly parentFingerPrint: Buffer; readonly childIndex: number; readonly chainCode: Buffer; readonly fingerPrint: Buffer; readonly publicKey: PublicKey; readonly xprivkey: string; private _hdPublicKey; _buffers: HDPrivateKeyBuffers; static readonly Hardened = 2147483648; static readonly MaxIndex: number; static readonly RootElementAlias: string[]; constructor(data?: string | Buffer | HDPrivateKeyData | HDPrivateKeyObject); get hdPublicKey(): HDPublicKey; get xpubkey(): Buffer; private _classifyArguments; private static _transformString; private static _transformSerialized; private static _transformBuffer; private static _transformObject; private static _getRandomData; private static _fromSeed; private _buildFromObject; isValidPath(arg: string | number, hardened?: boolean): boolean; private static _getDerivationIndexes; static isValidSerialized(data: string | Buffer, network?: Network | string): boolean; getSerializedError(data: string | Buffer, network?: Network | string): Error | null; derive(arg: string | number, hardened?: boolean): HDPrivateKey; private _deriveFromString; private _deriveWithNumber; deriveChild(arg: string | number, hardened?: boolean): HDPrivateKey; deriveNonCompliantChild(arg: string | number, hardened?: boolean): HDPrivateKey; toString(): string; toObject(): HDPrivateKeyObject; toJSON(): HDPrivateKeyObject; toBuffer(): Buffer; static fromBuffer(arg: Buffer): HDPrivateKey; static fromString(arg: string): HDPrivateKey; static fromObject(obj: HDPrivateKeyObject): HDPrivateKey; static fromSeed(hexa: string | Buffer, network?: Network | string): HDPrivateKey; inspect(): string; } //# sourceMappingURL=hdprivatekey.d.ts.map