@neuraiproject/neurai-rpc 0.6.1 → 0.7.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.0] - 2026-09-27
9
+
10
+ ### Reset testnet
11
+
12
+ - Export the new testnet and mainnet genesis hashes and `assertRpcGenesis` so
13
+ clients can reject an endpoint from the previous testnet before reading
14
+ balances or sending transactions.
15
+ - Preserve JSON-RPC errors returned with HTTP 200 as rejections.
16
+ - Verify genesis, asset marker and RPC error propagation against a node built
17
+ from Neurai-DePIN commit `0fe5a74943210508ec3be34c78e0f9192b7fefec`.
18
+
19
+ ## [0.6.2] - 2026-09-22
20
+
21
+ ### Documentation — neurai-key 5 address types
22
+
23
+ Documentation only; the runtime client (`rpc(method, params)`) is unchanged.
24
+ `docs.json` entries refreshed from the node's `help` output and `docs.ts` /
25
+ `neurai_methods.md` regenerated with `npm run create-docs`:
26
+
27
+ - `getnewaddress ( "account" "address_type" )`: new `address_type` argument,
28
+ `"legacy"` (Base58), `"pq"` (strict post-quantum, witness v2,
29
+ `pq1…`/`tpq1…`) or `"ecdsa"` (strict ECDSA, witness v3,
30
+ `nq1r…`/`tnq1r…`). Without it the wallet's default family is used.
31
+ - `getrawchangeaddress ( "address_type" )`: same optional argument.
32
+ - `listpqaddresses`: returns generic AuthScript v1 addresses with a PQ key
33
+ (`nc1p…`/`tnc1p…`), no longer `nq1…`.
34
+ - `validateaddress`: documents the fields returned for AuthScript witness
35
+ addresses (`isauthscript`, `witness_version`, `family`, `commitment`) and
36
+ uses a Neurai example address instead of a Bitcoin one.
37
+
8
38
  ## [0.6.0] - 2026-08-22
9
39
 
10
40
  ### Breaking — Neurai DePIN protocol 2
package/README.md CHANGED
@@ -127,3 +127,11 @@ strings remain quoted strings: use the representation required by the RPC
127
127
  method. Unsafe integer numbers, NaN and Infinity are rejected. No global
128
128
  BigInt.prototype mutation is performed. `parseRpcJson` and `stringifyRpcJson`
129
129
  are exported for callers implementing their own transport.
130
+
131
+ ## Verify the chain before using a testnet RPC
132
+
133
+ `TESTNET_GENESIS_HASH` identifies the reset testnet. Call
134
+ `await assertRpcGenesis(rpc, TESTNET_GENESIS_HASH)` after constructing an RPC
135
+ client and before reading balances or building transactions. The port and
136
+ `getblockchaininfo.chain` label alone do not distinguish the previous testnet.
137
+ `MAINNET_GENESIS_HASH` is also exported for mainnet clients.
package/dist/index.cjs CHANGED
@@ -19,6 +19,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // index.ts
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
+ MAINNET_GENESIS_HASH: () => MAINNET_GENESIS_HASH,
23
+ TESTNET_GENESIS_HASH: () => TESTNET_GENESIS_HASH,
24
+ assertRpcGenesis: () => assertRpcGenesis,
22
25
  getRPC: () => getRPC,
23
26
  methods: () => methods,
24
27
  parseRpcJson: () => parseRpcJson,
@@ -2402,7 +2405,7 @@ var methods = {
2402
2405
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2403
2406
  **/
2404
2407
  getnetworkinfo: "getnetworkinfo",
2405
- /** getnewaddress ( "account" )
2408
+ /** getnewaddress ( "account" "address_type" )
2406
2409
 
2407
2410
  Returns a new Neurai address for receiving payments.
2408
2411
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -2410,13 +2413,15 @@ var methods = {
2410
2413
 
2411
2414
  Arguments:
2412
2415
  1. "account" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.
2416
+ 2. "address_type" (string, optional) The address family: "legacy" (Base58, secp256k1), "pq" (strict post-quantum, witness v2, pq1.../tpq1...) or "ecdsa" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's default family is used (legacy for classic wallets, generic AuthScript v1 for PQ wallets).
2413
2417
 
2414
2418
  Result:
2415
2419
  "address" (string) The new neurai address
2416
2420
 
2417
2421
  Examples:
2418
2422
  > neurai-cli getnewaddress
2419
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2423
+ > neurai-cli getnewaddress "" "ecdsa"
2424
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["", "pq"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2420
2425
  **/
2421
2426
  getnewaddress: "getnewaddress",
2422
2427
  /** getpeerinfo
@@ -2492,11 +2497,14 @@ var methods = {
2492
2497
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpubkey", "params": ["NXa1b2c3d4e5f6..."] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2493
2498
  **/
2494
2499
  getpubkey: "getpubkey",
2495
- /** getrawchangeaddress
2500
+ /** getrawchangeaddress ( "address_type" )
2496
2501
 
2497
2502
  Returns a new Neurai address, for receiving change.
2498
2503
  This is for use with raw transactions, NOT normal use.
2499
2504
 
2505
+ Arguments:
2506
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2507
+
2500
2508
  Result:
2501
2509
  "address" (string) The address
2502
2510
 
@@ -3595,7 +3603,7 @@ var methods = {
3595
3603
 
3596
3604
  Result:
3597
3605
  [ (json array of strings)
3598
- "address" (string) A post-quantum Bech32m address (nq1...)
3606
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
3599
3607
  ...
3600
3608
  ]
3601
3609
 
@@ -4888,6 +4896,10 @@ var methods = {
4888
4896
  "ismine" : true|false, (boolean) If the address is yours or not
4889
4897
  "iswatchonly" : true|false, (boolean) If the address is watchonly
4890
4898
  "isscript" : true|false, (boolean) If the key is a script
4899
+ "isauthscript" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)
4900
+ "witness_version" : n, (numeric, optional) AuthScript witness version: 1 (generic AuthScript, nc1p.../tnc1p...), 2 (strict post-quantum, pq1z.../tpq1z...) or 3 (strict ECDSA, nq1r.../tnq1r...)
4901
+ "family" : "family", (string, optional) AuthScript family: "authscript" (v1; the commitment does not reveal the authentication type), "pq" (v2) or "ecdsa" (v3)
4902
+ "commitment" : "hex", (string, optional) Strict addresses (v2/v3) only: the 32-byte AuthScript commitment as a uint256 hex string (byte-reversed with respect to the scriptPubKey)
4891
4903
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
4892
4904
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
4893
4905
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -4905,8 +4917,8 @@ var methods = {
4905
4917
  }
4906
4918
 
4907
4919
  Examples:
4908
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
4909
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4920
+ > neurai-cli validateaddress "NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"
4921
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4910
4922
  **/
4911
4923
  validateaddress: "validateaddress",
4912
4924
  /** verifychain ( checklevel nblocks )
@@ -5045,6 +5057,14 @@ var methods = {
5045
5057
  };
5046
5058
 
5047
5059
  // index.ts
5060
+ var MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
5061
+ var TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
5062
+ async function assertRpcGenesis(rpc, expectedGenesisHash) {
5063
+ const actual = await rpc("getblockhash", [0]);
5064
+ if (typeof actual !== "string" || actual.toLowerCase() !== expectedGenesisHash.toLowerCase()) {
5065
+ throw new Error(`Unexpected genesis block: expected ${expectedGenesisHash}, received ${String(actual)}`);
5066
+ }
5067
+ }
5048
5068
  function rpcNumber(value) {
5049
5069
  return new import_lossless_json.LosslessNumber(value);
5050
5070
  }
@@ -5160,6 +5180,9 @@ async function postData(url = "", data = {}, username, password) {
5160
5180
  }
5161
5181
  // Annotate the CommonJS export names for ESM import in node:
5162
5182
  0 && (module.exports = {
5183
+ MAINNET_GENESIS_HASH,
5184
+ TESTNET_GENESIS_HASH,
5185
+ assertRpcGenesis,
5163
5186
  getRPC,
5164
5187
  methods,
5165
5188
  parseRpcJson,
package/dist/index.d.cts CHANGED
@@ -201,6 +201,10 @@ interface IMethods {
201
201
  }
202
202
  declare const methods: IMethods;
203
203
 
204
+ declare const MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
205
+ declare const TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
206
+ /** Reject an RPC endpoint that serves a different chain with the same network label. */
207
+ declare function assertRpcGenesis(rpc: (method: string, params: any[]) => Promise<unknown>, expectedGenesisHash: string): Promise<void>;
204
208
  /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
205
209
  declare function rpcNumber(value: string): LosslessNumber;
206
210
  /** Preserve unsafe JSON numeric tokens as strings; retain safe number compatibility. */
@@ -208,4 +212,4 @@ declare function parseRpcJson(text: string): any;
208
212
  declare function stringifyRpcJson(value: unknown): string;
209
213
  declare function getRPC(username: string, password: string, URL: string): (method: string, params: any[]) => Promise<unknown>;
210
214
 
211
- export { getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
215
+ export { MAINNET_GENESIS_HASH, TESTNET_GENESIS_HASH, assertRpcGenesis, getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
package/dist/index.d.ts CHANGED
@@ -201,6 +201,10 @@ interface IMethods {
201
201
  }
202
202
  declare const methods: IMethods;
203
203
 
204
+ declare const MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
205
+ declare const TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
206
+ /** Reject an RPC endpoint that serves a different chain with the same network label. */
207
+ declare function assertRpcGenesis(rpc: (method: string, params: any[]) => Promise<unknown>, expectedGenesisHash: string): Promise<void>;
204
208
  /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
205
209
  declare function rpcNumber(value: string): LosslessNumber;
206
210
  /** Preserve unsafe JSON numeric tokens as strings; retain safe number compatibility. */
@@ -208,4 +212,4 @@ declare function parseRpcJson(text: string): any;
208
212
  declare function stringifyRpcJson(value: unknown): string;
209
213
  declare function getRPC(username: string, password: string, URL: string): (method: string, params: any[]) => Promise<unknown>;
210
214
 
211
- export { getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
215
+ export { MAINNET_GENESIS_HASH, TESTNET_GENESIS_HASH, assertRpcGenesis, getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
package/dist/index.mjs CHANGED
@@ -2375,7 +2375,7 @@ var methods = {
2375
2375
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2376
2376
  **/
2377
2377
  getnetworkinfo: "getnetworkinfo",
2378
- /** getnewaddress ( "account" )
2378
+ /** getnewaddress ( "account" "address_type" )
2379
2379
 
2380
2380
  Returns a new Neurai address for receiving payments.
2381
2381
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -2383,13 +2383,15 @@ var methods = {
2383
2383
 
2384
2384
  Arguments:
2385
2385
  1. "account" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.
2386
+ 2. "address_type" (string, optional) The address family: "legacy" (Base58, secp256k1), "pq" (strict post-quantum, witness v2, pq1.../tpq1...) or "ecdsa" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's default family is used (legacy for classic wallets, generic AuthScript v1 for PQ wallets).
2386
2387
 
2387
2388
  Result:
2388
2389
  "address" (string) The new neurai address
2389
2390
 
2390
2391
  Examples:
2391
2392
  > neurai-cli getnewaddress
2392
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2393
+ > neurai-cli getnewaddress "" "ecdsa"
2394
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["", "pq"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2393
2395
  **/
2394
2396
  getnewaddress: "getnewaddress",
2395
2397
  /** getpeerinfo
@@ -2465,11 +2467,14 @@ var methods = {
2465
2467
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpubkey", "params": ["NXa1b2c3d4e5f6..."] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2466
2468
  **/
2467
2469
  getpubkey: "getpubkey",
2468
- /** getrawchangeaddress
2470
+ /** getrawchangeaddress ( "address_type" )
2469
2471
 
2470
2472
  Returns a new Neurai address, for receiving change.
2471
2473
  This is for use with raw transactions, NOT normal use.
2472
2474
 
2475
+ Arguments:
2476
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2477
+
2473
2478
  Result:
2474
2479
  "address" (string) The address
2475
2480
 
@@ -3568,7 +3573,7 @@ var methods = {
3568
3573
 
3569
3574
  Result:
3570
3575
  [ (json array of strings)
3571
- "address" (string) A post-quantum Bech32m address (nq1...)
3576
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
3572
3577
  ...
3573
3578
  ]
3574
3579
 
@@ -4861,6 +4866,10 @@ var methods = {
4861
4866
  "ismine" : true|false, (boolean) If the address is yours or not
4862
4867
  "iswatchonly" : true|false, (boolean) If the address is watchonly
4863
4868
  "isscript" : true|false, (boolean) If the key is a script
4869
+ "isauthscript" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)
4870
+ "witness_version" : n, (numeric, optional) AuthScript witness version: 1 (generic AuthScript, nc1p.../tnc1p...), 2 (strict post-quantum, pq1z.../tpq1z...) or 3 (strict ECDSA, nq1r.../tnq1r...)
4871
+ "family" : "family", (string, optional) AuthScript family: "authscript" (v1; the commitment does not reveal the authentication type), "pq" (v2) or "ecdsa" (v3)
4872
+ "commitment" : "hex", (string, optional) Strict addresses (v2/v3) only: the 32-byte AuthScript commitment as a uint256 hex string (byte-reversed with respect to the scriptPubKey)
4864
4873
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
4865
4874
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
4866
4875
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -4878,8 +4887,8 @@ var methods = {
4878
4887
  }
4879
4888
 
4880
4889
  Examples:
4881
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
4882
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4890
+ > neurai-cli validateaddress "NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"
4891
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4883
4892
  **/
4884
4893
  validateaddress: "validateaddress",
4885
4894
  /** verifychain ( checklevel nblocks )
@@ -5018,6 +5027,14 @@ var methods = {
5018
5027
  };
5019
5028
 
5020
5029
  // index.ts
5030
+ var MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
5031
+ var TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
5032
+ async function assertRpcGenesis(rpc, expectedGenesisHash) {
5033
+ const actual = await rpc("getblockhash", [0]);
5034
+ if (typeof actual !== "string" || actual.toLowerCase() !== expectedGenesisHash.toLowerCase()) {
5035
+ throw new Error(`Unexpected genesis block: expected ${expectedGenesisHash}, received ${String(actual)}`);
5036
+ }
5037
+ }
5021
5038
  function rpcNumber(value) {
5022
5039
  return new LosslessNumber(value);
5023
5040
  }
@@ -5132,6 +5149,9 @@ async function postData(url = "", data = {}, username, password) {
5132
5149
  return response;
5133
5150
  }
5134
5151
  export {
5152
+ MAINNET_GENESIS_HASH,
5153
+ TESTNET_GENESIS_HASH,
5154
+ assertRpcGenesis,
5135
5155
  getRPC,
5136
5156
  methods,
5137
5157
  parseRpcJson,
package/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "": "== Addressindex ==\ngetaddressbalance\ngetaddressdeltas\ngetaddressmempool\ngetaddresstxids\ngetaddressutxos\n\n== Assets ==\ncheckdepinvalidity \"asset_name\" \"address\"\nfreezedepin \"asset_name\" \"address\" (\"change_address\")\ngetassetdata \"asset_name\"\ngetcacheinfo \ngetsnapshot \"asset_name\" block_height\nissue \"asset_name\" qty \"( to_address )\" \"( change_address )\" ( units ) ( reissuable ) ( has_ipfs ) \"( ipfs_hash )\"\nissueunique \"root_name\" [asset_tags] ( [ipfs_hashes] ) \"( to_address )\" \"( change_address )\"\nlistaddressesbyasset \"asset_name\" (onlytotal) (count) (start)\nlistassetbalancesbyaddress \"address\" (onlytotal) (count) (start)\nlistassets \"( asset )\" ( verbose ) ( count ) ( start )\nlistdepinaddresses \"asset_name\" (count) (start)\nlistdepinholders \"asset_name\"\nlistmyassets \"( asset )\" ( verbose ) ( count ) ( start ) (confs) \npurgesnapshot \"asset_name\" block_height\nreissue \"asset_name\" qty \"to_address\" \"change_address\" ( reissuable ) ( new_units) \"( new_ipfs )\" \nselfrevokedepin \"asset_name\"\ntransfer \"asset_name\" qty \"to_address\" \"message\" expire_time \"change_address\" \"asset_change_address\"\ntransferfromaddress \"asset_name\" \"from_address\" qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\ntransferfromaddresses \"asset_name\" [\"from_addresses\"] qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\nunfreezedepin \"asset_name\" \"address\" (\"change_address\")\n\n== Blockchain ==\nclearmempool\ndecodeblock \"blockhex\"\ngetbestblockhash\ngetblock \"blockhash\" ( verbosity ) \ngetblockchaininfo\ngetibdstatus\ngetblockcount\n\ngetblockhash height\ngetblockhashes timestamp\ngetblockheader \"hash\" ( verbose )\ngetchaintips\ngetchaintxstats ( nblocks blockhash )\ngetdifficulty\ngetmempoolancestors txid (verbose)\ngetmempooldescendants txid (verbose)\ngetmempoolentry txid\ngetmempoolinfo\ngetrawmempool ( verbose )\ngetspentinfo\ngettxout \"txid\" n ( include_mempool )\ngettxoutproof [\"txid\",...] ( blockhash )\ngettxoutsetinfo\npreciousblock \"blockhash\"\npruneblockchain\nsavemempool\nverifychain ( checklevel nblocks )\nverifytxoutproof \"proof\"\n\n== Control ==\ngetinfo\ngetmemoryinfo (\"mode\")\ngetrpcinfo\nhelp ( \"command\" )\nstop\nuptime\n\n== Generating ==\ngenerate nblocks ( maxtries )\ngeneratetoaddress nblocks address (maxtries)\ngetgenerate\nsetgenerate generate ( genproclimit )\n\n== Messages ==\nclearmessages \nsendmessage \"channel_name\" \"ipfs_hash\" (expire_time)\nsubscribetochannel \nunsubscribefromchannel \nviewallmessagechannels \nviewallmessages \n\n== Mining ==\ngetblocktemplate ( TemplateRequest )\ngetkawpowhash \"header_hash\" \"mix_hash\" nonce, height, \"target\"\ngetmininginfo\ngetnetworkhashps ( nblocks height )\npprpcsb \"header_hash\" \"mix_hash\" \"nonce\"\nprioritisetransaction <txid> <dummy value> <fee delta>\nsubmitblock \"hexdata\" ( \"dummy\" )\n\n== Network ==\naddnode \"node\" \"add|remove|onetry\"\nclearbanned\ndisconnectnode \"[address]\" [nodeid]\ngetaddednodeinfo ( \"node\" )\ngetconnectioncount\ngetnettotals\ngetnetworkinfo\ngetpeerinfo\ngetpubkey \"address\"\nlistbanned\nping\nsetban \"subnet\" \"add|remove\" (bantime) (absolute)\nsetnetworkactive true|false\n\n== Rawtransactions ==\ncombinerawtransaction [\"hexstring\",...]\ncreaterawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":(amount or object),\"data\":\"hex\",...}\ndecoderawtransaction \"hexstring\"\ndecodescript \"hexstring\"\nfundrawtransaction \"hexstring\" ( options )\ngetrawtransaction \"txid\" ( verbose )\nsendrawtransaction \"hexstring\" ( allowhighfees )\nsignrawtransaction \"hexstring\" ( [{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\",\"redeemScript\":\"hex\"},...] [\"privatekey1\",...] sighashtype )\ntestmempoolaccept [\"rawtxs\"] ( allowhighfees )\n\n== Restricted assets ==\naddtagtoaddress tag_name to_address (change_address) (asset_data)\ncheckaddressrestriction address restricted_name\ncheckaddresstag address tag_name\ncheckglobalrestriction restricted_name\nfreezeaddress asset_name address (change_address) (asset_data)\nfreezerestrictedasset asset_name (change_address) (asset_data)\ngetverifierstring restricted_name\nissuequalifierasset \"asset_name\" qty \"( to_address )\" \"( change_address )\" ( has_ipfs ) \"( ipfs_hash )\"\nissuerestrictedasset \"asset_name\" qty \"verifier\" \"to_address\" \"( change_address )\" (units) ( reissuable ) ( has_ipfs ) \"( ipfs_hash )\"\nisvalidverifierstring verifier_string\nlistaddressesfortag tag_name\nlistaddressrestrictions address\nlistglobalrestrictions\nlisttagsforaddress address\nreissuerestrictedasset \"asset_name\" qty to_address ( change_verifier ) ( \"new_verifier\" ) \"( change_address )\" ( new_units ) ( reissuable ) \"( new_ipfs )\"\nremovetagfromaddress tag_name to_address (change_address) (asset_data)\ntransferqualifier \"qualifier_name\" qty \"to_address\" (\"change_address\") (\"message\") (expire_time) \nunfreezeaddress asset_name address (change_address) (asset_data)\nunfreezerestrictedasset asset_name (change_address) (asset_data)\n\n== Restricted ==\nviewmyrestrictedaddresses \nviewmytaggedaddresses \n\n== Rewards ==\ncancelsnapshotrequest \"asset_name\" block_height\ndistributereward \"asset_name\" snapshot_height \"distribution_asset_name\" gross_distribution_amount ( \"exception_addresses\" ) (\"change_address\") (\"dry_run\")\ngetdistributestatus \"asset_name\" snapshot_height \"distribution_asset_name\" gross_distribution_amount ( \"exception_addresses\" )\ngetsnapshotrequest \"asset_name\" block_height\nlistsnapshotrequests [\"asset_name\" [block_height]]\nrequestsnapshot \"asset_name\" block_height\n\n== Util ==\ncreatemultisig nrequired [\"key\",...]\nestimatefee nblocks\nestimatesmartfee conf_target (\"estimate_mode\")\nsignmessagewithprivkey \"privkey\" \"message\"\nvalidateaddress \"address\"\nverifymessage \"address\" \"signature\" \"message\"\n\n== Wallet ==\nabandontransaction \"txid\"\nabortrescan\naddmultisigaddress nrequired [\"key\",...] ( \"account\" )\naddwitnessaddress \"address\"\nbackupwallet \"destination\"\nbumpfee has been deprecated on the XNA Wallet.\ndumpprivkey \"address\"\ndumpwallet \"filename\"\nencryptwallet \"passphrase\"\ngetaccount \"address\"\ngetaccountaddress \"account\"\ngetaddressesbyaccount \"account\"\ngetbalance ( \"account\" minconf include_watchonly )\ngetmasterkeyinfo\ngetmywords ( \"account\" )\ngetnewaddress ( \"account\" )\ngetrawchangeaddress\ngetreceivedbyaccount \"account\" ( minconf )\ngetreceivedbyaddress \"address\" ( minconf )\ngettransaction \"txid\" ( include_watchonly )\ngetunconfirmedbalance\ngetwalletinfo\nimportaddress \"address\" ( \"label\" rescan p2sh )\nimportmulti \"requests\" ( \"options\" )\nimportprivkey \"privkey\" ( \"label\" ) ( rescan )\nimportprunedfunds\nimportpubkey \"pubkey\" ( \"label\" rescan )\nimportwallet \"filename\"\nkeypoolrefill ( newsize )\nlistaccounts ( minconf include_watchonly)\nlistaddressgroupings\nlistlockunspent\nlistpqaddresses\nlistreceivedbyaccount ( minconf include_empty include_watchonly)\nlistreceivedbyaddress ( minconf include_empty include_watchonly)\nlistsinceblock ( \"blockhash\" target_confirmations include_watchonly include_removed )\nlisttransactions ( \"account\" count skip include_watchonly)\nlistunspent ( minconf maxconf [\"addresses\",...] [include_unsafe] [query_options])\nlistwallets\nlockunspent unlock ([{\"txid\":\"txid\",\"vout\":n},...])\nmove \"fromaccount\" \"toaccount\" amount ( minconf \"comment\" )\nremoveprunedfunds \"txid\"\nrescanblockchain (\"start_height\") (\"stop_height\")\nsendfrom \"fromaccount\" \"toaddress\" amount ( minconf \"comment\" \"comment_to\" )\nsendfromaddress \"from_address\" \"to_address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount replaceable conf_target \"estimate_mode\")\nsendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" [\"address\",...] replaceable conf_target \"estimate_mode\")\nsendtoaddress \"address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount replaceable conf_target \"estimate_mode\")\nsetaccount \"address\" \"account\"\nsettxfee amount\nsignmessage \"address\" \"message\"",
2
+ "": "== Addressindex ==\ngetaddressbalance\ngetaddressdeltas\ngetaddressmempool\ngetaddresstxids\ngetaddressutxos\n\n== Assets ==\ncheckdepinvalidity \"asset_name\" \"address\"\nfreezedepin \"asset_name\" \"address\" (\"change_address\")\ngetassetdata \"asset_name\"\ngetcacheinfo \ngetsnapshot \"asset_name\" block_height\nissue \"asset_name\" qty \"( to_address )\" \"( change_address )\" ( units ) ( reissuable ) ( has_ipfs ) \"( ipfs_hash )\"\nissueunique \"root_name\" [asset_tags] ( [ipfs_hashes] ) \"( to_address )\" \"( change_address )\"\nlistaddressesbyasset \"asset_name\" (onlytotal) (count) (start)\nlistassetbalancesbyaddress \"address\" (onlytotal) (count) (start)\nlistassets \"( asset )\" ( verbose ) ( count ) ( start )\nlistdepinaddresses \"asset_name\" (count) (start)\nlistdepinholders \"asset_name\"\nlistmyassets \"( asset )\" ( verbose ) ( count ) ( start ) (confs) \npurgesnapshot \"asset_name\" block_height\nreissue \"asset_name\" qty \"to_address\" \"change_address\" ( reissuable ) ( new_units) \"( new_ipfs )\" \nselfrevokedepin \"asset_name\"\ntransfer \"asset_name\" qty \"to_address\" \"message\" expire_time \"change_address\" \"asset_change_address\"\ntransferfromaddress \"asset_name\" \"from_address\" qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\ntransferfromaddresses \"asset_name\" [\"from_addresses\"] qty \"to_address\" \"message\" expire_time \"xna_change_address\" \"asset_change_address\"\nunfreezedepin \"asset_name\" \"address\" (\"change_address\")\n\n== Blockchain ==\nclearmempool\ndecodeblock \"blockhex\"\ngetbestblockhash\ngetblock \"blockhash\" ( verbosity ) \ngetblockchaininfo\ngetibdstatus\ngetblockcount\n\ngetblockhash height\ngetblockhashes timestamp\ngetblockheader \"hash\" ( verbose )\ngetchaintips\ngetchaintxstats ( nblocks blockhash )\ngetdifficulty\ngetmempoolancestors txid (verbose)\ngetmempooldescendants txid (verbose)\ngetmempoolentry txid\ngetmempoolinfo\ngetrawmempool ( verbose )\ngetspentinfo\ngettxout \"txid\" n ( include_mempool )\ngettxoutproof [\"txid\",...] ( blockhash )\ngettxoutsetinfo\npreciousblock \"blockhash\"\npruneblockchain\nsavemempool\nverifychain ( checklevel nblocks )\nverifytxoutproof \"proof\"\n\n== Control ==\ngetinfo\ngetmemoryinfo (\"mode\")\ngetrpcinfo\nhelp ( \"command\" )\nstop\nuptime\n\n== Generating ==\ngenerate nblocks ( maxtries )\ngeneratetoaddress nblocks address (maxtries)\ngetgenerate\nsetgenerate generate ( genproclimit )\n\n== Messages ==\nclearmessages \nsendmessage \"channel_name\" \"ipfs_hash\" (expire_time)\nsubscribetochannel \nunsubscribefromchannel \nviewallmessagechannels \nviewallmessages \n\n== Mining ==\ngetblocktemplate ( TemplateRequest )\ngetkawpowhash \"header_hash\" \"mix_hash\" nonce, height, \"target\"\ngetmininginfo\ngetnetworkhashps ( nblocks height )\npprpcsb \"header_hash\" \"mix_hash\" \"nonce\"\nprioritisetransaction <txid> <dummy value> <fee delta>\nsubmitblock \"hexdata\" ( \"dummy\" )\n\n== Network ==\naddnode \"node\" \"add|remove|onetry\"\nclearbanned\ndisconnectnode \"[address]\" [nodeid]\ngetaddednodeinfo ( \"node\" )\ngetconnectioncount\ngetnettotals\ngetnetworkinfo\ngetpeerinfo\ngetpubkey \"address\"\nlistbanned\nping\nsetban \"subnet\" \"add|remove\" (bantime) (absolute)\nsetnetworkactive true|false\n\n== Rawtransactions ==\ncombinerawtransaction [\"hexstring\",...]\ncreaterawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":(amount or object),\"data\":\"hex\",...}\ndecoderawtransaction \"hexstring\"\ndecodescript \"hexstring\"\nfundrawtransaction \"hexstring\" ( options )\ngetrawtransaction \"txid\" ( verbose )\nsendrawtransaction \"hexstring\" ( allowhighfees )\nsignrawtransaction \"hexstring\" ( [{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\",\"redeemScript\":\"hex\"},...] [\"privatekey1\",...] sighashtype )\ntestmempoolaccept [\"rawtxs\"] ( allowhighfees )\n\n== Restricted assets ==\naddtagtoaddress tag_name to_address (change_address) (asset_data)\ncheckaddressrestriction address restricted_name\ncheckaddresstag address tag_name\ncheckglobalrestriction restricted_name\nfreezeaddress asset_name address (change_address) (asset_data)\nfreezerestrictedasset asset_name (change_address) (asset_data)\ngetverifierstring restricted_name\nissuequalifierasset \"asset_name\" qty \"( to_address )\" \"( change_address )\" ( has_ipfs ) \"( ipfs_hash )\"\nissuerestrictedasset \"asset_name\" qty \"verifier\" \"to_address\" \"( change_address )\" (units) ( reissuable ) ( has_ipfs ) \"( ipfs_hash )\"\nisvalidverifierstring verifier_string\nlistaddressesfortag tag_name\nlistaddressrestrictions address\nlistglobalrestrictions\nlisttagsforaddress address\nreissuerestrictedasset \"asset_name\" qty to_address ( change_verifier ) ( \"new_verifier\" ) \"( change_address )\" ( new_units ) ( reissuable ) \"( new_ipfs )\"\nremovetagfromaddress tag_name to_address (change_address) (asset_data)\ntransferqualifier \"qualifier_name\" qty \"to_address\" (\"change_address\") (\"message\") (expire_time) \nunfreezeaddress asset_name address (change_address) (asset_data)\nunfreezerestrictedasset asset_name (change_address) (asset_data)\n\n== Restricted ==\nviewmyrestrictedaddresses \nviewmytaggedaddresses \n\n== Rewards ==\ncancelsnapshotrequest \"asset_name\" block_height\ndistributereward \"asset_name\" snapshot_height \"distribution_asset_name\" gross_distribution_amount ( \"exception_addresses\" ) (\"change_address\") (\"dry_run\")\ngetdistributestatus \"asset_name\" snapshot_height \"distribution_asset_name\" gross_distribution_amount ( \"exception_addresses\" )\ngetsnapshotrequest \"asset_name\" block_height\nlistsnapshotrequests [\"asset_name\" [block_height]]\nrequestsnapshot \"asset_name\" block_height\n\n== Util ==\ncreatemultisig nrequired [\"key\",...]\nestimatefee nblocks\nestimatesmartfee conf_target (\"estimate_mode\")\nsignmessagewithprivkey \"privkey\" \"message\"\nvalidateaddress \"address\"\nverifymessage \"address\" \"signature\" \"message\"\n\n== Wallet ==\nabandontransaction \"txid\"\nabortrescan\naddmultisigaddress nrequired [\"key\",...] ( \"account\" )\naddwitnessaddress \"address\"\nbackupwallet \"destination\"\nbumpfee has been deprecated on the XNA Wallet.\ndumpprivkey \"address\"\ndumpwallet \"filename\"\nencryptwallet \"passphrase\"\ngetaccount \"address\"\ngetaccountaddress \"account\"\ngetaddressesbyaccount \"account\"\ngetbalance ( \"account\" minconf include_watchonly )\ngetmasterkeyinfo\ngetmywords ( \"account\" )\ngetnewaddress ( \"account\" \"address_type\" )\ngetrawchangeaddress ( \"address_type\" )\ngetreceivedbyaccount \"account\" ( minconf )\ngetreceivedbyaddress \"address\" ( minconf )\ngettransaction \"txid\" ( include_watchonly )\ngetunconfirmedbalance\ngetwalletinfo\nimportaddress \"address\" ( \"label\" rescan p2sh )\nimportmulti \"requests\" ( \"options\" )\nimportprivkey \"privkey\" ( \"label\" ) ( rescan )\nimportprunedfunds\nimportpubkey \"pubkey\" ( \"label\" rescan )\nimportwallet \"filename\"\nkeypoolrefill ( newsize )\nlistaccounts ( minconf include_watchonly)\nlistaddressgroupings\nlistlockunspent\nlistpqaddresses\nlistreceivedbyaccount ( minconf include_empty include_watchonly)\nlistreceivedbyaddress ( minconf include_empty include_watchonly)\nlistsinceblock ( \"blockhash\" target_confirmations include_watchonly include_removed )\nlisttransactions ( \"account\" count skip include_watchonly)\nlistunspent ( minconf maxconf [\"addresses\",...] [include_unsafe] [query_options])\nlistwallets\nlockunspent unlock ([{\"txid\":\"txid\",\"vout\":n},...])\nmove \"fromaccount\" \"toaccount\" amount ( minconf \"comment\" )\nremoveprunedfunds \"txid\"\nrescanblockchain (\"start_height\") (\"stop_height\")\nsendfrom \"fromaccount\" \"toaddress\" amount ( minconf \"comment\" \"comment_to\" )\nsendfromaddress \"from_address\" \"to_address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount replaceable conf_target \"estimate_mode\")\nsendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" [\"address\",...] replaceable conf_target \"estimate_mode\")\nsendtoaddress \"address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount replaceable conf_target \"estimate_mode\")\nsetaccount \"address\" \"account\"\nsettxfee amount\nsignmessage \"address\" \"message\"",
3
3
  "abandontransaction": "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> neurai-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:19001/\n",
4
4
  "abortrescan": "abortrescan\n\nStops current wallet rescan triggered e.g. by an importprivkey call.\n\nExamples:\n\nImport a private key\n> neurai-cli importprivkey \"mykey\"\n\nAbort the running wallet rescan\n> neurai-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:19001/\n",
5
5
  "addmultisigaddress": "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n\nAdd a nrequired-to-sign multisignature address to the wallet.\nEach key is a Neurai 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 neurai addresses or hex-encoded public keys\n [\n \"address\" (string) neurai 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 neurai address associated with the keys.\n\nExamples:\n\nAdd a multisig address from 2 addresses\n> neurai-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:19001/\n",
@@ -92,10 +92,10 @@
92
92
  "getnettotals": "getnettotals\n\nReturns information about network traffic, including bytes in, bytes out,\nand current time.\n\nResult:\n{\n \"totalbytesrecv\": n, (numeric) Total bytes received\n \"totalbytessent\": n, (numeric) Total bytes sent\n \"timemillis\": t, (numeric) Current UNIX time in milliseconds\n \"uploadtarget\":\n {\n \"timeframe\": n, (numeric) Length of the measuring timeframe in seconds\n \"target\": n, (numeric) Target in bytes\n \"target_reached\": true|false, (boolean) True if target is reached\n \"serve_historical_blocks\": true|false, (boolean) True if serving historical blocks\n \"bytes_left_in_cycle\": t, (numeric) Bytes left in current time cycle\n \"time_left_in_cycle\": t (numeric) Seconds left in current time cycle\n }\n}\n\nExamples:\n> neurai-cli getnettotals \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnettotals\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
93
93
  "getnetworkhashps": "getnetworkhashps ( nblocks height )\n\nReturns the estimated network hashes per second based on the last n blocks.\nPass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\nPass in [height] to estimate the network speed at the time when a certain block was found.\n\nArguments:\n1. nblocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.\n2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n\nResult:\nx (numeric) Hashes per second estimated\n\nExamples:\n> neurai-cli getnetworkhashps \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkhashps\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
94
94
  "getnetworkinfo": "getnetworkinfo\nReturns an object containing various state info regarding P2P networking.\n\nResult:\n{\n \"version\": xxxxx, (numeric) the server version\n \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n \"protocolversion\": xxxxx, (numeric) the protocol version\n \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n \"localrelay\": true|false, (bool) true if transaction relay is requested from peers\n \"timeoffset\": xxxxx, (numeric) the time offset\n \"connections\": xxxxx, (numeric) the number of connections\n \"networkactive\": true|false, (bool) whether p2p networking is enabled\n \"networks\": [ (array) information per network\n {\n \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n \"limited\": true|false, (boolean) is the network limited using -onlynet?\n \"reachable\": true|false, (boolean) is the network reachable?\n \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n \"proxy_randomize_credentials\": true|false, (string) Whether randomized credentials are used\n }\n ,...\n ],\n \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for transactions in XNA/kB\n \"incrementalfee\": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in XNA/kB\n \"localaddresses\": [ (array) list of local addresses\n {\n \"address\": \"xxxx\", (string) network address\n \"port\": xxx, (numeric) network port\n \"score\": xxx (numeric) relative score\n }\n ,...\n ]\n \"warnings\": \"...\" (string) any network and blockchain warnings\n}\n\nExamples:\n> neurai-cli getnetworkinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
95
- "getnewaddress": "getnewaddress ( \"account\" )\n\nReturns a new Neurai address for receiving payments.\nIf 'account' is specified (DEPRECATED), it is added to the address book \nso payments received with the address will be credited to 'account'.\n\nArguments:\n1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n\nResult:\n\"address\" (string) The new neurai address\n\nExamples:\n> neurai-cli getnewaddress \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnewaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
95
+ "getnewaddress": "getnewaddress ( \"account\" \"address_type\" )\n\nReturns a new Neurai address for receiving payments.\nIf 'account' is specified (DEPRECATED), it is added to the address book \nso payments received with the address will be credited to 'account'.\n\nArguments:\n1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n2. \"address_type\" (string, optional) The address family: \"legacy\" (Base58, secp256k1), \"pq\" (strict post-quantum, witness v2, pq1.../tpq1...) or \"ecdsa\" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's default family is used (legacy for classic wallets, generic AuthScript v1 for PQ wallets).\n\nResult:\n\"address\" (string) The new neurai address\n\nExamples:\n> neurai-cli getnewaddress \n> neurai-cli getnewaddress \"\" \"ecdsa\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnewaddress\", \"params\": [\"\", \"pq\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
96
96
  "getpeerinfo": "getpeerinfo\n\nReturns data about each connected network node as a json array of objects.\n\nResult:\n[\n {\n \"id\": n, (numeric) Peer index\n \"addr\":\"host:port\", (string) The IP address and port of the peer\n \"addrbind\":\"ip:port\", (string) Bind address of the connection to the peer\n \"addrlocal\":\"ip:port\", (string) Local address as reported by the peer\n \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n \"bytessent\": n, (numeric) The total bytes sent\n \"bytesrecv\": n, (numeric) The total bytes received\n \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n \"timeoffset\": ttt, (numeric) The time offset in seconds\n \"pingtime\": n, (numeric) ping time (if available)\n \"minping\": n, (numeric) minimum observed ping time (if any at all)\n \"pingwait\": n, (numeric) ping wait (if non-zero)\n \"version\": v, (numeric) The peer version, such as 7001\n \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n \"addnode\": true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection\n \"startingheight\": n, (numeric) The starting height (block) of the peer\n \"banscore\": n, (numeric) The ban score\n \"synced_headers\": n, (numeric) The last header we have in common with this peer\n \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n \"inflight\": [\n n, (numeric) The heights of blocks we're currently asking from this peer\n ...\n ],\n \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n \"bytessent_per_msg\": {\n \"addr\": n, (numeric) The total bytes sent aggregated by message type\n ...\n },\n \"bytesrecv_per_msg\": {\n \"addr\": n, (numeric) The total bytes received aggregated by message type\n ...\n }\n }\n ,...\n]\n\nExamples:\n> neurai-cli getpeerinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getpeerinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
97
97
  "getpubkey": "getpubkey \"address\"\n\nReturns the public key for an address that has revealed it by spending (requires pubkeyindex to be enabled).\n\nArguments:\n1. \"address\" (string, required) The Neurai address\n\nResult:\n{\n \"address\": \"address\", (string) The Neurai address\n \"pubkey\": \"hex\", (string) The public key in hex format\n \"revealed\": true|false, (boolean) Whether the public key has been revealed\n \"height\": n, (numeric) Block height where it was revealed\n \"txid\": \"hash\" (string) Transaction ID where it was revealed\n}\n\nExamples:\n> neurai-cli getpubkey \"NXa1b2c3d4e5f6...\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getpubkey\", \"params\": [\"NXa1b2c3d4e5f6...\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
98
- "getrawchangeaddress": "getrawchangeaddress\n\nReturns a new Neurai address, for receiving change.\nThis is for use with raw transactions, NOT normal use.\n\nResult:\n\"address\" (string) The address\n\nExamples:\n> neurai-cli getrawchangeaddress \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawchangeaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
98
+ "getrawchangeaddress": "getrawchangeaddress ( \"address_type\" )\n\nReturns a new Neurai address, for receiving change.\nThis is for use with raw transactions, NOT normal use.\n\nArguments:\n1. \"address_type\" (string, optional) \"legacy\", \"pq\" (strict witness v2) or \"ecdsa\" (strict witness v3). Default: the wallet's default family.\n\nResult:\n\"address\" (string) The address\n\nExamples:\n> neurai-cli getrawchangeaddress \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawchangeaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
99
99
  "getrawmempool": "getrawmempool ( verbose )\n\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n\nArguments:\n1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n\nResult: (for verbose = false):\n[ (json array of string)\n \"transactionid\" (string) The transaction id\n ,...\n]\n\nResult: (for verbose = true):\n{ (json object)\n \"transactionid\" : { (json object)\n \"size\" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.\n \"fee\" : n, (numeric) transaction fee in XNA\n \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n \"height\" : n, (numeric) block height when transaction entered pool\n \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n \"descendantsize\" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)\n \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n \"ancestorsize\" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)\n \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n \"wtxid\" : hash, (string) hash of serialized transaction, including witness data\n \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n \"transactionid\", (string) parent transaction id\n ... ]\n }, ...\n}\n\nExamples:\n> neurai-cli getrawmempool true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawmempool\", \"params\": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
100
100
  "getrawtransaction": "getrawtransaction \"txid\" ( verbose )\n\nNOTE: By default this function only works for mempool transactions. If the -txindex option is\nenabled, it also works for blockchain transactions.\nDEPRECATED: for now, it also works for transactions with unspent outputs.\n\nReturn the raw transaction data.\n\nIf verbose is 'true', returns an Object with information about 'txid'.\nIf verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n\nArguments:\n1. \"txid\" (string, required) The transaction id\n2. verbose (bool, optional, default=false) If false, return a string, otherwise return a json object\n\nResult (if verbose is not set or set to false):\n\"data\" (string) The serialized, hex-encoded data for 'txid'\n\nResult (if verbose is set to true):\n{\n \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n \"txid\" : \"id\", (string) The transaction id (same as provided)\n \"hash\" : \"id\", (string) The transaction hash (differs from txid for witness transactions)\n \"size\" : n, (numeric) The serialized transaction size\n \"vsize\" : n, (numeric) The virtual transaction size (differs from size for witness transactions)\n \"version\" : n, (numeric) The version\n \"locktime\" : ttt, (numeric) The lock time\n \"vin\" : [ (array of json objects)\n {\n \"txid\": \"id\", (string) The transaction id\n \"vout\": n, (numeric) \n \"scriptSig\": { (json object) The script\n \"asm\": \"asm\", (string) asm\n \"hex\": \"hex\" (string) hex\n },\n \"sequence\": n (numeric) The script sequence number\n \"txinwitness\": [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n }\n ,...\n ],\n \"vout\" : [ (array of json objects)\n {\n \"value\" : x.xxx, (numeric) The value in XNA\n \"n\" : n, (numeric) index\n \"scriptPubKey\" : { (json object)\n \"asm\" : \"asm\", (string) the asm\n \"hex\" : \"hex\", (string) the hex\n \"reqSigs\" : n, (numeric) The required sigs\n \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n \"addresses\" : [ (json array of string)\n \"address\" (string) neurai address\n ,...\n ]\n }\n }\n ,...\n ],\n \"blockhash\" : \"hash\", (string) the block hash\n \"confirmations\" : n, (numeric) The confirmations\n \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n}\n\nExamples:\n> neurai-cli getrawtransaction \"mytxid\"\n> neurai-cli getrawtransaction \"mytxid\" true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawtransaction\", \"params\": [\"mytxid\", true] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
101
101
  "getreceivedbyaccount": "getreceivedbyaccount \"account\" ( minconf )\n\nDEPRECATED. Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations.\n\nArguments:\n1. \"account\" (string, required) The selected account, may be the default account using \"\".\n2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n\nResult:\namount (numeric) The total amount in XNA received for this account.\n\nExamples:\n\nAmount received by the default account with at least 1 confirmation\n> neurai-cli getreceivedbyaccount \"\"\n\nAmount received at the tabby account including unconfirmed amounts with zero confirmations\n> neurai-cli getreceivedbyaccount \"tabby\" 0\n\nThe amount with at least 6 confirmations\n> neurai-cli getreceivedbyaccount \"tabby\" 6\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbyaccount\", \"params\": [\"tabby\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
@@ -137,7 +137,7 @@
137
137
  "listglobalrestrictions": "listglobalrestrictions\n\nTHIS COMMAND IS NOT YET ACTIVE! Restricted assets must be active\n\n\nList all global restricted assets\n\nResult:\n[\"asset_name\", (string) The asset name\n...,\n]\n\nExamples:\n> neurai-cli listglobalrestrictions \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listglobalrestrictions\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
138
138
  "listlockunspent": "listlockunspent\n\nReturns list of temporarily unspendable outputs.\nSee the lockunspent call to lock and unlock transactions for spending.\n\nResult:\n[\n {\n \"txid\" : \"transactionid\", (string) The transaction id locked\n \"vout\" : n (numeric) The vout value\n }\n ,...\n]\n\nExamples:\n\nList the unspent transactions\n> neurai-cli listunspent \n\nLock an unspent transaction\n> neurai-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nList the locked transactions\n> neurai-cli listlockunspent \n\nUnlock the transaction again\n> neurai-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listlockunspent\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
139
139
  "listmyassets": "listmyassets \"( asset )\" ( verbose ) ( count ) ( start ) (confs) \n\nTHIS COMMAND IS NOT YET ACTIVE!\nhttps://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki\n\nReturns a list of all asset that are owned by this wallet\n\nArguments:\n1. \"asset\" (string, optional, default=\"*\") filters results -- must be an asset name or a partial asset name followed by '*' ('*' matches all trailing characters)\n2. \"verbose\" (boolean, optional, default=false) when false results only contain balances -- when true results include outpoints\n3. \"count\" (integer, optional, default=ALL) truncates results to include only the first _count_ assets found\n4. \"start\" (integer, optional, default=0) results skip over the first _start_ assets found (if negative it skips back from the end)\n5. \"confs\" (integet, optional, default=0) results are skipped if they don't have this number of confirmations\n\nResult (verbose=false):\n{\n (asset_name): balance,\n ...\n}\n\nResult (verbose=true):\n{\n (asset_name):\n {\n \"balance\": balance,\n \"outpoints\":\n [\n {\n \"txid\": txid,\n \"vout\": vout,\n \"amount\": amount\n }\n {...}, {...}\n ]\n }\n}\n{...}, {...}\n\nExamples:\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listmyassets\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n> neurai-cli listmyassets ASSET\n> neurai-cli listmyassets \"ASSET*\" true 10 20\n> neurai-cli listmyassets \"ASSET*\" true 10 20 1\n",
140
- "listpqaddresses": "listpqaddresses\n\nReturns the list of post-quantum (ML-DSA-44) Bech32m addresses in the wallet.\n\nResult:\n[ (json array of strings)\n \"address\" (string) A post-quantum Bech32m address (nq1...)\n ...\n]\n\nExamples:\n> neurai-cli listpqaddresses \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listpqaddresses\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
140
+ "listpqaddresses": "listpqaddresses\n\nReturns the list of post-quantum (ML-DSA-44) Bech32m addresses in the wallet.\n\nResult:\n[ (json array of strings)\n \"address\" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)\n ...\n]\n\nExamples:\n> neurai-cli listpqaddresses \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listpqaddresses\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
141
141
  "listreceivedbyaccount": "listreceivedbyaccount ( minconf include_empty include_watchonly)\n\nDEPRECATED. List balances by account.\n\nArguments:\n1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n2. include_empty (bool, optional, default=false) Whether to include accounts that haven't received any payments.\n3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n\nResult:\n[\n {\n \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n \"account\" : \"accountname\", (string) The account name of the receiving account\n \"amount\" : x.xxx, (numeric) The total amount received by addresses with this account\n \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n \"label\" : \"label\" (string) A comment for the address/transaction, if any\n }\n ,...\n]\n\nExamples:\n> neurai-cli listreceivedbyaccount \n> neurai-cli listreceivedbyaccount 6 true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaccount\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
142
142
  "listreceivedbyaddress": "listreceivedbyaddress ( minconf include_empty include_watchonly)\n\nList balances by receiving address.\n\nArguments:\n1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n2. include_empty (bool, optional, default=false) Whether to include addresses that haven't received any payments.\n3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n\nResult:\n[\n {\n \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n \"address\" : \"receivingaddress\", (string) The receiving address\n \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n \"amount\" : x.xxx, (numeric) The total amount in XNA received by the address\n \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n \"label\" : \"label\", (string) A comment for the address/transaction, if any\n \"txids\": [\n n, (numeric) The ids of transactions received with the address \n ...\n ]\n }\n ,...\n]\n\nExamples:\n> neurai-cli listreceivedbyaddress \n> neurai-cli listreceivedbyaddress 6 true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaddress\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
143
143
  "listsinceblock": "listsinceblock ( \"blockhash\" target_confirmations include_watchonly include_removed )\n\nGet all transactions in blocks since block [blockhash], or all transactions if omitted.\nIf \"blockhash\" is no longer a part of the main chain, transactions from the fork point onward are included.\nAdditionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the \"removed\" array.\n\nArguments:\n1. \"blockhash\" (string, optional) The block hash to list transactions since\n2. target_confirmations: (numeric, optional, default=1) Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value\n3. include_watchonly: (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')\n4. include_removed: (bool, optional, default=true) Show transactions that were removed due to a reorg in the \"removed\" array\n (not guaranteed to work on pruned nodes)\n\nResult:\n{\n \"transactions\": [\n \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n \"address\":\"address\", (string) The neurai address of the transaction. Not present for move transactions (category = move).\n \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n \"amount\": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves \n outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n \"vout\" : n, (numeric) the vout value\n \"fee\": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the 'send' category of transactions.\n \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n When it's < 0, it means the transaction conflicted that many blocks ago.\n \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n may be unknown for unconfirmed transactions not in the mempool\n \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n \"comment\": \"...\", (string) If a comment is associated with the transaction.\n \"label\" : \"label\" (string) A comment for the address/transaction, if any\n \"to\": \"...\", (string) If a comment to is associated with the transaction.\n ],\n \"removed\": [\n <structure is the same as \"transactions\" above, only present if include_removed=true>\n Note: transactions that were readded in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n ],\n \"lastblock\": \"lastblockhash\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n}\n\nExamples:\n> neurai-cli listsinceblock \n> neurai-cli listsinceblock \"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listsinceblock\", \"params\": [\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
@@ -189,7 +189,7 @@
189
189
  "unfreezerestrictedasset": "unfreezerestrictedasset asset_name (change_address) (asset_data)\n\nTHIS COMMAND IS NOT YET ACTIVE! Restricted assets must be active\n\n\nUnfreeze all trading for a specific restricted asset\n\nArguments:\n1. \"asset_name\" (string, required) the name of the restricted asset you want to unfreeze\n2. \"change_address\" (string, optional) The change address for the owner token of the restricted asset\n4. \"asset_data\" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the owner token\n\nResult:\n\"txid\" (string) The transaction id\n\nExamples:\n> neurai-cli unfreezerestrictedasset \"$RESTRICTED_ASSET\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"unfreezerestrictedasset\", \"params\": [\"$RESTRICTED_ASSET\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n> neurai-cli unfreezerestrictedasset \"$RESTRICTED_ASSET\" \"change_address\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"unfreezerestrictedasset\", \"params\": [\"$RESTRICTED_ASSET\" \"change_address\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
190
190
  "unsubscribefromchannel": "unsubscribefromchannel \n\nTHIS COMMAND IS NOT YET ACTIVE!\nhttps://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki\n\nUnsubscribe from a certain message channel\n\nArguments:\n1. \"channel_name\" (string, required) The channel name to unsubscribe from, must end with '!' or have an '~' in the name\n\nResult:[\n\n]\n\nExamples:\n> neurai-cli unsubscribefromchannel \"ASSET_NAME!\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"unsubscribefromchannel\", \"params\": [\"ASSET_NAME!\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
191
191
  "uptime": "uptime\n\nReturns the total uptime of the server.\n\nResult:\nttt (numeric) The number of seconds that the server has been running\n\nExamples:\n> neurai-cli uptime \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"uptime\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
192
- "validateaddress": "validateaddress \"address\"\n\nReturn information about the given neurai address.\n\nArguments:\n1. \"address\" (string, required) The neurai address to validate\n\nResult:\n{\n \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n \"address\" : \"address\", (string) The neurai address validated\n \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n \"ismine\" : true|false, (boolean) If the address is yours or not\n \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n \"isscript\" : true|false, (boolean) If the key is a script\n \"script\" : \"type\" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash\n \"hex\" : \"hex\", (string, optional) The redeemscript for the p2sh address\n \"addresses\" (string, optional) Array of addresses associated with the known redeemscript\n [\n \"address\"\n ,...\n ]\n \"sigsrequired\" : xxxxx (numeric, optional) Number of signatures required to spend multisig output\n \"pubkey\" : \"publickeyhex\", (string) The hex value of the raw public key\n \"iscompressed\" : true|false, (boolean) If the address is compressed\n \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n \"timestamp\" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)\n \"hdkeypath\" : \"keypath\" (string, optional) The HD keypath if the key is HD and available\n \"hdmasterkeyid\" : \"<hash160>\" (string, optional) The Hash160 of the HD master pubkey\n}\n\nExamples:\n> neurai-cli validateaddress \"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"validateaddress\", \"params\": [\"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
192
+ "validateaddress": "validateaddress \"address\"\n\nReturn information about the given neurai address.\n\nArguments:\n1. \"address\" (string, required) The neurai address to validate\n\nResult:\n{\n \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n \"address\" : \"address\", (string) The neurai address validated\n \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n \"ismine\" : true|false, (boolean) If the address is yours or not\n \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n \"isscript\" : true|false, (boolean) If the key is a script\n \"isauthscript\" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)\n \"witness_version\" : n, (numeric, optional) AuthScript witness version: 1 (generic AuthScript, nc1p.../tnc1p...), 2 (strict post-quantum, pq1z.../tpq1z...) or 3 (strict ECDSA, nq1r.../tnq1r...)\n \"family\" : \"family\", (string, optional) AuthScript family: \"authscript\" (v1; the commitment does not reveal the authentication type), \"pq\" (v2) or \"ecdsa\" (v3)\n \"commitment\" : \"hex\", (string, optional) Strict addresses (v2/v3) only: the 32-byte AuthScript commitment as a uint256 hex string (byte-reversed with respect to the scriptPubKey)\n \"script\" : \"type\" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash\n \"hex\" : \"hex\", (string, optional) The redeemscript for the p2sh address\n \"addresses\" (string, optional) Array of addresses associated with the known redeemscript\n [\n \"address\"\n ,...\n ]\n \"sigsrequired\" : xxxxx (numeric, optional) Number of signatures required to spend multisig output\n \"pubkey\" : \"publickeyhex\", (string) The hex value of the raw public key\n \"iscompressed\" : true|false, (boolean) If the address is compressed\n \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n \"timestamp\" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)\n \"hdkeypath\" : \"keypath\" (string, optional) The HD keypath if the key is HD and available\n \"hdmasterkeyid\" : \"<hash160>\" (string, optional) The Hash160 of the HD master pubkey\n}\n\nExamples:\n> neurai-cli validateaddress \"NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"validateaddress\", \"params\": [\"NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
193
193
  "verifychain": "verifychain ( checklevel nblocks )\n\nVerifies blockchain database.\n\nArguments:\n1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.\n2. nblocks (numeric, optional, default=6, 0=all) The number of blocks to check.\n\nResult:\ntrue|false (boolean) Verified or not\n\nExamples:\n> neurai-cli verifychain \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifychain\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
194
194
  "verifymessage": "verifymessage \"address\" \"signature\" \"message\"\n\nVerify a signed message\n\nArguments:\n1. \"address\" (string, required) The neurai address to use for the signature.\n2. \"signature\" (string, required) The signature provided by the signer in base 64 encoding (see signmessage).\n3. \"message\" (string, required) The message that was signed.\n\nResult:\ntrue|false (boolean) If the signature is verified or not.\n\nExamples:\n\nUnlock the wallet for 30 seconds\n> neurai-cli walletpassphrase \"mypassphrase\" 30\n\nCreate the signature\n> neurai-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"my message\"\n\nVerify the signature\n> neurai-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\" \"signature\" \"my message\"\n\nAs json rpc\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifymessage\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", \"signature\", \"my message\"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/\n",
195
195
  "verifytxoutproof": "verifytxoutproof \"proof\"\n\nVerifies that a proof points to a transaction in a block, returning the transaction it commits to\nand throwing an RPC error if the block is not in our best chain\n\nArguments:\n1. \"proof\" (string, required) The hex-encoded proof generated by gettxoutproof\n\nResult:\n[\"txid\"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid\n",
package/docs.ts CHANGED
@@ -3038,7 +3038,7 @@ getnetworkinfo:'getnetworkinfo',
3038
3038
 
3039
3039
 
3040
3040
 
3041
- /** getnewaddress ( "account" )
3041
+ /** getnewaddress ( "account" "address_type" )
3042
3042
 
3043
3043
  Returns a new Neurai address for receiving payments.
3044
3044
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -3046,13 +3046,15 @@ so payments received with the address will be credited to 'account'.
3046
3046
 
3047
3047
  Arguments:
3048
3048
  1. "account" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.
3049
+ 2. "address_type" (string, optional) The address family: "legacy" (Base58, secp256k1), "pq" (strict post-quantum, witness v2, pq1.../tpq1...) or "ecdsa" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's default family is used (legacy for classic wallets, generic AuthScript v1 for PQ wallets).
3049
3050
 
3050
3051
  Result:
3051
3052
  "address" (string) The new neurai address
3052
3053
 
3053
3054
  Examples:
3054
3055
  > neurai-cli getnewaddress
3055
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3056
+ > neurai-cli getnewaddress "" "ecdsa"
3057
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["", "pq"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3056
3058
  **/
3057
3059
  getnewaddress:'getnewaddress',
3058
3060
 
@@ -3143,11 +3145,14 @@ getpubkey:'getpubkey',
3143
3145
 
3144
3146
 
3145
3147
 
3146
- /** getrawchangeaddress
3148
+ /** getrawchangeaddress ( "address_type" )
3147
3149
 
3148
3150
  Returns a new Neurai address, for receiving change.
3149
3151
  This is for use with raw transactions, NOT normal use.
3150
3152
 
3153
+ Arguments:
3154
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
3155
+
3151
3156
  Result:
3152
3157
  "address" (string) The address
3153
3158
 
@@ -4456,7 +4461,7 @@ Returns the list of post-quantum (ML-DSA-44) Bech32m addresses in the wallet.
4456
4461
 
4457
4462
  Result:
4458
4463
  [ (json array of strings)
4459
- "address" (string) A post-quantum Bech32m address (nq1...)
4464
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
4460
4465
  ...
4461
4466
  ]
4462
4467
 
@@ -6009,6 +6014,10 @@ Result:
6009
6014
  "ismine" : true|false, (boolean) If the address is yours or not
6010
6015
  "iswatchonly" : true|false, (boolean) If the address is watchonly
6011
6016
  "isscript" : true|false, (boolean) If the key is a script
6017
+ "isauthscript" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)
6018
+ "witness_version" : n, (numeric, optional) AuthScript witness version: 1 (generic AuthScript, nc1p.../tnc1p...), 2 (strict post-quantum, pq1z.../tpq1z...) or 3 (strict ECDSA, nq1r.../tnq1r...)
6019
+ "family" : "family", (string, optional) AuthScript family: "authscript" (v1; the commitment does not reveal the authentication type), "pq" (v2) or "ecdsa" (v3)
6020
+ "commitment" : "hex", (string, optional) Strict addresses (v2/v3) only: the 32-byte AuthScript commitment as a uint256 hex string (byte-reversed with respect to the scriptPubKey)
6012
6021
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
6013
6022
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
6014
6023
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -6026,8 +6035,8 @@ Result:
6026
6035
  }
6027
6036
 
6028
6037
  Examples:
6029
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
6030
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
6038
+ > neurai-cli validateaddress "NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"
6039
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
6031
6040
  **/
6032
6041
  validateaddress:'validateaddress',
6033
6042
 
package/index.ts CHANGED
@@ -3,6 +3,20 @@ import { methods } from "./docs";
3
3
 
4
4
  export { methods };
5
5
 
6
+ export const MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
7
+ export const TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
8
+
9
+ /** Reject an RPC endpoint that serves a different chain with the same network label. */
10
+ export async function assertRpcGenesis(
11
+ rpc: (method: string, params: any[]) => Promise<unknown>,
12
+ expectedGenesisHash: string,
13
+ ): Promise<void> {
14
+ const actual = await rpc("getblockhash", [0]);
15
+ if (typeof actual !== "string" || actual.toLowerCase() !== expectedGenesisHash.toLowerCase()) {
16
+ throw new Error(`Unexpected genesis block: expected ${expectedGenesisHash}, received ${String(actual)}`);
17
+ }
18
+ }
19
+
6
20
  /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
7
21
  export function rpcNumber(value: string): LosslessNumber {
8
22
  return new LosslessNumber(value);
package/neurai_methods.md CHANGED
@@ -2466,7 +2466,7 @@ Examples:
2466
2466
 
2467
2467
  &nbsp;<br> &nbsp;<br/>
2468
2468
  ## getnewaddress
2469
- &nbsp;<br/> getnewaddress ( "account" )
2469
+ &nbsp;<br/> getnewaddress ( "account" "address_type" )
2470
2470
 
2471
2471
  Returns a new Neurai address for receiving payments.
2472
2472
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -2474,13 +2474,15 @@ so payments received with the address will be credited to 'account'.
2474
2474
 
2475
2475
  Arguments:
2476
2476
  1. "account" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.
2477
+ 2. "address_type" (string, optional) The address family: "legacy" (Base58, secp256k1), "pq" (strict post-quantum, witness v2, pq1.../tpq1...) or "ecdsa" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's default family is used (legacy for classic wallets, generic AuthScript v1 for PQ wallets).
2477
2478
 
2478
2479
  Result:
2479
2480
  "address" (string) The new neurai address
2480
2481
 
2481
2482
  Examples:
2482
2483
  > neurai-cli getnewaddress
2483
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2484
+ > neurai-cli getnewaddress "" "ecdsa"
2485
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["", "pq"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2484
2486
 
2485
2487
  &nbsp;<br> &nbsp;<br/>
2486
2488
  ## getpeerinfo
@@ -2559,11 +2561,14 @@ Examples:
2559
2561
 
2560
2562
  &nbsp;<br> &nbsp;<br/>
2561
2563
  ## getrawchangeaddress
2562
- &nbsp;<br/> getrawchangeaddress
2564
+ &nbsp;<br/> getrawchangeaddress ( "address_type" )
2563
2565
 
2564
2566
  Returns a new Neurai address, for receiving change.
2565
2567
  This is for use with raw transactions, NOT normal use.
2566
2568
 
2569
+ Arguments:
2570
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2571
+
2567
2572
  Result:
2568
2573
  "address" (string) The address
2569
2574
 
@@ -3704,7 +3709,7 @@ Returns the list of post-quantum (ML-DSA-44) Bech32m addresses in the wallet.
3704
3709
 
3705
3710
  Result:
3706
3711
  [ (json array of strings)
3707
- "address" (string) A post-quantum Bech32m address (nq1...)
3712
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
3708
3713
  ...
3709
3714
  ]
3710
3715
 
@@ -5049,6 +5054,10 @@ Result:
5049
5054
  "ismine" : true|false, (boolean) If the address is yours or not
5050
5055
  "iswatchonly" : true|false, (boolean) If the address is watchonly
5051
5056
  "isscript" : true|false, (boolean) If the key is a script
5057
+ "isauthscript" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)
5058
+ "witness_version" : n, (numeric, optional) AuthScript witness version: 1 (generic AuthScript, nc1p.../tnc1p...), 2 (strict post-quantum, pq1z.../tpq1z...) or 3 (strict ECDSA, nq1r.../tnq1r...)
5059
+ "family" : "family", (string, optional) AuthScript family: "authscript" (v1; the commitment does not reveal the authentication type), "pq" (v2) or "ecdsa" (v3)
5060
+ "commitment" : "hex", (string, optional) Strict addresses (v2/v3) only: the 32-byte AuthScript commitment as a uint256 hex string (byte-reversed with respect to the scriptPubKey)
5052
5061
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
5053
5062
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
5054
5063
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -5066,8 +5075,8 @@ Result:
5066
5075
  }
5067
5076
 
5068
5077
  Examples:
5069
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
5070
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
5078
+ > neurai-cli validateaddress "NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"
5079
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
5071
5080
 
5072
5081
  &nbsp;<br> &nbsp;<br/>
5073
5082
  ## verifychain
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuraiproject/neurai-rpc",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Helps you access your Neurai full node using RPC from JavaScript",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -48,7 +48,7 @@
48
48
  "@types/node": "^18.19.130",
49
49
  "jest": "^29.7.0",
50
50
  "tsup": "^8.5.1",
51
- "typescript": "^5.5.3"
51
+ "typescript": "^5.9.3"
52
52
  },
53
53
  "overrides": {
54
54
  "esbuild": "^0.28.1"