@neuraiproject/neurai-rpc 0.8.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/neurai_methods.md CHANGED
@@ -132,10 +132,6 @@ Examples:
132
132
  > neurai-cli backupwallet "backup.dat"
133
133
  > 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/
134
134
 
135
- &nbsp;<br> &nbsp;<br/>
136
- ## bumpfee
137
- &nbsp;<br/> bumpfee has been deprecated on the XNA Wallet.
138
-
139
135
  &nbsp;<br> &nbsp;<br/>
140
136
  ## cancelsnapshotrequest
141
137
  &nbsp;<br/> cancelsnapshotrequest "asset_name" block_height
@@ -276,6 +272,29 @@ Examples:
276
272
  > neurai-cli clearmessages
277
273
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
278
274
 
275
+ &nbsp;<br> &nbsp;<br/>
276
+ ## closedepin
277
+ &nbsp;<br/> closedepin "asset_name" ("change_address")
278
+
279
+ THIS COMMAND IS NOT YET ACTIVE!
280
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
281
+
282
+ Close transfers of a DEPIN asset (owner only): the asset becomes soulbound
283
+ again and only the owner can move it. Valid from the open state; takes effect
284
+ from the block after the one that confirms it. Pending holder transfers are
285
+ dropped from the mempool when the close confirms.
286
+
287
+ Arguments:
288
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
289
+ 2. "change_address" (string, optional) The change address for the owner token
290
+
291
+ Result:
292
+ "txid" (string) The transaction id
293
+
294
+ Examples:
295
+ > neurai-cli closedepin "&FRANCE"
296
+ > 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/
297
+
279
298
  &nbsp;<br> &nbsp;<br/>
280
299
  ## combinerawtransaction
281
300
  &nbsp;<br/> combinerawtransaction ["hexstring",...]
@@ -296,6 +315,58 @@ Result:
296
315
  Examples:
297
316
  > neurai-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]
298
317
 
318
+ &nbsp;<br> &nbsp;<br/>
319
+ ## createdistributionbatch
320
+ &nbsp;<br/> createdistributionbatch "plan_hash" {plan} batch_index ( {options} )
321
+
322
+ Builds, funds and signs one batch of a distribution plan from this wallet (NIP-048), and locks the inputs it
323
+ spends. It does NOT broadcast: store the result in your batch records first, then send it with
324
+ sendrawtransaction. The plan must still hash to plan_hash, so a payment is always bound to the plan the
325
+ operator approved.
326
+ To replace a version that left the mempool, build a new one with the same anchor: every version of a batch
327
+ spends the anchor, so at most one of them can confirm.
328
+
329
+ Arguments:
330
+ 1. "plan_hash" (string, required) The approved plan hash, from getdistributionplan
331
+ 2. plan (object, required) The plan parameters
332
+ {
333
+ "asset_name": "name", (string, required) as in getdistributionplan
334
+ "snapshot_height": n, (number, required)
335
+ "distribution_asset_name": "name", (string, required)
336
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
337
+ "exception_addresses": "a,b", (string, optional)
338
+ "remainder": "payer"|"largest", (string, optional, default "payer")
339
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
340
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
341
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
342
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
343
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
344
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
345
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
346
+ }
347
+ 3. batch_index (number, required) The batch to build, from getdistributionbatches
348
+ 4. options (object, optional)
349
+ {
350
+ "max_outputs": n, (number, default 500) batch size, as in getdistributionbatches
351
+ "anchor": {"txid": "hex", "vout": n}, (object, optional) the anchor of earlier versions of this batch
352
+ "max_fee": x.xxx (numeric, optional) refuse a fee above this amount of XNA
353
+ }
354
+
355
+ Result:
356
+ {
357
+ "plan_hash": "hex",
358
+ "batch_index": n,
359
+ "batch_id": "hex",
360
+ "txid": "hex",
361
+ "hex": "hex", (string) the signed transaction, not broadcast
362
+ "fee": x.xxx,
363
+ "anchor": {"txid": "hex", "vout": n}, (object) the XNA input every later version must spend
364
+ "inputs": [ {"txid": "hex", "vout": n}, ... ] (array) inputs, now locked in this wallet
365
+ }
366
+
367
+ Examples:
368
+ > neurai-cli createdistributionbatch "planhash" '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' 0
369
+
299
370
  &nbsp;<br> &nbsp;<br/>
300
371
  ## createmultisig
301
372
  &nbsp;<br/> createmultisig nrequired ["key",...]
@@ -357,6 +428,9 @@ Paying for Asset Operations:
357
428
  unfreeze_addresses 0
358
429
  freeze_asset 0
359
430
  unfreeze_asset 0
431
+ open_depin 0
432
+ close_depin 0
433
+ seal_depin 0
360
434
 
361
435
  Assets For Authorization:
362
436
  These operations require a specific asset input for authorization:
@@ -369,6 +443,10 @@ Assets For Authorization:
369
443
  unfreeze_addresses
370
444
  freeze_asset
371
445
  unfreeze_asset
446
+ DEPIN Owner Token (&NAME!):
447
+ open_depin
448
+ close_depin
449
+ seal_depin
372
450
  Root Qualifier Token:
373
451
  issue_qualifier (when issuing subqualifier)
374
452
  Qualifier Token:
@@ -388,7 +466,9 @@ Arguments:
388
466
  {
389
467
  "txid":"id", (string, required) The transaction id
390
468
  "vout":n, (number, required) The output number
391
- "sequence":n (number, optional) The sequence number
469
+ "sequence":n (number, optional) The sequence number. Once the no-RBF sequence rule
470
+ applies to the next block it must be 4294967295, 4294967294 or, in a
471
+ version 2 or 3 transaction, a BIP 68 relative lock (bit 31 clear)
392
472
  }
393
473
  ,...
394
474
  ]
@@ -402,7 +482,7 @@ Arguments:
402
482
  "transfer":
403
483
  {
404
484
  "asset-name": (string, required) asset name
405
- asset-quantity (number, required) the number of raw units to transfer
485
+ asset-quantity (number or string, required) the number of raw units to transfer
406
486
  ,...
407
487
  }
408
488
  }
@@ -412,7 +492,7 @@ Arguments:
412
492
  "transferwithmessage":
413
493
  {
414
494
  "asset-name": (string, required) asset name
415
- asset-quantity, (number, required) the number of raw units to transfer
495
+ asset-quantity, (number or string, required) the number of raw units to transfer
416
496
  "message":"hash", (string, required) ipfs hash or a txid hash
417
497
  "expire_time": n (number, required) utc time in seconds to expire the message
418
498
  }
@@ -422,7 +502,7 @@ Arguments:
422
502
  "issue":
423
503
  {
424
504
  "asset_name":"asset-name", (string, required) new asset name
425
- "asset_quantity":n, (number, required) the number of raw units to issue
505
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
426
506
  "units":[1-8], (number, required) display units, between 1 (integral) to 8 (max precision)
427
507
  "reissuable":[0-1], (number, required) 1=reissuable asset
428
508
  "has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
@@ -445,8 +525,9 @@ Arguments:
445
525
  "reissue":
446
526
  {
447
527
  "asset_name":"asset-name", (string, required) name of asset to be reissued
448
- "asset_quantity":n, (number, required) the number of raw units to issue
528
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
449
529
  "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
530
+ "units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
450
531
  "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
451
532
  Overrides the current ipfs hash if given
452
533
  "owner_change_address" (string, optional) the address where the owner token will be sent to.
@@ -458,7 +539,7 @@ Arguments:
458
539
  "issue_restricted":
459
540
  {
460
541
  "asset_name":"asset-name",(string, required) new asset name
461
- "asset_quantity":n, (number, required) the number of raw units to issue
542
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
462
543
  "verifier_string":"text", (string, required) the verifier string to be used for a restricted
463
544
  asset transfer verification
464
545
  "units":[0-8], (number, required) display units, between 0 (integral) and 8 (max precision)
@@ -474,8 +555,9 @@ Arguments:
474
555
  "reissue_restricted":
475
556
  {
476
557
  "asset_name":"asset-name", (string, required) name of asset to be reissued
477
- "asset_quantity":n, (number, required) the number of raw units to issue
558
+ "asset_quantity":n, (number or string, required) the number of raw units to issue
478
559
  "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
560
+ "units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
479
561
  "verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
480
562
  transfer verification
481
563
  "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
@@ -489,7 +571,7 @@ Arguments:
489
571
  "issue_qualifier":
490
572
  {
491
573
  "asset_name":"asset_name", (string, required) a qualifier name (starts with '#')
492
- "asset_quantity":n, (numeric, optional, default=1) the number of units to be issued (1 to 10)
574
+ "asset_quantity":n, (number or string, optional, default=1) the number of units to be issued (1 to 10)
493
575
  "has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
494
576
  to be added to the asset
495
577
  "ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
@@ -497,7 +579,7 @@ Arguments:
497
579
  "root_change_address" (string, optional) Only applies when issuing subqualifiers.
498
580
  The address where the root qualifier will be sent.
499
581
  If not specified, it will be sent to the output address.
500
- "change_quantity":"qty" (numeric, optional) the asset change amount (defaults to 1)
582
+ "change_quantity":"qty" (number or string, optional) the asset change amount (defaults to 1)
501
583
  }
502
584
  }
503
585
  or
@@ -507,7 +589,7 @@ Arguments:
507
589
  {
508
590
  "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
509
591
  "addresses":["addr", ...], (array, required) the addresses to be tagged (up to 10)
510
- "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
592
+ "change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
511
593
  }
512
594
  }
513
595
  or
@@ -517,7 +599,7 @@ Arguments:
517
599
  {
518
600
  "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
519
601
  "addresses":["addr", ...], (array, required) the addresses to be untagged (up to 10)
520
- "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
602
+ "change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
521
603
  }
522
604
  }
523
605
  or
@@ -555,6 +637,14 @@ Arguments:
555
637
  }
556
638
  }
557
639
  or
640
+ { (object) A json object describing a DEPIN transfer state operation.
641
+ The address in the key will be used as the owner token change address.
642
+ "open_depin" | "close_depin" | "seal_depin":
643
+ {
644
+ "asset_name":"asset_name", (string, required) a DEPIN asset name (starts with '&')
645
+ }
646
+ }
647
+ or
558
648
  "data": "hex" (string, required) The key is "data", the value is hex encoded data
559
649
  ,...
560
650
  }
@@ -718,6 +808,25 @@ Examples:
718
808
  > neurai-cli decodescript "hexstring"
719
809
  > 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/
720
810
 
811
+ &nbsp;<br> &nbsp;<br/>
812
+ ## decodesilentpaymentcode
813
+ &nbsp;<br/> decodesilentpaymentcode "code"
814
+
815
+ Validates a silent payment code for this network and returns its keys.
816
+
817
+ Arguments:
818
+ 1. "code" (string, required) payment code
819
+
820
+ Result:
821
+ {
822
+ "isvalid": true|false, (boolean)
823
+ "error": "str", (string) reason when invalid
824
+ "network", "scan_pubkey", "spend_pubkey" when valid
825
+ }
826
+
827
+ Examples:
828
+ > neurai-cli decodesilentpaymentcode "tnsp1q..."
829
+
721
830
  &nbsp;<br> &nbsp;<br/>
722
831
  ## depinchallenge
723
832
  &nbsp;<br/> depinchallenge request
@@ -838,41 +947,10 @@ Examples:
838
947
 
839
948
  &nbsp;<br> &nbsp;<br/>
840
949
  ## distributereward
841
- &nbsp;<br/> distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ("change_address") ("dry_run")
842
-
843
- Splits the specified amount of the distribution asset to all owners of asset_name that are not in the optional exclusion_addresses
950
+ &nbsp;<br/> distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ( "change_address" )
844
951
 
845
- Arguments:
846
- 1. "asset_name" (string, required) The reward will be distributed all owners of this asset
847
- 2. "snapshot_height" (number, required) The block height of the ownership snapshot
848
- 3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
849
- 4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
850
- 5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
851
- 6. "change_address" (string, optional) If the rewards can't be fully distributed. The change will be sent to this address
852
-
853
- Result:
854
- {
855
- error_txn_gen_failed: (string),
856
- error_nsf: (string),
857
- error_rejects: (string),
858
- error_db_update: (string),
859
- batch_results: [
860
- {
861
- transaction_id: (string),
862
- error_txn_rejected: (string),
863
- total_amount: (number),
864
- fee: (number),
865
- expected_count: (number),
866
- actual_count: (number),
867
- }
868
- ]
869
- }
870
-
871
- Examples:
872
- > neurai-cli distributereward "TRONCO" 12345 "XNA" 1000
873
- > neurai-cli distributereward "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
874
- > 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/
875
- > 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/
952
+ Retired (NIP-048): the node no longer sends reward payments.
953
+ Use getdistributionplan to compute the payments, then send them from your wallet.
876
954
 
877
955
  &nbsp;<br> &nbsp;<br/>
878
956
  ## dumpextkeypq
@@ -1014,6 +1092,26 @@ have been observed to make an estimate for any number of blocks.
1014
1092
  Example:
1015
1093
  > neurai-cli estimatesmartfee 6
1016
1094
 
1095
+ &nbsp;<br> &nbsp;<br/>
1096
+ ## exportsilentpaymentviewkey
1097
+ &nbsp;<br/> exportsilentpaymentviewkey "acknowledge"
1098
+
1099
+ Returns the view key (b_scan and B_spend) of this wallet's silent payment code.
1100
+ Whoever holds it can find and link every payment to the code, but cannot spend them.
1101
+ Never combine it with an exported payment private key: together they reveal the spend key.
1102
+ The result is a secret: from a shell, prefer a terminal that is not recorded or logged.
1103
+
1104
+ Arguments:
1105
+ 1. "acknowledge" (string, required) must be "reveal view key"
1106
+
1107
+ Result:
1108
+ {
1109
+ "scan_private_key": "hex", "spend_pubkey": "hex", "network": "str"
1110
+ }
1111
+
1112
+ Examples:
1113
+ > neurai-cli exportsilentpaymentviewkey "reveal view key"
1114
+
1017
1115
  &nbsp;<br> &nbsp;<br/>
1018
1116
  ## exportxpqpub
1019
1117
  &nbsp;<br/> exportxpqpub count ( chain offset )
@@ -1134,7 +1232,6 @@ Arguments:
1134
1232
  Those recipients will receive less neurais than you enter in their corresponding amount field.
1135
1233
  If no outputs are specified here, the sender pays the fee.
1136
1234
  [vout_index,...]
1137
- Allows this transaction to be replaced by a transaction with higher fees
1138
1235
  "conf_target" (numeric, optional) Confirmation target (in blocks)
1139
1236
  "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
1140
1237
  "UNSET"
@@ -1481,6 +1578,7 @@ Result:
1481
1578
  ipfs_hash: (hash), (only if has_ipfs = 1 and that data is a ipfs hash)
1482
1579
  txid_hash: (hash), (only if has_ipfs = 1 and that data is a txid hash)
1483
1580
  verifier_string: (string)
1581
+ transfer_state: (string) "closed" | "open" | "sealed" (only for DEPIN assets, names starting with &)
1484
1582
  }
1485
1583
 
1486
1584
  Examples:
@@ -1546,10 +1644,12 @@ Examples:
1546
1644
  If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
1547
1645
  If verbosity is 1, returns an Object with information about block <hash>.
1548
1646
  If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
1647
+ If verbosity is 3, returns the same as verbosity 2 plus a "prevout" object in each input with the spent output
1648
+ (generated, height, value, scriptPubKey), read from the block undo data. This works without -txindex.
1549
1649
 
1550
1650
  Arguments:
1551
1651
  1. "blockhash" (string, required) The block hash
1552
- 2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data
1652
+ 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
1553
1653
 
1554
1654
  Result (for verbosity = 0):
1555
1655
  "data" (string) A string that is serialized, hex-encoded data for block 'hash'.
@@ -1601,6 +1701,7 @@ Result:
1601
1701
  {
1602
1702
  "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
1603
1703
  "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
1704
+ "asset_marker": "xxxx", (string) marker required for new asset outputs in the next block ("rvn" or "xna")
1604
1705
  "headers": xxxxxx, (numeric) the current number of headers we have validated
1605
1706
  "bestblockhash": "...", (string) the hash of the currently best block
1606
1707
  "difficulty": xxxxxx, (numeric) the current difficulty
@@ -1609,6 +1710,11 @@ Result:
1609
1710
  "chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
1610
1711
  "size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
1611
1712
  "pruned": xx, (boolean) if the blocks are subject to pruning
1713
+ "zk_public_tree": { (object) profile-2 public-transition activation
1714
+ "activation_height": n, (numeric or null) scheduled height, null when unscheduled
1715
+ "active_at_tip": b, (boolean) whether the current block uses profile 2
1716
+ "active_for_next_block": b (boolean) whether a candidate block uses profile 2
1717
+ },
1612
1718
  "pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
1613
1719
  "automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
1614
1720
  "prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
@@ -1637,6 +1743,17 @@ Result:
1637
1743
  }
1638
1744
  }
1639
1745
  }
1746
+ "asset_services": { (object) legacy asset modules (NIP-048)
1747
+ "messages": {
1748
+ "active": xx, (boolean) legacy asset messaging stores are open
1749
+ "store_on_disk": xx (boolean) the data directory has a messages store
1750
+ },
1751
+ "rewards": {
1752
+ "active": xx, (boolean) reward snapshot stores are open
1753
+ "store_on_disk": xx, (boolean) the data directory has a rewards store
1754
+ "assetindex": xx (boolean) -assetindex, which the reward RPCs require
1755
+ }
1756
+ },
1640
1757
  "warnings" : "...", (string) any network and blockchain warnings.
1641
1758
  }
1642
1759
 
@@ -1896,6 +2013,59 @@ Examples:
1896
2013
  > neurai-cli getchaintxstats
1897
2014
  > 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/
1898
2015
 
2016
+ &nbsp;<br> &nbsp;<br/>
2017
+ ## getchannelmessages
2018
+ &nbsp;<br/> getchannelmessages "channel" ( {options} )
2019
+
2020
+ Returns the messages of an asset channel from the chain-wide index (-channelmessageindex, NIP-048): every
2021
+ message an owner token (NAME!) or message channel token (NAME~CHANNEL) carried back to the address it came
2022
+ from, whatever the wallet. Expiry is decided at query time against reference_time, so nodes with the same
2023
+ chain answer alike.
2024
+
2025
+ Arguments:
2026
+ 1. "channel" (string, required) The owner token or message channel
2027
+ 2. options (object, optional)
2028
+ {
2029
+ "from_height": n, (number, default 0)
2030
+ "to_height": n, (number, default the tip)
2031
+ "include_expired": bool, (boolean, default false)
2032
+ "reference_time": n, (number, default the median time past of the tip) expiry reference
2033
+ "message": "hash", (string, optional) only messages with this payload
2034
+ "include_tx": bool, (boolean, default false) add the raw transaction
2035
+ "include_proof": bool, (boolean, default false) add a gettxoutproof-style proof
2036
+ "limit": n (number, default 1000, max 10000) messages per call;
2037
+ a block is never split, so the last block may go past it
2038
+ }
2039
+
2040
+ Result:
2041
+ {
2042
+ "channel": "name",
2043
+ "synced_height": n,
2044
+ "reference_time": n,
2045
+ "messages": [ (array) in chain order
2046
+ {
2047
+ "channel": "name",
2048
+ "authority": "owner"|"channel", (string) the token that carried the message
2049
+ "txid": "hex", "vout": n,
2050
+ "height": n, "block_hash": "hash", "block_time": n,
2051
+ "expire_time": n, (number) 0: never expires
2052
+ "expired": true|false,
2053
+ "message": "hash", (string) IPFS hash or 64-hex hash
2054
+ "address": "address", (string) the address that sent it to itself
2055
+ "op_return": "hex", (string, optional) data of the transaction's OP_RETURN output
2056
+ "op_return_matches": bool, (boolean, with op_return) the message is the SHA-256 of that data, so
2057
+ the data is content the token holder published in full (NIP-048 D1)
2058
+ "tx": "hex", (string, optional)
2059
+ "proof": "hex" (string, optional) checked with verifytxoutproof
2060
+ }, ...
2061
+ ],
2062
+ "next_from_height": n|null (number) the limit stopped here: pass it as from_height for the next page
2063
+ }
2064
+
2065
+ Examples:
2066
+ > neurai-cli getchannelmessages "ASSET!"
2067
+ > neurai-cli getchannelmessages "ASSET~NEWS" '{"from_height":1000,"include_expired":true}'
2068
+
1899
2069
  &nbsp;<br> &nbsp;<br/>
1900
2070
  ## getconnectioncount
1901
2071
  &nbsp;<br/> getconnectioncount
@@ -1941,6 +2111,182 @@ Examples:
1941
2111
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdistributestatus", "params": ["TRONCO" 34987 "DIVIDENDS" 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1942
2112
  > 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/
1943
2113
 
2114
+ &nbsp;<br> &nbsp;<br/>
2115
+ ## getdistributionbatches
2116
+ &nbsp;<br/> getdistributionbatches {plan} ( {options} )
2117
+
2118
+ Splits the payments of a distribution plan into batches of at most max_outputs recipients, in plan order
2119
+ (NIP-048). Each batch pays all its recipients in one transaction. Nothing is spent or locked.
2120
+
2121
+ Arguments:
2122
+ 1. plan (object, required) The plan parameters
2123
+ {
2124
+ "asset_name": "name", (string, required) as in getdistributionplan
2125
+ "snapshot_height": n, (number, required)
2126
+ "distribution_asset_name": "name", (string, required)
2127
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
2128
+ "exception_addresses": "a,b", (string, optional)
2129
+ "remainder": "payer"|"largest", (string, optional, default "payer")
2130
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
2131
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2132
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
2133
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
2134
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2135
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
2136
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
2137
+ }
2138
+ 2. options (object, optional)
2139
+ {
2140
+ "max_outputs": n (number, default 500, max 1000) recipients per batch
2141
+ }
2142
+
2143
+ Result:
2144
+ {
2145
+ "plan_hash": "hex",
2146
+ "max_outputs": n,
2147
+ "batches": [
2148
+ {
2149
+ "index": n,
2150
+ "batch_id": "hex", (string) SHA-256 of 0x04 || plan hash || max_outputs || index
2151
+ "first_recipient": n,
2152
+ "recipient_count": n,
2153
+ "amount": x.xxx, (numeric) total paid by the batch
2154
+ "outputs": { ... } (object) the payments in createrawtransaction format
2155
+ }, ...
2156
+ ]
2157
+ }
2158
+
2159
+ Examples:
2160
+ > neurai-cli getdistributionbatches '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}'
2161
+
2162
+ &nbsp;<br> &nbsp;<br/>
2163
+ ## getdistributionplan
2164
+ &nbsp;<br/> getdistributionplan "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" {options} )
2165
+
2166
+ Computes, without spending anything, how gross_distribution_amount of the distribution asset is split among the
2167
+ holders of asset_name in its snapshot at snapshot_height (NIP-048). Each holder gets floor(amount * held / total)
2168
+ in whole units of the distribution asset, or floor(amount / holders) with equal allocation. The plan hash commits
2169
+ to the snapshot, the parameters and every payment;
2170
+ pay the recipients from any wallet, for instance with getdistributionbatches and createdistributionbatch.
2171
+
2172
+ Arguments:
2173
+ 1. "asset_name" (string, required) The asset whose holders receive the distribution
2174
+ 2. "snapshot_height" (number, required) The height of a snapshot taken with requestsnapshot
2175
+ 3. "distribution_asset_name" (string, required) The asset to distribute, or XNA
2176
+ 4. "gross_distribution_amount" (number, required) The amount to split, a multiple of the distribution asset's smallest unit
2177
+ 5. "exception_addresses" (string, optional) Comma-separated holder addresses to exclude
2178
+ 6. options (object, optional)
2179
+ {
2180
+ "remainder": "payer"|"largest", (string, default "payer") Where the undivided remainder goes: it stays with the
2181
+ payer, or one unit each to the largest fractional parts (ties by script)
2182
+ "allow_legacy_snapshot": bool, (boolean, default false) Accept a snapshot captured before NIP-048, which has no block identity
2183
+ "announcement": { (object, optional) The transaction that announced snapshot_height in advance
2184
+ "txid": "hex", (see getsnapshotannouncement); the plan then commits to it (format version 2)
2185
+ "block_hash": "hex" (optional) Its block, for nodes without -txindex
2186
+ },
2187
+ "qualifier": "#TAG", (string, optional) Only holders tagged with this qualifier at the height
2188
+ "weights": {"address": n, ...}, (object, optional) Weights of a work report, positive integers; they replace
2189
+ the holdings, and holders without a weight are excluded
2190
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) The owner token transfer that anchored
2191
+ the report hash (SHA-256 of 0x07 || weights)
2192
+ "allocation": "holdings"|"equal", (string, default "holdings") Split in proportion to the holdings (or the
2193
+ report weights), or in equal shares among the eligible holders, whatever
2194
+ they hold; equal cannot be combined with weights
2195
+ "min_held": x.xxx, (numeric, optional) Only holders with at least this amount of asset_name
2196
+ }
2197
+
2198
+ A snapshot taken since NIP-048 D3 records, per holder, freezes, DEPIN self-revocations and qualifier tags; such
2199
+ holders are excluded. With a qualifier, report weights or both, the plan hash commits to them (format version 3);
2200
+ with equal allocation or a minimum holding, it commits to those too (format version 4).
2201
+
2202
+ Result:
2203
+ {
2204
+ "plan_hash": "hex", (string) SHA-256 commitment to the header and the Merkle root
2205
+ "merkle_root": "hex", (string) RFC 6962 root over the recipients, in order
2206
+ "version": n, (number) plan format version
2207
+ "network": "name", (string) network the plan belongs to
2208
+ "snapshot": {
2209
+ "asset_name": "name",
2210
+ "height": n,
2211
+ "block_hash": "hash", (string) block the snapshot was captured on; empty for a legacy snapshot
2212
+ "snapshot_hash": "hex", (string) commitment to the snapshot content
2213
+ "legacy": true|false,
2214
+ "confirmations": n
2215
+ },
2216
+ "distribution_asset_name": "name",
2217
+ "amount": x.xxx, (numeric) gross_distribution_amount
2218
+ "remainder_policy": "payer"|"largest",
2219
+ "allocation": "holdings"|"equal",
2220
+ "min_held": x.xxx, (numeric) minimum holding to be eligible, 0 if none
2221
+ "exception_addresses": [ "address", ... ], (array) sorted, as committed in the plan hash
2222
+ "total_held": x.xxx, (numeric) holdings of the eligible holders
2223
+ "distributed": x.xxx, (numeric) sum of the payments: the funds the payer needs, before fees
2224
+ "remainder": x.xxx, (numeric) amount left undistributed
2225
+ "recipients": [ (array) payments, ordered by output script
2226
+ { "address": "address", "script": "hex", "held": x.xxx, "amount": x.xxx }, ...
2227
+ ],
2228
+ "zero_amount": [ { "address": "address", "held": x.xxx }, ... ], (array) holders whose share rounds to zero
2229
+ "excluded": [ { "address": "address", "held": x.xxx, "reason": "..." }, ... ], (array) reason: exception, burn,
2230
+ globally_frozen, frozen, self_revoked, missing_qualifier, below_minimum or no_weight
2231
+ "announcement": { (object or null) The announcement, when given
2232
+ "txid": "hex", "height": n, "notice": n, "minimum_notice": n (notice: blocks between announcement and snapshot)
2233
+ },
2234
+ "verifiability": "announced"|"late_announcement"|"unannounced" (string) Whether other nodes could capture the
2235
+ same snapshot: without an announcement made with the minimum notice (-minsnapshotnotice),
2236
+ recipients rely on the issuer's snapshot or on replaysnapshot
2237
+ "qualifier": "#TAG"|null,
2238
+ "report": {"hash": "hex", "txid": "hex", "height": n}|null (recipients then also show their "weight")
2239
+ }
2240
+
2241
+ Examples:
2242
+ > neurai-cli getdistributionplan "TRONCO" 12345 "XNA" 1000
2243
+ > neurai-cli getdistributionplan "PHATSTACKS" 12345 "DIVIDENDS" 1000 "" '{"remainder":"largest"}'
2244
+ > neurai-cli getdistributionplan "&GRID" 12345 "XNA" 1000 "" '{"allocation":"equal","min_held":1}'
2245
+ > 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/
2246
+
2247
+ &nbsp;<br> &nbsp;<br/>
2248
+ ## getdistributionproof
2249
+ &nbsp;<br/> getdistributionproof {plan} "address"
2250
+
2251
+ Returns the RFC 6962 inclusion proof of one recipient of a distribution plan (NIP-048). With the plan's
2252
+ merkle_root it shows that the payment is part of the plan; it does not show that the amount is right or that
2253
+ no recipient is missing (recompute the plan for that).
2254
+
2255
+ Arguments:
2256
+ 1. plan (object, required) The plan parameters
2257
+ {
2258
+ "asset_name": "name", (string, required) as in getdistributionplan
2259
+ "snapshot_height": n, (number, required)
2260
+ "distribution_asset_name": "name", (string, required)
2261
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
2262
+ "exception_addresses": "a,b", (string, optional)
2263
+ "remainder": "payer"|"largest", (string, optional, default "payer")
2264
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
2265
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2266
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
2267
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
2268
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
2269
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
2270
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
2271
+ }
2272
+ 2. "address" (string, required) A recipient of the plan
2273
+
2274
+ Result:
2275
+ {
2276
+ "plan_hash": "hex",
2277
+ "merkle_root": "hex",
2278
+ "leaf_count": n,
2279
+ "index": n, (number) position of the recipient in the plan
2280
+ "address": "address",
2281
+ "script": "hex",
2282
+ "amount": x.xxx,
2283
+ "leaf_hash": "hex", (string) SHA-256 of 0x00 || script || amount
2284
+ "path": [ "hex", ... ] (array) sibling hashes, deepest first
2285
+ }
2286
+
2287
+ Examples:
2288
+ > neurai-cli getdistributionproof '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' "address"
2289
+
1944
2290
  &nbsp;<br> &nbsp;<br/>
1945
2291
  ## getgenerate
1946
2292
  &nbsp;<br/> getgenerate
@@ -1959,24 +2305,23 @@ Examples:
1959
2305
  &nbsp;<br> &nbsp;<br/>
1960
2306
  ## getibdstatus
1961
2307
  &nbsp;<br/> getibdstatus
1962
-
1963
2308
  Returns header synchronization timing collected since process start.
2309
+ request_to_response_us includes peer response and local queueing time.
1964
2310
 
1965
2311
  Result:
1966
2312
  {
1967
- "blocks": n,
1968
- "headers": n,
1969
- "header_batches": n,
1970
- "headers_in_batches": n,
1971
- "unsolicited_header_responses": n,
1972
- "average_request_to_response_us": n,
1973
- "average_validation_us": n,
1974
- "peers": [...]
2313
+ "blocks": n, (numeric) current active-chain height
2314
+ "headers": n, (numeric) best validated header height
2315
+ "header_batches": n, (numeric) requested header batches received
2316
+ "headers_in_batches": n, (numeric) headers in those batches
2317
+ "average_request_to_response_us": n, (numeric) average request-to-response time
2318
+ "average_validation_us": n, (numeric) average local processing time
2319
+ "peers": [ ... ] (array) per-peer timing counters
1975
2320
  }
1976
2321
 
1977
2322
  Examples:
1978
2323
  > neurai-cli getibdstatus
1979
- > curl --user myusername --data-binary '{"jsonrpc":"2.0","id":1,"method":"getibdstatus","params":[]}' -H 'content-type: application/json' http://127.0.0.1:19001/
2324
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getibdstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
1980
2325
 
1981
2326
  &nbsp;<br> &nbsp;<br/>
1982
2327
  ## getinfo
@@ -2016,11 +2361,11 @@ Examples:
2016
2361
  Get the kawpow hash for a block given its block data
2017
2362
 
2018
2363
  Arguments
2019
- 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
2020
- 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
2021
- 3. "nonce" (string, required) the hex nonce of the block that hashed the valid block
2364
+ 1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
2365
+ 2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
2366
+ 3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
2022
2367
  4. "height" (number, required) the height of the block data that is being hashed
2023
- 5. "target" (string, optional) the target of the block that is hash is trying to meet
2368
+ 5. "target" (string, optional) the target to meet (exactly 64 hex digits)
2024
2369
 
2025
2370
  Result:
2026
2371
 
@@ -2038,6 +2383,8 @@ Result:
2038
2383
  { (json object)
2039
2384
  "bip32_root_private" : (string) extended master private key,
2040
2385
  "bip32_root_public" : (string) extended master public key,
2386
+ "address_type" : (string) the wallet address type (-addresstype): legacy, pq or ecdsa
2387
+ "strict_ecdsa_derivation_path" : (string, ecdsa wallets) account path of its witness v3 keys
2041
2388
  "account_derivation_path" : (string) The derivation path to the account public/private keys
2042
2389
  "external_derivation_path" : (string) The derivation path prefix for receiving addresses
2043
2390
  "internal_derivation_path" : (string) The derivation path prefix for change addresses
@@ -2107,6 +2454,7 @@ Result (for verbose=true):
2107
2454
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2108
2455
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2109
2456
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2457
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2110
2458
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2111
2459
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2112
2460
  "transactionid", (string) parent transaction id
@@ -2148,6 +2496,7 @@ Result (for verbose=true):
2148
2496
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2149
2497
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2150
2498
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2499
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2151
2500
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2152
2501
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2153
2502
  "transactionid", (string) parent transaction id
@@ -2181,6 +2530,7 @@ Result:
2181
2530
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2182
2531
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2183
2532
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2533
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2184
2534
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2185
2535
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2186
2536
  "transactionid", (string) parent transaction id
@@ -2346,7 +2696,7 @@ so payments received with the address will be credited to 'account'.
2346
2696
 
2347
2697
  Arguments:
2348
2698
  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.
2349
- 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).
2699
+ 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.
2350
2700
 
2351
2701
  Result:
2352
2702
  "address" (string) The new neurai address
@@ -2409,11 +2759,34 @@ Examples:
2409
2759
  > neurai-cli getpeerinfo
2410
2760
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2411
2761
 
2762
+ &nbsp;<br> &nbsp;<br/>
2763
+ ## getprivacypoolinfo
2764
+ &nbsp;<br/> getprivacypoolinfo pool ( limit )
2765
+
2766
+ Read public state-thread identity and confirmed state, without registering a pool.
2767
+ Requires -spentindex and -txindex and readable historical transactions.
2768
+ pool: {"txid": birth_txid, "vout": birth_output}
2769
+ limit: maximum transitions to follow (default 100, maximum 1000).
2770
+ history_complete=false means current_state is unknown; continue with next_cursor.
2771
+ The reported profile describes the transport, not an audited privacy circuit.
2772
+
2773
+ &nbsp;<br> &nbsp;<br/>
2774
+ ## getprivacypoolupdates
2775
+ &nbsp;<br/> getprivacypoolupdates pool ( cursor limit )
2776
+
2777
+ Return confirmed public pool transactions, including complete witnesses, in state-thread order.
2778
+ pool: {"txid": birth_txid, "vout": birth_output}; no registry or viewing key.
2779
+ cursor: null for birth, otherwise the unchanged next_cursor from a previous query.
2780
+ limit: maximum updates (default 100, maximum 1000); pages also have a 1 MiB raw-byte limit.
2781
+ Pages pin one chain snapshot; a completed cursor refreshes to the current tip.
2782
+ A reorganized snapshot or foreign/tampered cursor is rejected. Mempool spends are excluded.
2783
+ No matching successor ends this transport; it does not prove the contract is closed.
2784
+
2412
2785
  &nbsp;<br> &nbsp;<br/>
2413
2786
  ## getpubkey
2414
2787
  &nbsp;<br/> getpubkey "address"
2415
2788
 
2416
- Returns the public key for an address that has revealed it by spending (requires pubkeyindex to be enabled).
2789
+ Returns the public key for a Legacy, AuthScript v1 or strict ECDSA address that has revealed it by spending (requires pubkeyindex to be enabled).
2417
2790
 
2418
2791
  Arguments:
2419
2792
  1. "address" (string, required) The Neurai address
@@ -2439,7 +2812,7 @@ Returns a new Neurai address, for receiving change.
2439
2812
  This is for use with raw transactions, NOT normal use.
2440
2813
 
2441
2814
  Arguments:
2442
- 1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's default family.
2815
+ 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).
2443
2816
 
2444
2817
  Result:
2445
2818
  "address" (string) The address
@@ -2479,6 +2852,7 @@ Result: (for verbose = true):
2479
2852
  "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2480
2853
  "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2481
2854
  "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2855
+ "poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
2482
2856
  "wtxid" : hash, (string) hash of serialized transaction, including witness data
2483
2857
  "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2484
2858
  "transactionid", (string) parent transaction id
@@ -2632,6 +3006,153 @@ Result:
2632
3006
  > neurai-cli getrpcinfo
2633
3007
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrpcinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
2634
3008
 
3009
+ &nbsp;<br> &nbsp;<br/>
3010
+ ## getsilentpaymentcode
3011
+ &nbsp;<br/> getsilentpaymentcode
3012
+
3013
+ Returns the reusable silent payment code of this wallet (NIP-047).
3014
+ Every payment to the code lands on a new strict ECDSA (witness v3) output
3015
+ that only this wallet can link to the code.
3016
+
3017
+ Result:
3018
+ {
3019
+ "code": "str", (string) payment code (nsp1... / tnsp1...)
3020
+ "network": "str", (string) main, test or regtest
3021
+ "scan_pubkey": "hex", (string) B_scan
3022
+ "spend_pubkey": "hex", (string) B_spend
3023
+ "view_only": true|false (boolean) imported view key: payments are detected, not spendable
3024
+ "verified": true (boolean) checked against the wallet seed in this session. An encrypted
3025
+ wallet shows its code only after one unlock in the session
3026
+ }
3027
+
3028
+ Examples:
3029
+ > neurai-cli getsilentpaymentcode
3030
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentcode", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3031
+
3032
+ &nbsp;<br> &nbsp;<br/>
3033
+ ## getsilentpaymentindexinfo
3034
+ &nbsp;<br/> getsilentpaymentindexinfo
3035
+
3036
+ State of the NIP-047 silent payment index (-silentpaymentindex).
3037
+
3038
+ Result:
3039
+ {
3040
+ "enabled" : true|false, (boolean) whether the node maintains the index
3041
+ "state" : "str", (string) disabled, ready or incomplete (records missing and their blocks pruned)
3042
+ "schema" : n, (numeric) storage schema of the records
3043
+ "formats" : [n,...], (array) public formats served
3044
+ "context" : "hex", (string) NIP-047 context N: network id, genesis, profile and family
3045
+ "start_height" : n, (numeric) first indexed height: max(1, strict AuthScript activation)
3046
+ "synced_height" : n, (numeric) every active block from start_height to this height has a record
3047
+ "synced_hash" : "hash", (string) hash of the block at synced_height
3048
+ "complete" : true|false, (boolean) ready and synced up to the tip
3049
+ "missing" : [[n,n],...], (array) height ranges without a record or block data to rebuild it
3050
+ "pruned" : true|false (boolean) whether the node has deleted block files
3051
+ }
3052
+
3053
+ Examples:
3054
+ > neurai-cli getsilentpaymentindexinfo
3055
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentindexinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
3056
+
3057
+ &nbsp;<br> &nbsp;<br/>
3058
+ ## getsilentpaymentinfo
3059
+ &nbsp;<br/> getsilentpaymentinfo
3060
+
3061
+ Returns the silent payment scanning state of this wallet.
3062
+
3063
+ Result:
3064
+ {
3065
+ "enabled": true|false, (boolean) the wallet has an identity (own or view key)
3066
+ "view_only": true|false,
3067
+ "code": "str", (string) once checked against the seed in this session and while
3068
+ the identity is sound
3069
+ "code_verified": true|false,(boolean) code checked against the seed in this session
3070
+ "identity_error": "str", (string) damaged identity: the code must not be used
3071
+ "paused": true|false, (boolean) locked wallet: scanning waits for walletpassphrase
3072
+ "scanned_height": n, (numeric) last block really scanned (-1: none)
3073
+ "scanned_hash": "hex",
3074
+ "tip_height": n,
3075
+ "blocks_behind": n,
3076
+ "error": "str", (string) why scanning stopped (missing block or undo data)
3077
+ "payments": n
3078
+ }
3079
+
3080
+ Examples:
3081
+ > neurai-cli getsilentpaymentinfo
3082
+
3083
+ &nbsp;<br> &nbsp;<br/>
3084
+ ## getsilentpaymenttweaks
3085
+ &nbsp;<br/> getsilentpaymenttweaks "blockhash" ( "encoding" )
3086
+
3087
+ NIP-047 light client data of one block: every eligible transaction with a native v3 output,
3088
+ its public tweak T = h*A and all its native v3 outputs, plus every native v3 output the block spends.
3089
+ A receiver computes b_scan*T for each entry; the node learns nothing about it.
3090
+ Requires -silentpaymentindex.
3091
+
3092
+ Arguments:
3093
+ 1. "blockhash" (string, required) the block hash
3094
+ 2. "encoding" (string, optional, default=json) json, or hex for the binary message of type 1
3095
+
3096
+ Result (json):
3097
+ {
3098
+ "format" : 1,
3099
+ "context" : "hex", (string) NIP-047 context N
3100
+ "block" : { (object) immutable for this block hash
3101
+ "height" : n,
3102
+ "hash" : "hash",
3103
+ "prev" : "hash",
3104
+ "entries" : [
3105
+ {
3106
+ "txid" : "hex",
3107
+ "tweak" : "hex", (string) 33-byte compressed point T
3108
+ "outputs" : [{ "vout" : n, "commitment" : "hex", "value_sat" : "n" },...]
3109
+ },...
3110
+ ],
3111
+ "spent" : [{ "txid" : "hex", "vout" : n },...],
3112
+ "digest" : "hex" (string) tagged hash of the canonical block bytes
3113
+ },
3114
+ "in_active_chain" : true|false
3115
+ }
3116
+
3117
+ Result (hex):
3118
+ "hex" (string) binary message of type 1
3119
+
3120
+ Examples:
3121
+ > neurai-cli getsilentpaymenttweaks "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
3122
+ > 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/
3123
+
3124
+ &nbsp;<br> &nbsp;<br/>
3125
+ ## getsilentpaymenttweaksrange
3126
+ &nbsp;<br/> getsilentpaymenttweaksrange start_height count ( "anchor_hash" "encoding" )
3127
+
3128
+ NIP-047 light client data of consecutive blocks of the active chain, as getsilentpaymenttweaks.
3129
+ The blocks come from one snapshot of the active chain. Whole blocks only: at least one, up to
3130
+ 1000 blocks and 4 MB. Requires -silentpaymentindex.
3131
+
3132
+ Arguments:
3133
+ 1. start_height (numeric, required) first height, from start_height of getsilentpaymentindexinfo
3134
+ up to the tip + 1 (an empty answer with status "tip")
3135
+ 2. count (numeric, required) number of blocks wanted
3136
+ 3. "anchor_hash" (string, optional) hash the client has at start_height - 1. If it left the active
3137
+ chain the answer is {"reorg": true, "fork_height": n}: continue from fork_height + 1
3138
+ 4. "encoding" (string, optional, default=json) json, or hex for the binary message of type 2
3139
+
3140
+ Result (json):
3141
+ {
3142
+ "format" : 1,
3143
+ "context" : "hex",
3144
+ "snapshot" : { "height" : n, "hash" : "hash" }, (object) tip when the request was served
3145
+ "synced_height" : n,
3146
+ "blocks" : [ {...},... ], (array) as "block" in getsilentpaymenttweaks
3147
+ "next_height" : n, (numeric) height after the last block returned
3148
+ "status" : "str" (string) more: ask again now; tip: wait for a new block;
3149
+ incomplete: the index lacks data from next_height
3150
+ }
3151
+
3152
+ Examples:
3153
+ > neurai-cli getsilentpaymenttweaksrange 1000 100
3154
+ > 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/
3155
+
2635
3156
  &nbsp;<br> &nbsp;<br/>
2636
3157
  ## getsnapshot
2637
3158
  &nbsp;<br/> getsnapshot "asset_name" block_height
@@ -2649,16 +3170,83 @@ Result:
2649
3170
  {
2650
3171
  name: (string),
2651
3172
  height: (number),
3173
+ block_hash: (string) the block the snapshot was captured on; empty for a legacy snapshot
3174
+ snapshot_hash: (string) commitment to the snapshot content (NIP-048); empty for a legacy snapshot
3175
+ format: (number) 0 legacy, 1 bound to its block, 2 also with holder state (NIP-048 D3)
3176
+ global_frozen: (bool, format 2) the asset was globally frozen
2652
3177
  owners: [
2653
3178
  {
2654
3179
  address: (string),
2655
3180
  amount_owned: (number),
3181
+ frozen: (bool, format 2) frozen for the asset (restricted asset or DEPIN owner freeze)
3182
+ self_revoked: (bool, format 2) a DEPIN holder that revoked itself
3183
+ tags: [ (string), ... ] (format 2) qualifier tags of the address
2656
3184
  }
2657
3185
  }
2658
3186
 
2659
3187
  Examples:
2660
3188
  > 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/
2661
3189
 
3190
+ &nbsp;<br> &nbsp;<br/>
3191
+ ## getsnapshotannouncement
3192
+ &nbsp;<br/> getsnapshotannouncement "asset_name" snapshot_height
3193
+
3194
+ Returns the message that announces a snapshot height before the chain reaches it (NIP-048). The holder of the
3195
+ owner token sends it to itself with that message, for instance:
3196
+ transfer "ASSET!" 1 "owner_token_address" "message"
3197
+ Other nodes that see the announcement request the same snapshot and can check the plan independently.
3198
+ A plan names the announcement with its "announcement" option.
3199
+
3200
+ Arguments:
3201
+ 1. "asset_name" (string, required) The asset whose holders will be snapshotted
3202
+ 2. snapshot_height (number, required) The future snapshot height
3203
+
3204
+ Result:
3205
+ {
3206
+ "asset_name": "name",
3207
+ "snapshot_height": n,
3208
+ "owner_token": "name", (string) the token that must carry the message
3209
+ "message": "hex", (string) SHA-256 of 0x05 || network || asset || height
3210
+ "minimum_notice": n, (number) blocks the announcement must precede the height (-minsnapshotnotice)
3211
+ "notice_if_mined_next": n (number) the notice if the announcement is mined in the next block
3212
+ }
3213
+
3214
+ Examples:
3215
+ > neurai-cli getsnapshotannouncement "TRONCO" 12345
3216
+
3217
+ &nbsp;<br> &nbsp;<br/>
3218
+ ## getsnapshotrecipients
3219
+ &nbsp;<br/> getsnapshotrecipients "asset_name" snapshot_height
3220
+
3221
+ The holders in a snapshot with what an encrypted bulletin to them needs (NIP-048 D5). Encryption follows DePIN
3222
+ messaging: a holder is ready when its address is P2PKH or strict ECDSA and its public key is in -pubkeyindex.
3223
+ The others are listed too, so no holder is skipped silently. Needs -pubkeyindex.
3224
+
3225
+ Arguments:
3226
+ 1. "asset_name" (string, required) The asset of the snapshot
3227
+ 2. snapshot_height (number, required) The snapshot height
3228
+
3229
+ Result:
3230
+ {
3231
+ "asset_name": "name",
3232
+ "height": n,
3233
+ "block_hash": "hash",
3234
+ "snapshot_hash": "hex",
3235
+ "ready": n, "key_not_revealed": n, "unsupported_type": n,
3236
+ "holders": [
3237
+ {
3238
+ "address": "address",
3239
+ "held": x.xxx,
3240
+ "state": "ready"|"key_not_revealed"|"unsupported_type",
3241
+ "pubkey": "hex", (string, when ready)
3242
+ "frozen": bool, "self_revoked": bool (snapshots with holder state)
3243
+ }, ...
3244
+ ]
3245
+ }
3246
+
3247
+ Examples:
3248
+ > neurai-cli getsnapshotrecipients "&TOKEN" 12345
3249
+
2662
3250
  &nbsp;<br> &nbsp;<br/>
2663
3251
  ## getsnapshotrequest
2664
3252
  &nbsp;<br/> getsnapshotrequest "asset_name" block_height
@@ -2724,8 +3312,6 @@ Result:
2724
3312
  "txid" : "transactionid", (string) The transaction id.
2725
3313
  "time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
2726
3314
  "timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
2727
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
2728
- may be unknown for unconfirmed transactions not in the mempool
2729
3315
  "details" : [
2730
3316
  {
2731
3317
  "account" : "accountname", (string) DEPRECATED. The account name involved in the transaction, can be "" for the default account.
@@ -2878,6 +3464,7 @@ Result:
2878
3464
  {
2879
3465
  "walletname": xxxxx, (string) the wallet name
2880
3466
  "walletversion": xxxxx, (numeric) the wallet version
3467
+ "addresstype": "type", (string) the address type fixed when the wallet was created (-addresstype): legacy, pq or ecdsa
2881
3468
  "balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in XNA
2882
3469
  "unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in XNA
2883
3470
  "immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in XNA
@@ -2918,6 +3505,7 @@ Arguments:
2918
3505
  2. "label" (string, optional, default="") An optional label
2919
3506
  3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
2920
3507
  4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well
3508
+ If the wallet already has the keys, registering the redeem script can make its P2SH output spendable.
2921
3509
 
2922
3510
  Note: This call can take minutes to complete if rescan is true.
2923
3511
  If you have the full public key, you should call importpubkey instead of this.
@@ -3038,6 +3626,29 @@ Import using a label without rescan
3038
3626
  As a JSON-RPC call
3039
3627
  > 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/
3040
3628
 
3629
+ &nbsp;<br> &nbsp;<br/>
3630
+ ## importsilentpaymentviewkey
3631
+ &nbsp;<br/> importsilentpaymentviewkey "scan_private_key" "spend_pubkey" ( start_height )
3632
+
3633
+ Turns this wallet into a watch wallet of a silent payment code: payments are
3634
+ detected and shown as watch-only, never spendable. Only for an unencrypted wallet
3635
+ without its own silent payment identity (or whose stored view key is damaged); the wallet
3636
+ can no longer be encrypted. Pass the secret with "neurai-cli -stdin importsilentpaymentviewkey"
3637
+ (one argument per line) so it stays out of the shell history and the process list.
3638
+
3639
+ Arguments:
3640
+ 1. "scan_private_key" (string, required) hex b_scan
3641
+ 2. "spend_pubkey" (string, required) hex B_spend
3642
+ 3. start_height (numeric, optional, default=0) first block to scan
3643
+
3644
+ Result:
3645
+ {
3646
+ "code": "str", "scanned_height": n, "found": n
3647
+ }
3648
+
3649
+ Examples:
3650
+ > neurai-cli importsilentpaymentviewkey "<hex>" "<hex>" 0
3651
+
3041
3652
  &nbsp;<br> &nbsp;<br/>
3042
3653
  ## importwallet
3043
3654
  &nbsp;<br/> importwallet "filename"
@@ -3439,6 +4050,7 @@ Result:
3439
4050
  {
3440
4051
  "address": "address", (string) The Neurai address
3441
4052
  "pubkey": "pubkey_hex" (string) The public key in hex format
4053
+ "valid": 1|0 (numeric) 1 = active/valid, 0 = blocked/revoked (only meaningful for DEPIN assets; always 1 for regular assets)
3442
4054
  },
3443
4055
  ...
3444
4056
  ]
@@ -3581,7 +4193,7 @@ Returns the list of post-quantum (ML-DSA-44) Bech32m addresses in the wallet.
3581
4193
 
3582
4194
  Result:
3583
4195
  [ (json array of strings)
3584
- "address" (string) A generic AuthScript v1 address with a PQ key (nc1p.../tnc1p...)
4196
+ "address" (string) A strict post-quantum (witness v2) address of a PQ key (pq1.../tpq1...)
3585
4197
  ...
3586
4198
  ]
3587
4199
 
@@ -3650,6 +4262,25 @@ Examples:
3650
4262
  > neurai-cli listreceivedbyaddress 6 true
3651
4263
  > 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/
3652
4264
 
4265
+ &nbsp;<br> &nbsp;<br/>
4266
+ ## listsilentpayments
4267
+ &nbsp;<br/> listsilentpayments ( include_spent )
4268
+
4269
+ Lists the silent payments received by this wallet.
4270
+
4271
+ Arguments:
4272
+ 1. include_spent (boolean, optional, default=true)
4273
+
4274
+ Result:
4275
+ [{
4276
+ "txid": "hex", "vout": n, "k": n, "amount": x.xxx, "address": "str",
4277
+ "status": "pending|unconfirmed|confirmed|spent|conflicted|abandoned|other_chain|unknown",
4278
+ "confirmations": n, "blockhash": "hex", "height": n, "view_only": true|false
4279
+ }, ...]
4280
+
4281
+ Examples:
4282
+ > neurai-cli listsilentpayments
4283
+
3653
4284
  &nbsp;<br> &nbsp;<br/>
3654
4285
  ## listsinceblock
3655
4286
  &nbsp;<br/> listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
@@ -3683,8 +4314,6 @@ Result:
3683
4314
  "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
3684
4315
  "time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
3685
4316
  "timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
3686
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3687
- may be unknown for unconfirmed transactions not in the mempool
3688
4317
  "abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
3689
4318
  "comment": "...", (string) If a comment is associated with the transaction.
3690
4319
  "label" : "label" (string) A comment for the address/transaction, if any
@@ -3792,8 +4421,6 @@ Result:
3792
4421
  "otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
3793
4422
  from (for receiving funds, positive amounts), or went to (for sending funds,
3794
4423
  negative amounts).
3795
- "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3796
- may be unknown for unconfirmed transactions not in the mempool
3797
4424
  "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
3798
4425
  'send' category of transactions.
3799
4426
  }
@@ -3949,6 +4576,29 @@ Move 0.01 XNA timotei to akiko with a comment and funds have 6 confirmations
3949
4576
  As a json rpc call
3950
4577
  > 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/
3951
4578
 
4579
+ &nbsp;<br> &nbsp;<br/>
4580
+ ## opendepin
4581
+ &nbsp;<br/> opendepin "asset_name" ("change_address")
4582
+
4583
+ THIS COMMAND IS NOT YET ACTIVE!
4584
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
4585
+
4586
+ Open transfers of a DEPIN asset (owner only): while open, holders can move
4587
+ the asset like a regular asset without the owner token. Transfers from addresses
4588
+ frozen by the owner or self-revoked stay rejected. Valid from the closed state;
4589
+ takes effect from the block after the one that confirms it.
4590
+
4591
+ Arguments:
4592
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
4593
+ 2. "change_address" (string, optional) The change address for the owner token
4594
+
4595
+ Result:
4596
+ "txid" (string) The transaction id
4597
+
4598
+ Examples:
4599
+ > neurai-cli opendepin "&FRANCE"
4600
+ > 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/
4601
+
3952
4602
  &nbsp;<br> &nbsp;<br/>
3953
4603
  ## ping
3954
4604
  &nbsp;<br/> ping
@@ -3968,15 +4618,15 @@ Examples:
3968
4618
  Attempts to submit new block to network mined by kawpow gpu miner via rpc.
3969
4619
 
3970
4620
  Arguments
3971
- 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
3972
- 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
3973
- 3. "nonce" (string, required) the nonce of the block that hashed the valid block
4621
+ 1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
4622
+ 2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
4623
+ 3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
3974
4624
 
3975
4625
  Result:
3976
4626
 
3977
4627
  Examples:
3978
- > neurai-cli pprpcsb "header_hash" "mix_hash" 100000
3979
- > 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/
4628
+ > neurai-cli pprpcsb "header_hash" "mix_hash" "0x100000"
4629
+ > 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/
3980
4630
 
3981
4631
  &nbsp;<br> &nbsp;<br/>
3982
4632
  ## preciousblock
@@ -4151,11 +4801,58 @@ Examples:
4151
4801
  > neurai-cli removetagfromaddress "#TAG" "to_address" "change_address"
4152
4802
  > 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/
4153
4803
 
4804
+ &nbsp;<br> &nbsp;<br/>
4805
+ ## repairsilentpaymentidentity
4806
+ &nbsp;<br/> repairsilentpaymentidentity
4807
+
4808
+ Rewrites the silent payment code of this wallet from its seed after an identity failure
4809
+ ("stored silent payment code does not match the wallet seed"). Payments sent to the
4810
+ replaced code did not reach this wallet: check your backups before repairing.
4811
+
4812
+ Result:
4813
+ {
4814
+ "previous_code": "str", (string) the code that was stored (do not use it)
4815
+ "code": "str" (string) the code derived from the seed
4816
+ }
4817
+
4818
+ Examples:
4819
+ > neurai-cli repairsilentpaymentidentity
4820
+
4821
+ &nbsp;<br> &nbsp;<br/>
4822
+ ## replaysnapshot
4823
+ &nbsp;<br/> replaysnapshot "asset_name" snapshot_height ( "expected_snapshot_hash" )
4824
+
4825
+ Rebuilds the holders of an asset at a height from the blocks and their undo data, without using any snapshot,
4826
+ and returns the snapshot hash they give (NIP-048). A node that did not capture the snapshot can so check a
4827
+ plan's snapshot_hash. It reads every block from asset activation to the height: it is slow, and a pruned node
4828
+ cannot do it.
4829
+
4830
+ Arguments:
4831
+ 1. "asset_name" (string, required) The asset
4832
+ 2. snapshot_height (number, required) The height to rebuild
4833
+ 3. "expected_snapshot_hash" (string, optional) A snapshot_hash to compare with, for instance from a plan
4834
+
4835
+ Result:
4836
+ {
4837
+ "asset_name": "name",
4838
+ "height": n,
4839
+ "block_hash": "hash",
4840
+ "snapshot_hash": "hex", (string) as in getsnapshot and getdistributionplan
4841
+ "holders": n,
4842
+ "scanned_blocks": n,
4843
+ "matches_stored": true|false|null, (null: this node holds no snapshot at that height)
4844
+ "matches_expected": true|false|null (null: no expected hash given)
4845
+ }
4846
+
4847
+ Examples:
4848
+ > neurai-cli replaysnapshot "TRONCO" 12345
4849
+
4154
4850
  &nbsp;<br> &nbsp;<br/>
4155
4851
  ## requestsnapshot
4156
4852
  &nbsp;<br/> requestsnapshot "asset_name" block_height
4157
4853
 
4158
- Schedules a snapshot of the specified asset at the specified block height.
4854
+ Schedules a snapshot of the specified asset at the specified block height. The node captures it while it
4855
+ connects that block, so at most -maxsnapshotrequests different assets are accepted at one height.
4159
4856
 
4160
4857
  Arguments:
4161
4858
  1. "asset_name" (string, required) The asset name for which the snapshot will be taken
@@ -4190,6 +4887,25 @@ Examples:
4190
4887
  > neurai-cli rescanblockchain 100000 120000
4191
4888
  > 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
4889
 
4890
+ &nbsp;<br> &nbsp;<br/>
4891
+ ## rescansilentpayments
4892
+ &nbsp;<br/> rescansilentpayments ( start_height )
4893
+
4894
+ Scans the active chain again for silent payments, from start_height to the tip.
4895
+ Reads blocks and their undo data; -txindex is not needed. Scanning stops, without
4896
+ advancing past it, at the first block whose data is not available (pruned node).
4897
+
4898
+ Arguments:
4899
+ 1. start_height (numeric, optional, default=0)
4900
+
4901
+ Result:
4902
+ {
4903
+ "start_height": n, "scanned_height": n, "found": n
4904
+ }
4905
+
4906
+ Examples:
4907
+ > neurai-cli rescansilentpayments 100
4908
+
4193
4909
  &nbsp;<br> &nbsp;<br/>
4194
4910
  ## savemempool
4195
4911
  &nbsp;<br/> savemempool
@@ -4200,6 +4916,29 @@ Examples:
4200
4916
  > neurai-cli savemempool
4201
4917
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4202
4918
 
4919
+ &nbsp;<br> &nbsp;<br/>
4920
+ ## sealdepin
4921
+ &nbsp;<br/> sealdepin "asset_name" ("change_address")
4922
+
4923
+ THIS COMMAND IS NOT YET ACTIVE!
4924
+ https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
4925
+
4926
+ Seal a DEPIN asset (owner only). WARNING: THIS IS IRREVERSIBLE.
4927
+ A sealed asset is soulbound like a closed one, but no transfer state operation
4928
+ (open, close or seal) is ever accepted for it again. Only valid from the closed
4929
+ state: an open asset must be closed first.
4930
+
4931
+ Arguments:
4932
+ 1. "asset_name" (string, required) The DEPIN asset name (must start with &)
4933
+ 2. "change_address" (string, optional) The change address for the owner token
4934
+
4935
+ Result:
4936
+ "txid" (string) The transaction id
4937
+
4938
+ Examples:
4939
+ > neurai-cli sealdepin "&FRANCE"
4940
+ > 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/
4941
+
4203
4942
  &nbsp;<br> &nbsp;<br/>
4204
4943
  ## selfrevokedepin
4205
4944
  &nbsp;<br/> selfrevokedepin "asset_name"
@@ -4271,7 +5010,7 @@ As a json rpc call
4271
5010
 
4272
5011
  &nbsp;<br> &nbsp;<br/>
4273
5012
  ## sendfromaddress
4274
- &nbsp;<br/> sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
5013
+ &nbsp;<br/> sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
4275
5014
 
4276
5015
  Send an amount from a specific address to a given address. All xna change will get sent back to the from_address
4277
5016
 
@@ -4303,7 +5042,7 @@ Examples:
4303
5042
 
4304
5043
  &nbsp;<br> &nbsp;<br/>
4305
5044
  ## sendmany
4306
- &nbsp;<br/> sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")
5045
+ &nbsp;<br/> sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] conf_target "estimate_mode")
4307
5046
 
4308
5047
  Send multiple times. Amounts are double-precision floating point numbers.
4309
5048
 
@@ -4397,9 +5136,32 @@ Send the transaction (signed hex)
4397
5136
  As a json rpc call
4398
5137
  > 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/
4399
5138
 
5139
+ &nbsp;<br> &nbsp;<br/>
5140
+ ## sendsilentpayments
5141
+ &nbsp;<br/> sendsilentpayments [{"code":"str","amount":x},...] ( conf_target "estimate_mode" )
5142
+
5143
+ Pays one or more silent payment codes from strict ECDSA (v3) coins only.
5144
+ Several payments to the same code are allowed (up to 16 per code); the change
5145
+ returns to a new internal v3 address.
5146
+
5147
+ Arguments:
5148
+ 1. payments (array, required) [{"code": payment code, "amount": amount in XNA}, ...]
5149
+ 2. conf_target (numeric, optional) Confirmation target (in blocks)
5150
+ 3. "estimate_mode" (string, optional, default=UNSET) UNSET, ECONOMICAL or CONSERVATIVE
5151
+
5152
+ Result:
5153
+ {
5154
+ "txid": "hex",
5155
+ "fee": x.xxx,
5156
+ "payments": [{"code": "str", "amount": x.xxx, "vout": n, "k": n}, ...]
5157
+ }
5158
+
5159
+ Examples:
5160
+ > neurai-cli sendsilentpayments '[{"code":"tnsp1q...","amount":1.5}]'
5161
+
4400
5162
  &nbsp;<br> &nbsp;<br/>
4401
5163
  ## sendtoaddress
4402
- &nbsp;<br/> sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
5164
+ &nbsp;<br/> sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
4403
5165
 
4404
5166
  Send an amount to a given address.
4405
5167
 
@@ -4623,7 +5385,6 @@ Examples:
4623
5385
  &nbsp;<br/> stop
4624
5386
 
4625
5387
  Stop Neurai server.
4626
-
4627
5388
  &nbsp;<br> &nbsp;<br/>
4628
5389
  ## submitblock
4629
5390
  &nbsp;<br/> submitblock "hexdata" ( "dummy" )
@@ -4967,6 +5728,74 @@ Examples:
4967
5728
  > neurai-cli verifychain
4968
5729
  > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
4969
5730
 
5731
+ &nbsp;<br> &nbsp;<br/>
5732
+ ## verifydistribution
5733
+ &nbsp;<br/> verifydistribution {plan} [batches] ( {options} )
5734
+
5735
+ Classifies the batches of a distribution plan from the operator's batch records (NIP-048): every signed
5736
+ version of each batch. Nothing is broadcast, rebuilt or spent.
5737
+ confirmed a version that pays the batch has the required confirmations
5738
+ confirming a version is in the active chain with fewer confirmations; its recipients stay reserved
5739
+ pending a version is in the mempool, or is signed and all its inputs are unspent; rebroadcast it
5740
+ conflicting every version has an input spent by another transaction (needs -txindex to tell apart
5741
+ from a confirmed version whose outputs were all spent)
5742
+ unknown no recorded version, or the node cannot tell; review before building anything
5743
+
5744
+ Arguments:
5745
+ 1. plan (object, required) The plan parameters
5746
+ {
5747
+ "asset_name": "name", (string, required) as in getdistributionplan
5748
+ "snapshot_height": n, (number, required)
5749
+ "distribution_asset_name": "name", (string, required)
5750
+ "amount": x.xxx, (numeric, required) gross_distribution_amount
5751
+ "exception_addresses": "a,b", (string, optional)
5752
+ "remainder": "payer"|"largest", (string, optional, default "payer")
5753
+ "allow_legacy_snapshot": bool, (boolean, optional, default false)
5754
+ "announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
5755
+ "qualifier": "#TAG", (string, optional) as in getdistributionplan
5756
+ "weights": {"address": n, ...}, (object, optional) as in getdistributionplan
5757
+ "report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
5758
+ "allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
5759
+ "min_held": x.xxx, (numeric, optional) as in getdistributionplan
5760
+ }
5761
+ 2. batches (array, required) The operator's batch records
5762
+ [
5763
+ {
5764
+ "index": n, (number, required) batch index
5765
+ "versions": [ (array, required) every signed version, as hex or as
5766
+ "hex" | { "hex": "hex", "block_hash": "hash" }, ... an object with the block it was seen in
5767
+ ]
5768
+ }, ...
5769
+ ]
5770
+ 3. options (object, optional)
5771
+ {
5772
+ "max_outputs": n, (number, default 500) batch size used to build the batches
5773
+ "confirmations": n (number, default 6) confirmations a batch needs to count as paid
5774
+ }
5775
+
5776
+ Result:
5777
+ {
5778
+ "plan_hash": "hex",
5779
+ "complete": true|false, (boolean) every batch is confirmed
5780
+ "paid": x.xxx, (numeric) amount in confirmed batches
5781
+ "reserved": x.xxx, (numeric) amount in confirming and pending batches
5782
+ "unpaid": x.xxx, (numeric) amount in conflicting and unknown batches
5783
+ "batches": [
5784
+ {
5785
+ "index": n,
5786
+ "batch_id": "hex",
5787
+ "state": "confirmed"|"confirming"|"pending"|"conflicting"|"unknown",
5788
+ "txid": "hex", (string, optional) the version that decides the state
5789
+ "confirmations": n, (number, optional)
5790
+ "amount": x.xxx,
5791
+ "issues": [ "text", ... ]
5792
+ }, ...
5793
+ ]
5794
+ }
5795
+
5796
+ Examples:
5797
+ > neurai-cli verifydistribution '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' '[{"index":0,"versions":["0200..."]}]'
5798
+
4970
5799
  &nbsp;<br> &nbsp;<br/>
4971
5800
  ## verifymessage
4972
5801
  &nbsp;<br/> verifymessage "address" "signature" "message"