User
class User
Class containing user management methods. Obtain class instance by calling auth on ZumoKit instance.
Properties
id
id: String
Returns user id.
hasWallet
hasWallet: Bool
Returns true if user has wallet on file.
Methods
createWallet
createWallet(mnemonic: String, password: String): Promise<Wallet>
Create user wallet seeded by provided mnemonic and encrypted with user's password.
getAccount
getAccount(symbol: String, network: String, type: String): Promise<Account>
Select specific user account. Supported parameters:
- symbol: BTC, ETH
- network: MAINNET, TESTNET, ROPSTEN, RINKEBY, GOERLI, KOVAN
- type: STANDARD, COMPATIBILITY, SEGWIT
getAccounts
getAccounts(): Promise<Account[]>
Get all user accounts.
getTransactions
getTransactions(): Promise<Transaction[]>
Get all user transactions.
isRecoveryMnemonic
recoverWallet(password: String): Promise<boolean>
Returns true if provided mnemonic corrresponds to user's wallet mnemonic phrase.
recoverWallet
recoverWallet(password: String): Promise<void>
Recover user wallet with user provided backup mnemonic and new password.
revealMnemonic
revealMnemonic(password: String): Promise<string>
Reveals mnemonic phrase if provided password is correct.
unlockWallet
unlockWallet(mnemonic: String, password: String): Promise<Wallet>
Unlocks wallet if provided password is correct.