⛏️createWallet
Description
The createWallet
function generates a new mnemonic that can be used to create a new cryptocurrency wallet. The mnemonic is a randomly generated sequence of words that can be used to generate a hierarchical deterministic wallet, allowing for easy backup and recovery of the wallet.
Parameters
This function does not take any parameters.
Response
Field | Data Type | Description |
---|---|---|
| number | Indicates whether the function was successful or not. A value of 1 indicates success, while a value of 0 indicates failure. |
| string | If the code is 1, then this field contains the generated mnemonic. If the code is 0, then this field will be empty. |
| string | If the code is 0, then this field contains the error message. If the code is 1, then this field will be empty. |
Example Request and Response
Prerequisites
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Next, install tiny-secp256k1
npm package in order to create a new wallet:
Request
Here is an example of how to make a createWallet
request using the Nest SDK:
Response
Use Cases
Cryptocurrency Wallets: This function can be used by cryptocurrency wallets to generate a new wallet and associated mnemonic for the user.
Blockchain Development: This function can be used by developers building blockchain applications to generate new wallets for testing and development purposes.
Last updated