// write a memo post to the blockchain
if (typeof web4bch !== 'undefined') {
web4bch = new Web4Bch(web4bch.currentProvider)
var txParams = {
to: "bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g",
from: web4bch.bch.defaultAccount,
value: "1000",
opReturn: {
data: ["0x6d02", "Hello BITBOX"]
}
}
web4bch.bch.sendTransaction(txParams, (err, txid) => {
if (err) {
console.log('send err', err)
} else {
console.log('send success, transaction id:', txid)
}
})
}