hive.broadcast.transfer(wif, from, to, amount, memo, function(err, result) {
console.log(err, result)
})
// wif, from, to, amount, memo
// 转账私钥,发起转帐地址,转给谁, 金额, 备注
transfer("wif", "lemool", "lucky", "0.001 HBD", "You are awesome ! take some tokens")
eg:
async hiveTransfer(){
let from = "lemooljiang"
let to = "lucky"
let wif = "5KNxxxxxxxxxxxxxxxx"
// let ss = parseFloat(hivevalue).toFixed(3)
// let amount = ss+' HIVE'
let amount = "100.200 HIVE" //必须是3位小数且带上单位的格式,
let memo = "测试"
await hive.broadcast.transferAsync(wif, from, to, amount, memo)
}
Sort: Trending