0.0.22 • Published 4 months ago
@keepix/wallets v0.0.22
Keepix.Wallets
Library that respects the WalletLibraryInterface.
This library is used to create wallets, hold coin and token balances and carry out transactions.
class Wallet {
constructor({}: {
password?: string,
mnemonic?: string,
privateKey?: string,
type: string,
keepixTokens?: { coins: any, tokens: any } // whitelisted coins & tokens
rpc?: any,
privateKeyTemplate?: string
}) {}
getPrivateKey: () => string;
getMnemonic: () => string | undefined;
getAddress: () => string;
getProdiver: () => Promise<any>;
// returns like 1.01 (Always in readable value)
getCoinBalance: (walletAddress?: string) => Promise<string>;
// returns like 1.01 (Always in readable value)
getTokenBalance: (tokenAddress: string, walletAddress?: string) => Promise<string>;
getTokenInformation: (tokenAddress: string) => Promise<{ "symbol": string, "decimals": number, "name": string } | undefined>;
// amount is always like 1.20 ETH
estimateCostSendCoinTo: (receiverAddress: string, amount: string) => Promise<{ success: boolean, description: string }>;
estimateCostSendTokenTo: (tokenAddress: string, receiverAddress: string, amount: string) => Promise<{ success: boolean, description: string }>;
sendCoinTo: (receiverAddress: string, amount: string) => Promise<{ success: boolean, description: string }>;
sendTokenTo: (tokenAddress: string, receiverAddress: string, amount: string) => Promise<{ success: boolean, description: string }>;
}
export interface WalletLibraryInterface {
Wallet: typeof Wallet;
};
0.0.22
4 months ago
0.0.20
5 months ago
0.0.21
5 months ago
0.0.13
5 months ago
0.0.14
5 months ago
0.0.15
5 months ago
0.0.16
5 months ago
0.0.17
5 months ago
0.0.18
5 months ago
0.0.19
5 months ago
0.0.12
5 months ago
0.0.10
5 months ago
0.0.11
5 months ago
0.0.9
5 months ago
0.0.8
5 months ago
0.0.7
5 months ago
0.0.6
5 months ago
0.0.5
5 months ago
0.0.4
5 months ago
0.0.3
5 months ago
0.0.2
5 months ago
0.0.1
5 months ago