Kickstart your Ravencoin development with RPC calls by using this tutorial. Full code for the script ********************************************* const { getRPC, methods } = require("@ravenrebels/ravencoin-rpc"); const rpc = getRPC("dauser", "dapassword", "http://localhost:8888"); async function work(){ const partyAnimalAddy = "mjSvdHgxTNaUJFj2isVGf7XwvWuadA5QJc"; const args = [partyAnimalAddy, 100000]; const a = await rpc(methods.sendtoaddress, args) console.log(a); const ugly = await rpc(methods.getassetdata, ["UGLY"]); const mempool = await rpc(methods.getrawmempool, []); console.log("UGLY", ugly); console.log("MEMPOOL", mempool); const transaction = await rpc(methods.getrawtransaction, [mempool[0], true]) const json = JSON.stringify(transaction, null, 4); console.log(json); } work(); ********************************************* #Ravencoin #Blockchain
Kickstart your Ravencoin development with RPC calls by using this tutorial. Full code for the script ********************************************* const { getRPC, methods } = require("@ravenrebels/ravencoin-rpc"); const rpc = getRPC("dauser", "dapassword", "http://localhost:8888"); async function work(){ const partyAnimalAddy = "mjSvdHgxTNaUJFj2isVGf7XwvWuadA5QJc"; const args = [partyAnimalAddy, 100000]; const a = await rpc(methods.sendtoaddress, args) console.log(a); const ugly = await rpc(methods.getassetdata, ["UGLY"]); const mempool = await rpc(methods.getrawmempool, []); console.log("UGLY", ugly); console.log("MEMPOOL", mempool); const transaction = await rpc(methods.getrawtransaction, [mempool[0], true]) const json = JSON.stringify(transaction, null, 4); console.log(json); } work(); ********************************************* #Ravencoin #Blockchain