@planetarium/account-web3-secret-storage
Version:
Libplanet account implementation using Ethereum Web3 Secret Storage
21 lines (20 loc) • 826 B
TypeScript
/// <reference types="node" resolution-mode="require"/>
import { KeyId } from "./KeyId.js";
import { Passphrase, PassphraseEntry } from "./PassphraseEntry.js";
import { Readable, Writable } from "node:stream";
export interface PassphraseReaderOptions {
input: Readable;
output: Writable;
mask: string | false;
}
export declare function readPassphrase(prompt: string, { input, output, mask }: PassphraseReaderOptions): Promise<Passphrase>;
interface TtyPassphraseEntryOptions extends PassphraseReaderOptions {
locale: string;
}
export declare class TtyPassphraseEntry implements PassphraseEntry {
#private;
constructor(options?: Partial<TtyPassphraseEntryOptions>);
authenticate(keyId: KeyId, firstAttempt: boolean): Promise<Passphrase>;
configurePassphrase(): Promise<Passphrase>;
}
export {};