firma-js-chain-2.0
Version:
The Official FirmaChain Javascript SDK written in Typescript
29 lines (28 loc) • 1.07 kB
TypeScript
import { DirectSecp256k1Wallet } from "@cosmjs/proto-signing";
import { FirmaConfig } from "./FirmaConfig";
export declare class FirmaWalletService {
private _config;
private _mnemonic;
private _privateKey;
private _accountIndex;
private _wallet;
getHdPath(): string;
getPrefix(): string;
getRawWallet(): DirectSecp256k1Wallet;
getPrivateKey(): string;
getMnemonic(): string;
getAddress(): Promise<string>;
constructor(_config: FirmaConfig);
private static getHdPath;
initFromMnemonic(mnemonic: string, accountIndex?: number): Promise<{
success: boolean;
}>;
private getPrivateKeyInternal;
initFromPrivateKey(privateKey: string): Promise<void>;
decryptData(data: string): string;
encryptData(data: string): string;
newWallet(): Promise<FirmaWalletService>;
fromMnemonic(mnemonic: string, accountIndex?: number): Promise<FirmaWalletService>;
fromPrivateKey(privateKey: string): Promise<FirmaWalletService>;
generateMnemonic(): Promise<string>;
}