Keypair
createKeypair
- Creates an instance of WalletKeypar
using password.
This method is used to restore a wallet keypair. The Keypair contains some essential information, such as:
address
public key
key store
and so on, and it is used for pretty much any personalized operation that user can do using FindoraSdk
Parameters:
<string>
- Password to be used to generate an encrypted KeyStore
Results:
Promise<WalletKeypar>
- An instance ofWalletKeypar
Example:
getAddressByPublicKey
- Get wallet address by given public key Using this function user can retreive the wallet address by given public key
Parameters:
<string>
- Public key
Results:
Promise<string>
- A wallet address.
Example:
getAddressPublicAndKey
- Create an instance of LightWalletKeypair
using given wallet address.
This method is used to create a light version of the WalletKeypar using given wallet address.The LightWalletKeypair contains two essential information:
address
public key
It's a light version of the WalletKeypar, containing only address and publickey
Parameters:
<string>
- Wallet address
Results:
Promise<LightWalletKeypair>
- An instance ofLightWalletKeypair
.
Example:
getMnemonic
- Creates an array of Mnemonic phrases. This method is used to creates an array of Mnemonic phrases.
Parameters:
<number>
- Desired length of mnemonic phrases. It can only be 12/15/18/21/24.<string>
- (optional) Default isen
.
Results:
Promise<LightWalletKeypair>
- An instance ofLightWalletKeypair
.
Example:
restoreFromMnemonic
- Creates an instance of WalletKeypar
using Mnemonic and password.
This method is used to restore a wallet keypair. The Keypair contains some essential information, such as:
address
public key
key store
and so on, and it is used for pretty much any personalized operation that user can do using FindoraSdk
Parameters:
<string[]>
- mnemonic words<string>
- Password to be used to generate an encrypted KeyStore
Results:
Promise<WalletKeypar>
- An instance ofWalletKeypar
.
Example:
restoreFromPrivateKey
- Creates an instance of WalletKeypar
using given private key and password.
This method is used to restore a wallet keypair. The Keypair contains some essential information, such as:
address
public key
key store
and so on, and it is used for pretty much any personalized operation that user can do using FindoraSdk
Parameters:
<string>
- Private key<string>
- Password to be used to generate an encrypted KeyStore
Results:
Promise<WalletKeypar>
- An instance ofWalletKeypar
.
Example:
Last updated