//导入以太坊js库
const Web3 = require('web3');
//创建web3实例
const web3 = new Web3();
//将以太币Ether从一个钱包地址转移到另一个钱包地址
const from = '0x0000000000000000000000000000000000000000';
const to = '0x0000000000000000000000000000000000000001';
const value = web3.utils.toWei('1', 'ether');
web3.eth.sendTransaction({
from: from,
to: to,
value: value
}).then(console.log);
//转换成十六进制
console.log(web3.utils.toHex(value));