@neuraiproject/neurai-rpc 0.7.0 → 0.9.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/dist/index.cjs CHANGED
@@ -19,10 +19,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // index.ts
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
+ DEPIN_REMOTE_METHODS: () => DEPIN_REMOTE_METHODS,
23
+ DEPIN_RPC_PROTOCOL: () => DEPIN_RPC_PROTOCOL,
22
24
  MAINNET_GENESIS_HASH: () => MAINNET_GENESIS_HASH,
23
25
  TESTNET_GENESIS_HASH: () => TESTNET_GENESIS_HASH,
26
+ assertNoDuplicateJsonKeys: () => assertNoDuplicateJsonKeys,
24
27
  assertRpcGenesis: () => assertRpcGenesis,
28
+ createDepinNodeRouter: () => createDepinNodeRouter,
29
+ getDepinRequest: () => getDepinRequest,
25
30
  getRPC: () => getRPC,
31
+ isDepinRemoteMethod: () => isDepinRemoteMethod,
26
32
  methods: () => methods,
27
33
  parseRpcJson: () => parseRpcJson,
28
34
  rpcNumber: () => rpcNumber,
@@ -61,7 +67,7 @@ var methods = {
61
67
  > neurai-cli importprivkey "mykey"
62
68
 
63
69
  Abort the running wallet rescan
64
- > neurai-cli abortrescan
70
+ > neurai-cli abortrescan
65
71
 
66
72
  As a JSON-RPC call
67
73
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
@@ -158,9 +164,6 @@ var methods = {
158
164
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "backupwallet", "params": ["backup.dat"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
159
165
  **/
160
166
  backupwallet: "backupwallet",
161
- /** bumpfee has been deprecated on the XNA Wallet.
162
- **/
163
- bumpfee: "bumpfee",
164
167
  /** cancelsnapshotrequest "asset_name" block_height
165
168
 
166
169
  Cancels the specified snapshot request.
@@ -264,7 +267,7 @@ var methods = {
264
267
  Clear all banned IPs.
265
268
 
266
269
  Examples:
267
- > neurai-cli clearbanned
270
+ > neurai-cli clearbanned
268
271
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
269
272
  **/
270
273
  clearbanned: "clearbanned",
@@ -273,11 +276,11 @@ var methods = {
273
276
  Removes all transaction from the mempool
274
277
 
275
278
  Examples:
276
- > neurai-cli clearmempool
279
+ > neurai-cli clearmempool
277
280
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
278
281
  **/
279
282
  clearmempool: "clearmempool",
280
- /** clearmessages
283
+ /** clearmessages
281
284
 
282
285
  THIS COMMAND IS NOT YET ACTIVE!
283
286
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -289,14 +292,36 @@ var methods = {
289
292
  ]
290
293
 
291
294
  Examples:
292
- > neurai-cli clearmessages
295
+ > neurai-cli clearmessages
293
296
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
294
297
  **/
295
298
  clearmessages: "clearmessages",
299
+ /** closedepin "asset_name" ("change_address")
300
+
301
+ THIS COMMAND IS NOT YET ACTIVE!
302
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
303
+
304
+ Close transfers of a DEPIN asset (owner only): the asset becomes soulbound
305
+ again and only the owner can move it. Valid from the open state; takes effect
306
+ from the block after the one that confirms it. Pending holder transfers are
307
+ dropped from the mempool when the close confirms.
308
+
309
+ Arguments:
310
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
311
+ 2. "change_address" (string, optional) The change address for the owner token
312
+
313
+ Result:
314
+ "txid" (string) The transaction id
315
+
316
+ Examples:
317
+ > neurai-cli closedepin "&FRANCE"
318
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "closedepin", "params": ["&FRANCE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
319
+ **/
320
+ closedepin: "closedepin",
296
321
  /** combinerawtransaction ["hexstring",...]
297
322
 
298
323
  Combine multiple partially signed transactions into one transaction.
299
- The combined transaction may be another partially signed transaction or a
324
+ The combined transaction may be another partially signed transaction or a
300
325
  fully signed transaction.
301
326
  Arguments:
302
327
  1. "txs" (string) A json array of hex strings of partially signed transactions
@@ -312,6 +337,57 @@ var methods = {
312
337
  > neurai-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]
313
338
  **/
314
339
  combinerawtransaction: "combinerawtransaction",
340
+ /** createdistributionbatch "plan_hash" {plan} batch_index ( {options} )
341
+
342
+ Builds, funds and signs one batch of a distribution plan from this wallet (NIP-048), and locks the inputs it
343
+ spends. It does NOT broadcast: store the result in your batch records first, then send it with
344
+ sendrawtransaction. The plan must still hash to plan_hash, so a payment is always bound to the plan the
345
+ operator approved.
346
+ To replace a version that left the mempool, build a new one with the same anchor: every version of a batch
347
+ spends the anchor, so at most one of them can confirm.
348
+
349
+ Arguments:
350
+ 1. "plan_hash" (string, required) The approved plan hash, from getdistributionplan
351
+ 2. plan (object, required) The plan parameters
352
+ {
353
+ "asset_name": "name", (string, required) as in getdistributionplan
354
+ "snapshot_height": n, (number, required)
355
+ "distribution_asset_name": "name", (string, required)
356
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
357
+ "exception_addresses": "a,b", (string, optional)
358
+ "remainder": "payer"|"largest", (string, optional, default "payer")
359
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
360
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
361
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
362
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
363
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
364
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
365
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
366
+ }
367
+ 3. batch_index (number, required) The batch to build, from getdistributionbatches
368
+ 4. options (object, optional)
369
+ {
370
+ "max_outputs": n, (number, default 500) batch size, as in getdistributionbatches
371
+ "anchor": {"txid": "hex", "vout": n}, (object, optional) the anchor of earlier versions of this batch
372
+ "max_fee": x.xxx (numeric, optional) refuse a fee above this amount of XNA
373
+ }
374
+
375
+ Result:
376
+ {
377
+ "plan_hash": "hex",
378
+ "batch_index": n,
379
+ "batch_id": "hex",
380
+ "txid": "hex",
381
+ "hex": "hex", (string) the signed transaction, not broadcast
382
+ "fee": x.xxx,
383
+ "anchor": {"txid": "hex", "vout": n}, (object) the XNA input every later version must spend
384
+ "inputs": [ {"txid": "hex", "vout": n}, ... ] (array) inputs, now locked in this wallet
385
+ }
386
+
387
+ Examples:
388
+ > neurai-cli createdistributionbatch "planhash" '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' 0
389
+ **/
390
+ createdistributionbatch: "createdistributionbatch",
315
391
  /** createmultisig nrequired ["key",...]
316
392
 
317
393
  Creates a multi-signature address with n signature of m keys required.
@@ -370,6 +446,9 @@ var methods = {
370
446
  unfreeze_addresses 0
371
447
  freeze_asset 0
372
448
  unfreeze_asset 0
449
+ open_depin 0
450
+ close_depin 0
451
+ seal_depin 0
373
452
 
374
453
  Assets For Authorization:
375
454
  These operations require a specific asset input for authorization:
@@ -382,6 +461,10 @@ var methods = {
382
461
  unfreeze_addresses
383
462
  freeze_asset
384
463
  unfreeze_asset
464
+ DEPIN Owner Token (&NAME!):
465
+ open_depin
466
+ close_depin
467
+ seal_depin
385
468
  Root Qualifier Token:
386
469
  issue_qualifier (when issuing subqualifier)
387
470
  Qualifier Token:
@@ -401,8 +484,10 @@ var methods = {
401
484
  {
402
485
  "txid":"id", (string, required) The transaction id
403
486
  "vout":n, (number, required) The output number
404
- "sequence":n (number, optional) The sequence number
405
- }
487
+ "sequence":n (number, optional) The sequence number. Once the no-RBF sequence rule
488
+ applies to the next block it must be 4294967295, 4294967294 or, in a
489
+ version 2 or 3 transaction, a BIP 68 relative lock (bit 31 clear)
490
+ }
406
491
  ,...
407
492
  ]
408
493
  2. "outputs" (object or array, required) outputs in object or ordered-array form
@@ -415,7 +500,7 @@ var methods = {
415
500
  "transfer":
416
501
  {
417
502
  "asset-name": (string, required) asset name
418
- asset-quantity (number, required) the number of raw units to transfer
503
+ asset-quantity (number or string, required) the number of raw units to transfer
419
504
  ,...
420
505
  }
421
506
  }
@@ -425,7 +510,7 @@ var methods = {
425
510
  "transferwithmessage":
426
511
  {
427
512
  "asset-name": (string, required) asset name
428
- asset-quantity, (number, required) the number of raw units to transfer
513
+ asset-quantity, (number or string, required) the number of raw units to transfer
429
514
  "message":"hash", (string, required) ipfs hash or a txid hash
430
515
  "expire_time": n (number, required) utc time in seconds to expire the message
431
516
  }
@@ -435,7 +520,7 @@ var methods = {
435
520
  "issue":
436
521
  {
437
522
  "asset_name":"asset-name", (string, required) new asset name
438
- "asset_quantity":n, (number, required) the number of raw units to issue
523
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
439
524
  "units":[1-8], (number, required) display units, between 1 (integral) to 8 (max precision)
440
525
  "reissuable":[0-1], (number, required) 1=reissuable asset
441
526
  "has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
@@ -446,10 +531,10 @@ var methods = {
446
531
  { (object) A json object describing new unique assets to issue
447
532
  "issue_unique":
448
533
  {
449
- "root_name":"root-name", (string, required) name of the asset the unique asset(s)
534
+ "root_name":"root-name", (string, required) name of the asset the unique asset(s)
450
535
  are being issued under
451
536
  "asset_tags":["asset_tag", ...], (array, required) the unique tag for each asset which is to be issued
452
- "ipfs_hashes":["hash", ...], (array, optional) ipfs hashes corresponding to each supplied tag
537
+ "ipfs_hashes":["hash", ...], (array, optional) ipfs hashes corresponding to each supplied tag
453
538
  (should be same size as "asset_tags")
454
539
  }
455
540
  }
@@ -458,11 +543,12 @@ var methods = {
458
543
  "reissue":
459
544
  {
460
545
  "asset_name":"asset-name", (string, required) name of asset to be reissued
461
- "asset_quantity":n, (number, required) the number of raw units to issue
546
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
462
547
  "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
463
- "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
548
+ "units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
549
+ "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
464
550
  Overrides the current ipfs hash if given
465
- "owner_change_address" (string, optional) the address where the owner token will be sent to.
551
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
466
552
  If not given, it will be sent to the output address
467
553
  }
468
554
  }
@@ -471,14 +557,14 @@ var methods = {
471
557
  "issue_restricted":
472
558
  {
473
559
  "asset_name":"asset-name",(string, required) new asset name
474
- "asset_quantity":n, (number, required) the number of raw units to issue
475
- "verifier_string":"text", (string, required) the verifier string to be used for a restricted
560
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
561
+ "verifier_string":"text", (string, required) the verifier string to be used for a restricted
476
562
  asset transfer verification
477
563
  "units":[0-8], (number, required) display units, between 0 (integral) and 8 (max precision)
478
564
  "reissuable":[0-1], (number, required) 1=reissuable asset
479
565
  "has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
480
566
  "ipfs_hash":"hash", (string, optional) an ipfs hash for discovering asset metadata
481
- "owner_change_address" (string, optional) the address where the owner token will be sent to.
567
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
482
568
  If not given, it will be sent to the output address
483
569
  }
484
570
  }
@@ -487,13 +573,14 @@ var methods = {
487
573
  "reissue_restricted":
488
574
  {
489
575
  "asset_name":"asset-name", (string, required) name of asset to be reissued
490
- "asset_quantity":n, (number, required) the number of raw units to issue
576
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
491
577
  "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
492
- "verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
578
+ "units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
579
+ "verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
493
580
  transfer verification
494
- "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
581
+ "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
495
582
  Overrides the current ipfs hash if given
496
- "owner_change_address" (string, optional) the address where the owner token will be sent to.
583
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
497
584
  If not given, it will be sent to the output address
498
585
  }
499
586
  }
@@ -502,15 +589,15 @@ var methods = {
502
589
  "issue_qualifier":
503
590
  {
504
591
  "asset_name":"asset_name", (string, required) a qualifier name (starts with '#')
505
- "asset_quantity":n, (numeric, optional, default=1) the number of units to be issued (1 to 10)
506
- "has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
592
+ "asset_quantity":n, (number or string, optional, default=1) the number of units to be issued (1 to 10)
593
+ "has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
507
594
  to be added to the asset
508
- "ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
595
+ "ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
509
596
  txid hash once RIP5 is activated
510
597
  "root_change_address" (string, optional) Only applies when issuing subqualifiers.
511
598
  The address where the root qualifier will be sent.
512
599
  If not specified, it will be sent to the output address.
513
- "change_quantity":"qty" (numeric, optional) the asset change amount (defaults to 1)
600
+ "change_quantity":"qty" (number or string, optional) the asset change amount (defaults to 1)
514
601
  }
515
602
  }
516
603
  or
@@ -520,7 +607,7 @@ var methods = {
520
607
  {
521
608
  "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
522
609
  "addresses":["addr", ...], (array, required) the addresses to be tagged (up to 10)
523
- "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
610
+ "change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
524
611
  }
525
612
  }
526
613
  or
@@ -530,7 +617,7 @@ var methods = {
530
617
  {
531
618
  "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
532
619
  "addresses":["addr", ...], (array, required) the addresses to be untagged (up to 10)
533
- "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
620
+ "change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
534
621
  }
535
622
  }
536
623
  or
@@ -568,6 +655,14 @@ var methods = {
568
655
  }
569
656
  }
570
657
  or
658
+ { (object) A json object describing a DEPIN transfer state operation.
659
+ The address in the key will be used as the owner token change address.
660
+ "open_depin" | "close_depin" | "seal_depin":
661
+ {
662
+ "asset_name":"asset_name", (string, required) a DEPIN asset name (starts with '&')
663
+ }
664
+ }
665
+ or
571
666
  "data": "hex" (string, required) The key is "data", the value is hex encoded data
572
667
  ,...
573
668
  }
@@ -729,216 +824,132 @@ var methods = {
729
824
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
730
825
  **/
731
826
  decodescript: "decodescript",
732
- /** depinchallenge "token" "address" timestamp "signature" ( "type" )
733
-
734
- Issues a single-use challenge for authenticated DePIN RPCs. The request must be signed over:
735
- "DEPIN-REQ|<type>|<token>|<address>|<timestamp>", where timestamp is Unix time in milliseconds and type is "receive" (default) or "admin".
736
-
737
- The encrypted result contains challenge, expires_in and type. Decrypt it with depindecrypt, then sign the challenge with depinsignchallenge or signmessage.
738
-
739
- Examples:
740
- > neurai-cli depinchallenge "&TOKEN/SECTION" "NXholder..." 1730000000000 "<signature>"
741
- **/
742
- depinchallenge: "depinchallenge",
743
- /** depinclearmsg "scope" "address" "challenge" "signature" ( "all" | hours )
744
-
745
- Removes messages from a DePIN pool. This owner-level operation requires an admin challenge issued for the exact scope. Use an empty scope for the pool root. Omit mode to remove expired messages, use "all" to remove every message in scope, or pass an age in hours.
746
-
747
- Result:
748
- {
749
- "removed": n,
750
- "remaining": n
751
- }
752
- **/
753
- depinclearmsg: "depinclearmsg",
754
- /** depindecrypt "address" "encrypted"
827
+ /** decodesilentpaymentcode "code"
755
828
 
756
- Decrypts an encrypted DePIN reply with a wallet key. Verify the reply's poolsig before using this method; depindecrypt does not verify it.
757
-
758
- Result:
759
- The decrypted JSON value, or a string when the plaintext is not JSON.
760
- **/
761
- depindecrypt: "depindecrypt",
762
- /** depingetancestorrecipients "token" ( max_results ) ( "stop_at" )
763
-
764
- List the active holders of a DEPIN branch: the deduplicated union of the
765
- holders of the given token and of every one of its '/'-separated ancestors,
766
- each with the public key it has revealed on chain.
767
-
768
- Active means: positive balance, public key revealed, and not blocked by an
769
- owner freeze or by self-revocation. Restriction is per (asset, address), so an
770
- address that is active in at least one ancestor is returned even if it revoked
771
- itself in another -- holding the root already grants visibility over the branch.
772
-
773
- The query is exact: '&TEST' returns holders of '&TEST' only, never of
774
- '&TEST/APPLE', '&TESTING' or '&TEST.FOO'. Every derived ancestor must exist; a
775
- missing intermediate level is an error rather than something skipped.
776
-
777
- This command is informational. It does not know about -depinmsgmaxusers, does
778
- not decide whether a message fits in a pool, and a truncated result must not be
779
- treated as a complete recipient set.
780
-
781
- Requires -assetindex and -pubkeyindex.
829
+ Validates a silent payment code for this network and returns its keys.
782
830
 
783
831
  Arguments:
784
- 1. "token" (string, required) DEPIN token, e.g. "&TEST/APPLE/GOLDEN"
785
- 2. max_results (numeric, optional, default=1000) Maximum recipients to return
786
- (1..10000)
787
- 3. "stop_at" (string, optional) Stop deriving ancestors at this token,
788
- inclusive. Must be the token itself or one of its ancestors.
789
- Omitted: derive up to the absolute root.
832
+ 1. "code" (string, required) payment code
790
833
 
791
834
  Result:
792
835
  {
793
- "token": "name", (string) Token queried
794
- "stop_at": "name", (string) Where derivation stopped ("" = root)
795
- "ancestors": ["name", ...], (array) Token first, then each ancestor
796
- "recipients": [ (array) Active holders, ordered by address
797
- {
798
- "address": "address", (string) Holder address
799
- "pubkey": "hex" (string) Public key revealed on chain
800
- }, ...
801
- ],
802
- "returned": n, (numeric) Number of recipients returned
803
- "max_results": n, (numeric) Limit applied
804
- "truncated": true|false, (boolean) True if more eligible recipients exist
805
- "skipped_no_pubkey": n, (numeric) Addresses dropped for lacking a usable
806
- revealed public key
807
- "skipped_no_pubkey_complete": bool, (boolean) False when truncated: the count then
808
- covers only the addresses examined
809
- "skipped_restricted": n, (numeric) Addresses dropped as frozen or
810
- self-revoked in every ancestor they hold
811
- "skipped_restricted_complete": bool (boolean) Same rule as above
836
+ "isvalid": true|false, (boolean)
837
+ "error": "str", (string) reason when invalid
838
+ "network", "scan_pubkey", "spend_pubkey" when valid
812
839
  }
813
840
 
814
841
  Examples:
815
- > neurai-cli depingetancestorrecipients "&TEST/APPLE/GOLDEN"
816
- > neurai-cli depingetancestorrecipients "&TEST/APPLE/GOLDEN" 50 "&TEST/APPLE"
817
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depingetancestorrecipients", "params": ["&TEST/APPLE/GOLDEN", 50, "&TEST/APPLE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
842
+ > neurai-cli decodesilentpaymentcode "tnsp1q..."
818
843
  **/
844
+ decodesilentpaymentcode: "decodesilentpaymentcode",
845
+ /**
846
+ * depinchallenge request
847
+ *
848
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
849
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
850
+ */
851
+ depinchallenge: "depinchallenge",
852
+ /**
853
+ * depinclearmsg request
854
+ *
855
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
856
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
857
+ */
858
+ depinclearmsg: "depinclearmsg",
859
+ /**
860
+ * depindecrypt "address" "encrypted"
861
+ *
862
+ * Decrypts an encrypted DePIN reply with a wallet key. Verify the reply's poolsig before using this method; depindecrypt does not verify it.
863
+ *
864
+ * Result:
865
+ * The decrypted JSON value, or a string when the plaintext is not JSON.
866
+ */
867
+ depindecrypt: "depindecrypt",
868
+ /**
869
+ * depingetancestorrecipients request
870
+ *
871
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
872
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
873
+ */
819
874
  depingetancestorrecipients: "depingetancestorrecipients",
820
- /** depingetmsg "token" ( "fromaddress" )
821
-
822
- Uses the local node wallet to decrypt messages from the local DePIN pool. The optional address must belong to the wallet and hold the requested token or a related branch token.
823
- **/
875
+ /**
876
+ * depingetmsg "token" ( "fromaddress" )
877
+ *
878
+ * Uses the local node wallet to decrypt messages from the local DePIN pool. The optional address must belong to the wallet and hold the requested token or a related branch token.
879
+ */
824
880
  depingetmsg: "depingetmsg",
825
- /** depingetmsginfo
826
-
827
- Returns DePIN protocol and pool configuration. Protocol 2 publishes depinpoolpkey in this response; clients should pin it on first use. Responses are signed with the pool key.
828
- **/
881
+ /**
882
+ * depingetmsginfo request
883
+ *
884
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
885
+ * Bootstrap fields: protocol=5, request_id (32 random bytes in lowercase hex), timestamp_ms (integer milliseconds). Verify the response with the local request hash, expected genesis and pinned pool key before using its context.
886
+ */
829
887
  depingetmsginfo: "depingetmsginfo",
830
- /** depinlistsections ( "address" "scope" "challenge" "signature" )
831
-
832
- With no arguments, lists public section names. Address mode requires all four arguments, authenticates with a receive challenge for scope, limits results to that subtree, and returns encrypted personal access and message counters.
833
- **/
888
+ /**
889
+ * depinlistsections request
890
+ *
891
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
892
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
893
+ */
834
894
  depinlistsections: "depinlistsections",
835
- /** depinmcpstatus
836
-
837
- Get status information about the DePIN MCP (AI) worker
838
-
839
- Result:
840
- {
841
- "enabled": true|false, (boolean) Whether MCP worker is enabled
842
- "running": true|false, (boolean) Whether MCP worker is running
843
- "mcp_url": "url", (string) MCP server URL
844
- "model_name": "name", (string) Name of the loaded AI model
845
- "command_key": "key", (string) Command prefix (e.g. /ai)
846
- "depin_token": "token", (string) DePIN token being monitored
847
- "poll_interval": n, (numeric) Polling interval in seconds
848
- "commands_processed": n, (numeric) Total commands processed
849
- "total_errors": n, (numeric) Total errors encountered
850
- "rate_limited": n, (numeric) Commands rejected by rate limiting
851
- "concurrency": n, (numeric) Number of parallel task threads
852
- "tasks_in_flight": n, (numeric) AI requests currently being processed
853
- "processed_cache": n, (numeric) Size of the processed-message dedup cache
854
- "context_sessions": n, (numeric) Active conversation contexts
855
- "last_poll_time": n (numeric) Unix timestamp of last poll
856
- }
857
-
858
- Examples:
859
- > neurai-cli depinmcpstatus
860
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinmcpstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
861
- **/
895
+ /**
896
+ * depinmcpstatus request
897
+ *
898
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
899
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
900
+ */
862
901
  depinmcpstatus: "depinmcpstatus",
863
- /** depinpoolpkey
864
-
865
- Wallet-only operator helper that derives the dedicated DePIN pool public key from the loaded service wallet.
866
-
867
- Result:
868
- {
869
- "pubkey": "hex",
870
- "address": "address",
871
- "path": "derivation_path"
872
- }
873
- **/
902
+ /**
903
+ * depinpoolpkey
904
+ *
905
+ * Wallet-only operator helper that derives the dedicated DePIN pool public key from the loaded service wallet.
906
+ *
907
+ * Result:
908
+ * {
909
+ * "pubkey": "hex",
910
+ * "address": "address",
911
+ * "path": "derivation_path"
912
+ * }
913
+ */
874
914
  depinpoolpkey: "depinpoolpkey",
875
- /** depinpoolstats
876
-
877
- Get statistical analysis of the DePIN message pool.
878
-
879
- Result:
880
- {
881
- "enabled": true|false,
882
- "token": "string",
883
- "total_messages": n,
884
- "total_size_bytes": n,
885
- "memory_usage_bytes": n,
886
- "oldest_message": "YYYY-MM-DD HH:MM:SS",
887
- "newest_message": "YYYY-MM-DD HH:MM:SS",
888
- "messages_by_age": {
889
- "last_hour": n,
890
- "last_day": n,
891
- "last_week": n
892
- },
893
- "unique_senders": n,
894
- "unique_recipients": n,
895
- "avg_recipients_per_message": n.nn,
896
- "avg_message_size": n,
897
- "expiring_in_24h": n
898
- }
899
-
900
- Examples:
901
- > neurai-cli depinpoolstats
902
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinpoolstats", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
903
- **/
915
+ /**
916
+ * depinpoolstats request
917
+ *
918
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
919
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
920
+ */
904
921
  depinpoolstats: "depinpoolstats",
905
- /** depinreceivemsg "token" "address" "challenge" "signature" ( timestamp "after_hash" limit )
906
-
907
- Returns messages accessible to an address, encrypted for its revealed public key and signed by the pool key. Requires a receive challenge. Pagination uses timestamp, after_hash and limit. The decrypted reply includes next_challenge for subsequent calls.
908
- **/
922
+ /**
923
+ * depinreceivemsg request
924
+ *
925
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
926
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
927
+ */
909
928
  depinreceivemsg: "depinreceivemsg",
910
- /** depinsendmsg "token" "message" "fromaddress"
911
-
912
- Uses the local node wallet to sign and encrypt a message for eligible recipients, then adds it to the local DePIN pool. Remote host and port parameters were removed in protocol 2.
913
- **/
929
+ /**
930
+ * depinreceiveseq request
931
+ *
932
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
933
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
934
+ */
935
+ depinreceiveseq: "depinreceiveseq",
936
+ /**
937
+ * depinsendmsg "token" "message" "fromaddress"
938
+ *
939
+ * Uses the local node wallet to sign and encrypt a message for eligible recipients, then adds it to the local DePIN pool. Remote host and port parameters were removed in protocol 2.
940
+ */
914
941
  depinsendmsg: "depinsendmsg",
915
- /** depinsignchallenge "address" "token" "challenge" ( "type" )
916
-
917
- Wallet helper that signs "DEPIN-GET|<token>|<address>|<challenge>" for receive access or "DEPIN-CLEAR|..." for admin access.
918
-
919
- Result:
920
- {
921
- "signature": "base64",
922
- "preimage": "text"
923
- }
924
- **/
925
- depinsignchallenge: "depinsignchallenge",
926
- /** depinsignrequest "address" "token" ( "type" )
927
-
928
- Wallet helper that signs a depinchallenge request over the current Unix time in milliseconds.
929
-
930
- Result:
931
- {
932
- "timestamp": n,
933
- "signature": "base64",
934
- "preimage": "DEPIN-REQ|..."
935
- }
936
- **/
937
- depinsignrequest: "depinsignrequest",
938
- /** depinsubmitmsg {"sender":"...","encrypted":"..."}
939
-
940
- Submits a client-prepared, signed DePIN message wrapped in an ECIES envelope for the pool key published by depingetmsginfo. Bare serialized hex is no longer accepted.
941
- **/
942
+ /**
943
+ * depinsignrpc "method" request
944
+ * Local unlocked-wallet helper: sign a complete RPC 5 request. Returns request, preimage and request_hash. Never expose this wallet helper through a public HTTP/WSS proxy.
945
+ */
946
+ depinsignrpc: "depinsignrpc",
947
+ /**
948
+ * depinsubmitmsg request
949
+ *
950
+ * DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
951
+ * Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
952
+ */
942
953
  depinsubmitmsg: "depinsubmitmsg",
943
954
  /** disconnectnode "[address]" [nodeid]
944
955
 
@@ -959,41 +970,10 @@ var methods = {
959
970
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
960
971
  **/
961
972
  disconnectnode: "disconnectnode",
962
- /** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ("change_address") ("dry_run")
963
-
964
- Splits the specified amount of the distribution asset to all owners of asset_name that are not in the optional exclusion_addresses
973
+ /** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ( "change_address" )
965
974
 
966
- Arguments:
967
- 1. "asset_name" (string, required) The reward will be distributed all owners of this asset
968
- 2. "snapshot_height" (number, required) The block height of the ownership snapshot
969
- 3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
970
- 4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
971
- 5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
972
- 6. "change_address" (string, optional) If the rewards can't be fully distributed. The change will be sent to this address
973
-
974
- Result:
975
- {
976
- error_txn_gen_failed: (string),
977
- error_nsf: (string),
978
- error_rejects: (string),
979
- error_db_update: (string),
980
- batch_results: [
981
- {
982
- transaction_id: (string),
983
- error_txn_rejected: (string),
984
- total_amount: (number),
985
- fee: (number),
986
- expected_count: (number),
987
- actual_count: (number),
988
- }
989
- ]
990
- }
991
-
992
- Examples:
993
- > neurai-cli distributereward "TRONCO" 12345 "XNA" 1000
994
- > neurai-cli distributereward "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
995
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "distributereward", "params": ["TRONCO" 34987 "DIVIDENDS" 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
996
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "distributereward", "params": ["PHATSTACKS" 34987 "XNA" 100000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
975
+ Retired (NIP-048): the node no longer sends reward payments.
976
+ Use getdistributionplan to compute the payments, then send them from your wallet.
997
977
  **/
998
978
  distributereward: "distributereward",
999
979
  /** dumpextkeypq
@@ -1005,7 +985,7 @@ var methods = {
1005
985
  "xpqpriv..." (string) Base58Check-encoded master CExtKeyPQ
1006
986
 
1007
987
  Examples:
1008
- > neurai-cli dumpextkeypq
988
+ > neurai-cli dumpextkeypq
1009
989
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpextkeypq", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1010
990
  **/
1011
991
  dumpextkeypq: "dumpextkeypq",
@@ -1046,7 +1026,7 @@ var methods = {
1046
1026
  /** encryptwallet "passphrase"
1047
1027
 
1048
1028
  Encrypts the wallet with 'passphrase'. This is for first time encryption.
1049
- After this, any calls that interact with private keys such as sending or signing
1029
+ After this, any calls that interact with private keys such as sending or signing
1050
1030
  will require the passphrase to be set prior the making these calls.
1051
1031
  Use the walletpassphrase call for this, and then walletlock call.
1052
1032
  If the wallet is already encrypted, use the walletpassphrasechange call.
@@ -1067,7 +1047,7 @@ var methods = {
1067
1047
  > neurai-cli signmessage "address" "test message"
1068
1048
 
1069
1049
  Now lock the wallet again by removing the passphrase
1070
- > neurai-cli walletlock
1050
+ > neurai-cli walletlock
1071
1051
 
1072
1052
  As a json rpc call
1073
1053
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "encryptwallet", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
@@ -1130,6 +1110,25 @@ var methods = {
1130
1110
  > neurai-cli estimatesmartfee 6
1131
1111
  **/
1132
1112
  estimatesmartfee: "estimatesmartfee",
1113
+ /** exportsilentpaymentviewkey "acknowledge"
1114
+
1115
+ Returns the view key (b_scan and B_spend) of this wallet's silent payment code.
1116
+ Whoever holds it can find and link every payment to the code, but cannot spend them.
1117
+ Never combine it with an exported payment private key: together they reveal the spend key.
1118
+ The result is a secret: from a shell, prefer a terminal that is not recorded or logged.
1119
+
1120
+ Arguments:
1121
+ 1. "acknowledge" (string, required) must be "reveal view key"
1122
+
1123
+ Result:
1124
+ {
1125
+ "scan_private_key": "hex", "spend_pubkey": "hex", "network": "str"
1126
+ }
1127
+
1128
+ Examples:
1129
+ > neurai-cli exportsilentpaymentviewkey "reveal view key"
1130
+ **/
1131
+ exportsilentpaymentviewkey: "exportsilentpaymentviewkey",
1133
1132
  /** exportxpqpub count ( chain offset )
1134
1133
 
1135
1134
  Generates a batch of count ML-DSA-44 public keys and returns the xpqpub blob.
@@ -1244,7 +1243,6 @@ var methods = {
1244
1243
  Those recipients will receive less neurais than you enter in their corresponding amount field.
1245
1244
  If no outputs are specified here, the sender pays the fee.
1246
1245
  [vout_index,...]
1247
- Allows this transaction to be replaced by a transaction with higher fees
1248
1246
  "conf_target" (numeric, optional) Confirmation target (in blocks)
1249
1247
  "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
1250
1248
  "UNSET"
@@ -1336,7 +1334,7 @@ var methods = {
1336
1334
  "address" (string) The account neurai address
1337
1335
 
1338
1336
  Examples:
1339
- > neurai-cli getaccountaddress
1337
+ > neurai-cli getaccountaddress
1340
1338
  > neurai-cli getaccountaddress ""
1341
1339
  > neurai-cli getaccountaddress "myaccount"
1342
1340
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccountaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
@@ -1579,6 +1577,7 @@ var methods = {
1579
1577
  ipfs_hash: (hash), (only if has_ipfs = 1 and that data is a ipfs hash)
1580
1578
  txid_hash: (hash), (only if has_ipfs = 1 and that data is a txid hash)
1581
1579
  verifier_string: (string)
1580
+ transfer_state: (string) "closed" | "open" | "sealed" (only for DEPIN assets, names starting with &)
1582
1581
  }
1583
1582
 
1584
1583
  Examples:
@@ -1615,7 +1614,7 @@ var methods = {
1615
1614
  Examples:
1616
1615
 
1617
1616
  The total amount in the wallet with 1 or more confirmations
1618
- > neurai-cli getbalance
1617
+ > neurai-cli getbalance
1619
1618
 
1620
1619
  The total amount in the wallet at least 6 blocks confirmed
1621
1620
  > neurai-cli getbalance "*" 6
@@ -1632,19 +1631,21 @@ var methods = {
1632
1631
  "hex" (string) the block hash hex encoded
1633
1632
 
1634
1633
  Examples:
1635
- > neurai-cli getbestblockhash
1634
+ > neurai-cli getbestblockhash
1636
1635
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1637
1636
  **/
1638
1637
  getbestblockhash: "getbestblockhash",
1639
- /** getblock "blockhash" ( verbosity )
1638
+ /** getblock "blockhash" ( verbosity )
1640
1639
 
1641
1640
  If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
1642
1641
  If verbosity is 1, returns an Object with information about block <hash>.
1643
- If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
1642
+ If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
1643
+ If verbosity is 3, returns the same as verbosity 2 plus a "prevout" object in each input with the spent output
1644
+ (generated, height, value, scriptPubKey), read from the block undo data. This works without -txindex.
1644
1645
 
1645
1646
  Arguments:
1646
1647
  1. "blockhash" (string, required) The block hash
1647
- 2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data
1648
+ 2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, 2 for json object with transaction data, and 3 for json object with transaction data and spent outputs
1648
1649
 
1649
1650
  Result (for verbosity = 0):
1650
1651
  "data" (string) A string that is serialized, hex-encoded data for block 'hash'.
@@ -1695,6 +1696,7 @@ var methods = {
1695
1696
  {
1696
1697
  "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
1697
1698
  "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
1699
+ "asset_marker": "xxxx", (string) marker required for new asset outputs in the next block ("rvn" or "xna")
1698
1700
  "headers": xxxxxx, (numeric) the current number of headers we have validated
1699
1701
  "bestblockhash": "...", (string) the hash of the currently best block
1700
1702
  "difficulty": xxxxxx, (numeric) the current difficulty
@@ -1703,6 +1705,11 @@ var methods = {
1703
1705
  "chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
1704
1706
  "size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
1705
1707
  "pruned": xx, (boolean) if the blocks are subject to pruning
1708
+ "zk_public_tree": { (object) profile-2 public-transition activation
1709
+ "activation_height": n, (numeric or null) scheduled height, null when unscheduled
1710
+ "active_at_tip": b, (boolean) whether the current block uses profile 2
1711
+ "active_for_next_block": b (boolean) whether a candidate block uses profile 2
1712
+ },
1706
1713
  "pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
1707
1714
  "automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
1708
1715
  "prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
@@ -1723,19 +1730,30 @@ var methods = {
1723
1730
  "timeout": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
1724
1731
  "since": xx, (numeric) height of the first block to which the status applies
1725
1732
  "statistics": { (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
1726
- "period": xx, (numeric) the length in blocks of the BIP9 signalling period
1727
- "threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
1728
- "elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
1729
- "count": xx, (numeric) the number of blocks with the version bit set in the current period
1730
- "possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
1733
+ "period": xx, (numeric) the length in blocks of the BIP9 signalling period
1734
+ "threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
1735
+ "elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
1736
+ "count": xx, (numeric) the number of blocks with the version bit set in the current period
1737
+ "possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
1731
1738
  }
1732
1739
  }
1733
1740
  }
1741
+ "asset_services": { (object) legacy asset modules (NIP-048)
1742
+ "messages": {
1743
+ "active": xx, (boolean) legacy asset messaging stores are open
1744
+ "store_on_disk": xx (boolean) the data directory has a messages store
1745
+ },
1746
+ "rewards": {
1747
+ "active": xx, (boolean) reward snapshot stores are open
1748
+ "store_on_disk": xx, (boolean) the data directory has a rewards store
1749
+ "assetindex": xx (boolean) -assetindex, which the reward RPCs require
1750
+ }
1751
+ },
1734
1752
  "warnings" : "...", (string) any network and blockchain warnings.
1735
1753
  }
1736
1754
 
1737
1755
  Examples:
1738
- > neurai-cli getblockchaininfo
1756
+ > neurai-cli getblockchaininfo
1739
1757
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1740
1758
  **/
1741
1759
  getblockchaininfo: "getblockchaininfo",
@@ -1747,7 +1765,7 @@ var methods = {
1747
1765
  n (numeric) The current block count
1748
1766
 
1749
1767
  Examples:
1750
- > neurai-cli getblockcount
1768
+ > neurai-cli getblockcount
1751
1769
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1752
1770
  **/
1753
1771
  getblockcount: "getblockcount",
@@ -1871,7 +1889,7 @@ var methods = {
1871
1889
  "data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte)
1872
1890
  "txid" : "xxxx", (string) transaction id encoded in little-endian hexadecimal
1873
1891
  "hash" : "xxxx", (string) hash encoded in little-endian hexadecimal (including witness data)
1874
- "depends" : [ (array) array of numbers
1892
+ "depends" : [ (array) array of numbers
1875
1893
  n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
1876
1894
  ,...
1877
1895
  ],
@@ -1889,7 +1907,7 @@ var methods = {
1889
1907
  "coinbasetxn" : { ... }, (json object) information for coinbase transaction
1890
1908
  "target" : "xxxx", (string) The hash target
1891
1909
  "mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)
1892
- "mutable" : [ (array of string) list of ways the block template may be changed
1910
+ "mutable" : [ (array of string) list of ways the block template may be changed
1893
1911
  "value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
1894
1912
  ,...
1895
1913
  ],
@@ -1903,11 +1921,11 @@ var methods = {
1903
1921
  }
1904
1922
 
1905
1923
  Examples:
1906
- > neurai-cli getblocktemplate
1924
+ > neurai-cli getblocktemplate
1907
1925
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1908
1926
  **/
1909
1927
  getblocktemplate: "getblocktemplate",
1910
- /** getcacheinfo
1928
+ /** getcacheinfo
1911
1929
 
1912
1930
  THIS COMMAND IS NOT YET ACTIVE!
1913
1931
  https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
@@ -1927,7 +1945,7 @@ var methods = {
1927
1945
 
1928
1946
  Examples:
1929
1947
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getcacheinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1930
- > neurai-cli getcacheinfo
1948
+ > neurai-cli getcacheinfo
1931
1949
  **/
1932
1950
  getcacheinfo: "getcacheinfo",
1933
1951
  /** getchaintips
@@ -1956,7 +1974,7 @@ var methods = {
1956
1974
  5. "active" This is the tip of the active main chain, which is certainly valid
1957
1975
 
1958
1976
  Examples:
1959
- > neurai-cli getchaintips
1977
+ > neurai-cli getchaintips
1960
1978
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1961
1979
  **/
1962
1980
  getchaintips: "getchaintips",
@@ -1979,10 +1997,62 @@ var methods = {
1979
1997
  }
1980
1998
 
1981
1999
  Examples:
1982
- > neurai-cli getchaintxstats
2000
+ > neurai-cli getchaintxstats
1983
2001
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintxstats", "params": [2016] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1984
2002
  **/
1985
2003
  getchaintxstats: "getchaintxstats",
2004
+ /** getchannelmessages "channel" ( {options} )
2005
+
2006
+ Returns the messages of an asset channel from the chain-wide index (-channelmessageindex, NIP-048): every
2007
+ message an owner token (NAME!) or message channel token (NAME~CHANNEL) carried back to the address it came
2008
+ from, whatever the wallet. Expiry is decided at query time against reference_time, so nodes with the same
2009
+ chain answer alike.
2010
+
2011
+ Arguments:
2012
+ 1. "channel" (string, required) The owner token or message channel
2013
+ 2. options (object, optional)
2014
+ {
2015
+ "from_height": n, (number, default 0)
2016
+ "to_height": n, (number, default the tip)
2017
+ "include_expired": bool, (boolean, default false)
2018
+ "reference_time": n, (number, default the median time past of the tip) expiry reference
2019
+ "message": "hash", (string, optional) only messages with this payload
2020
+ "include_tx": bool, (boolean, default false) add the raw transaction
2021
+ "include_proof": bool, (boolean, default false) add a gettxoutproof-style proof
2022
+ "limit": n (number, default 1000, max 10000) messages per call;
2023
+ a block is never split, so the last block may go past it
2024
+ }
2025
+
2026
+ Result:
2027
+ {
2028
+ "channel": "name",
2029
+ "synced_height": n,
2030
+ "reference_time": n,
2031
+ "messages": [ (array) in chain order
2032
+ {
2033
+ "channel": "name",
2034
+ "authority": "owner"|"channel", (string) the token that carried the message
2035
+ "txid": "hex", "vout": n,
2036
+ "height": n, "block_hash": "hash", "block_time": n,
2037
+ "expire_time": n, (number) 0: never expires
2038
+ "expired": true|false,
2039
+ "message": "hash", (string) IPFS hash or 64-hex hash
2040
+ "address": "address", (string) the address that sent it to itself
2041
+ "op_return": "hex", (string, optional) data of the transaction's OP_RETURN output
2042
+ "op_return_matches": bool, (boolean, with op_return) the message is the SHA-256 of that data, so
2043
+ the data is content the token holder published in full (NIP-048 D1)
2044
+ "tx": "hex", (string, optional)
2045
+ "proof": "hex" (string, optional) checked with verifytxoutproof
2046
+ }, ...
2047
+ ],
2048
+ "next_from_height": n|null (number) the limit stopped here: pass it as from_height for the next page
2049
+ }
2050
+
2051
+ Examples:
2052
+ > neurai-cli getchannelmessages "ASSET!"
2053
+ > neurai-cli getchannelmessages "ASSET~NEWS" '{"from_height":1000,"include_expired":true}'
2054
+ **/
2055
+ getchannelmessages: "getchannelmessages",
1986
2056
  /** getconnectioncount
1987
2057
 
1988
2058
  Returns the number of connections to other nodes.
@@ -1991,7 +2061,7 @@ var methods = {
1991
2061
  n (numeric) The connection count
1992
2062
 
1993
2063
  Examples:
1994
- > neurai-cli getconnectioncount
2064
+ > neurai-cli getconnectioncount
1995
2065
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1996
2066
  **/
1997
2067
  getconnectioncount: "getconnectioncount",
@@ -2003,7 +2073,7 @@ var methods = {
2003
2073
  n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.
2004
2074
 
2005
2075
  Examples:
2006
- > neurai-cli getdifficulty
2076
+ > neurai-cli getdifficulty
2007
2077
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2008
2078
  **/
2009
2079
  getdifficulty: "getdifficulty",
@@ -2025,6 +2095,179 @@ var methods = {
2025
2095
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdistributestatus", "params": ["PHATSTACKS" 34987 "XNA" 100000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2026
2096
  **/
2027
2097
  getdistributestatus: "getdistributestatus",
2098
+ /** getdistributionbatches {plan} ( {options} )
2099
+
2100
+ Splits the payments of a distribution plan into batches of at most max_outputs recipients, in plan order
2101
+ (NIP-048). Each batch pays all its recipients in one transaction. Nothing is spent or locked.
2102
+
2103
+ Arguments:
2104
+ 1. plan (object, required) The plan parameters
2105
+ {
2106
+ "asset_name": "name", (string, required) as in getdistributionplan
2107
+ "snapshot_height": n, (number, required)
2108
+ "distribution_asset_name": "name", (string, required)
2109
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
2110
+ "exception_addresses": "a,b", (string, optional)
2111
+ "remainder": "payer"|"largest", (string, optional, default "payer")
2112
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
2113
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2114
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
2115
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
2116
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2117
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
2118
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
2119
+ }
2120
+ 2. options (object, optional)
2121
+ {
2122
+ "max_outputs": n (number, default 500, max 1000) recipients per batch
2123
+ }
2124
+
2125
+ Result:
2126
+ {
2127
+ "plan_hash": "hex",
2128
+ "max_outputs": n,
2129
+ "batches": [
2130
+ {
2131
+ "index": n,
2132
+ "batch_id": "hex", (string) SHA-256 of 0x04 || plan hash || max_outputs || index
2133
+ "first_recipient": n,
2134
+ "recipient_count": n,
2135
+ "amount": x.xxx, (numeric) total paid by the batch
2136
+ "outputs": { ... } (object) the payments in createrawtransaction format
2137
+ }, ...
2138
+ ]
2139
+ }
2140
+
2141
+ Examples:
2142
+ > neurai-cli getdistributionbatches '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}'
2143
+ **/
2144
+ getdistributionbatches: "getdistributionbatches",
2145
+ /** getdistributionplan "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" {options} )
2146
+
2147
+ Computes, without spending anything, how gross_distribution_amount of the distribution asset is split among the
2148
+ holders of asset_name in its snapshot at snapshot_height (NIP-048). Each holder gets floor(amount * held / total)
2149
+ in whole units of the distribution asset, or floor(amount / holders) with equal allocation. The plan hash commits
2150
+ to the snapshot, the parameters and every payment;
2151
+ pay the recipients from any wallet, for instance with getdistributionbatches and createdistributionbatch.
2152
+
2153
+ Arguments:
2154
+ 1. "asset_name" (string, required) The asset whose holders receive the distribution
2155
+ 2. "snapshot_height" (number, required) The height of a snapshot taken with requestsnapshot
2156
+ 3. "distribution_asset_name" (string, required) The asset to distribute, or XNA
2157
+ 4. "gross_distribution_amount" (number, required) The amount to split, a multiple of the distribution asset's smallest unit
2158
+ 5. "exception_addresses" (string, optional) Comma-separated holder addresses to exclude
2159
+ 6. options (object, optional)
2160
+ {
2161
+ "remainder": "payer"|"largest", (string, default "payer") Where the undivided remainder goes: it stays with the
2162
+ payer, or one unit each to the largest fractional parts (ties by script)
2163
+ "allow_legacy_snapshot": bool, (boolean, default false) Accept a snapshot captured before NIP-048, which has no block identity
2164
+ "announcement": { (object, optional) The transaction that announced snapshot_height in advance
2165
+ "txid": "hex", (see getsnapshotannouncement); the plan then commits to it (format version 2)
2166
+ "block_hash": "hex" (optional) Its block, for nodes without -txindex
2167
+ },
2168
+ "qualifier": "#TAG", (string, optional) Only holders tagged with this qualifier at the height
2169
+ "weights": {"address": n, ...}, (object, optional) Weights of a work report, positive integers; they replace
2170
+ the holdings, and holders without a weight are excluded
2171
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) The owner token transfer that anchored
2172
+ the report hash (SHA-256 of 0x07 || weights)
2173
+ "allocation": "holdings"|"equal", (string, default "holdings") Split in proportion to the holdings (or the
2174
+ report weights), or in equal shares among the eligible holders, whatever
2175
+ they hold; equal cannot be combined with weights
2176
+ "min_held": x.xxx, (numeric, optional) Only holders with at least this amount of asset_name
2177
+ }
2178
+
2179
+ A snapshot taken since NIP-048 D3 records, per holder, freezes, DEPIN self-revocations and qualifier tags; such
2180
+ holders are excluded. With a qualifier, report weights or both, the plan hash commits to them (format version 3);
2181
+ with equal allocation or a minimum holding, it commits to those too (format version 4).
2182
+
2183
+ Result:
2184
+ {
2185
+ "plan_hash": "hex", (string) SHA-256 commitment to the header and the Merkle root
2186
+ "merkle_root": "hex", (string) RFC 6962 root over the recipients, in order
2187
+ "version": n, (number) plan format version
2188
+ "network": "name", (string) network the plan belongs to
2189
+ "snapshot": {
2190
+ "asset_name": "name",
2191
+ "height": n,
2192
+ "block_hash": "hash", (string) block the snapshot was captured on; empty for a legacy snapshot
2193
+ "snapshot_hash": "hex", (string) commitment to the snapshot content
2194
+ "legacy": true|false,
2195
+ "confirmations": n
2196
+ },
2197
+ "distribution_asset_name": "name",
2198
+ "amount": x.xxx, (numeric) gross_distribution_amount
2199
+ "remainder_policy": "payer"|"largest",
2200
+ "allocation": "holdings"|"equal",
2201
+ "min_held": x.xxx, (numeric) minimum holding to be eligible, 0 if none
2202
+ "exception_addresses": [ "address", ... ], (array) sorted, as committed in the plan hash
2203
+ "total_held": x.xxx, (numeric) holdings of the eligible holders
2204
+ "distributed": x.xxx, (numeric) sum of the payments: the funds the payer needs, before fees
2205
+ "remainder": x.xxx, (numeric) amount left undistributed
2206
+ "recipients": [ (array) payments, ordered by output script
2207
+ { "address": "address", "script": "hex", "held": x.xxx, "amount": x.xxx }, ...
2208
+ ],
2209
+ "zero_amount": [ { "address": "address", "held": x.xxx }, ... ], (array) holders whose share rounds to zero
2210
+ "excluded": [ { "address": "address", "held": x.xxx, "reason": "..." }, ... ], (array) reason: exception, burn,
2211
+ globally_frozen, frozen, self_revoked, missing_qualifier, below_minimum or no_weight
2212
+ "announcement": { (object or null) The announcement, when given
2213
+ "txid": "hex", "height": n, "notice": n, "minimum_notice": n (notice: blocks between announcement and snapshot)
2214
+ },
2215
+ "verifiability": "announced"|"late_announcement"|"unannounced" (string) Whether other nodes could capture the
2216
+ same snapshot: without an announcement made with the minimum notice (-minsnapshotnotice),
2217
+ recipients rely on the issuer's snapshot or on replaysnapshot
2218
+ "qualifier": "#TAG"|null,
2219
+ "report": {"hash": "hex", "txid": "hex", "height": n}|null (recipients then also show their "weight")
2220
+ }
2221
+
2222
+ Examples:
2223
+ > neurai-cli getdistributionplan "TRONCO" 12345 "XNA" 1000
2224
+ > neurai-cli getdistributionplan "PHATSTACKS" 12345 "DIVIDENDS" 1000 "" '{"remainder":"largest"}'
2225
+ > neurai-cli getdistributionplan "&GRID" 12345 "XNA" 1000 "" '{"allocation":"equal","min_held":1}'
2226
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdistributionplan", "params": ["TRONCO", 34987, "DIVIDENDS", 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2227
+ **/
2228
+ getdistributionplan: "getdistributionplan",
2229
+ /** getdistributionproof {plan} "address"
2230
+
2231
+ Returns the RFC 6962 inclusion proof of one recipient of a distribution plan (NIP-048). With the plan's
2232
+ merkle_root it shows that the payment is part of the plan; it does not show that the amount is right or that
2233
+ no recipient is missing (recompute the plan for that).
2234
+
2235
+ Arguments:
2236
+ 1. plan (object, required) The plan parameters
2237
+ {
2238
+ "asset_name": "name", (string, required) as in getdistributionplan
2239
+ "snapshot_height": n, (number, required)
2240
+ "distribution_asset_name": "name", (string, required)
2241
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
2242
+ "exception_addresses": "a,b", (string, optional)
2243
+ "remainder": "payer"|"largest", (string, optional, default "payer")
2244
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
2245
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2246
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
2247
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
2248
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2249
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
2250
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
2251
+ }
2252
+ 2. "address" (string, required) A recipient of the plan
2253
+
2254
+ Result:
2255
+ {
2256
+ "plan_hash": "hex",
2257
+ "merkle_root": "hex",
2258
+ "leaf_count": n,
2259
+ "index": n, (number) position of the recipient in the plan
2260
+ "address": "address",
2261
+ "script": "hex",
2262
+ "amount": x.xxx,
2263
+ "leaf_hash": "hex", (string) SHA-256 of 0x00 || script || amount
2264
+ "path": [ "hex", ... ] (array) sibling hashes, deepest first
2265
+ }
2266
+
2267
+ Examples:
2268
+ > neurai-cli getdistributionproof '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' "address"
2269
+ **/
2270
+ getdistributionproof: "getdistributionproof",
2028
2271
  /** getgenerate
2029
2272
 
2030
2273
  Return if the server is set to generate coins or not. The default is false.
@@ -2035,29 +2278,28 @@ var methods = {
2035
2278
  true|false (boolean) If the server is set to generate coins or not
2036
2279
 
2037
2280
  Examples:
2038
- > neurai-cli getgenerate
2281
+ > neurai-cli getgenerate
2039
2282
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getgenerate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2040
2283
  **/
2041
2284
  getgenerate: "getgenerate",
2042
2285
  /** getibdstatus
2043
-
2044
2286
  Returns header synchronization timing collected since process start.
2287
+ request_to_response_us includes peer response and local queueing time.
2045
2288
 
2046
2289
  Result:
2047
2290
  {
2048
- "blocks": n,
2049
- "headers": n,
2050
- "header_batches": n,
2051
- "headers_in_batches": n,
2052
- "unsolicited_header_responses": n,
2053
- "average_request_to_response_us": n,
2054
- "average_validation_us": n,
2055
- "peers": [...]
2291
+ "blocks": n, (numeric) current active-chain height
2292
+ "headers": n, (numeric) best validated header height
2293
+ "header_batches": n, (numeric) requested header batches received
2294
+ "headers_in_batches": n, (numeric) headers in those batches
2295
+ "average_request_to_response_us": n, (numeric) average request-to-response time
2296
+ "average_validation_us": n, (numeric) average local processing time
2297
+ "peers": [ ... ] (array) per-peer timing counters
2056
2298
  }
2057
2299
 
2058
2300
  Examples:
2059
2301
  > neurai-cli getibdstatus
2060
- > curl --user myusername --data-binary '{"jsonrpc":"2.0","id":1,"method":"getibdstatus","params":[]}' -H 'content-type: application/json' http://127.0.0.1:19001/
2302
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getibdstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2061
2303
  **/
2062
2304
  getibdstatus: "getibdstatus",
2063
2305
  /** getinfo
@@ -2086,7 +2328,7 @@ var methods = {
2086
2328
  }
2087
2329
 
2088
2330
  Examples:
2089
- > neurai-cli getinfo
2331
+ > neurai-cli getinfo
2090
2332
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2091
2333
  **/
2092
2334
  getinfo: "getinfo",
@@ -2095,11 +2337,11 @@ var methods = {
2095
2337
  Get the kawpow hash for a block given its block data
2096
2338
 
2097
2339
  Arguments
2098
- 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
2099
- 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
2100
- 3. "nonce" (string, required) the hex nonce of the block that hashed the valid block
2340
+ 1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
2341
+ 2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
2342
+ 3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
2101
2343
  4. "height" (number, required) the height of the block data that is being hashed
2102
- 5. "target" (string, optional) the target of the block that is hash is trying to meet
2344
+ 5. "target" (string, optional) the target to meet (exactly 64 hex digits)
2103
2345
 
2104
2346
  Result:
2105
2347
 
@@ -2116,6 +2358,8 @@ var methods = {
2116
2358
  { (json object)
2117
2359
  "bip32_root_private" : (string) extended master private key,
2118
2360
  "bip32_root_public" : (string) extended master public key,
2361
+ "address_type" : (string) the wallet address type (-addresstype): legacy, pq or ecdsa
2362
+ "strict_ecdsa_derivation_path" : (string, ecdsa wallets) account path of its witness v3 keys
2119
2363
  "account_derivation_path" : (string) The derivation path to the account public/private keys
2120
2364
  "external_derivation_path" : (string) The derivation path prefix for receiving addresses
2121
2365
  "internal_derivation_path" : (string) The derivation path prefix for change addresses
@@ -2124,7 +2368,7 @@ var methods = {
2124
2368
  }
2125
2369
 
2126
2370
  Examples:
2127
- > neurai-cli getmasterkeyinfo
2371
+ > neurai-cli getmasterkeyinfo
2128
2372
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmasterkeyinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2129
2373
  **/
2130
2374
  getmasterkeyinfo: "getmasterkeyinfo",
@@ -2151,7 +2395,7 @@ var methods = {
2151
2395
  "<malloc version="1">..."
2152
2396
 
2153
2397
  Examples:
2154
- > neurai-cli getmemoryinfo
2398
+ > neurai-cli getmemoryinfo
2155
2399
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2156
2400
  **/
2157
2401
  getmemoryinfo: "getmemoryinfo",
@@ -2183,6 +2427,7 @@ var methods = {
2183
2427
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2184
2428
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2185
2429
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2430
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2186
2431
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2187
2432
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2188
2433
  "transactionid", (string) parent transaction id
@@ -2223,6 +2468,7 @@ var methods = {
2223
2468
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2224
2469
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2225
2470
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2471
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2226
2472
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2227
2473
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2228
2474
  "transactionid", (string) parent transaction id
@@ -2255,6 +2501,7 @@ var methods = {
2255
2501
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2256
2502
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2257
2503
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2504
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2258
2505
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2259
2506
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2260
2507
  "transactionid", (string) parent transaction id
@@ -2280,7 +2527,7 @@ var methods = {
2280
2527
  }
2281
2528
 
2282
2529
  Examples:
2283
- > neurai-cli getmempoolinfo
2530
+ > neurai-cli getmempoolinfo
2284
2531
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2285
2532
  **/
2286
2533
  getmempoolinfo: "getmempoolinfo",
@@ -2302,7 +2549,7 @@ var methods = {
2302
2549
  }
2303
2550
 
2304
2551
  Examples:
2305
- > neurai-cli getmininginfo
2552
+ > neurai-cli getmininginfo
2306
2553
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2307
2554
  **/
2308
2555
  getmininginfo: "getmininginfo",
@@ -2316,7 +2563,7 @@ var methods = {
2316
2563
  "passphrase:" (optional) Only show if passphrase was used when creating the wallet
2317
2564
 
2318
2565
  Examples:
2319
- > neurai-cli getmywords
2566
+ > neurai-cli getmywords
2320
2567
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmywords", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2321
2568
  **/
2322
2569
  getmywords: "getmywords",
@@ -2342,7 +2589,7 @@ var methods = {
2342
2589
  }
2343
2590
 
2344
2591
  Examples:
2345
- > neurai-cli getnettotals
2592
+ > neurai-cli getnettotals
2346
2593
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2347
2594
  **/
2348
2595
  getnettotals: "getnettotals",
@@ -2360,7 +2607,7 @@ var methods = {
2360
2607
  x (numeric) Hashes per second estimated
2361
2608
 
2362
2609
  Examples:
2363
- > neurai-cli getnetworkhashps
2610
+ > neurai-cli getnetworkhashps
2364
2611
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2365
2612
  **/
2366
2613
  getnetworkhashps: "getnetworkhashps",
@@ -2401,25 +2648,25 @@ var methods = {
2401
2648
  }
2402
2649
 
2403
2650
  Examples:
2404
- > neurai-cli getnetworkinfo
2651
+ > neurai-cli getnetworkinfo
2405
2652
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2406
2653
  **/
2407
2654
  getnetworkinfo: "getnetworkinfo",
2408
2655
  /** getnewaddress ( "account" "address_type" )
2409
2656
 
2410
2657
  Returns a new Neurai address for receiving payments.
2411
- If 'account' is specified (DEPRECATED), it is added to the address book
2658
+ If 'account' is specified (DEPRECATED), it is added to the address book
2412
2659
  so payments received with the address will be credited to 'account'.
2413
2660
 
2414
2661
  Arguments:
2415
2662
  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).
2663
+ 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 address type (-addresstype when it was created, see getwalletinfo) is used. "pq" needs a pq wallet; an ecdsa wallet refuses "legacy". Strict addresses are handed out before the network activates them, but payments to them are refused until then. Generic AuthScript v1 (nc1p.../tnc1p...) is a contract family and is never handed out by the wallet.
2417
2664
 
2418
2665
  Result:
2419
2666
  "address" (string) The new neurai address
2420
2667
 
2421
2668
  Examples:
2422
- > neurai-cli getnewaddress
2669
+ > neurai-cli getnewaddress
2423
2670
  > neurai-cli getnewaddress "" "ecdsa"
2424
2671
  > 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/
2425
2672
  **/
@@ -2472,13 +2719,34 @@ var methods = {
2472
2719
  ]
2473
2720
 
2474
2721
  Examples:
2475
- > neurai-cli getpeerinfo
2722
+ > neurai-cli getpeerinfo
2476
2723
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2477
2724
  **/
2478
2725
  getpeerinfo: "getpeerinfo",
2726
+ /** getprivacypoolinfo pool ( limit )
2727
+
2728
+ Read public state-thread identity and confirmed state, without registering a pool.
2729
+ Requires -spentindex and -txindex and readable historical transactions.
2730
+ pool: {"txid": birth_txid, "vout": birth_output}
2731
+ limit: maximum transitions to follow (default 100, maximum 1000).
2732
+ history_complete=false means current_state is unknown; continue with next_cursor.
2733
+ The reported profile describes the transport, not an audited privacy circuit.
2734
+ **/
2735
+ getprivacypoolinfo: "getprivacypoolinfo",
2736
+ /** getprivacypoolupdates pool ( cursor limit )
2737
+
2738
+ Return confirmed public pool transactions, including complete witnesses, in state-thread order.
2739
+ pool: {"txid": birth_txid, "vout": birth_output}; no registry or viewing key.
2740
+ cursor: null for birth, otherwise the unchanged next_cursor from a previous query.
2741
+ limit: maximum updates (default 100, maximum 1000); pages also have a 1 MiB raw-byte limit.
2742
+ Pages pin one chain snapshot; a completed cursor refreshes to the current tip.
2743
+ A reorganized snapshot or foreign/tampered cursor is rejected. Mempool spends are excluded.
2744
+ No matching successor ends this transport; it does not prove the contract is closed.
2745
+ **/
2746
+ getprivacypoolupdates: "getprivacypoolupdates",
2479
2747
  /** getpubkey "address"
2480
2748
 
2481
- Returns the public key for an address that has revealed it by spending (requires pubkeyindex to be enabled).
2749
+ Returns the public key for a Legacy, AuthScript v1 or strict ECDSA address that has revealed it by spending (requires pubkeyindex to be enabled).
2482
2750
 
2483
2751
  Arguments:
2484
2752
  1. "address" (string, required) The Neurai address
@@ -2503,13 +2771,13 @@ var methods = {
2503
2771
  This is for use with raw transactions, NOT normal use.
2504
2772
 
2505
2773
  Arguments:
2506
- 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2774
+ 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's address type (-addresstype when it was created).
2507
2775
 
2508
2776
  Result:
2509
2777
  "address" (string) The address
2510
2778
 
2511
2779
  Examples:
2512
- > neurai-cli getrawchangeaddress
2780
+ > neurai-cli getrawchangeaddress
2513
2781
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2514
2782
  **/
2515
2783
  getrawchangeaddress: "getrawchangeaddress",
@@ -2542,6 +2810,7 @@ var methods = {
2542
2810
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2543
2811
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2544
2812
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2813
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2545
2814
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2546
2815
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2547
2816
  "transactionid", (string) parent transaction id
@@ -2584,7 +2853,7 @@ var methods = {
2584
2853
  "vin" : [ (array of json objects)
2585
2854
  {
2586
2855
  "txid": "id", (string) The transaction id
2587
- "vout": n, (numeric)
2856
+ "vout": n, (numeric)
2588
2857
  "scriptSig": { (json object) The script
2589
2858
  "asm": "asm", (string) asm
2590
2859
  "hex": "hex" (string) hex
@@ -2683,15 +2952,157 @@ var methods = {
2683
2952
  "active_commands" (array) All active commands
2684
2953
  [
2685
2954
  { (object) Information about an active command
2686
- "method" (string) The name of the RPC command
2955
+ "method" (string) The name of the RPC command
2687
2956
  "duration" (numeric) The running time in microseconds
2688
2957
  },...
2689
2958
  ],
2690
2959
  }
2691
- > neurai-cli getrpcinfo
2960
+ > neurai-cli getrpcinfo
2692
2961
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrpcinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2693
2962
  **/
2694
2963
  getrpcinfo: "getrpcinfo",
2964
+ /** getsilentpaymentcode
2965
+
2966
+ Returns the reusable silent payment code of this wallet (NIP-047).
2967
+ Every payment to the code lands on a new strict ECDSA (witness v3) output
2968
+ that only this wallet can link to the code.
2969
+
2970
+ Result:
2971
+ {
2972
+ "code": "str", (string) payment code (nsp1... / tnsp1...)
2973
+ "network": "str", (string) main, test or regtest
2974
+ "scan_pubkey": "hex", (string) B_scan
2975
+ "spend_pubkey": "hex", (string) B_spend
2976
+ "view_only": true|false (boolean) imported view key: payments are detected, not spendable
2977
+ "verified": true (boolean) checked against the wallet seed in this session. An encrypted
2978
+ wallet shows its code only after one unlock in the session
2979
+ }
2980
+
2981
+ Examples:
2982
+ > neurai-cli getsilentpaymentcode
2983
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentcode", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2984
+ **/
2985
+ getsilentpaymentcode: "getsilentpaymentcode",
2986
+ /** getsilentpaymentindexinfo
2987
+
2988
+ State of the NIP-047 silent payment index (-silentpaymentindex).
2989
+
2990
+ Result:
2991
+ {
2992
+ "enabled" : true|false, (boolean) whether the node maintains the index
2993
+ "state" : "str", (string) disabled, ready or incomplete (records missing and their blocks pruned)
2994
+ "schema" : n, (numeric) storage schema of the records
2995
+ "formats" : [n,...], (array) public formats served
2996
+ "context" : "hex", (string) NIP-047 context N: network id, genesis, profile and family
2997
+ "start_height" : n, (numeric) first indexed height: max(1, strict AuthScript activation)
2998
+ "synced_height" : n, (numeric) every active block from start_height to this height has a record
2999
+ "synced_hash" : "hash", (string) hash of the block at synced_height
3000
+ "complete" : true|false, (boolean) ready and synced up to the tip
3001
+ "missing" : [[n,n],...], (array) height ranges without a record or block data to rebuild it
3002
+ "pruned" : true|false (boolean) whether the node has deleted block files
3003
+ }
3004
+
3005
+ Examples:
3006
+ > neurai-cli getsilentpaymentindexinfo
3007
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentindexinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3008
+ **/
3009
+ getsilentpaymentindexinfo: "getsilentpaymentindexinfo",
3010
+ /** getsilentpaymentinfo
3011
+
3012
+ Returns the silent payment scanning state of this wallet.
3013
+
3014
+ Result:
3015
+ {
3016
+ "enabled": true|false, (boolean) the wallet has an identity (own or view key)
3017
+ "view_only": true|false,
3018
+ "code": "str", (string) once checked against the seed in this session and while
3019
+ the identity is sound
3020
+ "code_verified": true|false,(boolean) code checked against the seed in this session
3021
+ "identity_error": "str", (string) damaged identity: the code must not be used
3022
+ "paused": true|false, (boolean) locked wallet: scanning waits for walletpassphrase
3023
+ "scanned_height": n, (numeric) last block really scanned (-1: none)
3024
+ "scanned_hash": "hex",
3025
+ "tip_height": n,
3026
+ "blocks_behind": n,
3027
+ "error": "str", (string) why scanning stopped (missing block or undo data)
3028
+ "payments": n
3029
+ }
3030
+
3031
+ Examples:
3032
+ > neurai-cli getsilentpaymentinfo
3033
+ **/
3034
+ getsilentpaymentinfo: "getsilentpaymentinfo",
3035
+ /** getsilentpaymenttweaks "blockhash" ( "encoding" )
3036
+
3037
+ NIP-047 light client data of one block: every eligible transaction with a native v3 output,
3038
+ its public tweak T = h*A and all its native v3 outputs, plus every native v3 output the block spends.
3039
+ A receiver computes b_scan*T for each entry; the node learns nothing about it.
3040
+ Requires -silentpaymentindex.
3041
+
3042
+ Arguments:
3043
+ 1. "blockhash" (string, required) the block hash
3044
+ 2. "encoding" (string, optional, default=json) json, or hex for the binary message of type 1
3045
+
3046
+ Result (json):
3047
+ {
3048
+ "format" : 1,
3049
+ "context" : "hex", (string) NIP-047 context N
3050
+ "block" : { (object) immutable for this block hash
3051
+ "height" : n,
3052
+ "hash" : "hash",
3053
+ "prev" : "hash",
3054
+ "entries" : [
3055
+ {
3056
+ "txid" : "hex",
3057
+ "tweak" : "hex", (string) 33-byte compressed point T
3058
+ "outputs" : [{ "vout" : n, "commitment" : "hex", "value_sat" : "n" },...]
3059
+ },...
3060
+ ],
3061
+ "spent" : [{ "txid" : "hex", "vout" : n },...],
3062
+ "digest" : "hex" (string) tagged hash of the canonical block bytes
3063
+ },
3064
+ "in_active_chain" : true|false
3065
+ }
3066
+
3067
+ Result (hex):
3068
+ "hex" (string) binary message of type 1
3069
+
3070
+ Examples:
3071
+ > neurai-cli getsilentpaymenttweaks "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
3072
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymenttweaks", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3073
+ **/
3074
+ getsilentpaymenttweaks: "getsilentpaymenttweaks",
3075
+ /** getsilentpaymenttweaksrange start_height count ( "anchor_hash" "encoding" )
3076
+
3077
+ NIP-047 light client data of consecutive blocks of the active chain, as getsilentpaymenttweaks.
3078
+ The blocks come from one snapshot of the active chain. Whole blocks only: at least one, up to
3079
+ 1000 blocks and 4 MB. Requires -silentpaymentindex.
3080
+
3081
+ Arguments:
3082
+ 1. start_height (numeric, required) first height, from start_height of getsilentpaymentindexinfo
3083
+ up to the tip + 1 (an empty answer with status "tip")
3084
+ 2. count (numeric, required) number of blocks wanted
3085
+ 3. "anchor_hash" (string, optional) hash the client has at start_height - 1. If it left the active
3086
+ chain the answer is {"reorg": true, "fork_height": n}: continue from fork_height + 1
3087
+ 4. "encoding" (string, optional, default=json) json, or hex for the binary message of type 2
3088
+
3089
+ Result (json):
3090
+ {
3091
+ "format" : 1,
3092
+ "context" : "hex",
3093
+ "snapshot" : { "height" : n, "hash" : "hash" }, (object) tip when the request was served
3094
+ "synced_height" : n,
3095
+ "blocks" : [ {...},... ], (array) as "block" in getsilentpaymenttweaks
3096
+ "next_height" : n, (numeric) height after the last block returned
3097
+ "status" : "str" (string) more: ask again now; tip: wait for a new block;
3098
+ incomplete: the index lacks data from next_height
3099
+ }
3100
+
3101
+ Examples:
3102
+ > neurai-cli getsilentpaymenttweaksrange 1000 100
3103
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymenttweaksrange", "params": [1000, 100, "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3104
+ **/
3105
+ getsilentpaymenttweaksrange: "getsilentpaymenttweaksrange",
2695
3106
  /** getsnapshot "asset_name" block_height
2696
3107
 
2697
3108
  THIS COMMAND IS NOT YET ACTIVE!
@@ -2707,10 +3118,17 @@ var methods = {
2707
3118
  {
2708
3119
  name: (string),
2709
3120
  height: (number),
3121
+ block_hash: (string) the block the snapshot was captured on; empty for a legacy snapshot
3122
+ snapshot_hash: (string) commitment to the snapshot content (NIP-048); empty for a legacy snapshot
3123
+ format: (number) 0 legacy, 1 bound to its block, 2 also with holder state (NIP-048 D3)
3124
+ global_frozen: (bool, format 2) the asset was globally frozen
2710
3125
  owners: [
2711
3126
  {
2712
3127
  address: (string),
2713
3128
  amount_owned: (number),
3129
+ frozen: (bool, format 2) frozen for the asset (restricted asset or DEPIN owner freeze)
3130
+ self_revoked: (bool, format 2) a DEPIN holder that revoked itself
3131
+ tags: [ (string), ... ] (format 2) qualifier tags of the address
2714
3132
  }
2715
3133
  }
2716
3134
 
@@ -2718,6 +3136,64 @@ var methods = {
2718
3136
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsnapshot", "params": ["ASSET_NAME" 28546] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2719
3137
  **/
2720
3138
  getsnapshot: "getsnapshot",
3139
+ /** getsnapshotannouncement "asset_name" snapshot_height
3140
+
3141
+ Returns the message that announces a snapshot height before the chain reaches it (NIP-048). The holder of the
3142
+ owner token sends it to itself with that message, for instance:
3143
+ transfer "ASSET!" 1 "owner_token_address" "message"
3144
+ Other nodes that see the announcement request the same snapshot and can check the plan independently.
3145
+ A plan names the announcement with its "announcement" option.
3146
+
3147
+ Arguments:
3148
+ 1. "asset_name" (string, required) The asset whose holders will be snapshotted
3149
+ 2. snapshot_height (number, required) The future snapshot height
3150
+
3151
+ Result:
3152
+ {
3153
+ "asset_name": "name",
3154
+ "snapshot_height": n,
3155
+ "owner_token": "name", (string) the token that must carry the message
3156
+ "message": "hex", (string) SHA-256 of 0x05 || network || asset || height
3157
+ "minimum_notice": n, (number) blocks the announcement must precede the height (-minsnapshotnotice)
3158
+ "notice_if_mined_next": n (number) the notice if the announcement is mined in the next block
3159
+ }
3160
+
3161
+ Examples:
3162
+ > neurai-cli getsnapshotannouncement "TRONCO" 12345
3163
+ **/
3164
+ getsnapshotannouncement: "getsnapshotannouncement",
3165
+ /** getsnapshotrecipients "asset_name" snapshot_height
3166
+
3167
+ The holders in a snapshot with what an encrypted bulletin to them needs (NIP-048 D5). Encryption follows DePIN
3168
+ messaging: a holder is ready when its address is P2PKH or strict ECDSA and its public key is in -pubkeyindex.
3169
+ The others are listed too, so no holder is skipped silently. Needs -pubkeyindex.
3170
+
3171
+ Arguments:
3172
+ 1. "asset_name" (string, required) The asset of the snapshot
3173
+ 2. snapshot_height (number, required) The snapshot height
3174
+
3175
+ Result:
3176
+ {
3177
+ "asset_name": "name",
3178
+ "height": n,
3179
+ "block_hash": "hash",
3180
+ "snapshot_hash": "hex",
3181
+ "ready": n, "key_not_revealed": n, "unsupported_type": n,
3182
+ "holders": [
3183
+ {
3184
+ "address": "address",
3185
+ "held": x.xxx,
3186
+ "state": "ready"|"key_not_revealed"|"unsupported_type",
3187
+ "pubkey": "hex", (string, when ready)
3188
+ "frozen": bool, "self_revoked": bool (snapshots with holder state)
3189
+ }, ...
3190
+ ]
3191
+ }
3192
+
3193
+ Examples:
3194
+ > neurai-cli getsnapshotrecipients "&TOKEN" 12345
3195
+ **/
3196
+ getsnapshotrecipients: "getsnapshotrecipients",
2721
3197
  /** getsnapshotrequest "asset_name" block_height
2722
3198
 
2723
3199
  Retrieves the specified snapshot request details.
@@ -2770,7 +3246,7 @@ var methods = {
2770
3246
  Result:
2771
3247
  {
2772
3248
  "amount" : x.xxx, (numeric) The transaction amount in XNA
2773
- "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
3249
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
2774
3250
  'send' category of transactions.
2775
3251
  "confirmations" : n, (numeric) The number of confirmations
2776
3252
  "blockhash" : "hash", (string) The block hash
@@ -2779,8 +3255,6 @@ var methods = {
2779
3255
  "txid" : "transactionid", (string) The transaction id.
2780
3256
  "time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
2781
3257
  "timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
2782
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
2783
- may be unknown for unconfirmed transactions not in the mempool
2784
3258
  "details" : [
2785
3259
  {
2786
3260
  "account" : "accountname", (string) DEPRECATED. The account name involved in the transaction, can be "" for the default account.
@@ -2789,9 +3263,9 @@ var methods = {
2789
3263
  "amount" : x.xxx, (numeric) The amount in XNA
2790
3264
  "label" : "label", (string) A comment for the address/transaction, if any
2791
3265
  "vout" : n, (numeric) the vout value
2792
- "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
3266
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
2793
3267
  'send' category of transactions.
2794
- "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
3268
+ "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
2795
3269
  'send' category of transactions.
2796
3270
  }
2797
3271
  ,...
@@ -2831,8 +3305,8 @@ var methods = {
2831
3305
  "confirmations" : n, (numeric) The number of confirmations
2832
3306
  "value" : x.xxx, (numeric) The transaction value in XNA
2833
3307
  "scriptPubKey" : { (json object)
2834
- "asm" : "code", (string)
2835
- "hex" : "hex", (string)
3308
+ "asm" : "code", (string)
3309
+ "hex" : "hex", (string)
2836
3310
  "reqSigs" : n, (numeric) Number of required signatures
2837
3311
  "type" : "pubkeyhash", (string) The type, eg pubkeyhash
2838
3312
  "addresses" : [ (array of string) array of neurai addresses
@@ -2846,7 +3320,7 @@ var methods = {
2846
3320
  Examples:
2847
3321
 
2848
3322
  Get unspent transactions
2849
- > neurai-cli listunspent
3323
+ > neurai-cli listunspent
2850
3324
 
2851
3325
  View the details
2852
3326
  > neurai-cli gettxout "txid" 1
@@ -2894,7 +3368,7 @@ var methods = {
2894
3368
  }
2895
3369
 
2896
3370
  Examples:
2897
- > neurai-cli gettxoutsetinfo
3371
+ > neurai-cli gettxoutsetinfo
2898
3372
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2899
3373
  **/
2900
3374
  gettxoutsetinfo: "gettxoutsetinfo",
@@ -2927,6 +3401,7 @@ var methods = {
2927
3401
  {
2928
3402
  "walletname": xxxxx, (string) the wallet name
2929
3403
  "walletversion": xxxxx, (numeric) the wallet version
3404
+ "addresstype": "type", (string) the address type fixed when the wallet was created (-addresstype): legacy, pq or ecdsa
2930
3405
  "balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in XNA
2931
3406
  "unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in XNA
2932
3407
  "immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in XNA
@@ -2941,7 +3416,7 @@ var methods = {
2941
3416
  }
2942
3417
 
2943
3418
  Examples:
2944
- > neurai-cli getwalletinfo
3419
+ > neurai-cli getwalletinfo
2945
3420
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2946
3421
  **/
2947
3422
  getwalletinfo: "getwalletinfo",
@@ -2965,6 +3440,7 @@ var methods = {
2965
3440
  2. "label" (string, optional, default="") An optional label
2966
3441
  3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
2967
3442
  4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well
3443
+ If the wallet already has the keys, registering the redeem script can make its P2SH output spendable.
2968
3444
 
2969
3445
  Note: This call can take minutes to complete if rescan is true.
2970
3446
  If you have the full public key, you should call importpubkey instead of this.
@@ -3082,6 +3558,28 @@ var methods = {
3082
3558
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importpubkey", "params": ["mypubkey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3083
3559
  **/
3084
3560
  importpubkey: "importpubkey",
3561
+ /** importsilentpaymentviewkey "scan_private_key" "spend_pubkey" ( start_height )
3562
+
3563
+ Turns this wallet into a watch wallet of a silent payment code: payments are
3564
+ detected and shown as watch-only, never spendable. Only for an unencrypted wallet
3565
+ without its own silent payment identity (or whose stored view key is damaged); the wallet
3566
+ can no longer be encrypted. Pass the secret with "neurai-cli -stdin importsilentpaymentviewkey"
3567
+ (one argument per line) so it stays out of the shell history and the process list.
3568
+
3569
+ Arguments:
3570
+ 1. "scan_private_key" (string, required) hex b_scan
3571
+ 2. "spend_pubkey" (string, required) hex B_spend
3572
+ 3. start_height (numeric, optional, default=0) first block to scan
3573
+
3574
+ Result:
3575
+ {
3576
+ "code": "str", "scanned_height": n, "found": n
3577
+ }
3578
+
3579
+ Examples:
3580
+ > neurai-cli importsilentpaymentviewkey "<hex>" "<hex>" 0
3581
+ **/
3582
+ importsilentpaymentviewkey: "importsilentpaymentviewkey",
3085
3583
  /** importwallet "filename"
3086
3584
 
3087
3585
  Imports keys from a wallet dump file (see dumpwallet).
@@ -3252,7 +3750,7 @@ var methods = {
3252
3750
  1. newsize (numeric, optional, default=100) The new keypool size
3253
3751
 
3254
3752
  Examples:
3255
- > neurai-cli keypoolrefill
3753
+ > neurai-cli keypoolrefill
3256
3754
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3257
3755
  **/
3258
3756
  keypoolrefill: "keypoolrefill",
@@ -3273,7 +3771,7 @@ var methods = {
3273
3771
  Examples:
3274
3772
 
3275
3773
  List account balances where there at least 1 confirmation
3276
- > neurai-cli listaccounts
3774
+ > neurai-cli listaccounts
3277
3775
 
3278
3776
  List account balances including zero confirmation transactions
3279
3777
  > neurai-cli listaccounts 0
@@ -3349,7 +3847,7 @@ var methods = {
3349
3847
  ]
3350
3848
 
3351
3849
  Examples:
3352
- > neurai-cli listaddressgroupings
3850
+ > neurai-cli listaddressgroupings
3353
3851
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3354
3852
  **/
3355
3853
  listaddressgroupings: "listaddressgroupings",
@@ -3444,7 +3942,7 @@ var methods = {
3444
3942
  List all banned IPs/Subnets.
3445
3943
 
3446
3944
  Examples:
3447
- > neurai-cli listbanned
3945
+ > neurai-cli listbanned
3448
3946
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3449
3947
  **/
3450
3948
  listbanned: "listbanned",
@@ -3466,6 +3964,7 @@ var methods = {
3466
3964
  {
3467
3965
  "address": "address", (string) The Neurai address
3468
3966
  "pubkey": "pubkey_hex" (string) The public key in hex format
3967
+ "valid": 1|0 (numeric) 1 = active/valid, 0 = blocked/revoked (only meaningful for DEPIN assets; always 1 for regular assets)
3469
3968
  },
3470
3969
  ...
3471
3970
  ]
@@ -3516,7 +4015,7 @@ var methods = {
3516
4015
  ]
3517
4016
 
3518
4017
  Examples:
3519
- > neurai-cli listglobalrestrictions
4018
+ > neurai-cli listglobalrestrictions
3520
4019
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listglobalrestrictions", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3521
4020
  **/
3522
4021
  listglobalrestrictions: "listglobalrestrictions",
@@ -3537,13 +4036,13 @@ var methods = {
3537
4036
  Examples:
3538
4037
 
3539
4038
  List the unspent transactions
3540
- > neurai-cli listunspent
4039
+ > neurai-cli listunspent
3541
4040
 
3542
4041
  Lock an unspent transaction
3543
4042
  > neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
3544
4043
 
3545
4044
  List the locked transactions
3546
- > neurai-cli listlockunspent
4045
+ > neurai-cli listlockunspent
3547
4046
 
3548
4047
  Unlock the transaction again
3549
4048
  > neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
@@ -3552,7 +4051,7 @@ var methods = {
3552
4051
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3553
4052
  **/
3554
4053
  listlockunspent: "listlockunspent",
3555
- /** listmyassets "( asset )" ( verbose ) ( count ) ( start ) (confs)
4054
+ /** listmyassets "( asset )" ( verbose ) ( count ) ( start ) (confs)
3556
4055
 
3557
4056
  THIS COMMAND IS NOT YET ACTIVE!
3558
4057
  https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
@@ -3603,12 +4102,12 @@ var methods = {
3603
4102
 
3604
4103
  Result:
3605
4104
  [ (json array of strings)
3606
- "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
4105
+ "address" (string) A strict post-quantum (witness v2) address of a PQ key (pq1.../tpq1...)
3607
4106
  ...
3608
4107
  ]
3609
4108
 
3610
4109
  Examples:
3611
- > neurai-cli listpqaddresses
4110
+ > neurai-cli listpqaddresses
3612
4111
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listpqaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3613
4112
  **/
3614
4113
  listpqaddresses: "listpqaddresses",
@@ -3634,7 +4133,7 @@ var methods = {
3634
4133
  ]
3635
4134
 
3636
4135
  Examples:
3637
- > neurai-cli listreceivedbyaccount
4136
+ > neurai-cli listreceivedbyaccount
3638
4137
  > neurai-cli listreceivedbyaccount 6 true
3639
4138
  > 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/
3640
4139
  **/
@@ -3658,7 +4157,7 @@ var methods = {
3658
4157
  "confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
3659
4158
  "label" : "label", (string) A comment for the address/transaction, if any
3660
4159
  "txids": [
3661
- n, (numeric) The ids of transactions received with the address
4160
+ n, (numeric) The ids of transactions received with the address
3662
4161
  ...
3663
4162
  ]
3664
4163
  }
@@ -3666,11 +4165,29 @@ var methods = {
3666
4165
  ]
3667
4166
 
3668
4167
  Examples:
3669
- > neurai-cli listreceivedbyaddress
4168
+ > neurai-cli listreceivedbyaddress
3670
4169
  > neurai-cli listreceivedbyaddress 6 true
3671
4170
  > 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/
3672
4171
  **/
3673
4172
  listreceivedbyaddress: "listreceivedbyaddress",
4173
+ /** listsilentpayments ( include_spent )
4174
+
4175
+ Lists the silent payments received by this wallet.
4176
+
4177
+ Arguments:
4178
+ 1. include_spent (boolean, optional, default=true)
4179
+
4180
+ Result:
4181
+ [{
4182
+ "txid": "hex", "vout": n, "k": n, "amount": x.xxx, "address": "str",
4183
+ "status": "pending|unconfirmed|confirmed|spent|conflicted|abandoned|other_chain|unknown",
4184
+ "confirmations": n, "blockhash": "hex", "height": n, "view_only": true|false
4185
+ }, ...]
4186
+
4187
+ Examples:
4188
+ > neurai-cli listsilentpayments
4189
+ **/
4190
+ listsilentpayments: "listsilentpayments",
3674
4191
  /** listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
3675
4192
 
3676
4193
  Get all transactions in blocks since block [blockhash], or all transactions if omitted.
@@ -3690,7 +4207,7 @@ var methods = {
3690
4207
  "account":"accountname", (string) DEPRECATED. The account name associated with the transaction. Will be "" for the default account.
3691
4208
  "address":"address", (string) The neurai address of the transaction. Not present for move transactions (category = move).
3692
4209
  "category":"send|receive", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.
3693
- "amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves
4210
+ "amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves
3694
4211
  outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.
3695
4212
  "vout" : n, (numeric) the vout value
3696
4213
  "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the 'send' category of transactions.
@@ -3702,8 +4219,6 @@ var methods = {
3702
4219
  "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
3703
4220
  "time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
3704
4221
  "timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
3705
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3706
- may be unknown for unconfirmed transactions not in the mempool
3707
4222
  "abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
3708
4223
  "comment": "...", (string) If a comment is associated with the transaction.
3709
4224
  "label" : "label" (string) A comment for the address/transaction, if any
@@ -3717,7 +4232,7 @@ var methods = {
3717
4232
  }
3718
4233
 
3719
4234
  Examples:
3720
- > neurai-cli listsinceblock
4235
+ > neurai-cli listsinceblock
3721
4236
  > neurai-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
3722
4237
  > 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/
3723
4238
  **/
@@ -3739,7 +4254,7 @@ var methods = {
3739
4254
  ]
3740
4255
 
3741
4256
  Examples:
3742
- > neurai-cli listsnapshotrequests
4257
+ > neurai-cli listsnapshotrequests
3743
4258
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsnapshotrequests", "params": ["TRONCO" 345333] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3744
4259
  **/
3745
4260
  listsnapshotrequests: "listsnapshotrequests",
@@ -3776,22 +4291,22 @@ var methods = {
3776
4291
  Result:
3777
4292
  [
3778
4293
  {
3779
- "account":"accountname", (string) DEPRECATED. The account name associated with the transaction.
4294
+ "account":"accountname", (string) DEPRECATED. The account name associated with the transaction.
3780
4295
  It will be "" for the default account.
3781
- "address":"address", (string) The neurai address of the transaction. Not present for
4296
+ "address":"address", (string) The neurai address of the transaction. Not present for
3782
4297
  move transactions (category = move).
3783
4298
  "category":"send|receive|move", (string) The transaction category. 'move' is a local (off blockchain)
3784
4299
  transaction between accounts, and not associated with an address,
3785
- transaction id or block. 'send' and 'receive' transactions are
4300
+ transaction id or block. 'send' and 'receive' transactions are
3786
4301
  associated with an address, transaction id and block details
3787
4302
  "amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the
3788
4303
  'move' category for moves outbound. It is positive for the 'receive' category,
3789
4304
  and for the 'move' category for inbound funds.
3790
4305
  "label": "label", (string) A comment for the address/transaction, if any
3791
4306
  "vout": n, (numeric) the vout value
3792
- "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
4307
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
3793
4308
  'send' category of transactions.
3794
- "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
4309
+ "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
3795
4310
  'receive' category of transactions. Negative confirmations indicate the
3796
4311
  transaction conflicts with the block chain
3797
4312
  "trusted": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.
@@ -3802,15 +4317,13 @@ var methods = {
3802
4317
  "blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
3803
4318
  "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
3804
4319
  "time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
3805
- "timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
4320
+ "timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
3806
4321
  for 'send' and 'receive' category of transactions.
3807
4322
  "comment": "...", (string) If a comment is associated with the transaction.
3808
- "otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
4323
+ "otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
3809
4324
  from (for receiving funds, positive amounts), or went to (for sending funds,
3810
4325
  negative amounts).
3811
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3812
- may be unknown for unconfirmed transactions not in the mempool
3813
- "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
4326
+ "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
3814
4327
  'send' category of transactions.
3815
4328
  }
3816
4329
  ]
@@ -3818,7 +4331,7 @@ var methods = {
3818
4331
  Examples:
3819
4332
 
3820
4333
  List the most recent 10 transactions in the systems
3821
- > neurai-cli listtransactions
4334
+ > neurai-cli listtransactions
3822
4335
 
3823
4336
  List transactions 100 to 120
3824
4337
  > neurai-cli listtransactions "*" 20 100
@@ -3854,7 +4367,7 @@ var methods = {
3854
4367
  Result
3855
4368
  [ (array of json object)
3856
4369
  {
3857
- "txid" : "txid", (string) the transaction id
4370
+ "txid" : "txid", (string) the transaction id
3858
4371
  "vout" : n, (numeric) the vout value
3859
4372
  "address" : "address", (string) the neurai address
3860
4373
  "account" : "account", (string) DEPRECATED. The associated account, or "" for the default account
@@ -3872,7 +4385,7 @@ var methods = {
3872
4385
  ]
3873
4386
 
3874
4387
  Examples
3875
- > neurai-cli listunspent
4388
+ > neurai-cli listunspent
3876
4389
  > neurai-cli listunspent 6 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"
3877
4390
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3878
4391
  > neurai-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
@@ -3890,7 +4403,7 @@ var methods = {
3890
4403
  ]
3891
4404
 
3892
4405
  Examples:
3893
- > neurai-cli listwallets
4406
+ > neurai-cli listwallets
3894
4407
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3895
4408
  **/
3896
4409
  listwallets: "listwallets",
@@ -3921,13 +4434,13 @@ var methods = {
3921
4434
  Examples:
3922
4435
 
3923
4436
  List the unspent transactions
3924
- > neurai-cli listunspent
4437
+ > neurai-cli listunspent
3925
4438
 
3926
4439
  Lock an unspent transaction
3927
4440
  > neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
3928
4441
 
3929
4442
  List the locked transactions
3930
- > neurai-cli listlockunspent
4443
+ > neurai-cli listlockunspent
3931
4444
 
3932
4445
  Unlock the transaction again
3933
4446
  > neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
@@ -3962,6 +4475,28 @@ var methods = {
3962
4475
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko", 0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3963
4476
  **/
3964
4477
  move: "move",
4478
+ /** opendepin "asset_name" ("change_address")
4479
+
4480
+ THIS COMMAND IS NOT YET ACTIVE!
4481
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
4482
+
4483
+ Open transfers of a DEPIN asset (owner only): while open, holders can move
4484
+ the asset like a regular asset without the owner token. Transfers from addresses
4485
+ frozen by the owner or self-revoked stay rejected. Valid from the closed state;
4486
+ takes effect from the block after the one that confirms it.
4487
+
4488
+ Arguments:
4489
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
4490
+ 2. "change_address" (string, optional) The change address for the owner token
4491
+
4492
+ Result:
4493
+ "txid" (string) The transaction id
4494
+
4495
+ Examples:
4496
+ > neurai-cli opendepin "&FRANCE"
4497
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "opendepin", "params": ["&FRANCE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4498
+ **/
4499
+ opendepin: "opendepin",
3965
4500
  /** ping
3966
4501
 
3967
4502
  Requests that a ping be sent to all other nodes, to measure ping time.
@@ -3969,7 +4504,7 @@ var methods = {
3969
4504
  Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
3970
4505
 
3971
4506
  Examples:
3972
- > neurai-cli ping
4507
+ > neurai-cli ping
3973
4508
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3974
4509
  **/
3975
4510
  ping: "ping",
@@ -3978,15 +4513,15 @@ var methods = {
3978
4513
  Attempts to submit new block to network mined by kawpow gpu miner via rpc.
3979
4514
 
3980
4515
  Arguments
3981
- 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
3982
- 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
3983
- 3. "nonce" (string, required) the nonce of the block that hashed the valid block
4516
+ 1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
4517
+ 2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
4518
+ 3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
3984
4519
 
3985
4520
  Result:
3986
4521
 
3987
4522
  Examples:
3988
- > neurai-cli pprpcsb "header_hash" "mix_hash" 100000
3989
- > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pprpcsb", "params": ["header_hash" "mix_hash" 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4523
+ > neurai-cli pprpcsb "header_hash" "mix_hash" "0x100000"
4524
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pprpcsb", "params": ["header_hash" "mix_hash" "0x100000"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3990
4525
  **/
3991
4526
  pprpcsb: "pprpcsb",
3992
4527
  /** preciousblock "blockhash"
@@ -4062,7 +4597,7 @@ var methods = {
4062
4597
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "purgesnapshot", "params": ["ASSET_NAME" 28546] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4063
4598
  **/
4064
4599
  purgesnapshot: "purgesnapshot",
4065
- /** reissue "asset_name" qty "to_address" "change_address" ( reissuable ) ( new_units) "( new_ipfs )"
4600
+ /** reissue "asset_name" qty "to_address" "change_address" ( reissuable ) ( new_units) "( new_ipfs )"
4066
4601
 
4067
4602
  THIS COMMAND IS NOT YET ACTIVE!
4068
4603
  https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
@@ -4111,7 +4646,7 @@ var methods = {
4111
4646
 
4112
4647
  Examples:
4113
4648
  > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
4114
- > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
4649
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
4115
4650
  > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress"
4116
4651
  > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress" -1 true
4117
4652
  > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" false "" "changeaddress" -1 false QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
@@ -4154,9 +4689,54 @@ var methods = {
4154
4689
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removetagfromaddress", "params": ["#TAG" "to_address" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4155
4690
  **/
4156
4691
  removetagfromaddress: "removetagfromaddress",
4692
+ /** repairsilentpaymentidentity
4693
+
4694
+ Rewrites the silent payment code of this wallet from its seed after an identity failure
4695
+ ("stored silent payment code does not match the wallet seed"). Payments sent to the
4696
+ replaced code did not reach this wallet: check your backups before repairing.
4697
+
4698
+ Result:
4699
+ {
4700
+ "previous_code": "str", (string) the code that was stored (do not use it)
4701
+ "code": "str" (string) the code derived from the seed
4702
+ }
4703
+
4704
+ Examples:
4705
+ > neurai-cli repairsilentpaymentidentity
4706
+ **/
4707
+ repairsilentpaymentidentity: "repairsilentpaymentidentity",
4708
+ /** replaysnapshot "asset_name" snapshot_height ( "expected_snapshot_hash" )
4709
+
4710
+ Rebuilds the holders of an asset at a height from the blocks and their undo data, without using any snapshot,
4711
+ and returns the snapshot hash they give (NIP-048). A node that did not capture the snapshot can so check a
4712
+ plan's snapshot_hash. It reads every block from asset activation to the height: it is slow, and a pruned node
4713
+ cannot do it.
4714
+
4715
+ Arguments:
4716
+ 1. "asset_name" (string, required) The asset
4717
+ 2. snapshot_height (number, required) The height to rebuild
4718
+ 3. "expected_snapshot_hash" (string, optional) A snapshot_hash to compare with, for instance from a plan
4719
+
4720
+ Result:
4721
+ {
4722
+ "asset_name": "name",
4723
+ "height": n,
4724
+ "block_hash": "hash",
4725
+ "snapshot_hash": "hex", (string) as in getsnapshot and getdistributionplan
4726
+ "holders": n,
4727
+ "scanned_blocks": n,
4728
+ "matches_stored": true|false|null, (null: this node holds no snapshot at that height)
4729
+ "matches_expected": true|false|null (null: no expected hash given)
4730
+ }
4731
+
4732
+ Examples:
4733
+ > neurai-cli replaysnapshot "TRONCO" 12345
4734
+ **/
4735
+ replaysnapshot: "replaysnapshot",
4157
4736
  /** requestsnapshot "asset_name" block_height
4158
4737
 
4159
- Schedules a snapshot of the specified asset at the specified block height.
4738
+ Schedules a snapshot of the specified asset at the specified block height. The node captures it while it
4739
+ connects that block, so at most -maxsnapshotrequests different assets are accepted at one height.
4160
4740
 
4161
4741
  Arguments:
4162
4742
  1. "asset_name" (string, required) The asset name for which the snapshot will be taken
@@ -4191,15 +4771,55 @@ var methods = {
4191
4771
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "rescanblockchain", "params": [100000, 120000] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4192
4772
  **/
4193
4773
  rescanblockchain: "rescanblockchain",
4774
+ /** rescansilentpayments ( start_height )
4775
+
4776
+ Scans the active chain again for silent payments, from start_height to the tip.
4777
+ Reads blocks and their undo data; -txindex is not needed. Scanning stops, without
4778
+ advancing past it, at the first block whose data is not available (pruned node).
4779
+
4780
+ Arguments:
4781
+ 1. start_height (numeric, optional, default=0)
4782
+
4783
+ Result:
4784
+ {
4785
+ "start_height": n, "scanned_height": n, "found": n
4786
+ }
4787
+
4788
+ Examples:
4789
+ > neurai-cli rescansilentpayments 100
4790
+ **/
4791
+ rescansilentpayments: "rescansilentpayments",
4194
4792
  /** savemempool
4195
4793
 
4196
4794
  Dumps the mempool to disk.
4197
4795
 
4198
4796
  Examples:
4199
- > neurai-cli savemempool
4797
+ > neurai-cli savemempool
4200
4798
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4201
4799
  **/
4202
4800
  savemempool: "savemempool",
4801
+ /** sealdepin "asset_name" ("change_address")
4802
+
4803
+ THIS COMMAND IS NOT YET ACTIVE!
4804
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
4805
+
4806
+ Seal a DEPIN asset (owner only). WARNING: THIS IS IRREVERSIBLE.
4807
+ A sealed asset is soulbound like a closed one, but no transfer state operation
4808
+ (open, close or seal) is ever accepted for it again. Only valid from the closed
4809
+ state: an open asset must be closed first.
4810
+
4811
+ Arguments:
4812
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
4813
+ 2. "change_address" (string, optional) The change address for the owner token
4814
+
4815
+ Result:
4816
+ "txid" (string) The transaction id
4817
+
4818
+ Examples:
4819
+ > neurai-cli sealdepin "&FRANCE"
4820
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sealdepin", "params": ["&FRANCE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4821
+ **/
4822
+ sealdepin: "sealdepin",
4203
4823
  /** selfrevokedepin "asset_name"
4204
4824
 
4205
4825
  THIS COMMAND IS NOT YET ACTIVE!
@@ -4246,10 +4866,10 @@ var methods = {
4246
4866
  2. "toaddress" (string, required) The neurai address to send funds to.
4247
4867
  3. amount (numeric or string, required) The amount in XNA (transaction fee is added on top).
4248
4868
  4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
4249
- 5. "comment" (string, optional) A comment used to store what the transaction is for.
4869
+ 5. "comment" (string, optional) A comment used to store what the transaction is for.
4250
4870
  This is not part of the transaction, just kept in your wallet.
4251
- 6. "comment_to" (string, optional) An optional comment to store the name of the person or organization
4252
- to which you're sending the transaction. This is not part of the transaction,
4871
+ 6. "comment_to" (string, optional) An optional comment to store the name of the person or organization
4872
+ to which you're sending the transaction. This is not part of the transaction,
4253
4873
  it is just kept in your wallet.
4254
4874
 
4255
4875
  Result:
@@ -4267,7 +4887,7 @@ var methods = {
4267
4887
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendfrom", "params": ["tabby", "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.01, 6, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4268
4888
  **/
4269
4889
  sendfrom: "sendfrom",
4270
- /** sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
4890
+ /** sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
4271
4891
 
4272
4892
  Send an amount from a specific address to a given address. All xna change will get sent back to the from_address
4273
4893
 
@@ -4275,10 +4895,10 @@ var methods = {
4275
4895
  1. "from_address" (string, required) The neurai address to send from.
4276
4896
  2. "to_address" (string, required) The neurai address to send to.
4277
4897
  3. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
4278
- 4. "comment" (string, optional) A comment used to store what the transaction is for.
4898
+ 4. "comment" (string, optional) A comment used to store what the transaction is for.
4279
4899
  This is not part of the transaction, just kept in your wallet.
4280
- 5. "comment_to" (string, optional) A comment to store the name of the person or organization
4281
- to which you're sending the transaction. This is not part of the
4900
+ 5. "comment_to" (string, optional) A comment to store the name of the person or organization
4901
+ to which you're sending the transaction. This is not part of the
4282
4902
  transaction, just kept in your wallet.
4283
4903
  6. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
4284
4904
  The recipient will receive less neurais than you enter in the amount field.
@@ -4298,7 +4918,7 @@ var methods = {
4298
4918
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendfromaddress", "params": ["1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4299
4919
  **/
4300
4920
  sendfromaddress: "sendfromaddress",
4301
- /** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")
4921
+ /** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] conf_target "estimate_mode")
4302
4922
 
4303
4923
  Send multiple times. Amounts are double-precision floating point numbers.
4304
4924
 
@@ -4326,7 +4946,7 @@ var methods = {
4326
4946
  "CONSERVATIVE"
4327
4947
 
4328
4948
  Result:
4329
- "txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
4949
+ "txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
4330
4950
  the number of addresses.
4331
4951
 
4332
4952
  Examples:
@@ -4391,17 +5011,39 @@ var methods = {
4391
5011
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4392
5012
  **/
4393
5013
  sendrawtransaction: "sendrawtransaction",
4394
- /** sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
5014
+ /** sendsilentpayments [{"code":"str","amount":x},...] ( conf_target "estimate_mode" )
5015
+
5016
+ Pays one or more silent payment codes from strict ECDSA (v3) coins only.
5017
+ Several payments to the same code are allowed (up to 16 per code); the change
5018
+ returns to a new internal v3 address.
5019
+
5020
+ Arguments:
5021
+ 1. payments (array, required) [{"code": payment code, "amount": amount in XNA}, ...]
5022
+ 2. conf_target (numeric, optional) Confirmation target (in blocks)
5023
+ 3. "estimate_mode" (string, optional, default=UNSET) UNSET, ECONOMICAL or CONSERVATIVE
5024
+
5025
+ Result:
5026
+ {
5027
+ "txid": "hex",
5028
+ "fee": x.xxx,
5029
+ "payments": [{"code": "str", "amount": x.xxx, "vout": n, "k": n}, ...]
5030
+ }
5031
+
5032
+ Examples:
5033
+ > neurai-cli sendsilentpayments '[{"code":"tnsp1q...","amount":1.5}]'
5034
+ **/
5035
+ sendsilentpayments: "sendsilentpayments",
5036
+ /** sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
4395
5037
 
4396
5038
  Send an amount to a given address.
4397
5039
 
4398
5040
  Arguments:
4399
5041
  1. "address" (string, required) The neurai address to send to.
4400
5042
  2. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
4401
- 3. "comment" (string, optional) A comment used to store what the transaction is for.
5043
+ 3. "comment" (string, optional) A comment used to store what the transaction is for.
4402
5044
  This is not part of the transaction, just kept in your wallet.
4403
- 4. "comment_to" (string, optional) A comment to store the name of the person or organization
4404
- to which you're sending the transaction. This is not part of the
5045
+ 4. "comment_to" (string, optional) A comment to store the name of the person or organization
5046
+ to which you're sending the transaction. This is not part of the
4405
5047
  transaction, just kept in your wallet.
4406
5048
  5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
4407
5049
  The recipient will receive less neurais than you enter in the amount field.
@@ -4466,7 +5108,7 @@ var methods = {
4466
5108
  > neurai-cli setgenerate true 1
4467
5109
 
4468
5110
  Check the setting
4469
- > neurai-cli getgenerate
5111
+ > neurai-cli getgenerate
4470
5112
 
4471
5113
  Turn off generation
4472
5114
  > neurai-cli setgenerate false
@@ -4605,8 +5247,7 @@ var methods = {
4605
5247
  signrawtransaction: "signrawtransaction",
4606
5248
  /** stop
4607
5249
 
4608
- Stop Neurai server.
4609
- **/
5250
+ Stop Neurai server.**/
4610
5251
  stop: "stop",
4611
5252
  /** submitblock "hexdata" ( "dummy" )
4612
5253
 
@@ -4624,7 +5265,7 @@ var methods = {
4624
5265
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4625
5266
  **/
4626
5267
  submitblock: "submitblock",
4627
- /** subscribetochannel
5268
+ /** subscribetochannel
4628
5269
 
4629
5270
  THIS COMMAND IS NOT YET ACTIVE!
4630
5271
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -4696,7 +5337,7 @@ var methods = {
4696
5337
  7. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
4697
5338
 
4698
5339
  Result:
4699
- txid[
5340
+ txid[
4700
5341
  txid
4701
5342
  ]
4702
5343
 
@@ -4722,7 +5363,7 @@ var methods = {
4722
5363
  8. "asset_change_address" (string, optional, default = "") the transaction Asset change will be sent to this address
4723
5364
 
4724
5365
  Result:
4725
- txid[
5366
+ txid[
4726
5367
  txid
4727
5368
  ]
4728
5369
 
@@ -4748,7 +5389,7 @@ var methods = {
4748
5389
  8. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
4749
5390
 
4750
5391
  Result:
4751
- txid[
5392
+ txid[
4752
5393
  txid
4753
5394
  ]
4754
5395
 
@@ -4757,7 +5398,7 @@ var methods = {
4757
5398
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "transferfromaddresses", "params": ["ASSET_NAME" '["fromaddress1", "fromaddress2"]' 20 "to_address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 154652365] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4758
5399
  **/
4759
5400
  transferfromaddresses: "transferfromaddresses",
4760
- /** transferqualifier "qualifier_name" qty "to_address" ("change_address") ("message") (expire_time)
5401
+ /** transferqualifier "qualifier_name" qty "to_address" ("change_address") ("message") (expire_time)
4761
5402
 
4762
5403
  THIS COMMAND IS NOT YET ACTIVE! Restricted assets must be active
4763
5404
 
@@ -4772,7 +5413,7 @@ var methods = {
4772
5413
  6. "expire_time" (numeric, optional) UTC timestamp of when the message expires
4773
5414
 
4774
5415
  Result:
4775
- txid[
5416
+ txid[
4776
5417
  txid
4777
5418
  ]
4778
5419
 
@@ -4850,7 +5491,7 @@ var methods = {
4850
5491
  > 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/
4851
5492
  **/
4852
5493
  unfreezerestrictedasset: "unfreezerestrictedasset",
4853
- /** unsubscribefromchannel
5494
+ /** unsubscribefromchannel
4854
5495
 
4855
5496
  THIS COMMAND IS NOT YET ACTIVE!
4856
5497
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -4877,7 +5518,7 @@ var methods = {
4877
5518
  ttt (numeric) The number of seconds that the server has been running
4878
5519
 
4879
5520
  Examples:
4880
- > neurai-cli uptime
5521
+ > neurai-cli uptime
4881
5522
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4882
5523
  **/
4883
5524
  uptime: "uptime",
@@ -4933,10 +5574,77 @@ var methods = {
4933
5574
  true|false (boolean) Verified or not
4934
5575
 
4935
5576
  Examples:
4936
- > neurai-cli verifychain
5577
+ > neurai-cli verifychain
4937
5578
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4938
5579
  **/
4939
5580
  verifychain: "verifychain",
5581
+ /** verifydistribution {plan} [batches] ( {options} )
5582
+
5583
+ Classifies the batches of a distribution plan from the operator's batch records (NIP-048): every signed
5584
+ version of each batch. Nothing is broadcast, rebuilt or spent.
5585
+ confirmed a version that pays the batch has the required confirmations
5586
+ confirming a version is in the active chain with fewer confirmations; its recipients stay reserved
5587
+ pending a version is in the mempool, or is signed and all its inputs are unspent; rebroadcast it
5588
+ conflicting every version has an input spent by another transaction (needs -txindex to tell apart
5589
+ from a confirmed version whose outputs were all spent)
5590
+ unknown no recorded version, or the node cannot tell; review before building anything
5591
+
5592
+ Arguments:
5593
+ 1. plan (object, required) The plan parameters
5594
+ {
5595
+ "asset_name": "name", (string, required) as in getdistributionplan
5596
+ "snapshot_height": n, (number, required)
5597
+ "distribution_asset_name": "name", (string, required)
5598
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
5599
+ "exception_addresses": "a,b", (string, optional)
5600
+ "remainder": "payer"|"largest", (string, optional, default "payer")
5601
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
5602
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
5603
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
5604
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
5605
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
5606
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
5607
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
5608
+ }
5609
+ 2. batches (array, required) The operator's batch records
5610
+ [
5611
+ {
5612
+ "index": n, (number, required) batch index
5613
+ "versions": [ (array, required) every signed version, as hex or as
5614
+ "hex" | { "hex": "hex", "block_hash": "hash" }, ... an object with the block it was seen in
5615
+ ]
5616
+ }, ...
5617
+ ]
5618
+ 3. options (object, optional)
5619
+ {
5620
+ "max_outputs": n, (number, default 500) batch size used to build the batches
5621
+ "confirmations": n (number, default 6) confirmations a batch needs to count as paid
5622
+ }
5623
+
5624
+ Result:
5625
+ {
5626
+ "plan_hash": "hex",
5627
+ "complete": true|false, (boolean) every batch is confirmed
5628
+ "paid": x.xxx, (numeric) amount in confirmed batches
5629
+ "reserved": x.xxx, (numeric) amount in confirming and pending batches
5630
+ "unpaid": x.xxx, (numeric) amount in conflicting and unknown batches
5631
+ "batches": [
5632
+ {
5633
+ "index": n,
5634
+ "batch_id": "hex",
5635
+ "state": "confirmed"|"confirming"|"pending"|"conflicting"|"unknown",
5636
+ "txid": "hex", (string, optional) the version that decides the state
5637
+ "confirmations": n, (number, optional)
5638
+ "amount": x.xxx,
5639
+ "issues": [ "text", ... ]
5640
+ }, ...
5641
+ ]
5642
+ }
5643
+
5644
+ Examples:
5645
+ > neurai-cli verifydistribution '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' '[{"index":0,"versions":["0200..."]}]'
5646
+ **/
5647
+ verifydistribution: "verifydistribution",
4940
5648
  /** verifymessage "address" "signature" "message"
4941
5649
 
4942
5650
  Verify a signed message
@@ -4976,7 +5684,7 @@ var methods = {
4976
5684
  ["txid"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid
4977
5685
  **/
4978
5686
  verifytxoutproof: "verifytxoutproof",
4979
- /** viewallmessagechannels
5687
+ /** viewallmessagechannels
4980
5688
 
4981
5689
  THIS COMMAND IS NOT YET ACTIVE!
4982
5690
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -4989,11 +5697,11 @@ var methods = {
4989
5697
  ]
4990
5698
 
4991
5699
  Examples:
4992
- > neurai-cli viewallmessagechannels
5700
+ > neurai-cli viewallmessagechannels
4993
5701
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessagechannels", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4994
5702
  **/
4995
5703
  viewallmessagechannels: "viewallmessagechannels",
4996
- /** viewallmessages
5704
+ /** viewallmessages
4997
5705
 
4998
5706
  THIS COMMAND IS NOT YET ACTIVE!
4999
5707
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -5010,11 +5718,11 @@ var methods = {
5010
5718
  "Expire UTC Time:" (Date, optional) If the message contains an expire date that is too large, the UTC number will be displayed
5011
5719
 
5012
5720
  Examples:
5013
- > neurai-cli viewallmessages
5721
+ > neurai-cli viewallmessages
5014
5722
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
5015
5723
  **/
5016
5724
  viewallmessages: "viewallmessages",
5017
- /** viewmyrestrictedaddresses
5725
+ /** viewmyrestrictedaddresses
5018
5726
 
5019
5727
  THIS COMMAND IS NOT YET ACTIVE!
5020
5728
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -5030,11 +5738,11 @@ var methods = {
5030
5738
  }...
5031
5739
 
5032
5740
  Examples:
5033
- > neurai-cli viewmyrestrictedaddresses
5741
+ > neurai-cli viewmyrestrictedaddresses
5034
5742
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmyrestrictedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
5035
5743
  **/
5036
5744
  viewmyrestrictedaddresses: "viewmyrestrictedaddresses",
5037
- /** viewmytaggedaddresses
5745
+ /** viewmytaggedaddresses
5038
5746
 
5039
5747
  THIS COMMAND IS NOT YET ACTIVE!
5040
5748
  https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
@@ -5050,12 +5758,110 @@ var methods = {
5050
5758
  }...
5051
5759
 
5052
5760
  Examples:
5053
- > neurai-cli viewmytaggedaddresses
5761
+ > neurai-cli viewmytaggedaddresses
5054
5762
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmytaggedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
5055
5763
  **/
5056
5764
  viewmytaggedaddresses: "viewmytaggedaddresses"
5057
5765
  };
5058
5766
 
5767
+ // depin.ts
5768
+ var DEPIN_RPC_PROTOCOL = 5;
5769
+ var DEPIN_REMOTE_METHODS = Object.freeze([
5770
+ "depingetmsginfo",
5771
+ "depinpoolstats",
5772
+ "depinmcpstatus",
5773
+ "depinchallenge",
5774
+ "depinreceivemsg",
5775
+ "depinreceiveseq",
5776
+ "depinlistsections",
5777
+ "depinclearmsg",
5778
+ "depinsubmitmsg",
5779
+ "depingetancestorrecipients"
5780
+ ]);
5781
+ function isDepinRemoteMethod(method) {
5782
+ return DEPIN_REMOTE_METHODS.includes(method);
5783
+ }
5784
+ function getDepinRequest(params) {
5785
+ const request = Array.isArray(params) && params.length === 1 ? params[0] : params && typeof params === "object" && Object.keys(params).length === 1 ? params.request : null;
5786
+ const protocol = request?.protocol;
5787
+ if (!request || typeof request !== "object" || Array.isArray(request) || !(protocol === 5 || protocol?.isLosslessNumber === true && protocol.value === "5" && typeof protocol.toString === "function" && protocol.toString() === "5")) {
5788
+ throw Object.assign(new Error("DePIN protocol 5 requires one request object"), {
5789
+ code: -8,
5790
+ data: { depin_error: "unsupported_protocol", expected_protocol: 5 }
5791
+ });
5792
+ }
5793
+ return request;
5794
+ }
5795
+ function createDepinNodeRouter(healthyNodes, randomId) {
5796
+ const identities = /* @__PURE__ */ new WeakMap();
5797
+ const pending = /* @__PURE__ */ new WeakMap();
5798
+ const discoveredAt = /* @__PURE__ */ new WeakMap();
5799
+ async function discover(node) {
5800
+ let promise = pending.get(node);
5801
+ if (!promise && Date.now() - (discoveredAt.get(node) ?? 0) < 1e3) return;
5802
+ if (!promise) {
5803
+ discoveredAt.set(node, Date.now());
5804
+ promise = (async () => {
5805
+ const reply = await node.rpc("depingetmsginfo", [{ protocol: 5, request_id: randomId(), timestamp_ms: Date.now() }]);
5806
+ if (reply?.protocol !== 5 || typeof reply.network !== "string" || typeof reply.pool_pubkey !== "string" || typeof reply.pool_root !== "string" || typeof reply.instance_id !== "string")
5807
+ throw new Error("Node has no RPC 5 pool identity");
5808
+ identities.set(node, reply);
5809
+ })().finally(() => pending.delete(node));
5810
+ pending.set(node, promise);
5811
+ }
5812
+ await promise;
5813
+ }
5814
+ return async function route(method, params) {
5815
+ const request = getDepinRequest(params);
5816
+ const nodes = healthyNodes();
5817
+ if (!nodes.length) throw new Error("No healthy RPC node");
5818
+ if (method === "depingetmsginfo") return nodes[0];
5819
+ const target = request;
5820
+ const matches = (node) => {
5821
+ const identity = identities.get(node);
5822
+ return identity && ["network", "pool_pubkey", "pool_root", "instance_id"].every((key) => identity[key] === target[key]);
5823
+ };
5824
+ let found = nodes.find(matches);
5825
+ if (found) return found;
5826
+ await Promise.all(nodes.map((node) => discover(node).catch(() => identities.delete(node))));
5827
+ found = nodes.find(matches);
5828
+ if (!found)
5829
+ throw Object.assign(new Error("DePIN service_mismatch: target pool or instance is unavailable; refresh bootstrap"), {
5830
+ code: -32600,
5831
+ data: { depin_error: "service_mismatch", expected_protocol: 5 }
5832
+ });
5833
+ return found;
5834
+ };
5835
+ }
5836
+
5837
+ // json.ts
5838
+ function assertNoDuplicateJsonKeys(text) {
5839
+ const stack = [];
5840
+ for (let i = 0; i < text.length; i++) {
5841
+ const ch = text[i];
5842
+ if (ch === '"') {
5843
+ const start = i++;
5844
+ while (i < text.length && text[i] !== '"') {
5845
+ if (text[i] === "\\") i++;
5846
+ i++;
5847
+ }
5848
+ if (i >= text.length) throw new SyntaxError("Unterminated JSON string");
5849
+ const top = stack[stack.length - 1];
5850
+ if (top?.keys && top.expectKey) {
5851
+ const key = JSON.parse(text.slice(start, i + 1));
5852
+ if (top.keys.has(key)) throw new SyntaxError("Duplicate JSON key");
5853
+ top.keys.add(key);
5854
+ top.expectKey = false;
5855
+ }
5856
+ } else if (ch === "{" || ch === "[") {
5857
+ if (stack.length >= 128) throw new SyntaxError("JSON nesting limit exceeded");
5858
+ stack.push(ch === "{" ? { keys: /* @__PURE__ */ new Set(), expectKey: true, close: "}" } : { close: "]" });
5859
+ } else if (ch === "}" || ch === "]") {
5860
+ if (stack.pop()?.close !== ch) throw new SyntaxError("Invalid JSON nesting");
5861
+ } else if (ch === "," && stack[stack.length - 1]?.keys) stack[stack.length - 1].expectKey = true;
5862
+ }
5863
+ }
5864
+
5059
5865
  // index.ts
5060
5866
  var MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
5061
5867
  var TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
@@ -5109,7 +5915,9 @@ function getRPC(username, password, URL) {
5109
5915
  const rpcResponse = postData(URL, data, username, password);
5110
5916
  rpcResponse.then(async (response) => {
5111
5917
  if (response.ok) {
5112
- const obj = parseRpcJson(await response.text());
5918
+ const responseText = await response.text();
5919
+ if (isDepinRemoteMethod(method)) assertNoDuplicateJsonKeys(responseText);
5920
+ const obj = parseRpcJson(responseText);
5113
5921
  if (obj && obj.error) {
5114
5922
  rejectionFunc({
5115
5923
  error: obj.error,
@@ -5124,7 +5932,9 @@ function getRPC(username, password, URL) {
5124
5932
  description: null
5125
5933
  };
5126
5934
  try {
5127
- obj = parseRpcJson(await response.text());
5935
+ const responseText = await response.text();
5936
+ if (isDepinRemoteMethod(method)) assertNoDuplicateJsonKeys(responseText);
5937
+ obj = parseRpcJson(responseText);
5128
5938
  } catch (e) {
5129
5939
  }
5130
5940
  const myError = {
@@ -5155,9 +5965,7 @@ async function postData(url = "", data = {}, username, password) {
5155
5965
  if (typeof btoa === "function") {
5156
5966
  base64Credentials = btoa(`${username}:${password}`);
5157
5967
  } else if (Buffer) {
5158
- base64Credentials = Buffer.from(`${username}:${password}`).toString(
5159
- "base64"
5160
- );
5968
+ base64Credentials = Buffer.from(`${username}:${password}`).toString("base64");
5161
5969
  }
5162
5970
  const response = await fetch(url, {
5163
5971
  method: "POST",
@@ -5180,10 +5988,16 @@ async function postData(url = "", data = {}, username, password) {
5180
5988
  }
5181
5989
  // Annotate the CommonJS export names for ESM import in node:
5182
5990
  0 && (module.exports = {
5991
+ DEPIN_REMOTE_METHODS,
5992
+ DEPIN_RPC_PROTOCOL,
5183
5993
  MAINNET_GENESIS_HASH,
5184
5994
  TESTNET_GENESIS_HASH,
5995
+ assertNoDuplicateJsonKeys,
5185
5996
  assertRpcGenesis,
5997
+ createDepinNodeRouter,
5998
+ getDepinRequest,
5186
5999
  getRPC,
6000
+ isDepinRemoteMethod,
5187
6001
  methods,
5188
6002
  parseRpcJson,
5189
6003
  rpcNumber,