Wallets can be used for many important things, for instance:
The SDK has multiple classes related to a Wallet instance:
Wallet : Works simply like a wrapper providing methods to create and instantiating WalletUnlocked
and WalletLocked
instances.
WalletLocked : Provides the functionalities for a locked wallet.
WalletUnlocked : Provides the functionalities for an unlocked wallet.
Account : Provides an abstraction with basic functionalities for wallets or accounts to interact with the network. It is essential to notice that both WalletLocked
and WalletUnlocked
extend from the Account
class.
Let's explore these different approaches in the following sub-chapters.
Note: Keep in mind that you should never share your private/secret key. And in the case of wallets that were derived from a mnemonic phrase, never share your mnemonic phrase. If you're planning on storing the wallet on disk, do not store the plain private/secret key and do not store the plain mnemonic phrase. Instead, use
WalletManager
to encrypt its content first before saving it to disk.