beeline-cli
Version:
A terminal wallet for the Hive blockchain - type, sign, rule the chain
51 lines • 1.79 kB
TypeScript
import { PrivateKey } from '@hiveio/dhive';
export interface WalletKey {
account: string;
role: 'owner' | 'active' | 'posting' | 'memo';
publicKey: string;
encrypted: boolean;
}
export interface WalletConfig {
accounts: {
[account: string]: WalletKey[];
};
defaultAccount?: string;
encryptionEnabled: boolean;
}
export interface DerivedKeys {
owner: PrivateKey;
active: PrivateKey;
posting: PrivateKey;
memo: PrivateKey;
}
export declare class KeyManager {
private config;
constructor();
initialize(): Promise<void>;
saveConfig(): Promise<void>;
private getKeyId;
importPrivateKey(account: string, role: 'owner' | 'active' | 'posting' | 'memo', privateKeyWif: string, pin?: string): Promise<void>;
getPrivateKey(account: string, role: string, pin?: string): Promise<string | null>;
listAccounts(): Promise<string[]>;
listKeys(account: string): Promise<WalletKey[]>;
removeKey(account: string, role: string): Promise<void>;
getDefaultAccount(): string | undefined;
setDefaultAccount(account: string): Promise<void>;
deriveKeysFromPassword(account: string, password: string): DerivedKeys;
loginWithPassword(account: string, password: string, pin?: string, roles?: ('owner' | 'active' | 'posting' | 'memo')[]): Promise<void>;
hasAccount(account: string): Promise<boolean>;
getAccountSummary(account: string): Promise<{
account: string;
keyCount: number;
roles: string[];
isDefault: boolean;
} | null>;
getAllAccountSummaries(): Promise<Array<{
account: string;
keyCount: number;
roles: string[];
isDefault: boolean;
}>>;
scrubMemory(data: string): void;
}
//# sourceMappingURL=crypto.d.ts.map