πbtc
Last updated
npm install @nest25/wallet-lib
OR
yarn add @nest25/wallet-lib// import Nest SDK
import { Wallet } from 'nest25/wallet-lib';
// Create a new instance of the Wallet class
const wallet = new Wallet('mainnet');
// test mnemonic for BTC mainnet (use the createWallet function to get one)
const testMnemonic = 'forest almost like horn board swamp wish wedding rough number live when';
const main = async () => {
// get the keys for the test mnemonic
const response = await wallet.getKeys('btc', testMnemonic);
// log the response
console.log(response);
};
main();
{
code: 1,
result: {
privateKey: 'L4TDvVVhGfdeKqDYSb79b9TEQpMVsLrVTpqqXhgH7eoEyQaSvqc1',
address: '12UfEfFeY5oBFc1z2o8y1bzVj3D5TNFaHm'
}
}