⛏️fetchWalletFromPrivateKey
Description
The fetchWalletfromPrivateKey
function generates a key pair (public key and private key) from a given private key. It makes use of the CasperClient library and the Ed25519 algorithm to generate the key pair.
Parameters
Name | Type | Description |
---|---|---|
| string | The private key to be used to generate the key pair |
| string | The RPC API to be used by the CasperClient |
Response
Name | Type | Description |
---|---|---|
| object | An object containing the generated public key and private key as buffers |
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 fetchWalletfromPrivateKey
request using the Nest SDK:
Response
Use Cases
Crypto Wallets: The function can be used by crypto wallets to generate key pairs from private keys.
Blockchain Applications: The function can be used by blockchain applications to interact with the Casper network and sign transactions with generated key pairs.
Last updated