import { type TRet } from '@noble/hashes/utils.js'; /** SLIP-0010 master secret label for ed25519 keys. */ export declare const MASTER_SECRET: TRet; /** Hardened child index offset. */ export declare const HARDENED_OFFSET: number; interface HDKeyOpt { depth?: number; index?: number; parentFingerprint?: number; chainCode: Uint8Array; privateKey: Uint8Array; } /** * HD key for ed25519, SLIP-0010 format. * This surface is the ed25519 private-only, hardened-only subset of SLIP-0010, * not a full BIP-0032 xpub/xprv implementation. * @param opt - Internal {@link HDKeyOpt} constructor options for derived keys: * depth, child index, parent fingerprint, chain code, and private key. * @example * Start from a master seed, derive the hardened child path you need, then * recreate the child from stored private key material and chain code. * ```ts * import { randomBytes } from '@noble/hashes/utils.js'; * import { HDKey } from 'micro-key-producer/slip10.js'; * const seed = randomBytes(32); * const child = HDKey.fromMasterSeed(seed).derive("m/0'"); * const restored = new HDKey({ * privateKey: child.privateKey, * chainCode: child.chainCode, * }); * restored.fingerprintHex; * ``` */ export declare class HDKey { get publicKeyRaw(): Uint8Array; get publicKey(): Uint8Array; get pubHash(): Uint8Array; get fingerprint(): number; get fingerprintHex(): string; get parentFingerprintHex(): string; static fromMasterSeed(seed: Uint8Array): HDKey; readonly depth: number; readonly index: number; readonly chainCode: Uint8Array; readonly parentFingerprint: number; readonly privateKey: Uint8Array; constructor(opt: HDKeyOpt); derive(path: string, forceHardened?: boolean): HDKey; deriveChild(index: number): HDKey; sign(message: Uint8Array): Uint8Array; verify(message: Uint8Array, signature: Uint8Array): boolean; } export default HDKey;