Working with wallet
A KardiaChain wallet contains a unique address
and a unique private key
which will be used to represent you in blockchain world.
A wallet in some way can be understood as an account in traditional system: address
as username
and private key
as password
. But keep in mind that wallet's private key
can NOT be changed. If you lose your private key
, your wallet will be gone. So, keep your credentials carefully, you're the only personal controlling your wallet.
Creating a new wallet
To create a new wallet, use the generateWallet
utility from account module
The above code will (or should) return
It's recommended to write down your private key and mnemonic phrase. One of them is enough to access your wallet, but just write down both to make sure.
Access your wallet
To access your wallet, KardiaChain JS SDK support 2 methods:
Using private key:
Using mnemonic phrase:
Get your wallet KAI balance
The above code will return your KAI balance, but in HYDRO (similar to wei in ethereum ecosystem). To convert to KAI, use the following util from KAIChain module
Last updated