βοΈcreateWallet
Last updated
npm install tiny-secp256k1
or
yarn add tiny-secp256k1// import Nest SDK
import { Wallet } from 'nest25/wallet-lib';
import * as ecc from 'tiny-secp256k1';
// Create a new instance of the Wallet class
const wallet = new Wallet(ecc); // Wallet class has 2 params: one is for ecc and the second one for environment (testnet , mainnet). By default, the value is set to testnet
const main = async () => {
// Create a new wallet
const response = await wallet.createWallet();
// Log the response
console.log('Response: ', response);
};
main();{
code: 1,
result: 'forest almost like horn board swamp wish wedding rough number live when'
}