UNPKG

lotus-sdk

Version:

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

98 lines 3.49 kB
import { PublicKey } from './publickey.js'; import { HDPrivateKey } from './hdprivatekey.js'; import { Network } from './networks.js'; export interface HDPublicKeyData { xpubkey?: string; network?: Network; depth?: number; parentFingerPrint?: Buffer; childIndex?: number; chainCode?: Buffer; publicKey?: PublicKey; } export interface HDPublicKeyObject { xpubkey: string; network: string; depth: number; fingerPrint: string; parentFingerPrint: string; childIndex: number; chainCode: string; publicKey: string; } export interface HDPublicKeyBuffers { version: Buffer; depth: Buffer; parentFingerPrint: Buffer; childIndex: Buffer; chainCode: Buffer; publicKey: Buffer; checksum?: Buffer; xpubkey?: Buffer; privateKey?: Buffer; xprivkey?: Buffer; } export declare class HDPublicKey { readonly xpubkey: Buffer; readonly network: Network; readonly depth: number; readonly publicKey: PublicKey; readonly fingerPrint: Buffer; readonly parentFingerPrint: Buffer; readonly childIndex: number; readonly chainCode: Buffer; private _buffers; static readonly Hardened = 2147483648; static readonly RootElementAlias: string[]; static readonly VersionSize = 4; static readonly DepthSize = 1; static readonly ParentFingerPrintSize = 4; static readonly ChildIndexSize = 4; static readonly ChainCodeSize = 32; static readonly PublicKeySize = 33; static readonly CheckSumSize = 4; static readonly DataSize = 78; static readonly SerializedByteSize = 82; static readonly VersionStart = 0; static readonly VersionEnd: number; static readonly DepthStart: number; static readonly DepthEnd: number; static readonly ParentFingerPrintStart: number; static readonly ParentFingerPrintEnd: number; static readonly ChildIndexStart: number; static readonly ChildIndexEnd: number; static readonly ChainCodeStart: number; static readonly ChainCodeEnd: number; static readonly PublicKeyStart: number; static readonly PublicKeyEnd: number; static readonly ChecksumStart: number; static readonly ChecksumEnd: number; constructor(arg: string | Buffer | HDPublicKeyData | HDPublicKeyObject | HDPrivateKey); static isValidPath(arg: string | number): boolean; static isValidSerialized(data: string | Buffer, network?: string | Network): boolean; static getSerializedError(data: string | Buffer, network?: string | Network): Error | null; private static _validateNetwork; static fromString(arg: string): HDPublicKey; static fromObject(arg: HDPublicKeyData | HDPublicKeyObject): HDPublicKey; static fromBuffer(arg: Buffer): HDPublicKey; private _classifyArguments; private static _transformString; private static _transformSerialized; private static _transformBuffer; private static _transformObject; private _buildFromPrivate; private _buildFromSerialized; private _buildFromBuffers; private static _validateBufferArguments; private _buildFromObject; derive(arg: string | number, hardened?: boolean): HDPublicKey; deriveChild(arg: string | number, hardened?: boolean): HDPublicKey; private _deriveWithNumber; private _deriveFromString; toString(): string; toBuffer(): Buffer; toObject(): HDPublicKeyObject; toJSON(): string; inspect(): string; } //# sourceMappingURL=hdpublickey.d.ts.map