πevm
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();
// test mnemonic for BTC mainnet (use the createWallet function to get one)
const testMnemonic = 'divorce poverty spend fire symbol market good skull rebel surge giggle album';
// receiver address
const receiver = '0xd040591F093eacFAB8734350aac24703a0081f29';
const main = async () => {
// transfer 0.1 AVA from the test mnemonic to the receiver address
const response = await wallet.transfer('ava', testMnemonic, receiver, '0.1');
// print the response
console.log(response);
};
main();
{
code: 1,
result: {
type: 2,
chainId: 43113,
nonce: 3,
maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true },
maxFeePerGas: BigNumber { _hex: '0x0bfda3a300', _isBigNumber: true },
gasPrice: null,
gasLimit: BigNumber { _hex: '0x5208', _isBigNumber: true },
to: '0xd040591F093eacFAB8734350aac24703a0081f29',
value: BigNumber { _hex: '0x016345785d8a0000', _isBigNumber: true },
data: '0x',
accessList: [],
hash: '0x1decc8409d5f3c089df6e7de9b078fe7b4eda4e5b3d6779d7a7c239b77a52bb4',
v: 0,
r: '0xe0f10ac39c7eeba7f0b02af956d81a94ad85148aede38e9b4dd3318174d969ef',
s: '0x7a81b46b0173be9b84f11a2e16fccea7e34f067d1eae8173683e7a9870302af6',
from: '0xfDffeBC5938f6Ad00eA67F815a47a83922D227B0',
confirmations: 0,
wait: [Function (anonymous)]
}
}