UNPKG

lotus-sdk

Version:

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

56 lines 2.04 kB
import { BN } from './crypto/bn.js'; import { Network } from './networks.js'; import { PublicKey } from './publickey.js'; import { Address } from './address.js'; export interface PrivateKeyData { bn?: BN; compressed?: boolean; network?: Network; } export interface PrivateKeyObject { bn: string; network: string; compressed: boolean; } export interface PrivateKeySerialized { bn: string; compressed: boolean; network: string; } export interface HDPrivateKeyDerivedData { buf: Buffer; compressed: boolean; } export type PrivateKeyInput = string | Buffer | PrivateKeyData | BN | PrivateKeyObject | HDPrivateKeyDerivedData; export declare class PrivateKey { readonly bn: BN; readonly compressed: boolean; readonly network: Network; private _pubkey?; constructor(data?: PrivateKeyInput, network?: Network | string); get publicKey(): PublicKey; private _classifyArguments; private static _getRandomBN; private static _transformBuffer; private static _transformBNBuffer; private static _transformWIF; private static _transformObject; static fromBuffer(arg: Buffer, network?: Network | string): PrivateKey; static fromString(str: string, network?: Network | string): PrivateKey; static fromWIF(str: string, network?: Network | string): PrivateKey; static fromObject(obj: PrivateKeyObject, network?: Network | string): PrivateKey; static fromRandom(network?: Network | string): PrivateKey; static getValidationError(data: PrivateKeyInput, network?: Network | string): Error | null; static isValid(data: PrivateKeyInput, network?: Network | string): boolean; toString(): string; toWIF(compressed?: boolean): string; toBigNumber(): BN; toBuffer(): Buffer; toBufferNoPadding(): Buffer; toPublicKey(): PublicKey; toAddress(network?: Network | string): Address; toObject(): PrivateKeySerialized; toJSON(): PrivateKeySerialized; inspect(): string; } //# sourceMappingURL=privatekey.d.ts.map