aegis/lib/dgb/core/wif.d.ts

28 lines
987 B
TypeScript
Raw Normal View History

import { type ECPairInterface } from 'ecpair';
import { type Network } from './network.js';
export type WifImportResult = {
keyPair: ECPairInterface;
variant: 'modern' | 'legacy';
};
export declare function importWif(wif: string): WifImportResult;
export declare function importWifStrict(wif: string, network?: Network): ECPairInterface;
export declare function exportWif(keyPair: ECPairInterface): string;
export interface PubkeyAddresses {
p2pkh: string;
p2shP2wpkhModern: string;
p2shP2wpkhLegacy: string;
p2wpkh: string;
p2tr: string;
scripts: {
p2pkh: string;
p2shP2wpkh: string;
p2wpkh: string;
p2tr: string;
};
}
export declare function addressesForPubkey(pubkey: Buffer, network?: Network): PubkeyAddresses;
export interface WifImportWithAddresses extends WifImportResult, PubkeyAddresses {
}
export declare function importWifWithAddresses(wif: string): WifImportWithAddresses;
export type { ECPairInterface };