🔗near
Last updated
Last updated
The getKeys
function is an asynchronous function that generates a new key pair and creates a new account on the NEAR blockchain.
Parameter | Data Type | Description |
---|---|---|
Field | Data Type | Description |
---|---|---|
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:
Here is an example of how to make a getKeys
request using the Nest SDK:
Crypto Wallet: Crypto wallets can use this function to generate private keys and corresponding public addresses for their users.
Testing: Blockchain developers can use this function to generate private keys and addresses for testing and development purposes.
mnemonic
string
The mnemonic phrase used to generate the key pair for the new account.
accountId
string
The desired account name for the new account.
code
number
A status code indicating the result of the operation. 1 for success, 0 for error.
result
object
An object containing the generated public and private keys for the new account.
result.publicKey
string
The generated public key for the new account.
result.privateKey
string
The generated private key for the new account.