πnear
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();
const testMnemonic = 'divorce poverty spend fire symbol market good skull rebel surge giggle album';
// receiver address
const receiver = '0xd040591F093eacFAB8734350aac24703a0081f29';
const main = async () => {
// transfer 10000 yactoNEAR from the test mnemonic to the receiver address
const response = await wallet.transfer('btc',testMnemonic,receiver,'10000');
// print the response
console.log(response);
};
main(); {
code: 1,
result: '5oWsXKXkTYxWUeBtyhaC6xxx7ZNRXW5qq1PJpbas1y4zQqgD9mxPGBF2zCeUkVHornFDo63hriUdVGuPp49u5Tvy'
}