@neuraiproject/neurai-rpc 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEPIN_EXAMPLES.md +271 -0
- package/README.md +49 -4
- package/depin.ts +294 -0
- package/dist/index.cjs +458 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +457 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +74 -1
- package/dist/types.d.ts.map +1 -1
- package/docs.json +13 -0
- package/docs.ts +399 -0
- package/index.ts +9 -0
- package/neurai_methods.md +4936 -0
- package/package.json +4 -4
- package/test-depin.ts +187 -0
- package/tsconfig.json +26 -0
- package/test-getpubkey.js +0 -149
package/docs.json
CHANGED
|
@@ -20,6 +20,19 @@
|
|
|
20
20
|
"transferfromaddress": "transferfromaddress \"asset_name\" \"from_address\" qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\n\nTransfer a quantity of an owned asset in a specific address to a given address\nArguments:\n1. \"asset_name\" (string, required) name of asset\n2. \"from_address\" (string, required) address that the asset will be transferred from\n3. \"qty\" (numeric, required) number of assets you want to send to the address\n4. \"to_address\" (string, required) address to send the asset to\n5. \"message\" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer\n6. \"expire_time\" (numeric, optional) UTC timestamp of when the message expires\n7. \"xna_change_address\" (string, optional, default = \"\") the transaction XNA change will be sent to this address\n8. \"asset_change_address\" (string, optional, default = \"\") the transaction Asset change will be sent to this address\n\nResult:\ntxid[ \ntxid\n]\n\nExamples:\n> neurai-cli transferfromaddress \"ASSET_NAME\" \"fromaddress\" 20 \"address\" \"QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E\", 156545652\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"transferfromaddress\", \"params\": [\"ASSET_NAME\" \"fromaddress\" 20 \"address\" \"QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E\", 156545652] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
21
21
|
"transferfromaddresses": "transferfromaddresses \"asset_name\" [\"from_addresses\"] qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\n\nTransfer a quantity of an owned asset in specific address(es) to a given address\nArguments:\n1. \"asset_name\" (string, required) name of asset\n2. \"from_addresses\" (array, required) list of from addresses to send from\n3. \"qty\" (numeric, required) number of assets you want to send to the address\n4. \"to_address\" (string, required) address to send the asset to\n5. \"message\" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer\n6. \"expire_time\" (numeric, optional) UTC timestamp of when the message expires\n7. \"xna_change_address\" (string, optional, default = \"\") the transactions XNA change will be sent to this address\n8. \"asset_change_address\" (string, optional, default = \"\") the transactions Asset change will be sent to this address\n\nResult:\ntxid[ \ntxid\n]\n\nExamples:\n> neurai-cli transferfromaddresses \"ASSET_NAME\" '[\"fromaddress1\", \"fromaddress2\"]' 20 \"to_address\" \"QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E\" 154652365\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"transferfromaddresses\", \"params\": [\"ASSET_NAME\" '[\"fromaddress1\", \"fromaddress2\"]' 20 \"to_address\" \"QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E\" 154652365] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
22
22
|
"clearmempool": "clearmempool\n\nRemoves all transaction from the mempool\n\nExamples:\n> neurai-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",
|
|
23
|
+
"checkdepinvalidity": "checkdepinvalidity \"asset_name\" \"address\"\n\nCheck if a DEPIN asset is valid/active for a specific address\n\nArguments:\n1. \"asset_name\" (string, required) The DEPIN asset name (must start with &)\n2. \"address\" (string, required) The address to check\n\nResult:\n{\n \"has_asset\": true|false, (boolean) Whether the address holds the asset\n \"amount\": n, (numeric) The amount (if has_asset is true)\n \"valid\": 1|0, (numeric) 1 = active/valid, 0 = blocked/revoked (if has_asset is true)\n \"blocked\": true|false (boolean) Whether the asset is blocked (if has_asset is true)\n}\n\nExamples:\n> neurai-cli checkdepinvalidity \"&FRANCE\" \"address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"checkdepinvalidity\", \"params\": [\"&FRANCE\", \"address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
24
|
+
"depinclearmsg": "depinclearmsg ( \"all\" | hours )\n\nRemove messages from DePIN messaging pool\n\nArguments:\n1. mode (string or numeric, optional) Cleanup mode:\n - omitted: Remove only expired messages (default)\n - \"all\": Remove ALL messages from pool\n - <hours>: Remove messages older than specified hours (numeric)\n\nResult:\n{\n \"removed\": n, (numeric) Number of messages removed\n \"remaining\": n (numeric) Number of messages remaining\n}\n\nExamples:\n> neurai-cli depinclearmsg\n> neurai-cli depinclearmsg \"all\"\n> neurai-cli depinclearmsg 7\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depinclearmsg\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
25
|
+
"depingetmsg": "depingetmsg \"token\" (\"ip[:port]\"|\"fromaddress\") (\"fromaddress\")\n\nRetrieve and decrypt DePIN messages for your addresses\n\nArguments:\n1. \"token\" (string, required) Token name\n2. \"ip[:port]\" OR \"fromaddress\" (string, optional)\n - IP address with optional port (e.g., \"192.168.1.31\" or \"192.168.1.31:19002\")\n - OR Neurai address for local query with specific address\n - Omit for local query with all addresses\n3. \"fromaddress\" (string, optional) Specific address to decrypt with (only if arg 2 is an IP)\n\nResult:\n[\n {\n \"recipient\": \"address\", (string) Recipient address (your address)\n \"sender\": \"address\", (string) Sender address\n \"message\": \"text\", (string) Decrypted message\n \"timestamp\": n, (numeric) Unix timestamp\n \"date\": \"YYYY-MM-DD HH:MM:SS\", (string) Formatted date\n \"expires\": \"YYYY-MM-DD HH:MM:SS\" (string) Expiration date\n },\n ...\n]\n\nExamples:\n> neurai-cli depingetmsg \"MYTOKEN\"\n> neurai-cli depingetmsg \"MYTOKEN\" \"NXyouraddress...\"\n> neurai-cli depingetmsg \"MYTOKEN\" \"192.168.1.78\"\n> neurai-cli depingetmsg \"MYTOKEN\" \"192.168.1.78:19002\" \"NXyouraddress...\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depingetmsg\", \"params\": [\"MYTOKEN\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
26
|
+
"depingetmsginfo": "depingetmsginfo\n\nReturns information about the DePIN messaging system\n\nResult:\n{\n \"enabled\": true|false, (boolean) Whether DePIN messaging is enabled\n \"token\": \"name\", (string) Active token name\n \"port\": n, (numeric) Listening port\n \"maxrecipients\": n, (numeric) Maximum recipients per message\n \"maxmessagesize\": n, (numeric) Maximum message size in bytes\n \"messageexpiryhours\": n, (numeric) Message expiry time in hours\n \"maxpoolsizemb\": n, (numeric) Maximum pool size in MB\n \"messages\": n, (numeric) Number of messages in mempool\n \"memoryusage\": n, (numeric) Memory usage in bytes\n \"memoryusagemb\": n, (numeric) Memory usage in MB\n \"oldestmessage\": \"time\", (string) Timestamp of oldest message\n \"newestmessage\": \"time\" (string) Timestamp of newest message\n}\n\nExamples:\n> neurai-cli depingetmsginfo\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depingetmsginfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
27
|
+
"depingetpoolcontent": "depingetpoolcontent ( verbose sender_address recipient_address start_time end_time limit offset )\n\nInspect the contents of the DePIN message pool.\n\nArguments:\n1. verbose (boolean, \"all\", or \"raw\", optional, default=false) Show detailed message structure. Use \"all\" for all messages, \"raw\" to show encrypted hex data\n2. sender_address (string, optional) Filter by sender address\n3. recipient_address (string, optional) Filter by recipient address\n4. start_time (numeric, optional) Filter messages after timestamp\n5. end_time (numeric, optional) Filter messages before timestamp\n6. limit (numeric, optional, default=100) Maximum messages to return\n7. offset (numeric, optional, default=0) Skip first N messages\n\nResult (verbose=false):\n[\n {\n \"hash\": \"hex\",\n \"sender\": \"address\",\n \"timestamp\": n,\n \"date\": \"YYYY-MM-DD HH:MM:SS\",\n \"expires\": \"YYYY-MM-DD HH:MM:SS\",\n \"encryption_type\": \"ECIES_shared\",\n \"size\": n\n },\n ...\n]\n\nExamples:\n> neurai-cli depingetpoolcontent\n> neurai-cli depingetpoolcontent true\n> neurai-cli depingetpoolcontent \"all\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depingetpoolcontent\", \"params\": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
28
|
+
"depinmcpstatus": "depinmcpstatus\n\nGet status information about the DePIN MCP (AI) worker\n\nResult:\n{\n \"enabled\": true|false, (boolean) Whether MCP worker is enabled\n \"running\": true|false, (boolean) Whether MCP worker is running\n \"mcp_url\": \"url\", (string) MCP server URL\n \"model_name\": \"name\", (string) Name of the loaded AI model\n \"command_key\": \"key\", (string) Command prefix (e.g. /ai)\n \"depin_token\": \"token\", (string) DePIN token being monitored\n \"poll_interval\": n, (numeric) Polling interval in seconds\n \"commands_processed\": n, (numeric) Total commands processed\n \"total_errors\": n, (numeric) Total errors encountered\n \"last_poll_time\": n (numeric) Unix timestamp of last poll\n}\n\nExamples:\n> neurai-cli depinmcpstatus\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depinmcpstatus\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
29
|
+
"depinpoolstats": "depinpoolstats\n\nGet statistical analysis of the DePIN message pool.\n\nResult:\n{\n \"enabled\": true|false,\n \"token\": \"string\",\n \"total_messages\": n,\n \"total_size_bytes\": n,\n \"memory_usage_bytes\": n,\n \"oldest_message\": \"YYYY-MM-DD HH:MM:SS\",\n \"newest_message\": \"YYYY-MM-DD HH:MM:SS\",\n \"messages_by_age\": {\n \"last_hour\": n,\n \"last_day\": n,\n \"last_week\": n\n },\n \"unique_senders\": n,\n \"avg_message_size\": n,\n \"expiring_in_24h\": n\n}\n\nExamples:\n> neurai-cli depinpoolstats\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depinpoolstats\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
30
|
+
"depinsendmsg": "depinsendmsg \"token\" \"ip[:port]\" \"message\" \"fromaddress\" (port)\n\nSend an encrypted message through a remote DePIN gateway (challenge/response)\n\nArguments:\n1. \"token\" (string, required) Token name\n2. \"ip[:port]\" (string, required) Target node address (optional :port to contact remote gateway)\n3. \"message\" (string, required) Message to send (max 1KB)\n4. \"fromaddress\" (string, required) Wallet address used for signing/encryption\n5. port (numeric, optional) Destination message port (defaults to 19002). Only used when specified after fromaddress\n\nResult:\n{\n \"result\": \"success\", (string) Status\n \"hash\": \"hash\", (string) Message hash\n \"recipients\": n, (numeric) Number of recipients\n \"timestamp\": n (numeric) Message timestamp\n}\n\nExamples:\n> neurai-cli depinsendmsg \"MYTOKEN\" \"192.168.1.100\" \"Hello team!\" \"NXsender...\"\n> neurai-cli depinsendmsg \"MYTOKEN\" \"192.168.1.100:19005\" \"Hello team!\" \"NXsender...\" 19005\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depinsendmsg\", \"params\": [\"MYTOKEN\", \"192.168.1.100\", \"Hello team!\", \"NXsender...\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
31
|
+
"depinsubmitmsg": "depinsubmitmsg \"hexmessage\"\n\nSubmit a pre-encrypted and signed DePIN message to the pool\n\nThis is the secure protocol where the client prepares the complete message\n(encryption + signature) and the server only validates and stores it.\n\nArguments:\n1. \"hexmessage\" (string, required) Hex-encoded serialized CDepinMessage\n\nResult:\n{\n \"result\": \"success\", (string) Status\n \"hash\": \"hash\", (string) Message hash\n \"timestamp\": n (numeric) Unix timestamp\n}\n\nNote: This endpoint is typically called by remote nodes after challenge/response authentication.\n\nExamples:\n> neurai-cli depinsubmitmsg \"0a3f2e...\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"depinsubmitmsg\", \"params\": [\"0a3f2e...\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
32
|
+
"freezedepin": "freezedepin \"asset_name\" \"address\" (\"change_address\")\n\nFreeze a DEPIN asset for a specific address (owner only)\n\nThe address will still hold the asset but it will be marked as invalid\n\nRequires the owner token (&ASSET!) in the wallet\n\nArguments:\n1. \"asset_name\" (string, required) The DEPIN asset name (must start with &)\n2. \"address\" (string, required) The address to freeze\n3. \"change_address\" (string, optional) The change address for the owner token\n\nResult:\n\"txid\" (string) The transaction id\n\nExamples:\n> neurai-cli freezedepin \"&FRANCE\" \"address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"freezedepin\", \"params\": [\"&FRANCE\", \"address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
33
|
+
"listdepinholders": "listdepinholders \"asset_name\"\n\nReturns all addresses holding a DEPIN asset with validity status\n\nDEPIN assets are soulbound (non-transferable except by owner) and can be frozen/revoked\n\nArguments:\n1. \"asset_name\" (string, required) The DEPIN asset name (must start with &)\n\nResult:\n[\n {\n \"address\": \"address\", (string) The address\n \"amount\": n, (numeric) The amount (always 1 for DEPIN)\n \"valid\": 1|0 (numeric) 1 = active/valid, 0 = blocked/revoked\n },\n ...\n]\n\nExamples:\n> neurai-cli listdepinholders \"&FRANCE\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listdepinholders\", \"params\": [\"&FRANCE\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
34
|
+
"selfrevokedepin": "selfrevokedepin \"asset_name\"\n\nSelf-revoke a DEPIN asset held in this wallet\n\nThe asset will be marked as invalid but will remain in the address\n\nThis action can only be undone by the asset owner\n\nArguments:\n1. \"asset_name\" (string, required) The DEPIN asset name (must start with &)\n\nResult:\n\"txid\" (string) The transaction id\n\nExamples:\n> neurai-cli selfrevokedepin \"&FRANCE\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"selfrevokedepin\", \"params\": [\"&FRANCE\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
35
|
+
"unfreezedepin": "unfreezedepin \"asset_name\" \"address\" (\"change_address\")\n\nUnfreeze a DEPIN asset for a specific address (owner only)\n\nThe asset will be marked as valid again\n\nRequires the owner token (&ASSET!) in the wallet\n\nArguments:\n1. \"asset_name\" (string, required) The DEPIN asset name (must start with &)\n2. \"address\" (string, required) The address to unfreeze\n3. \"change_address\" (string, optional) The change address for the owner token\n\nResult:\n\"txid\" (string) The transaction id\n\nExamples:\n> neurai-cli unfreezedepin \"&FRANCE\" \"address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"unfreezedepin\", \"params\": [\"&FRANCE\", \"address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
23
36
|
"decodeblock": "decodeblock \"blockhex\"\n\nArguments:\n1. \"blockhex\" (string, required) The block hex\n\nResult:\n{\n \"hash\" : \"hash\", (string) the block hash (same as provided)\n \"size\" : n, (numeric) The block size\n \"strippedsize\" : n, (numeric) The block size excluding witness data\n \"weight\" : n (numeric) The block weight as defined in BIP 141\n \"height\" : n, (numeric) The block height or index\n \"version\" : n, (numeric) The block version\n \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n \"merkleroot\" : \"xxxx\", (string) The merkle root\n \"tx\" : [ (array of string) The transaction ids\n \"transactionid\" (string) The transaction id\n ,...\n ],\n \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n \"nonce\" : n, (numeric) The nonce\n \"bits\" : \"1d00ffff\", (string) The bits\n}\n\nExamples:\n> neurai-cli decodeblock \"xxxx\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"decodeblock\", \"params\": [\"xxxx\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
24
37
|
"getbestblockhash": "getbestblockhash\n\nReturns the hash of the best (tip) block in the longest blockchain.\n\nResult:\n\"hex\" (string) the block hash hex encoded\n\nExamples:\n> neurai-cli getbestblockhash \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbestblockhash\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
|
25
38
|
"getblock": "getblock \"blockhash\" ( verbosity ) \n\nIf verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.\nIf verbosity is 1, returns an Object with information about block <hash>.\nIf verbosity is 2, returns an Object with information about block <hash> and information about each transaction. \n\nArguments:\n1. \"blockhash\" (string, required) The block hash\n2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data\n\nResult (for verbosity = 0):\n\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n\nResult (for verbosity = 1):\n{\n \"hash\" : \"hash\", (string) the block hash (same as provided)\n \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n \"size\" : n, (numeric) The block size\n \"strippedsize\" : n, (numeric) The block size excluding witness data\n \"weight\" : n (numeric) The block weight as defined in BIP 141\n \"height\" : n, (numeric) The block height or index\n \"version\" : n, (numeric) The block version\n \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n \"merkleroot\" : \"xxxx\", (string) The merkle root\n \"tx\" : [ (array of string) The transaction ids\n \"transactionid\" (string) The transaction id\n ,...\n ],\n \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n \"nonce\" : n, (numeric) The nonce\n \"bits\" : \"1d00ffff\", (string) The bits\n \"difficulty\" : x.xxx, (numeric) The difficulty\n \"chainwork\" : \"xxxx\", (string) Expected number of hashes required to produce the chain up to this block (in hex)\n \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n \"nextblockhash\" : \"hash\" (string) The hash of the next block\n}\n\nResult (for verbosity = 2):\n{\n ..., Same output as verbosity = 1.\n \"tx\" : [ (array of Objects) The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 \"tx\" result.\n ,...\n ],\n ,... Same output as verbosity = 1.\n}\n\nExamples:\n> neurai-cli getblock \"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblock\", \"params\": [\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/\n",
|
package/docs.ts
CHANGED
|
@@ -11,6 +11,7 @@ bumpfee: string;
|
|
|
11
11
|
cancelsnapshotrequest: string;
|
|
12
12
|
checkaddressrestriction: string;
|
|
13
13
|
checkaddresstag: string;
|
|
14
|
+
checkdepinvalidity: string;
|
|
14
15
|
checkglobalrestriction: string;
|
|
15
16
|
clearbanned: string;
|
|
16
17
|
clearmempool: string;
|
|
@@ -21,6 +22,14 @@ createrawtransaction: string;
|
|
|
21
22
|
decodeblock: string;
|
|
22
23
|
decoderawtransaction: string;
|
|
23
24
|
decodescript: string;
|
|
25
|
+
depinclearmsg: string;
|
|
26
|
+
depingetmsg: string;
|
|
27
|
+
depingetmsginfo: string;
|
|
28
|
+
depingetpoolcontent: string;
|
|
29
|
+
depinmcpstatus: string;
|
|
30
|
+
depinpoolstats: string;
|
|
31
|
+
depinsendmsg: string;
|
|
32
|
+
depinsubmitmsg: string;
|
|
24
33
|
disconnectnode: string;
|
|
25
34
|
distributereward: string;
|
|
26
35
|
dumpprivkey: string;
|
|
@@ -29,6 +38,7 @@ encryptwallet: string;
|
|
|
29
38
|
estimatefee: string;
|
|
30
39
|
estimatesmartfee: string;
|
|
31
40
|
freezeaddress: string;
|
|
41
|
+
freezedepin: string;
|
|
32
42
|
freezerestrictedasset: string;
|
|
33
43
|
fundrawtransaction: string;
|
|
34
44
|
generate: string;
|
|
@@ -112,6 +122,7 @@ listaddressrestrictions: string;
|
|
|
112
122
|
listassetbalancesbyaddress: string;
|
|
113
123
|
listassets: string;
|
|
114
124
|
listbanned: string;
|
|
125
|
+
listdepinholders: string;
|
|
115
126
|
listglobalrestrictions: string;
|
|
116
127
|
listlockunspent: string;
|
|
117
128
|
listmyassets: string;
|
|
@@ -138,6 +149,7 @@ removetagfromaddress: string;
|
|
|
138
149
|
requestsnapshot: string;
|
|
139
150
|
rescanblockchain: string;
|
|
140
151
|
savemempool: string;
|
|
152
|
+
selfrevokedepin: string;
|
|
141
153
|
sendfrom: string;
|
|
142
154
|
sendfromaddress: string;
|
|
143
155
|
sendmany: string;
|
|
@@ -161,6 +173,7 @@ transferfromaddress: string;
|
|
|
161
173
|
transferfromaddresses: string;
|
|
162
174
|
transferqualifier: string;
|
|
163
175
|
unfreezeaddress: string;
|
|
176
|
+
unfreezedepin: string;
|
|
164
177
|
unfreezerestrictedasset: string;
|
|
165
178
|
unsubscribefromchannel: string;
|
|
166
179
|
uptime: string;
|
|
@@ -410,6 +423,32 @@ checkaddresstag:'checkaddresstag',
|
|
|
410
423
|
|
|
411
424
|
|
|
412
425
|
|
|
426
|
+
/** checkdepinvalidity "asset_name" "address"
|
|
427
|
+
|
|
428
|
+
Check if a DEPIN asset is valid/active for a specific address
|
|
429
|
+
|
|
430
|
+
Arguments:
|
|
431
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
432
|
+
2. "address" (string, required) The address to check
|
|
433
|
+
|
|
434
|
+
Result:
|
|
435
|
+
{
|
|
436
|
+
"has_asset": true|false, (boolean) Whether the address holds the asset
|
|
437
|
+
"amount": n, (numeric) The amount (if has_asset is true)
|
|
438
|
+
"valid": 1|0, (numeric) 1 = active/valid, 0 = blocked/revoked (if has_asset is true)
|
|
439
|
+
"blocked": true|false (boolean) Whether the asset is blocked (if has_asset is true)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
Examples:
|
|
443
|
+
> neurai-cli checkdepinvalidity "&FRANCE" "address"
|
|
444
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "checkdepinvalidity", "params": ["&FRANCE", "address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
445
|
+
**/
|
|
446
|
+
checkdepinvalidity:'checkdepinvalidity',
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
413
452
|
/** checkglobalrestriction restricted_name
|
|
414
453
|
|
|
415
454
|
Checks to see if a restricted asset is globally frozen
|
|
@@ -923,6 +962,261 @@ decodescript:'decodescript',
|
|
|
923
962
|
|
|
924
963
|
|
|
925
964
|
|
|
965
|
+
/** depinclearmsg ( "all" | hours )
|
|
966
|
+
|
|
967
|
+
Remove messages from DePIN messaging pool
|
|
968
|
+
|
|
969
|
+
Arguments:
|
|
970
|
+
1. mode (string or numeric, optional) Cleanup mode:
|
|
971
|
+
- omitted: Remove only expired messages (default)
|
|
972
|
+
- "all": Remove ALL messages from pool
|
|
973
|
+
- <hours>: Remove messages older than specified hours (numeric)
|
|
974
|
+
|
|
975
|
+
Result:
|
|
976
|
+
{
|
|
977
|
+
"removed": n, (numeric) Number of messages removed
|
|
978
|
+
"remaining": n (numeric) Number of messages remaining
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
Examples:
|
|
982
|
+
> neurai-cli depinclearmsg
|
|
983
|
+
> neurai-cli depinclearmsg "all"
|
|
984
|
+
> neurai-cli depinclearmsg 7
|
|
985
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinclearmsg", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
986
|
+
**/
|
|
987
|
+
depinclearmsg:'depinclearmsg',
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
/** depingetmsg "token" ("ip[:port]"|"fromaddress") ("fromaddress")
|
|
994
|
+
|
|
995
|
+
Retrieve and decrypt DePIN messages for your addresses
|
|
996
|
+
|
|
997
|
+
Arguments:
|
|
998
|
+
1. "token" (string, required) Token name
|
|
999
|
+
2. "ip[:port]" OR "fromaddress" (string, optional)
|
|
1000
|
+
- IP address with optional port (e.g., "192.168.1.31" or "192.168.1.31:19002")
|
|
1001
|
+
- OR Neurai address for local query with specific address
|
|
1002
|
+
- Omit for local query with all addresses
|
|
1003
|
+
3. "fromaddress" (string, optional) Specific address to decrypt with (only if arg 2 is an IP)
|
|
1004
|
+
|
|
1005
|
+
Result:
|
|
1006
|
+
[
|
|
1007
|
+
{
|
|
1008
|
+
"recipient": "address", (string) Recipient address (your address)
|
|
1009
|
+
"sender": "address", (string) Sender address
|
|
1010
|
+
"message": "text", (string) Decrypted message
|
|
1011
|
+
"timestamp": n, (numeric) Unix timestamp
|
|
1012
|
+
"date": "YYYY-MM-DD HH:MM:SS", (string) Formatted date
|
|
1013
|
+
"expires": "YYYY-MM-DD HH:MM:SS" (string) Expiration date
|
|
1014
|
+
},
|
|
1015
|
+
...
|
|
1016
|
+
]
|
|
1017
|
+
|
|
1018
|
+
Examples:
|
|
1019
|
+
> neurai-cli depingetmsg "MYTOKEN"
|
|
1020
|
+
> neurai-cli depingetmsg "MYTOKEN" "NXyouraddress..."
|
|
1021
|
+
> neurai-cli depingetmsg "MYTOKEN" "192.168.1.78"
|
|
1022
|
+
> neurai-cli depingetmsg "MYTOKEN" "192.168.1.78:19002" "NXyouraddress..."
|
|
1023
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depingetmsg", "params": ["MYTOKEN"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1024
|
+
**/
|
|
1025
|
+
depingetmsg:'depingetmsg',
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
/** depingetmsginfo
|
|
1032
|
+
|
|
1033
|
+
Returns information about the DePIN messaging system
|
|
1034
|
+
|
|
1035
|
+
Result:
|
|
1036
|
+
{
|
|
1037
|
+
"enabled": true|false, (boolean) Whether DePIN messaging is enabled
|
|
1038
|
+
"token": "name", (string) Active token name
|
|
1039
|
+
"port": n, (numeric) Listening port
|
|
1040
|
+
"maxrecipients": n, (numeric) Maximum recipients per message
|
|
1041
|
+
"maxmessagesize": n, (numeric) Maximum message size in bytes
|
|
1042
|
+
"messageexpiryhours": n, (numeric) Message expiry time in hours
|
|
1043
|
+
"maxpoolsizemb": n, (numeric) Maximum pool size in MB
|
|
1044
|
+
"messages": n, (numeric) Number of messages in mempool
|
|
1045
|
+
"memoryusage": n, (numeric) Memory usage in bytes
|
|
1046
|
+
"memoryusagemb": n, (numeric) Memory usage in MB
|
|
1047
|
+
"oldestmessage": "time", (string) Timestamp of oldest message
|
|
1048
|
+
"newestmessage": "time" (string) Timestamp of newest message
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
Examples:
|
|
1052
|
+
> neurai-cli depingetmsginfo
|
|
1053
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depingetmsginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1054
|
+
**/
|
|
1055
|
+
depingetmsginfo:'depingetmsginfo',
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
/** depingetpoolcontent ( verbose sender_address recipient_address start_time end_time limit offset )
|
|
1062
|
+
|
|
1063
|
+
Inspect the contents of the DePIN message pool.
|
|
1064
|
+
|
|
1065
|
+
Arguments:
|
|
1066
|
+
1. verbose (boolean, "all", or "raw", optional, default=false) Show detailed message structure. Use "all" for all messages, "raw" to show encrypted hex data
|
|
1067
|
+
2. sender_address (string, optional) Filter by sender address
|
|
1068
|
+
3. recipient_address (string, optional) Filter by recipient address
|
|
1069
|
+
4. start_time (numeric, optional) Filter messages after timestamp
|
|
1070
|
+
5. end_time (numeric, optional) Filter messages before timestamp
|
|
1071
|
+
6. limit (numeric, optional, default=100) Maximum messages to return
|
|
1072
|
+
7. offset (numeric, optional, default=0) Skip first N messages
|
|
1073
|
+
|
|
1074
|
+
Result (verbose=false):
|
|
1075
|
+
[
|
|
1076
|
+
{
|
|
1077
|
+
"hash": "hex",
|
|
1078
|
+
"sender": "address",
|
|
1079
|
+
"timestamp": n,
|
|
1080
|
+
"date": "YYYY-MM-DD HH:MM:SS",
|
|
1081
|
+
"expires": "YYYY-MM-DD HH:MM:SS",
|
|
1082
|
+
"encryption_type": "ECIES_shared",
|
|
1083
|
+
"size": n
|
|
1084
|
+
},
|
|
1085
|
+
...
|
|
1086
|
+
]
|
|
1087
|
+
|
|
1088
|
+
Examples:
|
|
1089
|
+
> neurai-cli depingetpoolcontent
|
|
1090
|
+
> neurai-cli depingetpoolcontent true
|
|
1091
|
+
> neurai-cli depingetpoolcontent "all"
|
|
1092
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depingetpoolcontent", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1093
|
+
**/
|
|
1094
|
+
depingetpoolcontent:'depingetpoolcontent',
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
/** depinmcpstatus
|
|
1101
|
+
|
|
1102
|
+
Get status information about the DePIN MCP (AI) worker
|
|
1103
|
+
|
|
1104
|
+
Result:
|
|
1105
|
+
{
|
|
1106
|
+
"enabled": true|false, (boolean) Whether MCP worker is enabled
|
|
1107
|
+
"running": true|false, (boolean) Whether MCP worker is running
|
|
1108
|
+
"mcp_url": "url", (string) MCP server URL
|
|
1109
|
+
"model_name": "name", (string) Name of the loaded AI model
|
|
1110
|
+
"command_key": "key", (string) Command prefix (e.g. /ai)
|
|
1111
|
+
"depin_token": "token", (string) DePIN token being monitored
|
|
1112
|
+
"poll_interval": n, (numeric) Polling interval in seconds
|
|
1113
|
+
"commands_processed": n, (numeric) Total commands processed
|
|
1114
|
+
"total_errors": n, (numeric) Total errors encountered
|
|
1115
|
+
"last_poll_time": n (numeric) Unix timestamp of last poll
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
Examples:
|
|
1119
|
+
> neurai-cli depinmcpstatus
|
|
1120
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinmcpstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1121
|
+
**/
|
|
1122
|
+
depinmcpstatus:'depinmcpstatus',
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
/** depinpoolstats
|
|
1129
|
+
|
|
1130
|
+
Get statistical analysis of the DePIN message pool.
|
|
1131
|
+
|
|
1132
|
+
Result:
|
|
1133
|
+
{
|
|
1134
|
+
"enabled": true|false,
|
|
1135
|
+
"token": "string",
|
|
1136
|
+
"total_messages": n,
|
|
1137
|
+
"total_size_bytes": n,
|
|
1138
|
+
"memory_usage_bytes": n,
|
|
1139
|
+
"oldest_message": "YYYY-MM-DD HH:MM:SS",
|
|
1140
|
+
"newest_message": "YYYY-MM-DD HH:MM:SS",
|
|
1141
|
+
"messages_by_age": {
|
|
1142
|
+
"last_hour": n,
|
|
1143
|
+
"last_day": n,
|
|
1144
|
+
"last_week": n
|
|
1145
|
+
},
|
|
1146
|
+
"unique_senders": n,
|
|
1147
|
+
"avg_message_size": n,
|
|
1148
|
+
"expiring_in_24h": n
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
Examples:
|
|
1152
|
+
> neurai-cli depinpoolstats
|
|
1153
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinpoolstats", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1154
|
+
**/
|
|
1155
|
+
depinpoolstats:'depinpoolstats',
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
/** depinsendmsg "token" "ip[:port]" "message" "fromaddress" (port)
|
|
1162
|
+
|
|
1163
|
+
Send an encrypted message through a remote DePIN gateway (challenge/response)
|
|
1164
|
+
|
|
1165
|
+
Arguments:
|
|
1166
|
+
1. "token" (string, required) Token name
|
|
1167
|
+
2. "ip[:port]" (string, required) Target node address (optional :port to contact remote gateway)
|
|
1168
|
+
3. "message" (string, required) Message to send (max 1KB)
|
|
1169
|
+
4. "fromaddress" (string, required) Wallet address used for signing/encryption
|
|
1170
|
+
5. port (numeric, optional) Destination message port (defaults to 19002). Only used when specified after fromaddress
|
|
1171
|
+
|
|
1172
|
+
Result:
|
|
1173
|
+
{
|
|
1174
|
+
"result": "success", (string) Status
|
|
1175
|
+
"hash": "hash", (string) Message hash
|
|
1176
|
+
"recipients": n, (numeric) Number of recipients
|
|
1177
|
+
"timestamp": n (numeric) Message timestamp
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
Examples:
|
|
1181
|
+
> neurai-cli depinsendmsg "MYTOKEN" "192.168.1.100" "Hello team!" "NXsender..."
|
|
1182
|
+
> neurai-cli depinsendmsg "MYTOKEN" "192.168.1.100:19005" "Hello team!" "NXsender..." 19005
|
|
1183
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinsendmsg", "params": ["MYTOKEN", "192.168.1.100", "Hello team!", "NXsender..."] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1184
|
+
**/
|
|
1185
|
+
depinsendmsg:'depinsendmsg',
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
/** depinsubmitmsg "hexmessage"
|
|
1192
|
+
|
|
1193
|
+
Submit a pre-encrypted and signed DePIN message to the pool
|
|
1194
|
+
|
|
1195
|
+
This is the secure protocol where the client prepares the complete message
|
|
1196
|
+
(encryption + signature) and the server only validates and stores it.
|
|
1197
|
+
|
|
1198
|
+
Arguments:
|
|
1199
|
+
1. "hexmessage" (string, required) Hex-encoded serialized CDepinMessage
|
|
1200
|
+
|
|
1201
|
+
Result:
|
|
1202
|
+
{
|
|
1203
|
+
"result": "success", (string) Status
|
|
1204
|
+
"hash": "hash", (string) Message hash
|
|
1205
|
+
"timestamp": n (numeric) Unix timestamp
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
Note: This endpoint is typically called by remote nodes after challenge/response authentication.
|
|
1209
|
+
|
|
1210
|
+
Examples:
|
|
1211
|
+
> neurai-cli depinsubmitmsg "0a3f2e..."
|
|
1212
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinsubmitmsg", "params": ["0a3f2e..."] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1213
|
+
**/
|
|
1214
|
+
depinsubmitmsg:'depinsubmitmsg',
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
|
|
926
1220
|
/** disconnectnode "[address]" [nodeid]
|
|
927
1221
|
|
|
928
1222
|
Immediately disconnects from the specified peer node.
|
|
@@ -1160,6 +1454,32 @@ freezeaddress:'freezeaddress',
|
|
|
1160
1454
|
|
|
1161
1455
|
|
|
1162
1456
|
|
|
1457
|
+
/** freezedepin "asset_name" "address" ("change_address")
|
|
1458
|
+
|
|
1459
|
+
Freeze a DEPIN asset for a specific address (owner only)
|
|
1460
|
+
|
|
1461
|
+
The address will still hold the asset but it will be marked as invalid
|
|
1462
|
+
|
|
1463
|
+
Requires the owner token (&ASSET!) in the wallet
|
|
1464
|
+
|
|
1465
|
+
Arguments:
|
|
1466
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
1467
|
+
2. "address" (string, required) The address to freeze
|
|
1468
|
+
3. "change_address" (string, optional) The change address for the owner token
|
|
1469
|
+
|
|
1470
|
+
Result:
|
|
1471
|
+
"txid" (string) The transaction id
|
|
1472
|
+
|
|
1473
|
+
Examples:
|
|
1474
|
+
> neurai-cli freezedepin "&FRANCE" "address"
|
|
1475
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "freezedepin", "params": ["&FRANCE", "address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
1476
|
+
**/
|
|
1477
|
+
freezedepin:'freezedepin',
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1163
1483
|
/** freezerestrictedasset asset_name (change_address) (asset_data)
|
|
1164
1484
|
|
|
1165
1485
|
Freeze all trading for a specific restricted asset
|
|
@@ -3756,6 +4076,35 @@ listbanned:'listbanned',
|
|
|
3756
4076
|
|
|
3757
4077
|
|
|
3758
4078
|
|
|
4079
|
+
/** listdepinholders "asset_name"
|
|
4080
|
+
|
|
4081
|
+
Returns all addresses holding a DEPIN asset with validity status
|
|
4082
|
+
|
|
4083
|
+
DEPIN assets are soulbound (non-transferable except by owner) and can be frozen/revoked
|
|
4084
|
+
|
|
4085
|
+
Arguments:
|
|
4086
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
4087
|
+
|
|
4088
|
+
Result:
|
|
4089
|
+
[
|
|
4090
|
+
{
|
|
4091
|
+
"address": "address", (string) The address
|
|
4092
|
+
"amount": n, (numeric) The amount (always 1 for DEPIN)
|
|
4093
|
+
"valid": 1|0 (numeric) 1 = active/valid, 0 = blocked/revoked
|
|
4094
|
+
},
|
|
4095
|
+
...
|
|
4096
|
+
]
|
|
4097
|
+
|
|
4098
|
+
Examples:
|
|
4099
|
+
> neurai-cli listdepinholders "&FRANCE"
|
|
4100
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listdepinholders", "params": ["&FRANCE"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
4101
|
+
**/
|
|
4102
|
+
listdepinholders:'listdepinholders',
|
|
4103
|
+
|
|
4104
|
+
|
|
4105
|
+
|
|
4106
|
+
|
|
4107
|
+
|
|
3759
4108
|
/** listglobalrestrictions
|
|
3760
4109
|
|
|
3761
4110
|
List all global restricted assets
|
|
@@ -4547,6 +4896,30 @@ savemempool:'savemempool',
|
|
|
4547
4896
|
|
|
4548
4897
|
|
|
4549
4898
|
|
|
4899
|
+
/** selfrevokedepin "asset_name"
|
|
4900
|
+
|
|
4901
|
+
Self-revoke a DEPIN asset held in this wallet
|
|
4902
|
+
|
|
4903
|
+
The asset will be marked as invalid but will remain in the address
|
|
4904
|
+
|
|
4905
|
+
This action can only be undone by the asset owner
|
|
4906
|
+
|
|
4907
|
+
Arguments:
|
|
4908
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
4909
|
+
|
|
4910
|
+
Result:
|
|
4911
|
+
"txid" (string) The transaction id
|
|
4912
|
+
|
|
4913
|
+
Examples:
|
|
4914
|
+
> neurai-cli selfrevokedepin "&FRANCE"
|
|
4915
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "selfrevokedepin", "params": ["&FRANCE"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
4916
|
+
**/
|
|
4917
|
+
selfrevokedepin:'selfrevokedepin',
|
|
4918
|
+
|
|
4919
|
+
|
|
4920
|
+
|
|
4921
|
+
|
|
4922
|
+
|
|
4550
4923
|
/** sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" )
|
|
4551
4924
|
|
|
4552
4925
|
DEPRECATED (use sendtoaddress). Sent an amount from an account to a neurai address.
|
|
@@ -5210,6 +5583,32 @@ unfreezeaddress:'unfreezeaddress',
|
|
|
5210
5583
|
|
|
5211
5584
|
|
|
5212
5585
|
|
|
5586
|
+
/** unfreezedepin "asset_name" "address" ("change_address")
|
|
5587
|
+
|
|
5588
|
+
Unfreeze a DEPIN asset for a specific address (owner only)
|
|
5589
|
+
|
|
5590
|
+
The asset will be marked as valid again
|
|
5591
|
+
|
|
5592
|
+
Requires the owner token (&ASSET!) in the wallet
|
|
5593
|
+
|
|
5594
|
+
Arguments:
|
|
5595
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
5596
|
+
2. "address" (string, required) The address to unfreeze
|
|
5597
|
+
3. "change_address" (string, optional) The change address for the owner token
|
|
5598
|
+
|
|
5599
|
+
Result:
|
|
5600
|
+
"txid" (string) The transaction id
|
|
5601
|
+
|
|
5602
|
+
Examples:
|
|
5603
|
+
> neurai-cli unfreezedepin "&FRANCE" "address"
|
|
5604
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unfreezedepin", "params": ["&FRANCE", "address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
|
|
5605
|
+
**/
|
|
5606
|
+
unfreezedepin:'unfreezedepin',
|
|
5607
|
+
|
|
5608
|
+
|
|
5609
|
+
|
|
5610
|
+
|
|
5611
|
+
|
|
5213
5612
|
/** unfreezerestrictedasset asset_name (change_address) (asset_data)
|
|
5214
5613
|
|
|
5215
5614
|
Unfreeze all trading for a specific restricted asset
|
package/index.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { methods } from "./docs";
|
|
2
2
|
|
|
3
3
|
export { methods };
|
|
4
|
+
|
|
5
|
+
// Export DePIN RPC functionality
|
|
6
|
+
export {
|
|
7
|
+
getDePinRPC,
|
|
8
|
+
requestDePinChallenge,
|
|
9
|
+
type DePinAuthOptions,
|
|
10
|
+
type DePinChallenge,
|
|
11
|
+
} from "./depin";
|
|
12
|
+
|
|
4
13
|
function throwSyntaxError() {
|
|
5
14
|
throw new Error("Syntax error, call getRPC with (username, password, URL)");
|
|
6
15
|
}
|