🔗btc
Description
The getKeys
function generates a Bitcoin wallet address and its corresponding private key based on a given mnemonic phrase and environment (mainnet or testnet).
Parameters
mnemonic
string
The mnemonic phrase used to generate the wallet
env
string
The environment (mainnet or testnet) used to generate the wallet
Response
code
number
1 if successful, 0 if there was an error
result
object
An object containing the Bitcoin private key and address if code is 1, otherwise an error message
result.privateKey
string
The private key of the generated wallet
result.address
string
The Bitcoin address of the generated wallet
error
string
The error message if code is 0
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:
Request
Here is an example of how to make a getKeys
request using the Nest SDK:
Response
Use Cases
Bitcoin Wallet: This function can be used by a cryptocurrency wallet provider to generate a Bitcoin wallet for a user based on their mnemonic phrase and the desired environment.
Online Merchants: This function can be used by an online merchant to generate a Bitcoin address for receiving payments from customers on the mainnet or testnet.
Last updated