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ts","docs.ts"],"sourcesContent":["import { methods } from \"./docs\";\n\nexport { methods };\nfunction throwSyntaxError() {\n throw new Error(\"Syntax error, call getRPC with (username, password, URL)\");\n}\n\nexport function getRPC(username: string, password: string, URL: string) {\n if (!username) {\n throwSyntaxError();\n }\n if (!password) {\n throwSyntaxError();\n }\n if (!URL) {\n throwSyntaxError();\n }\n\n return async function rpc(method: string, params: any[]) {\n const promise = new Promise((resolutionFunc, rejectionFunc) => {\n const data = {\n jsonrpc: \"2.0\",\n id: Math.random(),\n method,\n params,\n };\n\n try {\n const rpcResponse = postData(URL, data, username, password);\n\n rpcResponse\n .then(async (response) => {\n /*\n This means that we got a response.\n The response can still be an error/problem but the server responded\n\n */\n\n if (response.ok) {\n //Happy flow\n const obj = await response.json(); //Convert to JSON\n resolutionFunc(obj.result);\n } else if (response.status !== 200) {\n //OK something is wrong\n let obj = {\n error: null,\n description: null,\n };\n try {\n obj = await response.json();\n } catch (e) {}\n const myError = {\n statusText: response.statusText,\n status: response.status,\n description: obj.description,\n error: obj.error,\n };\n\n rejectionFunc(myError);\n }\n })\n .catch((e) => {\n rejectionFunc({\n originalError: e,\n type: \"ServerUnreachable\",\n error: \"Could not communicate with Raven core node\",\n description:\n \"Are you sure that the URL is correct? The URL is usually mainnet = http://127.0.0.1:8766 and testnet = http://127.0.0.1:18766\",\n });\n });\n } catch (e) {\n rejectionFunc(e.response);\n }\n });\n return promise;\n };\n}\nfunction getValidMethods() {\n const keys = Object.keys(methods).sort();\n return keys.join(\" \");\n}\n// Example POST method implementation:\nasync function postData(\n url = \"\",\n data = {},\n username: string,\n password: string\n) {\n let base64Credentials = \"\";\n\n //btoa or Buffer, depends if we are in Node.js or in the browser\n if (typeof btoa === \"function\") {\n base64Credentials = btoa(`${username}:${password}`);\n } else if (Buffer) {\n base64Credentials = Buffer.from(`${username}:${password}`).toString(\n \"base64\"\n );\n }\n\n // Default options are marked with *\n const response = await fetch(url, {\n method: \"POST\", // *GET, POST, PUT, DELETE, etc.\n mode: \"cors\", // no-cors, *cors, same-origin\n headers: {\n Authorization: \"Basic \" + base64Credentials,\n \"Content-Type\": \"application/json\",\n\n // 'Content-Type': 'application/x-www-form-urlencoded',\n },\n redirect: \"follow\", // manual, *follow, error\n referrerPolicy: \"no-referrer\", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url\n body: JSON.stringify(data), // body data type must match \"Content-Type\" header\n });\n return response;\n}\n\n/*\nexport const methods = {\n \"getaddressbalance\": \"getaddressbalance\",\n \"getaddressdeltas\": \"getaddressdeltas\",\n \"getaddressmempool\": \"getaddressmempool\",\n \"getaddresstxids\": \"getaddresstxids\",\n \"getaddressutxos\": \"getaddressutxos\",\n \"getassetdata\": \"getassetdata\",\n \"getcacheinfo\": \"getcacheinfo\",\n \"getsnapshot\": \"getsnapshot\",\n \"issue\": \"issue\",\n \"issueunique\": \"issueunique\",\n \"listaddressesbyasset\": \"listaddressesbyasset\",\n \"listassetbalancesbyaddress\": \"listassetbalancesbyaddress\",\n \"listassets\": \"listassets\",\n \"listmyassets\": \"listmyassets\",\n \"purgesnapshot\": \"purgesnapshot\",\n \"reissue\": \"reissue\",\n \"transfer\": \"transfer\",\n \"transferfromaddress\": \"transferfromaddress\",\n \"transferfromaddresses\": \"transferfromaddresses\",\n \"clearmempool\": \"clearmempool\",\n \"decodeblock\": \"decodeblock\",\n \"getbestblockhash\": \"getbestblockhash\",\n \"getblock\": \"getblock\",\n \"getblockchaininfo\": \"getblockchaininfo\",\n \"getblockcount\": \"getblockcount\",\n \"getblockhash\": \"getblockhash\",\n \"getblockhashes\": \"getblockhashes\",\n \"getblockheader\": \"getblockheader\",\n \"getchaintips\": \"getchaintips\",\n \"getchaintxstats\": \"getchaintxstats\",\n \"getdifficulty\": \"getdifficulty\",\n \"getmempoolancestors\": \"getmempoolancestors\",\n \"getmempooldescendants\": \"getmempooldescendants\",\n \"getmempoolentry\": \"getmempoolentry\",\n \"getmempoolinfo\": \"getmempoolinfo\",\n \"getrawmempool\": \"getrawmempool\",\n \"getspentinfo\": \"getspentinfo\",\n \"gettxout\": \"gettxout\",\n \"gettxoutproof\": \"gettxoutproof\",\n \"gettxoutsetinfo\": \"gettxoutsetinfo\",\n \"preciousblock\": \"preciousblock\",\n \"pruneblockchain\": \"pruneblockchain\",\n \"savemempool\": \"savemempool\",\n \"verifychain\": \"verifychain\",\n \"verifytxoutproof\": \"verifytxoutproof\",\n \"getinfo\": \"getinfo\",\n \"getmemoryinfo\": \"getmemoryinfo\",\n \"getrpcinfo\": \"getrpcinfo\",\n \"help\": \"help\",\n \"stop\": \"stop\",\n \"uptime\": \"uptime\",\n \"generate\": \"generate\",\n \"generatetoaddress\": \"generatetoaddress\",\n \"getgenerate\": \"getgenerate\",\n \"setgenerate\": \"setgenerate\",\n \"clearmessages\": \"clearmessages\",\n \"sendmessage\": \"sendmessage\",\n \"subscribetochannel\": \"subscribetochannel\",\n \"unsubscribefromchannel\": \"unsubscribefromchannel\",\n \"viewallmessagechannels\": \"viewallmessagechannels\",\n \"viewallmessages\": \"viewallmessages\",\n \"getblocktemplate\": \"getblocktemplate\",\n \"getkawpowhash\": \"getkawpowhash\",\n \"getmininginfo\": \"getmininginfo\",\n \"getnetworkhashps\": \"getnetworkhashps\",\n \"pprpcsb\": \"pprpcsb\",\n \"prioritisetransaction\": \"prioritisetransaction\",\n \"submitblock\": \"submitblock\",\n \"addnode\": \"addnode\",\n \"clearbanned\": \"clearbanned\",\n \"disconnectnode\": \"disconnectnode\",\n \"getaddednodeinfo\": \"getaddednodeinfo\",\n \"getconnectioncount\": \"getconnectioncount\",\n \"getnettotals\": \"getnettotals\",\n \"getnetworkinfo\": \"getnetworkinfo\",\n \"getpeerinfo\": \"getpeerinfo\",\n \"listbanned\": \"listbanned\",\n \"ping\": \"ping\",\n \"setban\": \"setban\",\n \"setnetworkactive\": \"setnetworkactive\",\n \"combinerawtransaction\": \"combinerawtransaction\",\n \"createrawtransaction\": \"createrawtransaction\",\n \"decoderawtransaction\": \"decoderawtransaction\",\n \"decodescript\": \"decodescript\",\n \"fundrawtransaction\": \"fundrawtransaction\",\n \"getrawtransaction\": \"getrawtransaction\",\n \"sendrawtransaction\": \"sendrawtransaction\",\n \"signrawtransaction\": \"signrawtransaction\",\n \"testmempoolaccept\": \"testmempoolaccept\",\n \"addtagtoaddress\": \"addtagtoaddress\",\n \"checkaddressrestriction\": \"checkaddressrestriction\",\n \"checkaddresstag\": \"checkaddresstag\",\n \"checkglobalrestriction\": \"checkglobalrestriction\",\n \"freezeaddress\": \"freezeaddress\",\n \"freezerestrictedasset\": \"freezerestrictedasset\",\n \"getverifierstring\": \"getverifierstring\",\n \"issuequalifierasset\": \"issuequalifierasset\",\n \"issuerestrictedasset\": \"issuerestrictedasset\",\n \"isvalidverifierstring\": \"isvalidverifierstring\",\n \"listaddressesfortag\": \"listaddressesfortag\",\n \"listaddressrestrictions\": \"listaddressrestrictions\",\n \"listglobalrestrictions\": \"listglobalrestrictions\",\n \"listtagsforaddress\": \"listtagsforaddress\",\n \"reissuerestrictedasset\": \"reissuerestrictedasset\",\n \"removetagfromaddress\": \"removetagfromaddress\",\n \"transferqualifier\": \"transferqualifier\",\n \"unfreezeaddress\": \"unfreezeaddress\",\n \"unfreezerestrictedasset\": \"unfreezerestrictedasset\",\n \"viewmyrestrictedaddresses\": \"viewmyrestrictedaddresses\",\n \"viewmytaggedaddresses\": \"viewmytaggedaddresses\",\n \"cancelsnapshotrequest\": \"cancelsnapshotrequest\",\n \"distributereward\": \"distributereward\",\n \"getdistributestatus\": \"getdistributestatus\",\n \"getsnapshotrequest\": \"getsnapshotrequest\",\n \"listsnapshotrequests\": \"listsnapshotrequests\",\n \"requestsnapshot\": \"requestsnapshot\",\n \"createmultisig\": \"createmultisig\",\n \"estimatefee\": \"estimatefee\",\n \"estimatesmartfee\": \"estimatesmartfee\",\n \"signmessagewithprivkey\": \"signmessagewithprivkey\",\n \"validateaddress\": \"validateaddress\",\n \"verifymessage\": \"verifymessage\",\n \"abandontransaction\": \"abandontransaction\",\n \"abortrescan\": \"abortrescan\",\n \"addmultisigaddress\": \"addmultisigaddress\",\n \"addwitnessaddress\": \"addwitnessaddress\",\n \"backupwallet\": \"backupwallet\",\n \"bumpfee\": \"bumpfee\",\n \"dumpprivkey\": \"dumpprivkey\",\n \"dumpwallet\": \"dumpwallet\",\n \"encryptwallet\": \"encryptwallet\",\n \"getaccount\": \"getaccount\",\n \"getaccountaddress\": \"getaccountaddress\",\n \"getaddressesbyaccount\": \"getaddressesbyaccount\",\n \"getbalance\": \"getbalance\",\n \"getmasterkeyinfo\": \"getmasterkeyinfo\",\n \"getmywords\": \"getmywords\",\n \"getnewaddress\": \"getnewaddress\",\n \"getrawchangeaddress\": \"getrawchangeaddress\",\n \"getreceivedbyaccount\": \"getreceivedbyaccount\",\n \"getreceivedbyaddress\": \"getreceivedbyaddress\",\n \"gettransaction\": \"gettransaction\",\n \"getunconfirmedbalance\": \"getunconfirmedbalance\",\n \"getwalletinfo\": \"getwalletinfo\",\n \"importaddress\": \"importaddress\",\n \"importmulti\": \"importmulti\",\n \"importprivkey\": \"importprivkey\",\n \"importprunedfunds\": \"importprunedfunds\",\n \"importpubkey\": \"importpubkey\",\n \"importwallet\": \"importwallet\",\n \"keypoolrefill\": \"keypoolrefill\",\n \"listaccounts\": \"listaccounts\",\n \"listaddressgroupings\": \"listaddressgroupings\",\n \"listlockunspent\": \"listlockunspent\",\n \"listreceivedbyaccount\": \"listreceivedbyaccount\",\n \"listreceivedbyaddress\": \"listreceivedbyaddress\",\n \"listsinceblock\": \"listsinceblock\",\n \"listtransactions\": \"listtransactions\",\n \"listunspent\": \"listunspent\",\n \"listwallets\": \"listwallets\",\n \"lockunspent\": \"lockunspent\",\n \"move\": \"move\",\n \"removeprunedfunds\": \"removeprunedfunds\",\n \"rescanblockchain\": \"rescanblockchain\",\n \"sendfrom\": \"sendfrom\",\n \"sendfromaddress\": \"sendfromaddress\",\n \"sendmany\": \"sendmany\",\n \"sendtoaddress\": \"sendtoaddress\",\n \"setaccount\": \"setaccount\",\n \"settxfee\": \"settxfee\",\n \"signmessage\": \"signmessage\"\n}*/\n","interface IMethods {\n abandontransaction: string;\n abortrescan: string;\n addmultisigaddress: string;\n addnode: string;\n addtagtoaddress: string;\n addwitnessaddress: string;\n backupwallet: string;\n bumpfee: string;\n cancelsnapshotrequest: string;\n checkaddressrestriction: string;\n checkaddresstag: string;\n checkglobalrestriction: string;\n clearbanned: string;\n clearmempool: string;\n clearmessages: string;\n combinerawtransaction: string;\n createmultisig: string;\n createrawtransaction: string;\n decodeblock: string;\n decoderawtransaction: string;\n decodescript: string;\n disconnectnode: string;\n distributereward: string;\n dumpprivkey: string;\n dumpwallet: string;\n encryptwallet: string;\n estimatefee: string;\n estimatesmartfee: string;\n freezeaddress: string;\n freezerestrictedasset: string;\n fundrawtransaction: string;\n generate: string;\n generatetoaddress: string;\n getaccount: string;\n getaccountaddress: string;\n getaddednodeinfo: string;\n getaddressbalance: string;\n getaddressdeltas: string;\n getaddressesbyaccount: string;\n getaddressmempool: string;\n getaddresstxids: string;\n getaddressutxos: string;\n getassetdata: string;\n getbalance: string;\n getbestblockhash: string;\n getblock: string;\n getblockchaininfo: string;\n getblockcount: string;\n getblockhash: string;\n getblockhashes: string;\n getblockheader: string;\n getblocktemplate: string;\n getcacheinfo: string;\n getchaintips: string;\n getchaintxstats: string;\n getconnectioncount: string;\n getdifficulty: string;\n getdistributestatus: string;\n getgenerate: string;\n getinfo: string;\n getkawpowhash: string;\n getmasterkeyinfo: string;\n getmemoryinfo: string;\n getmempoolancestors: string;\n getmempooldescendants: string;\n getmempoolentry: string;\n getmempoolinfo: string;\n getmininginfo: string;\n getmywords: string;\n getnettotals: string;\n getnetworkhashps: string;\n getnetworkinfo: string;\n getnewaddress: string;\n getpeerinfo: string;\n getrawchangeaddress: string;\n getrawmempool: string;\n getrawtransaction: string;\n getreceivedbyaccount: string;\n getreceivedbyaddress: string;\n getrpcinfo: string;\n getsnapshot: string;\n getsnapshotrequest: string;\n getspentinfo: string;\n gettransaction: string;\n gettxout: string;\n gettxoutproof: string;\n gettxoutsetinfo: string;\n getunconfirmedbalance: string;\n getverifierstring: string;\n getwalletinfo: string;\n help: string;\n importaddress: string;\n importmulti: string;\n importprivkey: string;\n importprunedfunds: string;\n importpubkey: string;\n importwallet: string;\n issue: string;\n issuequalifierasset: string;\n issuerestrictedasset: string;\n issueunique: string;\n isvalidverifierstring: string;\n keypoolrefill: string;\n listaccounts: string;\n listaddressesbyasset: string;\n listaddressesfortag: string;\n listaddressgroupings: string;\n listaddressrestrictions: string;\n listassetbalancesbyaddress: string;\n listassets: string;\n listbanned: string;\n listglobalrestrictions: string;\n listlockunspent: string;\n listmyassets: string;\n listreceivedbyaccount: string;\n listreceivedbyaddress: string;\n listsinceblock: string;\n listsnapshotrequests: string;\n listtagsforaddress: string;\n listtransactions: string;\n listunspent: string;\n listwallets: string;\n lockunspent: string;\n move: string;\n ping: string;\n pprpcsb: string;\n preciousblock: string;\n prioritisetransaction: string;\n pruneblockchain: string;\n purgesnapshot: string;\n reissue: string;\n reissuerestrictedasset: string;\n removeprunedfunds: string;\n removetagfromaddress: string;\n requestsnapshot: string;\n rescanblockchain: string;\n savemempool: string;\n sendfrom: string;\n sendfromaddress: string;\n sendmany: string;\n sendmessage: string;\n sendrawtransaction: string;\n sendtoaddress: string;\n setaccount: string;\n setban: string;\n setgenerate: string;\n setnetworkactive: string;\n settxfee: string;\n signmessage: string;\n signmessagewithprivkey: string;\n signrawtransaction: string;\n stop: string;\n submitblock: string;\n subscribetochannel: string;\n testmempoolaccept: string;\n transfer: string;\n transferfromaddress: string;\n transferfromaddresses: string;\n transferqualifier: string;\n unfreezeaddress: string;\n unfreezerestrictedasset: string;\n unsubscribefromchannel: string;\n uptime: string;\n validateaddress: string;\n verifychain: string;\n verifymessage: string;\n verifytxoutproof: string;\n viewallmessagechannels: string;\n viewallmessages: string;\n viewmyrestrictedaddresses: string;\n viewmytaggedaddresses: string;\n}\n\nexport const methods: IMethods = {\n /** abandontransaction \"txid\"\n\nMark in-wallet transaction <txid> as abandoned\nThis will mark this transaction and all its in-wallet descendants as abandoned which will allow\nfor their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions.\nIt only works on transactions which are not included in a block and are not currently in the mempool.\nIt has no effect on transactions which are already conflicted or abandoned.\n\nArguments:\n1. \"txid\" (string, required) The transaction id\n\nResult:\n\nExamples:\n> raven-cli abandontransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"abandontransaction\", \"params\": [\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n abandontransaction: \"abandontransaction\",\n\n /** abortrescan\n\nStops current wallet rescan triggered e.g. by an importprivkey call.\n\nExamples:\n\nImport a private key\n> raven-cli importprivkey \"mykey\"\n\nAbort the running wallet rescan\n> raven-cli abortrescan \n\nAs a JSON-RPC call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"abortrescan\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n abortrescan: \"abortrescan\",\n\n /** addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n\nAdd a nrequired-to-sign multisignature address to the wallet.\nEach key is a Raven address or hex-encoded public key.\nIf 'account' is specified (DEPRECATED), assign address to that account.\n\nArguments:\n1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n2. \"keys\" (string, required) A json array of raven addresses or hex-encoded public keys\n [\n \"address\" (string) raven address or hex-encoded public key\n ...,\n ]\n3. \"account\" (string, optional) DEPRECATED. An account to assign the addresses to.\n\nResult:\n\"address\" (string) A raven address associated with the keys.\n\nExamples:\n\nAdd a multisig address from 2 addresses\n> raven-cli addmultisigaddress 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"\n\nAs json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addmultisigaddress\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n addmultisigaddress: \"addmultisigaddress\",\n\n /** addnode \"node\" \"add|remove|onetry\"\n\nAttempts to add or remove a node from the addnode list.\nOr try a connection to a node once.\nNodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be\nfull nodes/support SegWit as other outbound peers are (though such peers will not be synced from).\n\nArguments:\n1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n\nExamples:\n> raven-cli addnode \"192.168.0.6:8767\" \"onetry\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addnode\", \"params\": [\"192.168.0.6:8767\", \"onetry\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n addnode: \"addnode\",\n\n /** addtagtoaddress tag_name to_address (change_address) (asset_data)\n\nAssign a tag to a address\n\nArguments:\n1. \"tag_name\" (string, required) the name of the tag you are assigning to the address, if it doens't have '#' at the front it will be added\n2. \"to_address\" (string, required) the address that will be assigned the tag\n3. \"change_address\" (string, optional) The change address for the qualifier token to be sent to\n4. \"asset_data\" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the qualifier token\n\nResult:\n\"txid\" (string) The transaction id\n\nExamples:\n> raven-cli addtagtoaddress \"#TAG\" \"to_address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addtagtoaddress\", \"params\": [\"#TAG\" \"to_address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n> raven-cli addtagtoaddress \"#TAG\" \"to_address\" \"change_address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addtagtoaddress\", \"params\": [\"#TAG\" \"to_address\" \"change_address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n addtagtoaddress: \"addtagtoaddress\",\n\n /** addwitnessaddress \"address\"\n\nAdd a witness address for a script (with pubkey or redeemscript known).\nIt returns the witness script.\n\nArguments:\n1. \"address\" (string, required) An address known to the wallet\n\nResult:\n\"witnessaddress\", (string) The value of the new address (P2SH of witness script).\n}\n**/\n addwitnessaddress: \"addwitnessaddress\",\n\n /** backupwallet \"destination\"\n\nSafely copies current wallet file to destination, which can be a directory or a path with filename.\n\nArguments:\n1. \"destination\" (string) The destination directory or file\n\nExamples:\n> raven-cli backupwallet \"backup.dat\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"backupwallet\", \"params\": [\"backup.dat\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n backupwallet: \"backupwallet\",\n\n /** bumpfee has been deprecated on the RVN Wallet.**/\n bumpfee: \"bumpfee\",\n\n /** cancelsnapshotrequest \"asset_name\" block_height\n\nCancels the specified snapshot request.\n\nArguments:\n1. \"asset_name\" (string, required) The asset name for which the snapshot will be taken\n2. \"block_height\" (number, required) The block height at which the snapshot will be take\n\nResult:\n{\n request_status: (string),\n}\n\nExamples:\n> raven-cli cancelsnapshotrequest \"TRONCO\" 12345\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"cancelsnapshotrequest\", \"params\": [\"PHATSTACKS\" 34987] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n cancelsnapshotrequest: \"cancelsnapshotrequest\",\n\n /** checkaddressrestriction address restricted_name\n\nChecks to see if an address has been frozen by the given restricted asset\n\nArguments:\n1. \"address\" (string, required) the RVN address to search\n1. \"restricted_name\" (string, required) the restricted asset to search\n\nResult:\n\"true/false\", (boolean) If the address is frozen\n\nExamples:\n> raven-cli checkaddressrestriction \"address\" \"restricted_name\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"checkaddressrestriction\", \"params\": [\"address\" \"restricted_name\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n checkaddressrestriction: \"checkaddressrestriction\",\n\n /** checkaddresstag address tag_name\n\nChecks to see if an address has the given tag\n\nArguments:\n1. \"address\" (string, required) the RVN address to search\n1. \"tag_name\" (string, required) the tag to search\n\nResult:\n\"true/false\", (boolean) If the address has the tag\n\nExamples:\n> raven-cli checkaddresstag \"address\" \"tag_name\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"checkaddresstag\", \"params\": [\"address\" \"tag_name\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n checkaddresstag: \"checkaddresstag\",\n\n /** checkglobalrestriction restricted_name\n\nChecks to see if a restricted asset is globally frozen\n\nArguments:\n1. \"restricted_name\" (string, required) the restricted asset to search\n\nResult:\n\"true/false\", (boolean) If the restricted asset is frozen globally\n\nExamples:\n> raven-cli checkglobalrestriction \"restricted_name\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"checkglobalrestriction\", \"params\": [\"restricted_name\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n checkglobalrestriction: \"checkglobalrestriction\",\n\n /** clearbanned\n\nClear all banned IPs.\n\nExamples:\n> raven-cli clearbanned \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"clearbanned\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n clearbanned: \"clearbanned\",\n\n /** clearmempool\n\nRemoves all transaction from the mempool\n\nExamples:\n> raven-cli clearmempool \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"clearmempool\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n clearmempool: \"clearmempool\",\n\n /** clearmessages \n\nDelete current database of messages\n\nResult:[\n\n]\n\nExamples:\n> raven-cli clearmessages \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"clearmessages\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n clearmessages: \"clearmessages\",\n\n /** combinerawtransaction [\"hexstring\",...]\n\nCombine multiple partially signed transactions into one transaction.\nThe combined transaction may be another partially signed transaction or a \nfully signed transaction.\nArguments:\n1. \"txs\" (string) A json array of hex strings of partially signed transactions\n [\n \"hexstring\" (string) A transaction hash\n ,...\n ]\n\nResult:\n\"hex\" (string) The hex-encoded raw transaction with signature(s)\n\nExamples:\n> raven-cli combinerawtransaction [\"myhex1\", \"myhex2\", \"myhex3\"]\n**/\n combinerawtransaction: \"combinerawtransaction\",\n\n /** createmultisig nrequired [\"key\",...]\n\nCreates a multi-signature address with n signature of m keys required.\nIt returns a json object with the address and redeemScript.\n\nArguments:\n1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n2. \"keys\" (string, required) A json array of keys which are raven addresses or hex-encoded public keys\n [\n \"key\" (string) raven address or hex-encoded public key\n ,...\n ]\n\nResult:\n{\n \"address\":\"multisigaddress\", (string) The value of the new multisig address.\n \"redeemScript\":\"script\" (string) The string value of the hex-encoded redemption script.\n}\n\nExamples:\n\nCreate a multisig address from 2 addresses\n> raven-cli createmultisig 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createmultisig\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n**/\n createmultisig: \"createmultisig\",\n\n /** createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":(amount or object),\"data\":\"hex\",...}\n ( locktime ) ( replaceable )\n\nCreate a transaction spending the given inputs and creating new outputs.\nOutputs are addresses (paired with a RVN amount, data or object specifying an asset operation) or data.\nReturns hex-encoded raw transaction.\nNote that the transaction's inputs are not signed, and\nit is not stored in the wallet or transmitted to the network.\n\nPaying for Asset Operations:\n Some operations require an amount of RVN to be sent to a burn address:\n\n Operation Amount + Burn Address\n transfer 0\n transferwithmessage 0\n issue 500 to RXissueAssetXXXXXXXXXXXXXXXXXhhZGt\n issue (subasset) 100 to RXissueSubAssetXXXXXXXXXXXXXWcwhwL\n issue_unique 5 to RXissueUniqueAssetXXXXXXXXXXWEAe58\n reissue 100 to RXReissueAssetXXXXXXXXXXXXXXVEFAWu\n issue_restricted 1500 to RXissueRestrictedXXXXXXXXXXXXzJZ1q\n reissue_restricted 100 to RXReissueAssetXXXXXXXXXXXXXXVEFAWu\n issue_qualifier 1000 to RXissueQuaLifierXXXXXXXXXXXXUgEDbC\n issue_qualifier (sub) 100 to RXissueSubQuaLifierXXXXXXXXXVTzvv5\n tag_addresses 0.1 to RXaddTagBurnXXXXXXXXXXXXXXXXZQm5ya (per address)\n untag_addresses 0.1 to RXaddTagBurnXXXXXXXXXXXXXXXXZQm5ya (per address)\n freeze_addresses 0\n unfreeze_addresses 0\n freeze_asset 0\n unfreeze_asset 0\n\nAssets For Authorization:\n These operations require a specific asset input for authorization:\n Root Owner Token:\n reissue\n issue_unique\n issue_restricted\n reissue_restricted\n freeze_addresses\n unfreeze_addresses\n freeze_asset\n unfreeze_asset\n Root Qualifier Token:\n issue_qualifier (when issuing subqualifier)\n Qualifier Token:\n tag_addresses\n untag_addresses\n\nOutput Ordering:\n Asset operations require the following:\n 1) All coin outputs come first (including the burn output).\n 2) The owner token change output comes next (if required).\n 3) An issue, reissue, or any number of transfers comes last\n (different types can't be mixed in a single transaction).\n\nArguments:\n1. \"inputs\" (array, required) A json array of json objects\n [\n {\n \"txid\":\"id\", (string, required) The transaction id\n \"vout\":n, (number, required) The output number\n \"sequence\":n (number, optional) The sequence number\n } \n ,...\n ]\n2. \"outputs\" (object, required) a json object with outputs\n {\n \"address\": (string, required) The destination raven address.\n Each output must have a different address.\n x.xxx (number or string, required) The RVN amount\n or\n { (object) A json object of assets to send\n \"transfer\":\n {\n \"asset-name\": (string, required) asset name\n asset-quantity (number, required) the number of raw units to transfer\n ,...\n }\n }\n or\n { (object) A json object of describing the transfer and message contents to send\n \"transferwithmessage\":\n {\n \"asset-name\": (string, required) asset name\n asset-quantity, (number, required) the number of raw units to transfer\n \"message\":\"hash\", (string, required) ipfs hash or a txid hash\n \"expire_time\": n (number, required) utc time in seconds to expire the message\n }\n }\n or\n { (object) A json object describing new assets to issue\n \"issue\":\n {\n \"asset_name\":\"asset-name\", (string, required) new asset name\n \"asset_quantity\":n, (number, required) the number of raw units to issue\n \"units\":[1-8], (number, required) display units, between 1 (integral) to 8 (max precision)\n \"reissuable\":[0-1], (number, required) 1=reissuable asset\n \"has_ipfs\":[0-1], (number, required) 1=passing ipfs_hash\n \"ipfs_hash\":\"hash\" (string, optional) an ipfs hash for discovering asset metadata\n }\n }\n or\n { (object) A json object describing new unique assets to issue\n \"issue_unique\":\n {\n \"root_name\":\"root-name\", (string, required) name of the asset the unique asset(s) \n are being issued under\n \"asset_tags\":[\"asset_tag\", ...], (array, required) the unique tag for each asset which is to be issued\n \"ipfs_hashes\":[\"hash\", ...], (array, optional) ipfs hashes corresponding to each supplied tag \n (should be same size as \"asset_tags\")\n }\n }\n or\n { (object) A json object describing follow-on asset issue.\n \"reissue\":\n {\n \"asset_name\":\"asset-name\", (string, required) name of asset to be reissued\n \"asset_quantity\":n, (number, required) the number of raw units to issue\n \"reissuable\":[0-1], (number, optional) default is 1, 1=reissuable asset\n \"ipfs_hash\":\"hash\", (string, optional) An ipfs hash for discovering asset metadata, \n Overrides the current ipfs hash if given\n \"owner_change_address\" (string, optional) the address where the owner token will be sent to. \n If not given, it will be sent to the output address\n }\n }\n or\n { (object) A json object describing how restricted asset to issue\n \"issue_restricted\":\n {\n \"asset_name\":\"asset-name\",(string, required) new asset name\n \"asset_quantity\":n, (number, required) the number of raw units to issue\n \"verifier_string\":\"text\", (string, required) the verifier string to be used for a restricted \n asset transfer verification\n \"units\":[0-8], (number, required) display units, between 0 (integral) and 8 (max precision)\n \"reissuable\":[0-1], (number, required) 1=reissuable asset\n \"has_ipfs\":[0-1], (number, required) 1=passing ipfs_hash\n \"ipfs_hash\":\"hash\", (string, optional) an ipfs hash for discovering asset metadata\n \"owner_change_address\" (string, optional) the address where the owner token will be sent to. \n If not given, it will be sent to the output address\n }\n }\n or\n { (object) A json object describing follow-on asset issue.\n \"reissue_restricted\":\n {\n \"asset_name\":\"asset-name\", (string, required) name of asset to be reissued\n \"asset_quantity\":n, (number, required) the number of raw units to issue\n \"reissuable\":[0-1], (number, optional) default is 1, 1=reissuable asset\n \"verifier_string\":\"text\", (string, optional) the verifier string to be used for a restricted asset \n transfer verification\n \"ipfs_hash\":\"hash\", (string, optional) An ipfs hash for discovering asset metadata, \n Overrides the current ipfs hash if given\n \"owner_change_address\" (string, optional) the address where the owner token will be sent to. \n If not given, it will be sent to the output address\n }\n }\n or\n { (object) A json object describing a new qualifier to issue.\n \"issue_qualifier\":\n {\n \"asset_name\":\"asset_name\", (string, required) a qualifier name (starts with '#')\n \"asset_quantity\":n, (numeric, optional, default=1) the number of units to be issued (1 to 10)\n \"has_ipfs\":[0-1], (boolean, optional, default=false), whether ifps hash is going \n to be added to the asset\n \"ipfs_hash\":\"hash\", (string, optional but required if has_ipfs = 1), an ipfs hash or a \n txid hash once RIP5 is activated\n \"root_change_address\" (string, optional) Only applies when issuing subqualifiers.\n The address where the root qualifier will be sent.\n If not specified, it will be sent to the output address.\n \"change_quantity\":\"qty\" (numeric, optional) the asset change amount (defaults to 1)\n }\n }\n or\n { (object) A json object describing addresses to be tagged.\n The address in the key will used as the asset change address.\n \"tag_addresses\":\n {\n \"qualifier\":\"qualifier\", (string, required) a qualifier name (starts with '#')\n \"addresses\":[\"addr\", ...], (array, required) the addresses to be tagged (up to 10)\n \"change_quantity\":\"qty\", (numeric, optional) the asset change amount (defaults to 1)\n }\n }\n or\n { (object) A json object describing addresses to be untagged.\n The address in the key will be used as the asset change address.\n \"untag_addresses\":\n {\n \"qualifier\":\"qualifier\", (string, required) a qualifier name (starts with '#')\n \"addresses\":[\"addr\", ...], (array, required) the addresses to be untagged (up to 10)\n \"change_quantity\":\"qty\", (numeric, optional) the asset change amount (defaults to 1)\n }\n }\n or\n { (object) A json object describing addresses to be frozen.\n The address in the key will used as the owner change address.\n \"freeze_addresses\":\n {\n \"asset_name\":\"asset_name\", (string, required) a restricted asset name (starts with '$')\n \"addresses\":[\"addr\", ...], (array, required) the addresses to be frozen (up to 10)\n }\n }\n or\n { (object) A json object describing addresses to be frozen.\n The address in the key will be used as the owner change address.\n \"unfreeze_addresses\":\n {\n \"asset_name\":\"asset_name\", (string, required) a restricted asset name (starts with '$')\n \"addresses\":[\"addr\", ...], (array, required) the addresses to be untagged (up to 10)\n }\n }\n or\n { (object) A json object describing an asset to be frozen.\n The address in the key will used as the owner change address.\n \"freeze_asset\":\n {\n \"asset_name\":\"asset_name\", (string, required) a restricted asset name (starts with '$')\n }\n }\n or\n { (object) A json object describing an asset to be frozen.\n The address in the key will be used as the owner change address.\n \"unfreeze_asset\":\n {\n \"asset_name\":\"asset_name\", (string, required) a restricted asset name (starts with '$')\n