js-conflux-sdk
Version:
JavaScript Conflux Software Development Kit
61 lines • 1.72 kB
TypeScript
export = Wallet;
/**
* Wallet to manager accounts.
*/
declare class Wallet extends Map<any, any> {
/**
* @param {number} networkId
* @return {Wallet}
*/
constructor(networkId: number);
networkId: number;
/**
* Set network id
* @param {number} networkId
*/
setNetworkId(networkId: number): void;
/**
* Check if address exist
*
* @param {string} address
* @return {boolean}
*/
has(address: string): boolean;
/**
* Drop one account by address
*
* @param {string} address
* @return {boolean}
*/
delete(address: string): boolean;
/**
* @param {any} address - Key of account, usually is `address`
* @param {any} account - Account instance
* @return {any}
*/
set(address: any, account: any): any;
/**
* @param {string} address
* @return {Account}
*/
get(address: string): Account;
/**
* @param {string|Buffer} privateKey - Private key of account
* @return {PrivateKeyAccount}
*/
addPrivateKey(privateKey: string | Buffer): PrivateKeyAccount;
/**
* @param {string|Buffer} [entropy] - Entropy of random account
* @return {PrivateKeyAccount}
*/
addRandom(entropy?: string | Buffer): PrivateKeyAccount;
/**
* @param {object} keystore - Keystore version 3 object.
* @param {string|Buffer} password - Password for keystore to decrypt with.
* @return {PrivateKeyAccount}
*/
addKeystore(keystore: object, password: string | Buffer): PrivateKeyAccount;
}
import Account = require("./Account");
import PrivateKeyAccount = require("./PrivateKeyAccount");
//# sourceMappingURL=Wallet.d.ts.map