UNPKG

@taquito/signer

Version:

Software signer implementations and signing utilities for Taquito.

34 lines (33 loc) 1.14 kB
import { ExtendedPrivateKey } from './types'; export declare class PrivateKey implements ExtendedPrivateKey { readonly priv: Uint8Array; readonly chainCode: Uint8Array; /** * * @param priv generated keypair 0->32 private key 32->n public key * @param chainCode new HMAC hash with new key */ constructor(priv: Uint8Array, chainCode: Uint8Array); /** * * @param seedSrc result of Bip39.mnemonicToSeed * @returns instance of PrivateKey * @throws InvalidSeedLengthError */ static fromSeed(seedSrc: Uint8Array | string): PrivateKey; /** * * @returns slice(0, 32) of current priv for new seed for next derived priv */ seed(): Uint8Array; /** \* @remarks index: current derivation path item ie: 1729' * @returns derivation path child of original private key pair */ derive(index: number): PrivateKey; /** * @param path array of numbers pre adjusted for hardened paths ie: 44' -> 2^31 + 44 * @returns final child of full derivation path private key pair */ derivePath(path: Iterable<number>): PrivateKey; }