@neuraiproject/neurai-rpc 0.6.0 → 0.6.2

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,25 @@ 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.6.2] - 2026-09-22
9
+
10
+ ### Documentation — neurai-key 5 address types
11
+
12
+ Documentation only; the runtime client (`rpc(method, params)`) is unchanged.
13
+ `docs.json` entries refreshed from the node's `help` output and `docs.ts` /
14
+ `neurai_methods.md` regenerated with `npm run create-docs`:
15
+
16
+ - `getnewaddress ( "account" "address_type" )`: new `address_type` argument,
17
+ `"legacy"` (Base58), `"pq"` (strict post-quantum, witness v2,
18
+ `pq1…`/`tpq1…`) or `"ecdsa"` (strict ECDSA, witness v3,
19
+ `nq1r…`/`tnq1r…`). Without it the wallet's default family is used.
20
+ - `getrawchangeaddress ( "address_type" )`: same optional argument.
21
+ - `listpqaddresses`: returns generic AuthScript v1 addresses with a PQ key
22
+ (`nc1p…`/`tnc1p…`), no longer `nq1…`.
23
+ - `validateaddress`: documents the fields returned for AuthScript witness
24
+ addresses (`isauthscript`, `witness_version`, `family`, `commitment`) and
25
+ uses a Neurai example address instead of a Bitcoin one.
26
+
8
27
  ## [0.6.0] - 2026-08-22
9
28
 
10
29
  ### Breaking — Neurai DePIN protocol 2
package/README.md CHANGED
@@ -113,3 +113,17 @@ Generated command documentation is in
113
113
 
114
114
  - [GitHub repository](https://github.com/neuraiproject/neurai-rpc)
115
115
  - [NPM package](https://www.npmjs.com/package/@neuraiproject/neurai-rpc)
116
+
117
+ ### Exact numeric values
118
+
119
+ RPC responses are parsed from their original JSON text. Safe numbers retain
120
+ `number` compatibility; numeric tokens that would lose digits (large raw
121
+ integers or high-precision decimals) are returned as strings. Normalize monetary
122
+ fields to bigint/decimal text in your application, never with parseFloat.
123
+
124
+ For request parameters use bigint for exact integer JSON tokens, or
125
+ `rpcNumber('100000000.00000001')` for an exact decimal JSON token. Ordinary
126
+ strings remain quoted strings: use the representation required by the RPC
127
+ method. Unsafe integer numbers, NaN and Infinity are rejected. No global
128
+ BigInt.prototype mutation is performed. `parseRpcJson` and `stringifyRpcJson`
129
+ are exported for callers implementing their own transport.
package/dist/index.cjs CHANGED
@@ -20,9 +20,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
22
  getRPC: () => getRPC,
23
- methods: () => methods
23
+ methods: () => methods,
24
+ parseRpcJson: () => parseRpcJson,
25
+ rpcNumber: () => rpcNumber,
26
+ stringifyRpcJson: () => stringifyRpcJson
24
27
  });
25
28
  module.exports = __toCommonJS(index_exports);
29
+ var import_lossless_json = require("lossless-json");
26
30
 
27
31
  // docs.ts
28
32
  var methods = {
@@ -2398,7 +2402,7 @@ var methods = {
2398
2402
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2399
2403
  **/
2400
2404
  getnetworkinfo: "getnetworkinfo",
2401
- /** getnewaddress ( "account" )
2405
+ /** getnewaddress ( "account" "address_type" )
2402
2406
 
2403
2407
  Returns a new Neurai address for receiving payments.
2404
2408
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -2406,13 +2410,15 @@ var methods = {
2406
2410
 
2407
2411
  Arguments:
2408
2412
  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.
2413
+ 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).
2409
2414
 
2410
2415
  Result:
2411
2416
  "address" (string) The new neurai address
2412
2417
 
2413
2418
  Examples:
2414
2419
  > neurai-cli getnewaddress
2415
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2420
+ > neurai-cli getnewaddress "" "ecdsa"
2421
+ > 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/
2416
2422
  **/
2417
2423
  getnewaddress: "getnewaddress",
2418
2424
  /** getpeerinfo
@@ -2488,11 +2494,14 @@ var methods = {
2488
2494
  > 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/
2489
2495
  **/
2490
2496
  getpubkey: "getpubkey",
2491
- /** getrawchangeaddress
2497
+ /** getrawchangeaddress ( "address_type" )
2492
2498
 
2493
2499
  Returns a new Neurai address, for receiving change.
2494
2500
  This is for use with raw transactions, NOT normal use.
2495
2501
 
2502
+ Arguments:
2503
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2504
+
2496
2505
  Result:
2497
2506
  "address" (string) The address
2498
2507
 
@@ -3591,7 +3600,7 @@ var methods = {
3591
3600
 
3592
3601
  Result:
3593
3602
  [ (json array of strings)
3594
- "address" (string) A post-quantum Bech32m address (nq1...)
3603
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
3595
3604
  ...
3596
3605
  ]
3597
3606
 
@@ -4884,6 +4893,10 @@ var methods = {
4884
4893
  "ismine" : true|false, (boolean) If the address is yours or not
4885
4894
  "iswatchonly" : true|false, (boolean) If the address is watchonly
4886
4895
  "isscript" : true|false, (boolean) If the key is a script
4896
+ "isauthscript" : true, (boolean, optional) Only for AuthScript witness addresses (witness v1, v2 or v3)
4897
+ "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...)
4898
+ "family" : "family", (string, optional) AuthScript family: "authscript" (v1; the commitment does not reveal the authentication type), "pq" (v2) or "ecdsa" (v3)
4899
+ "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)
4887
4900
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
4888
4901
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
4889
4902
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -4901,8 +4914,8 @@ var methods = {
4901
4914
  }
4902
4915
 
4903
4916
  Examples:
4904
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
4905
- > 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/
4917
+ > neurai-cli validateaddress "NLhdtwjgrcEkRqjJZkRY4sjhkJ93EytLeE"
4918
+ > 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/
4906
4919
  **/
4907
4920
  validateaddress: "validateaddress",
4908
4921
  /** verifychain ( checklevel nblocks )
@@ -5041,6 +5054,25 @@ var methods = {
5041
5054
  };
5042
5055
 
5043
5056
  // index.ts
5057
+ function rpcNumber(value) {
5058
+ return new import_lossless_json.LosslessNumber(value);
5059
+ }
5060
+ function parseRpcJson(text) {
5061
+ return (0, import_lossless_json.parse)(text, void 0, (token) => {
5062
+ const value = Number(token);
5063
+ return (0, import_lossless_json.isSafeNumber)(token) && Math.abs(value) <= Number.MAX_SAFE_INTEGER && (Number.isInteger(value) || Math.abs(value) <= Number.MAX_SAFE_INTEGER / 1e8) ? value : token;
5064
+ });
5065
+ }
5066
+ function stringifyRpcJson(value) {
5067
+ const result = (0, import_lossless_json.stringify)(value, (_key, item) => {
5068
+ if (typeof item === "number" && (!Number.isFinite(item) || Number.isInteger(item) && !Number.isSafeInteger(item) || !Number.isInteger(item) && Math.abs(item) > Number.MAX_SAFE_INTEGER / 1e8)) {
5069
+ throw new Error("Unsafe RPC numeric parameter: use bigint or rpcNumber(decimalText)");
5070
+ }
5071
+ return item;
5072
+ });
5073
+ if (result === void 0) throw new Error("RPC payload is not serializable");
5074
+ return result;
5075
+ }
5044
5076
  function throwSyntaxError() {
5045
5077
  throw new Error("Syntax error, call getRPC with (username, password, URL)");
5046
5078
  }
@@ -5066,7 +5098,7 @@ function getRPC(username, password, URL) {
5066
5098
  const rpcResponse = postData(URL, data, username, password);
5067
5099
  rpcResponse.then(async (response) => {
5068
5100
  if (response.ok) {
5069
- const obj = await response.json();
5101
+ const obj = parseRpcJson(await response.text());
5070
5102
  if (obj && obj.error) {
5071
5103
  rejectionFunc({
5072
5104
  error: obj.error,
@@ -5081,7 +5113,7 @@ function getRPC(username, password, URL) {
5081
5113
  description: null
5082
5114
  };
5083
5115
  try {
5084
- obj = await response.json();
5116
+ obj = parseRpcJson(await response.text());
5085
5117
  } catch (e) {
5086
5118
  }
5087
5119
  const myError = {
@@ -5101,7 +5133,7 @@ function getRPC(username, password, URL) {
5101
5133
  });
5102
5134
  });
5103
5135
  } catch (e) {
5104
- rejectionFunc(e.response);
5136
+ rejectionFunc(e);
5105
5137
  }
5106
5138
  });
5107
5139
  return promise;
@@ -5130,7 +5162,7 @@ async function postData(url = "", data = {}, username, password) {
5130
5162
  // manual, *follow, error
5131
5163
  referrerPolicy: "no-referrer",
5132
5164
  // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
5133
- body: JSON.stringify(data)
5165
+ body: stringifyRpcJson(data)
5134
5166
  // body data type must match "Content-Type" header
5135
5167
  });
5136
5168
  return response;
@@ -5138,5 +5170,8 @@ async function postData(url = "", data = {}, username, password) {
5138
5170
  // Annotate the CommonJS export names for ESM import in node:
5139
5171
  0 && (module.exports = {
5140
5172
  getRPC,
5141
- methods
5173
+ methods,
5174
+ parseRpcJson,
5175
+ rpcNumber,
5176
+ stringifyRpcJson
5142
5177
  });
package/dist/index.d.cts CHANGED
@@ -1,3 +1,5 @@
1
+ import { LosslessNumber } from 'lossless-json';
2
+
1
3
  interface IMethods {
2
4
  abandontransaction: string;
3
5
  abortrescan: string;
@@ -199,6 +201,11 @@ interface IMethods {
199
201
  }
200
202
  declare const methods: IMethods;
201
203
 
204
+ /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
205
+ declare function rpcNumber(value: string): LosslessNumber;
206
+ /** Preserve unsafe JSON numeric tokens as strings; retain safe number compatibility. */
207
+ declare function parseRpcJson(text: string): any;
208
+ declare function stringifyRpcJson(value: unknown): string;
202
209
  declare function getRPC(username: string, password: string, URL: string): (method: string, params: any[]) => Promise<unknown>;
203
210
 
204
- export { getRPC, methods };
211
+ export { getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { LosslessNumber } from 'lossless-json';
2
+
1
3
  interface IMethods {
2
4
  abandontransaction: string;
3
5
  abortrescan: string;
@@ -199,6 +201,11 @@ interface IMethods {
199
201
  }
200
202
  declare const methods: IMethods;
201
203
 
204
+ /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
205
+ declare function rpcNumber(value: string): LosslessNumber;
206
+ /** Preserve unsafe JSON numeric tokens as strings; retain safe number compatibility. */
207
+ declare function parseRpcJson(text: string): any;
208
+ declare function stringifyRpcJson(value: unknown): string;
202
209
  declare function getRPC(username: string, password: string, URL: string): (method: string, params: any[]) => Promise<unknown>;
203
210
 
204
- export { getRPC, methods };
211
+ export { getRPC, methods, parseRpcJson, rpcNumber, stringifyRpcJson };
package/dist/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ // index.ts
2
+ import { parse, stringify, isSafeNumber, LosslessNumber } from "lossless-json";
3
+
1
4
  // docs.ts
2
5
  var methods = {
3
6
  /** abandontransaction "txid"
@@ -2372,7 +2375,7 @@ var methods = {
2372
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/
2373
2376
  **/
2374
2377
  getnetworkinfo: "getnetworkinfo",
2375
- /** getnewaddress ( "account" )
2378
+ /** getnewaddress ( "account" "address_type" )
2376
2379
 
2377
2380
  Returns a new Neurai address for receiving payments.
2378
2381
  If 'account' is specified (DEPRECATED), it is added to the address book
@@ -2380,13 +2383,15 @@ var methods = {
2380
2383
 
2381
2384
  Arguments:
2382
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).
2383
2387
 
2384
2388
  Result:
2385
2389
  "address" (string) The new neurai address
2386
2390
 
2387
2391
  Examples:
2388
2392
  > neurai-cli getnewaddress
2389
- > 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/
2390
2395
  **/
2391
2396
  getnewaddress: "getnewaddress",
2392
2397
  /** getpeerinfo
@@ -2462,11 +2467,14 @@ var methods = {
2462
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/
2463
2468
  **/
2464
2469
  getpubkey: "getpubkey",
2465
- /** getrawchangeaddress
2470
+ /** getrawchangeaddress ( "address_type" )
2466
2471
 
2467
2472
  Returns a new Neurai address, for receiving change.
2468
2473
  This is for use with raw transactions, NOT normal use.
2469
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
+
2470
2478
  Result:
2471
2479
  "address" (string) The address
2472
2480
 
@@ -3565,7 +3573,7 @@ var methods = {
3565
3573
 
3566
3574
  Result:
3567
3575
  [ (json array of strings)
3568
- "address" (string) A post-quantum Bech32m address (nq1...)
3576
+ "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
3569
3577
  ...
3570
3578
  ]
3571
3579
 
@@ -4858,6 +4866,10 @@ var methods = {
4858
4866
  "ismine" : true|false, (boolean) If the address is yours or not
4859
4867
  "iswatchonly" : true|false, (boolean) If the address is watchonly
4860
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)
4861
4873
  "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
4862
4874
  "hex" : "hex", (string, optional) The redeemscript for the p2sh address
4863
4875
  "addresses" (string, optional) Array of addresses associated with the known redeemscript
@@ -4875,8 +4887,8 @@ var methods = {
4875
4887
  }
4876
4888
 
4877
4889
  Examples:
4878
- > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
4879
- > 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/
4880
4892
  **/
4881
4893
  validateaddress: "validateaddress",
4882
4894
  /** verifychain ( checklevel nblocks )
@@ -5015,6 +5027,25 @@ var methods = {
5015
5027
  };
5016
5028
 
5017
5029
  // index.ts
5030
+ function rpcNumber(value) {
5031
+ return new LosslessNumber(value);
5032
+ }
5033
+ function parseRpcJson(text) {
5034
+ return parse(text, void 0, (token) => {
5035
+ const value = Number(token);
5036
+ return isSafeNumber(token) && Math.abs(value) <= Number.MAX_SAFE_INTEGER && (Number.isInteger(value) || Math.abs(value) <= Number.MAX_SAFE_INTEGER / 1e8) ? value : token;
5037
+ });
5038
+ }
5039
+ function stringifyRpcJson(value) {
5040
+ const result = stringify(value, (_key, item) => {
5041
+ if (typeof item === "number" && (!Number.isFinite(item) || Number.isInteger(item) && !Number.isSafeInteger(item) || !Number.isInteger(item) && Math.abs(item) > Number.MAX_SAFE_INTEGER / 1e8)) {
5042
+ throw new Error("Unsafe RPC numeric parameter: use bigint or rpcNumber(decimalText)");
5043
+ }
5044
+ return item;
5045
+ });
5046
+ if (result === void 0) throw new Error("RPC payload is not serializable");
5047
+ return result;
5048
+ }
5018
5049
  function throwSyntaxError() {
5019
5050
  throw new Error("Syntax error, call getRPC with (username, password, URL)");
5020
5051
  }
@@ -5040,7 +5071,7 @@ function getRPC(username, password, URL) {
5040
5071
  const rpcResponse = postData(URL, data, username, password);
5041
5072
  rpcResponse.then(async (response) => {
5042
5073
  if (response.ok) {
5043
- const obj = await response.json();
5074
+ const obj = parseRpcJson(await response.text());
5044
5075
  if (obj && obj.error) {
5045
5076
  rejectionFunc({
5046
5077
  error: obj.error,
@@ -5055,7 +5086,7 @@ function getRPC(username, password, URL) {
5055
5086
  description: null
5056
5087
  };
5057
5088
  try {
5058
- obj = await response.json();
5089
+ obj = parseRpcJson(await response.text());
5059
5090
  } catch (e) {
5060
5091
  }
5061
5092
  const myError = {
@@ -5075,7 +5106,7 @@ function getRPC(username, password, URL) {
5075
5106
  });
5076
5107
  });
5077
5108
  } catch (e) {
5078
- rejectionFunc(e.response);
5109
+ rejectionFunc(e);
5079
5110
  }
5080
5111
  });
5081
5112
  return promise;
@@ -5104,12 +5135,15 @@ async function postData(url = "", data = {}, username, password) {
5104
5135
  // manual, *follow, error
5105
5136
  referrerPolicy: "no-referrer",
5106
5137
  // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
5107
- body: JSON.stringify(data)
5138
+ body: stringifyRpcJson(data)
5108
5139
  // body data type must match "Content-Type" header
5109
5140
  });
5110
5141
  return response;
5111
5142
  }
5112
5143
  export {
5113
5144
  getRPC,
5114
- methods
5145
+ methods,
5146
+ parseRpcJson,
5147
+ rpcNumber,
5148
+ stringifyRpcJson
5115
5149
  };
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
@@ -1,7 +1,36 @@
1
+ import { parse, stringify, isSafeNumber, LosslessNumber } from 'lossless-json';
1
2
  import { methods } from "./docs";
2
3
 
3
4
  export { methods };
4
5
 
6
+ /** Exact decimal parameter, emitted as a JSON number rather than a quoted string. */
7
+ export function rpcNumber(value: string): LosslessNumber {
8
+ return new LosslessNumber(value);
9
+ }
10
+
11
+ /** Preserve unsafe JSON numeric tokens as strings; retain safe number compatibility. */
12
+ export function parseRpcJson(text: string): any {
13
+ return parse(text, undefined, (token: string) => {
14
+ const value = Number(token);
15
+ return isSafeNumber(token) && Math.abs(value) <= Number.MAX_SAFE_INTEGER
16
+ && (Number.isInteger(value) || Math.abs(value) <= Number.MAX_SAFE_INTEGER / 1e8)
17
+ ? value : token;
18
+ });
19
+ }
20
+
21
+ export function stringifyRpcJson(value: unknown): string {
22
+ const result = stringify(value, (_key, item) => {
23
+ if (typeof item === 'number' && (!Number.isFinite(item) ||
24
+ (Number.isInteger(item) && !Number.isSafeInteger(item)) ||
25
+ (!Number.isInteger(item) && Math.abs(item) > Number.MAX_SAFE_INTEGER / 1e8))) {
26
+ throw new Error('Unsafe RPC numeric parameter: use bigint or rpcNumber(decimalText)');
27
+ }
28
+ return item;
29
+ });
30
+ if (result === undefined) throw new Error('RPC payload is not serializable');
31
+ return result;
32
+ }
33
+
5
34
  // DePIN protocol 2 uses this same authenticated HTTP JSON-RPC transport. The
6
35
  // former raw-TCP gateway and its dedicated port were removed from the node.
7
36
 
@@ -41,7 +70,7 @@ export function getRPC(username: string, password: string, URL: string) {
41
70
  */
42
71
 
43
72
  if (response.ok) {
44
- const obj = await response.json(); //Convert to JSON
73
+ const obj = parseRpcJson(await response.text()); //Convert to JSON
45
74
  // A JSON-RPC error can arrive with HTTP 200 — it must reject,
46
75
  // not resolve undefined.
47
76
  if (obj && obj.error) {
@@ -59,7 +88,7 @@ export function getRPC(username: string, password: string, URL: string) {
59
88
  description: null,
60
89
  };
61
90
  try {
62
- obj = await response.json();
91
+ obj = parseRpcJson(await response.text());
63
92
  } catch (e) {}
64
93
  const myError = {
65
94
  statusText: response.statusText,
@@ -81,7 +110,7 @@ export function getRPC(username: string, password: string, URL: string) {
81
110
  });
82
111
  });
83
112
  } catch (e) {
84
- rejectionFunc(e.response);
113
+ rejectionFunc(e);
85
114
  }
86
115
  });
87
116
  return promise;
@@ -121,7 +150,7 @@ async function postData(
121
150
  },
122
151
  redirect: "follow", // manual, *follow, error
123
152
  referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
124
- body: JSON.stringify(data), // body data type must match "Content-Type" header
153
+ body: stringifyRpcJson(data), // body data type must match "Content-Type" header
125
154
  });
126
155
  return response;
127
156
  }
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.0",
3
+ "version": "0.6.2",
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,9 +48,12 @@
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"
55
+ },
56
+ "dependencies": {
57
+ "lossless-json": "^4.3.0"
55
58
  }
56
59
  }