@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/CHANGELOG.md +5 -0
- package/dist/index.cjs +889 -85
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.mjs +889 -85
- package/docs.json +57 -32
- package/docs.ts +1045 -91
- package/index.ts +0 -1
- package/neurai_methods.md +914 -85
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -128,9 +128,6 @@ var methods = {
|
|
|
128
128
|
> 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/
|
|
129
129
|
**/
|
|
130
130
|
backupwallet: "backupwallet",
|
|
131
|
-
/** bumpfee has been deprecated on the XNA Wallet.
|
|
132
|
-
**/
|
|
133
|
-
bumpfee: "bumpfee",
|
|
134
131
|
/** cancelsnapshotrequest "asset_name" block_height
|
|
135
132
|
|
|
136
133
|
Cancels the specified snapshot request.
|
|
@@ -263,6 +260,28 @@ var methods = {
|
|
|
263
260
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
264
261
|
**/
|
|
265
262
|
clearmessages: "clearmessages",
|
|
263
|
+
/** closedepin "asset_name" ("change_address")
|
|
264
|
+
|
|
265
|
+
THIS COMMAND IS NOT YET ACTIVE!
|
|
266
|
+
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
267
|
+
|
|
268
|
+
Close transfers of a DEPIN asset (owner only): the asset becomes soulbound
|
|
269
|
+
again and only the owner can move it. Valid from the open state; takes effect
|
|
270
|
+
from the block after the one that confirms it. Pending holder transfers are
|
|
271
|
+
dropped from the mempool when the close confirms.
|
|
272
|
+
|
|
273
|
+
Arguments:
|
|
274
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
275
|
+
2. "change_address" (string, optional) The change address for the owner token
|
|
276
|
+
|
|
277
|
+
Result:
|
|
278
|
+
"txid" (string) The transaction id
|
|
279
|
+
|
|
280
|
+
Examples:
|
|
281
|
+
> neurai-cli closedepin "&FRANCE"
|
|
282
|
+
> 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/
|
|
283
|
+
**/
|
|
284
|
+
closedepin: "closedepin",
|
|
266
285
|
/** combinerawtransaction ["hexstring",...]
|
|
267
286
|
|
|
268
287
|
Combine multiple partially signed transactions into one transaction.
|
|
@@ -282,6 +301,57 @@ var methods = {
|
|
|
282
301
|
> neurai-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]
|
|
283
302
|
**/
|
|
284
303
|
combinerawtransaction: "combinerawtransaction",
|
|
304
|
+
/** createdistributionbatch "plan_hash" {plan} batch_index ( {options} )
|
|
305
|
+
|
|
306
|
+
Builds, funds and signs one batch of a distribution plan from this wallet (NIP-048), and locks the inputs it
|
|
307
|
+
spends. It does NOT broadcast: store the result in your batch records first, then send it with
|
|
308
|
+
sendrawtransaction. The plan must still hash to plan_hash, so a payment is always bound to the plan the
|
|
309
|
+
operator approved.
|
|
310
|
+
To replace a version that left the mempool, build a new one with the same anchor: every version of a batch
|
|
311
|
+
spends the anchor, so at most one of them can confirm.
|
|
312
|
+
|
|
313
|
+
Arguments:
|
|
314
|
+
1. "plan_hash" (string, required) The approved plan hash, from getdistributionplan
|
|
315
|
+
2. plan (object, required) The plan parameters
|
|
316
|
+
{
|
|
317
|
+
"asset_name": "name", (string, required) as in getdistributionplan
|
|
318
|
+
"snapshot_height": n, (number, required)
|
|
319
|
+
"distribution_asset_name": "name", (string, required)
|
|
320
|
+
"amount": x.xxx, (numeric, required) gross_distribution_amount
|
|
321
|
+
"exception_addresses": "a,b", (string, optional)
|
|
322
|
+
"remainder": "payer"|"largest", (string, optional, default "payer")
|
|
323
|
+
"allow_legacy_snapshot": bool, (boolean, optional, default false)
|
|
324
|
+
"announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
325
|
+
"qualifier": "#TAG", (string, optional) as in getdistributionplan
|
|
326
|
+
"weights": {"address": n, ...}, (object, optional) as in getdistributionplan
|
|
327
|
+
"report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
328
|
+
"allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
|
|
329
|
+
"min_held": x.xxx, (numeric, optional) as in getdistributionplan
|
|
330
|
+
}
|
|
331
|
+
3. batch_index (number, required) The batch to build, from getdistributionbatches
|
|
332
|
+
4. options (object, optional)
|
|
333
|
+
{
|
|
334
|
+
"max_outputs": n, (number, default 500) batch size, as in getdistributionbatches
|
|
335
|
+
"anchor": {"txid": "hex", "vout": n}, (object, optional) the anchor of earlier versions of this batch
|
|
336
|
+
"max_fee": x.xxx (numeric, optional) refuse a fee above this amount of XNA
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
Result:
|
|
340
|
+
{
|
|
341
|
+
"plan_hash": "hex",
|
|
342
|
+
"batch_index": n,
|
|
343
|
+
"batch_id": "hex",
|
|
344
|
+
"txid": "hex",
|
|
345
|
+
"hex": "hex", (string) the signed transaction, not broadcast
|
|
346
|
+
"fee": x.xxx,
|
|
347
|
+
"anchor": {"txid": "hex", "vout": n}, (object) the XNA input every later version must spend
|
|
348
|
+
"inputs": [ {"txid": "hex", "vout": n}, ... ] (array) inputs, now locked in this wallet
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
Examples:
|
|
352
|
+
> neurai-cli createdistributionbatch "planhash" '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' 0
|
|
353
|
+
**/
|
|
354
|
+
createdistributionbatch: "createdistributionbatch",
|
|
285
355
|
/** createmultisig nrequired ["key",...]
|
|
286
356
|
|
|
287
357
|
Creates a multi-signature address with n signature of m keys required.
|
|
@@ -340,6 +410,9 @@ var methods = {
|
|
|
340
410
|
unfreeze_addresses 0
|
|
341
411
|
freeze_asset 0
|
|
342
412
|
unfreeze_asset 0
|
|
413
|
+
open_depin 0
|
|
414
|
+
close_depin 0
|
|
415
|
+
seal_depin 0
|
|
343
416
|
|
|
344
417
|
Assets For Authorization:
|
|
345
418
|
These operations require a specific asset input for authorization:
|
|
@@ -352,6 +425,10 @@ var methods = {
|
|
|
352
425
|
unfreeze_addresses
|
|
353
426
|
freeze_asset
|
|
354
427
|
unfreeze_asset
|
|
428
|
+
DEPIN Owner Token (&NAME!):
|
|
429
|
+
open_depin
|
|
430
|
+
close_depin
|
|
431
|
+
seal_depin
|
|
355
432
|
Root Qualifier Token:
|
|
356
433
|
issue_qualifier (when issuing subqualifier)
|
|
357
434
|
Qualifier Token:
|
|
@@ -371,7 +448,9 @@ var methods = {
|
|
|
371
448
|
{
|
|
372
449
|
"txid":"id", (string, required) The transaction id
|
|
373
450
|
"vout":n, (number, required) The output number
|
|
374
|
-
"sequence":n (number, optional) The sequence number
|
|
451
|
+
"sequence":n (number, optional) The sequence number. Once the no-RBF sequence rule
|
|
452
|
+
applies to the next block it must be 4294967295, 4294967294 or, in a
|
|
453
|
+
version 2 or 3 transaction, a BIP 68 relative lock (bit 31 clear)
|
|
375
454
|
}
|
|
376
455
|
,...
|
|
377
456
|
]
|
|
@@ -385,7 +464,7 @@ var methods = {
|
|
|
385
464
|
"transfer":
|
|
386
465
|
{
|
|
387
466
|
"asset-name": (string, required) asset name
|
|
388
|
-
asset-quantity (number, required) the number of raw units to transfer
|
|
467
|
+
asset-quantity (number or string, required) the number of raw units to transfer
|
|
389
468
|
,...
|
|
390
469
|
}
|
|
391
470
|
}
|
|
@@ -395,7 +474,7 @@ var methods = {
|
|
|
395
474
|
"transferwithmessage":
|
|
396
475
|
{
|
|
397
476
|
"asset-name": (string, required) asset name
|
|
398
|
-
asset-quantity, (number, required) the number of raw units to transfer
|
|
477
|
+
asset-quantity, (number or string, required) the number of raw units to transfer
|
|
399
478
|
"message":"hash", (string, required) ipfs hash or a txid hash
|
|
400
479
|
"expire_time": n (number, required) utc time in seconds to expire the message
|
|
401
480
|
}
|
|
@@ -405,7 +484,7 @@ var methods = {
|
|
|
405
484
|
"issue":
|
|
406
485
|
{
|
|
407
486
|
"asset_name":"asset-name", (string, required) new asset name
|
|
408
|
-
"asset_quantity":n, (number, required) the number of raw units to issue
|
|
487
|
+
"asset_quantity":n, (number or string, required) the number of raw units to issue
|
|
409
488
|
"units":[1-8], (number, required) display units, between 1 (integral) to 8 (max precision)
|
|
410
489
|
"reissuable":[0-1], (number, required) 1=reissuable asset
|
|
411
490
|
"has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
|
|
@@ -428,8 +507,9 @@ var methods = {
|
|
|
428
507
|
"reissue":
|
|
429
508
|
{
|
|
430
509
|
"asset_name":"asset-name", (string, required) name of asset to be reissued
|
|
431
|
-
"asset_quantity":n, (number, required) the number of raw units to issue
|
|
510
|
+
"asset_quantity":n, (number or string, required) the number of raw units to issue
|
|
432
511
|
"reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
|
|
512
|
+
"units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
|
|
433
513
|
"ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
|
|
434
514
|
Overrides the current ipfs hash if given
|
|
435
515
|
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
@@ -441,7 +521,7 @@ var methods = {
|
|
|
441
521
|
"issue_restricted":
|
|
442
522
|
{
|
|
443
523
|
"asset_name":"asset-name",(string, required) new asset name
|
|
444
|
-
"asset_quantity":n, (number, required) the number of raw units to issue
|
|
524
|
+
"asset_quantity":n, (number or string, required) the number of raw units to issue
|
|
445
525
|
"verifier_string":"text", (string, required) the verifier string to be used for a restricted
|
|
446
526
|
asset transfer verification
|
|
447
527
|
"units":[0-8], (number, required) display units, between 0 (integral) and 8 (max precision)
|
|
@@ -457,8 +537,9 @@ var methods = {
|
|
|
457
537
|
"reissue_restricted":
|
|
458
538
|
{
|
|
459
539
|
"asset_name":"asset-name", (string, required) name of asset to be reissued
|
|
460
|
-
"asset_quantity":n, (number, required) the number of raw units to issue
|
|
540
|
+
"asset_quantity":n, (number or string, required) the number of raw units to issue
|
|
461
541
|
"reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
|
|
542
|
+
"units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
|
|
462
543
|
"verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
|
|
463
544
|
transfer verification
|
|
464
545
|
"ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
|
|
@@ -472,7 +553,7 @@ var methods = {
|
|
|
472
553
|
"issue_qualifier":
|
|
473
554
|
{
|
|
474
555
|
"asset_name":"asset_name", (string, required) a qualifier name (starts with '#')
|
|
475
|
-
"asset_quantity":n, (
|
|
556
|
+
"asset_quantity":n, (number or string, optional, default=1) the number of units to be issued (1 to 10)
|
|
476
557
|
"has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
|
|
477
558
|
to be added to the asset
|
|
478
559
|
"ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
|
|
@@ -480,7 +561,7 @@ var methods = {
|
|
|
480
561
|
"root_change_address" (string, optional) Only applies when issuing subqualifiers.
|
|
481
562
|
The address where the root qualifier will be sent.
|
|
482
563
|
If not specified, it will be sent to the output address.
|
|
483
|
-
"change_quantity":"qty" (
|
|
564
|
+
"change_quantity":"qty" (number or string, optional) the asset change amount (defaults to 1)
|
|
484
565
|
}
|
|
485
566
|
}
|
|
486
567
|
or
|
|
@@ -490,7 +571,7 @@ var methods = {
|
|
|
490
571
|
{
|
|
491
572
|
"qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
|
|
492
573
|
"addresses":["addr", ...], (array, required) the addresses to be tagged (up to 10)
|
|
493
|
-
"change_quantity":"qty", (
|
|
574
|
+
"change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
|
|
494
575
|
}
|
|
495
576
|
}
|
|
496
577
|
or
|
|
@@ -500,7 +581,7 @@ var methods = {
|
|
|
500
581
|
{
|
|
501
582
|
"qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
|
|
502
583
|
"addresses":["addr", ...], (array, required) the addresses to be untagged (up to 10)
|
|
503
|
-
"change_quantity":"qty", (
|
|
584
|
+
"change_quantity":"qty", (number or string, optional) the asset change amount (defaults to 1)
|
|
504
585
|
}
|
|
505
586
|
}
|
|
506
587
|
or
|
|
@@ -538,6 +619,14 @@ var methods = {
|
|
|
538
619
|
}
|
|
539
620
|
}
|
|
540
621
|
or
|
|
622
|
+
{ (object) A json object describing a DEPIN transfer state operation.
|
|
623
|
+
The address in the key will be used as the owner token change address.
|
|
624
|
+
"open_depin" | "close_depin" | "seal_depin":
|
|
625
|
+
{
|
|
626
|
+
"asset_name":"asset_name", (string, required) a DEPIN asset name (starts with '&')
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
or
|
|
541
630
|
"data": "hex" (string, required) The key is "data", the value is hex encoded data
|
|
542
631
|
,...
|
|
543
632
|
}
|
|
@@ -699,6 +788,24 @@ var methods = {
|
|
|
699
788
|
> 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/
|
|
700
789
|
**/
|
|
701
790
|
decodescript: "decodescript",
|
|
791
|
+
/** decodesilentpaymentcode "code"
|
|
792
|
+
|
|
793
|
+
Validates a silent payment code for this network and returns its keys.
|
|
794
|
+
|
|
795
|
+
Arguments:
|
|
796
|
+
1. "code" (string, required) payment code
|
|
797
|
+
|
|
798
|
+
Result:
|
|
799
|
+
{
|
|
800
|
+
"isvalid": true|false, (boolean)
|
|
801
|
+
"error": "str", (string) reason when invalid
|
|
802
|
+
"network", "scan_pubkey", "spend_pubkey" when valid
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
Examples:
|
|
806
|
+
> neurai-cli decodesilentpaymentcode "tnsp1q..."
|
|
807
|
+
**/
|
|
808
|
+
decodesilentpaymentcode: "decodesilentpaymentcode",
|
|
702
809
|
/**
|
|
703
810
|
* depinchallenge request
|
|
704
811
|
*
|
|
@@ -827,41 +934,10 @@ var methods = {
|
|
|
827
934
|
> 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/
|
|
828
935
|
**/
|
|
829
936
|
disconnectnode: "disconnectnode",
|
|
830
|
-
/** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ("change_address"
|
|
831
|
-
|
|
832
|
-
Splits the specified amount of the distribution asset to all owners of asset_name that are not in the optional exclusion_addresses
|
|
833
|
-
|
|
834
|
-
Arguments:
|
|
835
|
-
1. "asset_name" (string, required) The reward will be distributed all owners of this asset
|
|
836
|
-
2. "snapshot_height" (number, required) The block height of the ownership snapshot
|
|
837
|
-
3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
|
|
838
|
-
4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
|
|
839
|
-
5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
|
|
840
|
-
6. "change_address" (string, optional) If the rewards can't be fully distributed. The change will be sent to this address
|
|
841
|
-
|
|
842
|
-
Result:
|
|
843
|
-
{
|
|
844
|
-
error_txn_gen_failed: (string),
|
|
845
|
-
error_nsf: (string),
|
|
846
|
-
error_rejects: (string),
|
|
847
|
-
error_db_update: (string),
|
|
848
|
-
batch_results: [
|
|
849
|
-
{
|
|
850
|
-
transaction_id: (string),
|
|
851
|
-
error_txn_rejected: (string),
|
|
852
|
-
total_amount: (number),
|
|
853
|
-
fee: (number),
|
|
854
|
-
expected_count: (number),
|
|
855
|
-
actual_count: (number),
|
|
856
|
-
}
|
|
857
|
-
]
|
|
858
|
-
}
|
|
937
|
+
/** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ( "change_address" )
|
|
859
938
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
> neurai-cli distributereward "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
|
|
863
|
-
> 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/
|
|
864
|
-
> 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/
|
|
939
|
+
Retired (NIP-048): the node no longer sends reward payments.
|
|
940
|
+
Use getdistributionplan to compute the payments, then send them from your wallet.
|
|
865
941
|
**/
|
|
866
942
|
distributereward: "distributereward",
|
|
867
943
|
/** dumpextkeypq
|
|
@@ -998,6 +1074,25 @@ var methods = {
|
|
|
998
1074
|
> neurai-cli estimatesmartfee 6
|
|
999
1075
|
**/
|
|
1000
1076
|
estimatesmartfee: "estimatesmartfee",
|
|
1077
|
+
/** exportsilentpaymentviewkey "acknowledge"
|
|
1078
|
+
|
|
1079
|
+
Returns the view key (b_scan and B_spend) of this wallet's silent payment code.
|
|
1080
|
+
Whoever holds it can find and link every payment to the code, but cannot spend them.
|
|
1081
|
+
Never combine it with an exported payment private key: together they reveal the spend key.
|
|
1082
|
+
The result is a secret: from a shell, prefer a terminal that is not recorded or logged.
|
|
1083
|
+
|
|
1084
|
+
Arguments:
|
|
1085
|
+
1. "acknowledge" (string, required) must be "reveal view key"
|
|
1086
|
+
|
|
1087
|
+
Result:
|
|
1088
|
+
{
|
|
1089
|
+
"scan_private_key": "hex", "spend_pubkey": "hex", "network": "str"
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
Examples:
|
|
1093
|
+
> neurai-cli exportsilentpaymentviewkey "reveal view key"
|
|
1094
|
+
**/
|
|
1095
|
+
exportsilentpaymentviewkey: "exportsilentpaymentviewkey",
|
|
1001
1096
|
/** exportxpqpub count ( chain offset )
|
|
1002
1097
|
|
|
1003
1098
|
Generates a batch of count ML-DSA-44 public keys and returns the xpqpub blob.
|
|
@@ -1112,7 +1207,6 @@ var methods = {
|
|
|
1112
1207
|
Those recipients will receive less neurais than you enter in their corresponding amount field.
|
|
1113
1208
|
If no outputs are specified here, the sender pays the fee.
|
|
1114
1209
|
[vout_index,...]
|
|
1115
|
-
Allows this transaction to be replaced by a transaction with higher fees
|
|
1116
1210
|
"conf_target" (numeric, optional) Confirmation target (in blocks)
|
|
1117
1211
|
"estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
|
|
1118
1212
|
"UNSET"
|
|
@@ -1447,6 +1541,7 @@ var methods = {
|
|
|
1447
1541
|
ipfs_hash: (hash), (only if has_ipfs = 1 and that data is a ipfs hash)
|
|
1448
1542
|
txid_hash: (hash), (only if has_ipfs = 1 and that data is a txid hash)
|
|
1449
1543
|
verifier_string: (string)
|
|
1544
|
+
transfer_state: (string) "closed" | "open" | "sealed" (only for DEPIN assets, names starting with &)
|
|
1450
1545
|
}
|
|
1451
1546
|
|
|
1452
1547
|
Examples:
|
|
@@ -1509,10 +1604,12 @@ var methods = {
|
|
|
1509
1604
|
If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
|
|
1510
1605
|
If verbosity is 1, returns an Object with information about block <hash>.
|
|
1511
1606
|
If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
|
|
1607
|
+
If verbosity is 3, returns the same as verbosity 2 plus a "prevout" object in each input with the spent output
|
|
1608
|
+
(generated, height, value, scriptPubKey), read from the block undo data. This works without -txindex.
|
|
1512
1609
|
|
|
1513
1610
|
Arguments:
|
|
1514
1611
|
1. "blockhash" (string, required) The block hash
|
|
1515
|
-
2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and
|
|
1612
|
+
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
|
|
1516
1613
|
|
|
1517
1614
|
Result (for verbosity = 0):
|
|
1518
1615
|
"data" (string) A string that is serialized, hex-encoded data for block 'hash'.
|
|
@@ -1563,6 +1660,7 @@ var methods = {
|
|
|
1563
1660
|
{
|
|
1564
1661
|
"chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
|
|
1565
1662
|
"blocks": xxxxxx, (numeric) the current number of blocks processed in the server
|
|
1663
|
+
"asset_marker": "xxxx", (string) marker required for new asset outputs in the next block ("rvn" or "xna")
|
|
1566
1664
|
"headers": xxxxxx, (numeric) the current number of headers we have validated
|
|
1567
1665
|
"bestblockhash": "...", (string) the hash of the currently best block
|
|
1568
1666
|
"difficulty": xxxxxx, (numeric) the current difficulty
|
|
@@ -1571,6 +1669,11 @@ var methods = {
|
|
|
1571
1669
|
"chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
|
|
1572
1670
|
"size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
|
|
1573
1671
|
"pruned": xx, (boolean) if the blocks are subject to pruning
|
|
1672
|
+
"zk_public_tree": { (object) profile-2 public-transition activation
|
|
1673
|
+
"activation_height": n, (numeric or null) scheduled height, null when unscheduled
|
|
1674
|
+
"active_at_tip": b, (boolean) whether the current block uses profile 2
|
|
1675
|
+
"active_for_next_block": b (boolean) whether a candidate block uses profile 2
|
|
1676
|
+
},
|
|
1574
1677
|
"pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
|
|
1575
1678
|
"automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
|
|
1576
1679
|
"prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
|
|
@@ -1599,6 +1702,17 @@ var methods = {
|
|
|
1599
1702
|
}
|
|
1600
1703
|
}
|
|
1601
1704
|
}
|
|
1705
|
+
"asset_services": { (object) legacy asset modules (NIP-048)
|
|
1706
|
+
"messages": {
|
|
1707
|
+
"active": xx, (boolean) legacy asset messaging stores are open
|
|
1708
|
+
"store_on_disk": xx (boolean) the data directory has a messages store
|
|
1709
|
+
},
|
|
1710
|
+
"rewards": {
|
|
1711
|
+
"active": xx, (boolean) reward snapshot stores are open
|
|
1712
|
+
"store_on_disk": xx, (boolean) the data directory has a rewards store
|
|
1713
|
+
"assetindex": xx (boolean) -assetindex, which the reward RPCs require
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1602
1716
|
"warnings" : "...", (string) any network and blockchain warnings.
|
|
1603
1717
|
}
|
|
1604
1718
|
|
|
@@ -1851,6 +1965,58 @@ var methods = {
|
|
|
1851
1965
|
> 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/
|
|
1852
1966
|
**/
|
|
1853
1967
|
getchaintxstats: "getchaintxstats",
|
|
1968
|
+
/** getchannelmessages "channel" ( {options} )
|
|
1969
|
+
|
|
1970
|
+
Returns the messages of an asset channel from the chain-wide index (-channelmessageindex, NIP-048): every
|
|
1971
|
+
message an owner token (NAME!) or message channel token (NAME~CHANNEL) carried back to the address it came
|
|
1972
|
+
from, whatever the wallet. Expiry is decided at query time against reference_time, so nodes with the same
|
|
1973
|
+
chain answer alike.
|
|
1974
|
+
|
|
1975
|
+
Arguments:
|
|
1976
|
+
1. "channel" (string, required) The owner token or message channel
|
|
1977
|
+
2. options (object, optional)
|
|
1978
|
+
{
|
|
1979
|
+
"from_height": n, (number, default 0)
|
|
1980
|
+
"to_height": n, (number, default the tip)
|
|
1981
|
+
"include_expired": bool, (boolean, default false)
|
|
1982
|
+
"reference_time": n, (number, default the median time past of the tip) expiry reference
|
|
1983
|
+
"message": "hash", (string, optional) only messages with this payload
|
|
1984
|
+
"include_tx": bool, (boolean, default false) add the raw transaction
|
|
1985
|
+
"include_proof": bool, (boolean, default false) add a gettxoutproof-style proof
|
|
1986
|
+
"limit": n (number, default 1000, max 10000) messages per call;
|
|
1987
|
+
a block is never split, so the last block may go past it
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
Result:
|
|
1991
|
+
{
|
|
1992
|
+
"channel": "name",
|
|
1993
|
+
"synced_height": n,
|
|
1994
|
+
"reference_time": n,
|
|
1995
|
+
"messages": [ (array) in chain order
|
|
1996
|
+
{
|
|
1997
|
+
"channel": "name",
|
|
1998
|
+
"authority": "owner"|"channel", (string) the token that carried the message
|
|
1999
|
+
"txid": "hex", "vout": n,
|
|
2000
|
+
"height": n, "block_hash": "hash", "block_time": n,
|
|
2001
|
+
"expire_time": n, (number) 0: never expires
|
|
2002
|
+
"expired": true|false,
|
|
2003
|
+
"message": "hash", (string) IPFS hash or 64-hex hash
|
|
2004
|
+
"address": "address", (string) the address that sent it to itself
|
|
2005
|
+
"op_return": "hex", (string, optional) data of the transaction's OP_RETURN output
|
|
2006
|
+
"op_return_matches": bool, (boolean, with op_return) the message is the SHA-256 of that data, so
|
|
2007
|
+
the data is content the token holder published in full (NIP-048 D1)
|
|
2008
|
+
"tx": "hex", (string, optional)
|
|
2009
|
+
"proof": "hex" (string, optional) checked with verifytxoutproof
|
|
2010
|
+
}, ...
|
|
2011
|
+
],
|
|
2012
|
+
"next_from_height": n|null (number) the limit stopped here: pass it as from_height for the next page
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
Examples:
|
|
2016
|
+
> neurai-cli getchannelmessages "ASSET!"
|
|
2017
|
+
> neurai-cli getchannelmessages "ASSET~NEWS" '{"from_height":1000,"include_expired":true}'
|
|
2018
|
+
**/
|
|
2019
|
+
getchannelmessages: "getchannelmessages",
|
|
1854
2020
|
/** getconnectioncount
|
|
1855
2021
|
|
|
1856
2022
|
Returns the number of connections to other nodes.
|
|
@@ -1893,6 +2059,179 @@ var methods = {
|
|
|
1893
2059
|
> 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/
|
|
1894
2060
|
**/
|
|
1895
2061
|
getdistributestatus: "getdistributestatus",
|
|
2062
|
+
/** getdistributionbatches {plan} ( {options} )
|
|
2063
|
+
|
|
2064
|
+
Splits the payments of a distribution plan into batches of at most max_outputs recipients, in plan order
|
|
2065
|
+
(NIP-048). Each batch pays all its recipients in one transaction. Nothing is spent or locked.
|
|
2066
|
+
|
|
2067
|
+
Arguments:
|
|
2068
|
+
1. plan (object, required) The plan parameters
|
|
2069
|
+
{
|
|
2070
|
+
"asset_name": "name", (string, required) as in getdistributionplan
|
|
2071
|
+
"snapshot_height": n, (number, required)
|
|
2072
|
+
"distribution_asset_name": "name", (string, required)
|
|
2073
|
+
"amount": x.xxx, (numeric, required) gross_distribution_amount
|
|
2074
|
+
"exception_addresses": "a,b", (string, optional)
|
|
2075
|
+
"remainder": "payer"|"largest", (string, optional, default "payer")
|
|
2076
|
+
"allow_legacy_snapshot": bool, (boolean, optional, default false)
|
|
2077
|
+
"announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
2078
|
+
"qualifier": "#TAG", (string, optional) as in getdistributionplan
|
|
2079
|
+
"weights": {"address": n, ...}, (object, optional) as in getdistributionplan
|
|
2080
|
+
"report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
2081
|
+
"allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
|
|
2082
|
+
"min_held": x.xxx, (numeric, optional) as in getdistributionplan
|
|
2083
|
+
}
|
|
2084
|
+
2. options (object, optional)
|
|
2085
|
+
{
|
|
2086
|
+
"max_outputs": n (number, default 500, max 1000) recipients per batch
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
Result:
|
|
2090
|
+
{
|
|
2091
|
+
"plan_hash": "hex",
|
|
2092
|
+
"max_outputs": n,
|
|
2093
|
+
"batches": [
|
|
2094
|
+
{
|
|
2095
|
+
"index": n,
|
|
2096
|
+
"batch_id": "hex", (string) SHA-256 of 0x04 || plan hash || max_outputs || index
|
|
2097
|
+
"first_recipient": n,
|
|
2098
|
+
"recipient_count": n,
|
|
2099
|
+
"amount": x.xxx, (numeric) total paid by the batch
|
|
2100
|
+
"outputs": { ... } (object) the payments in createrawtransaction format
|
|
2101
|
+
}, ...
|
|
2102
|
+
]
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
Examples:
|
|
2106
|
+
> neurai-cli getdistributionbatches '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}'
|
|
2107
|
+
**/
|
|
2108
|
+
getdistributionbatches: "getdistributionbatches",
|
|
2109
|
+
/** getdistributionplan "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" {options} )
|
|
2110
|
+
|
|
2111
|
+
Computes, without spending anything, how gross_distribution_amount of the distribution asset is split among the
|
|
2112
|
+
holders of asset_name in its snapshot at snapshot_height (NIP-048). Each holder gets floor(amount * held / total)
|
|
2113
|
+
in whole units of the distribution asset, or floor(amount / holders) with equal allocation. The plan hash commits
|
|
2114
|
+
to the snapshot, the parameters and every payment;
|
|
2115
|
+
pay the recipients from any wallet, for instance with getdistributionbatches and createdistributionbatch.
|
|
2116
|
+
|
|
2117
|
+
Arguments:
|
|
2118
|
+
1. "asset_name" (string, required) The asset whose holders receive the distribution
|
|
2119
|
+
2. "snapshot_height" (number, required) The height of a snapshot taken with requestsnapshot
|
|
2120
|
+
3. "distribution_asset_name" (string, required) The asset to distribute, or XNA
|
|
2121
|
+
4. "gross_distribution_amount" (number, required) The amount to split, a multiple of the distribution asset's smallest unit
|
|
2122
|
+
5. "exception_addresses" (string, optional) Comma-separated holder addresses to exclude
|
|
2123
|
+
6. options (object, optional)
|
|
2124
|
+
{
|
|
2125
|
+
"remainder": "payer"|"largest", (string, default "payer") Where the undivided remainder goes: it stays with the
|
|
2126
|
+
payer, or one unit each to the largest fractional parts (ties by script)
|
|
2127
|
+
"allow_legacy_snapshot": bool, (boolean, default false) Accept a snapshot captured before NIP-048, which has no block identity
|
|
2128
|
+
"announcement": { (object, optional) The transaction that announced snapshot_height in advance
|
|
2129
|
+
"txid": "hex", (see getsnapshotannouncement); the plan then commits to it (format version 2)
|
|
2130
|
+
"block_hash": "hex" (optional) Its block, for nodes without -txindex
|
|
2131
|
+
},
|
|
2132
|
+
"qualifier": "#TAG", (string, optional) Only holders tagged with this qualifier at the height
|
|
2133
|
+
"weights": {"address": n, ...}, (object, optional) Weights of a work report, positive integers; they replace
|
|
2134
|
+
the holdings, and holders without a weight are excluded
|
|
2135
|
+
"report": {"txid": "hex", "block_hash": "hex"} (object, optional) The owner token transfer that anchored
|
|
2136
|
+
the report hash (SHA-256 of 0x07 || weights)
|
|
2137
|
+
"allocation": "holdings"|"equal", (string, default "holdings") Split in proportion to the holdings (or the
|
|
2138
|
+
report weights), or in equal shares among the eligible holders, whatever
|
|
2139
|
+
they hold; equal cannot be combined with weights
|
|
2140
|
+
"min_held": x.xxx, (numeric, optional) Only holders with at least this amount of asset_name
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
A snapshot taken since NIP-048 D3 records, per holder, freezes, DEPIN self-revocations and qualifier tags; such
|
|
2144
|
+
holders are excluded. With a qualifier, report weights or both, the plan hash commits to them (format version 3);
|
|
2145
|
+
with equal allocation or a minimum holding, it commits to those too (format version 4).
|
|
2146
|
+
|
|
2147
|
+
Result:
|
|
2148
|
+
{
|
|
2149
|
+
"plan_hash": "hex", (string) SHA-256 commitment to the header and the Merkle root
|
|
2150
|
+
"merkle_root": "hex", (string) RFC 6962 root over the recipients, in order
|
|
2151
|
+
"version": n, (number) plan format version
|
|
2152
|
+
"network": "name", (string) network the plan belongs to
|
|
2153
|
+
"snapshot": {
|
|
2154
|
+
"asset_name": "name",
|
|
2155
|
+
"height": n,
|
|
2156
|
+
"block_hash": "hash", (string) block the snapshot was captured on; empty for a legacy snapshot
|
|
2157
|
+
"snapshot_hash": "hex", (string) commitment to the snapshot content
|
|
2158
|
+
"legacy": true|false,
|
|
2159
|
+
"confirmations": n
|
|
2160
|
+
},
|
|
2161
|
+
"distribution_asset_name": "name",
|
|
2162
|
+
"amount": x.xxx, (numeric) gross_distribution_amount
|
|
2163
|
+
"remainder_policy": "payer"|"largest",
|
|
2164
|
+
"allocation": "holdings"|"equal",
|
|
2165
|
+
"min_held": x.xxx, (numeric) minimum holding to be eligible, 0 if none
|
|
2166
|
+
"exception_addresses": [ "address", ... ], (array) sorted, as committed in the plan hash
|
|
2167
|
+
"total_held": x.xxx, (numeric) holdings of the eligible holders
|
|
2168
|
+
"distributed": x.xxx, (numeric) sum of the payments: the funds the payer needs, before fees
|
|
2169
|
+
"remainder": x.xxx, (numeric) amount left undistributed
|
|
2170
|
+
"recipients": [ (array) payments, ordered by output script
|
|
2171
|
+
{ "address": "address", "script": "hex", "held": x.xxx, "amount": x.xxx }, ...
|
|
2172
|
+
],
|
|
2173
|
+
"zero_amount": [ { "address": "address", "held": x.xxx }, ... ], (array) holders whose share rounds to zero
|
|
2174
|
+
"excluded": [ { "address": "address", "held": x.xxx, "reason": "..." }, ... ], (array) reason: exception, burn,
|
|
2175
|
+
globally_frozen, frozen, self_revoked, missing_qualifier, below_minimum or no_weight
|
|
2176
|
+
"announcement": { (object or null) The announcement, when given
|
|
2177
|
+
"txid": "hex", "height": n, "notice": n, "minimum_notice": n (notice: blocks between announcement and snapshot)
|
|
2178
|
+
},
|
|
2179
|
+
"verifiability": "announced"|"late_announcement"|"unannounced" (string) Whether other nodes could capture the
|
|
2180
|
+
same snapshot: without an announcement made with the minimum notice (-minsnapshotnotice),
|
|
2181
|
+
recipients rely on the issuer's snapshot or on replaysnapshot
|
|
2182
|
+
"qualifier": "#TAG"|null,
|
|
2183
|
+
"report": {"hash": "hex", "txid": "hex", "height": n}|null (recipients then also show their "weight")
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
Examples:
|
|
2187
|
+
> neurai-cli getdistributionplan "TRONCO" 12345 "XNA" 1000
|
|
2188
|
+
> neurai-cli getdistributionplan "PHATSTACKS" 12345 "DIVIDENDS" 1000 "" '{"remainder":"largest"}'
|
|
2189
|
+
> neurai-cli getdistributionplan "&GRID" 12345 "XNA" 1000 "" '{"allocation":"equal","min_held":1}'
|
|
2190
|
+
> 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/
|
|
2191
|
+
**/
|
|
2192
|
+
getdistributionplan: "getdistributionplan",
|
|
2193
|
+
/** getdistributionproof {plan} "address"
|
|
2194
|
+
|
|
2195
|
+
Returns the RFC 6962 inclusion proof of one recipient of a distribution plan (NIP-048). With the plan's
|
|
2196
|
+
merkle_root it shows that the payment is part of the plan; it does not show that the amount is right or that
|
|
2197
|
+
no recipient is missing (recompute the plan for that).
|
|
2198
|
+
|
|
2199
|
+
Arguments:
|
|
2200
|
+
1. plan (object, required) The plan parameters
|
|
2201
|
+
{
|
|
2202
|
+
"asset_name": "name", (string, required) as in getdistributionplan
|
|
2203
|
+
"snapshot_height": n, (number, required)
|
|
2204
|
+
"distribution_asset_name": "name", (string, required)
|
|
2205
|
+
"amount": x.xxx, (numeric, required) gross_distribution_amount
|
|
2206
|
+
"exception_addresses": "a,b", (string, optional)
|
|
2207
|
+
"remainder": "payer"|"largest", (string, optional, default "payer")
|
|
2208
|
+
"allow_legacy_snapshot": bool, (boolean, optional, default false)
|
|
2209
|
+
"announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
2210
|
+
"qualifier": "#TAG", (string, optional) as in getdistributionplan
|
|
2211
|
+
"weights": {"address": n, ...}, (object, optional) as in getdistributionplan
|
|
2212
|
+
"report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
2213
|
+
"allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
|
|
2214
|
+
"min_held": x.xxx, (numeric, optional) as in getdistributionplan
|
|
2215
|
+
}
|
|
2216
|
+
2. "address" (string, required) A recipient of the plan
|
|
2217
|
+
|
|
2218
|
+
Result:
|
|
2219
|
+
{
|
|
2220
|
+
"plan_hash": "hex",
|
|
2221
|
+
"merkle_root": "hex",
|
|
2222
|
+
"leaf_count": n,
|
|
2223
|
+
"index": n, (number) position of the recipient in the plan
|
|
2224
|
+
"address": "address",
|
|
2225
|
+
"script": "hex",
|
|
2226
|
+
"amount": x.xxx,
|
|
2227
|
+
"leaf_hash": "hex", (string) SHA-256 of 0x00 || script || amount
|
|
2228
|
+
"path": [ "hex", ... ] (array) sibling hashes, deepest first
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
Examples:
|
|
2232
|
+
> neurai-cli getdistributionproof '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' "address"
|
|
2233
|
+
**/
|
|
2234
|
+
getdistributionproof: "getdistributionproof",
|
|
1896
2235
|
/** getgenerate
|
|
1897
2236
|
|
|
1898
2237
|
Return if the server is set to generate coins or not. The default is false.
|
|
@@ -1908,24 +2247,23 @@ var methods = {
|
|
|
1908
2247
|
**/
|
|
1909
2248
|
getgenerate: "getgenerate",
|
|
1910
2249
|
/** getibdstatus
|
|
1911
|
-
|
|
1912
2250
|
Returns header synchronization timing collected since process start.
|
|
2251
|
+
request_to_response_us includes peer response and local queueing time.
|
|
1913
2252
|
|
|
1914
2253
|
Result:
|
|
1915
2254
|
{
|
|
1916
|
-
"blocks": n,
|
|
1917
|
-
"headers": n,
|
|
1918
|
-
"header_batches": n,
|
|
1919
|
-
"headers_in_batches": n,
|
|
1920
|
-
"
|
|
1921
|
-
"
|
|
1922
|
-
"
|
|
1923
|
-
"peers": [...]
|
|
2255
|
+
"blocks": n, (numeric) current active-chain height
|
|
2256
|
+
"headers": n, (numeric) best validated header height
|
|
2257
|
+
"header_batches": n, (numeric) requested header batches received
|
|
2258
|
+
"headers_in_batches": n, (numeric) headers in those batches
|
|
2259
|
+
"average_request_to_response_us": n, (numeric) average request-to-response time
|
|
2260
|
+
"average_validation_us": n, (numeric) average local processing time
|
|
2261
|
+
"peers": [ ... ] (array) per-peer timing counters
|
|
1924
2262
|
}
|
|
1925
2263
|
|
|
1926
2264
|
Examples:
|
|
1927
2265
|
> neurai-cli getibdstatus
|
|
1928
|
-
> curl --user myusername --data-binary '{"jsonrpc":"
|
|
2266
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getibdstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1929
2267
|
**/
|
|
1930
2268
|
getibdstatus: "getibdstatus",
|
|
1931
2269
|
/** getinfo
|
|
@@ -1963,11 +2301,11 @@ var methods = {
|
|
|
1963
2301
|
Get the kawpow hash for a block given its block data
|
|
1964
2302
|
|
|
1965
2303
|
Arguments
|
|
1966
|
-
1. "header_hash" (string, required) the
|
|
1967
|
-
2. "mix_hash" (string, required) the mix hash
|
|
1968
|
-
3. "nonce" (string, required)
|
|
2304
|
+
1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
|
|
2305
|
+
2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
|
|
2306
|
+
3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
|
|
1969
2307
|
4. "height" (number, required) the height of the block data that is being hashed
|
|
1970
|
-
5. "target" (string, optional) the target
|
|
2308
|
+
5. "target" (string, optional) the target to meet (exactly 64 hex digits)
|
|
1971
2309
|
|
|
1972
2310
|
Result:
|
|
1973
2311
|
|
|
@@ -1984,6 +2322,8 @@ var methods = {
|
|
|
1984
2322
|
{ (json object)
|
|
1985
2323
|
"bip32_root_private" : (string) extended master private key,
|
|
1986
2324
|
"bip32_root_public" : (string) extended master public key,
|
|
2325
|
+
"address_type" : (string) the wallet address type (-addresstype): legacy, pq or ecdsa
|
|
2326
|
+
"strict_ecdsa_derivation_path" : (string, ecdsa wallets) account path of its witness v3 keys
|
|
1987
2327
|
"account_derivation_path" : (string) The derivation path to the account public/private keys
|
|
1988
2328
|
"external_derivation_path" : (string) The derivation path prefix for receiving addresses
|
|
1989
2329
|
"internal_derivation_path" : (string) The derivation path prefix for change addresses
|
|
@@ -2051,6 +2391,7 @@ var methods = {
|
|
|
2051
2391
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2052
2392
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2053
2393
|
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
|
|
2394
|
+
"poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
|
|
2054
2395
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2055
2396
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2056
2397
|
"transactionid", (string) parent transaction id
|
|
@@ -2091,6 +2432,7 @@ var methods = {
|
|
|
2091
2432
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2092
2433
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2093
2434
|
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
|
|
2435
|
+
"poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
|
|
2094
2436
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2095
2437
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2096
2438
|
"transactionid", (string) parent transaction id
|
|
@@ -2123,6 +2465,7 @@ var methods = {
|
|
|
2123
2465
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2124
2466
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2125
2467
|
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
|
|
2468
|
+
"poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
|
|
2126
2469
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2127
2470
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2128
2471
|
"transactionid", (string) parent transaction id
|
|
@@ -2281,7 +2624,7 @@ var methods = {
|
|
|
2281
2624
|
|
|
2282
2625
|
Arguments:
|
|
2283
2626
|
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.
|
|
2284
|
-
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
|
|
2627
|
+
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.
|
|
2285
2628
|
|
|
2286
2629
|
Result:
|
|
2287
2630
|
"address" (string) The new neurai address
|
|
@@ -2344,9 +2687,30 @@ var methods = {
|
|
|
2344
2687
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2345
2688
|
**/
|
|
2346
2689
|
getpeerinfo: "getpeerinfo",
|
|
2690
|
+
/** getprivacypoolinfo pool ( limit )
|
|
2691
|
+
|
|
2692
|
+
Read public state-thread identity and confirmed state, without registering a pool.
|
|
2693
|
+
Requires -spentindex and -txindex and readable historical transactions.
|
|
2694
|
+
pool: {"txid": birth_txid, "vout": birth_output}
|
|
2695
|
+
limit: maximum transitions to follow (default 100, maximum 1000).
|
|
2696
|
+
history_complete=false means current_state is unknown; continue with next_cursor.
|
|
2697
|
+
The reported profile describes the transport, not an audited privacy circuit.
|
|
2698
|
+
**/
|
|
2699
|
+
getprivacypoolinfo: "getprivacypoolinfo",
|
|
2700
|
+
/** getprivacypoolupdates pool ( cursor limit )
|
|
2701
|
+
|
|
2702
|
+
Return confirmed public pool transactions, including complete witnesses, in state-thread order.
|
|
2703
|
+
pool: {"txid": birth_txid, "vout": birth_output}; no registry or viewing key.
|
|
2704
|
+
cursor: null for birth, otherwise the unchanged next_cursor from a previous query.
|
|
2705
|
+
limit: maximum updates (default 100, maximum 1000); pages also have a 1 MiB raw-byte limit.
|
|
2706
|
+
Pages pin one chain snapshot; a completed cursor refreshes to the current tip.
|
|
2707
|
+
A reorganized snapshot or foreign/tampered cursor is rejected. Mempool spends are excluded.
|
|
2708
|
+
No matching successor ends this transport; it does not prove the contract is closed.
|
|
2709
|
+
**/
|
|
2710
|
+
getprivacypoolupdates: "getprivacypoolupdates",
|
|
2347
2711
|
/** getpubkey "address"
|
|
2348
2712
|
|
|
2349
|
-
Returns the public key for
|
|
2713
|
+
Returns the public key for a Legacy, AuthScript v1 or strict ECDSA address that has revealed it by spending (requires pubkeyindex to be enabled).
|
|
2350
2714
|
|
|
2351
2715
|
Arguments:
|
|
2352
2716
|
1. "address" (string, required) The Neurai address
|
|
@@ -2371,7 +2735,7 @@ var methods = {
|
|
|
2371
2735
|
This is for use with raw transactions, NOT normal use.
|
|
2372
2736
|
|
|
2373
2737
|
Arguments:
|
|
2374
|
-
1. "address_type" (string, optional) "legacy", "pq" (strict witness v2) or "ecdsa" (strict witness v3). Default: the wallet's
|
|
2738
|
+
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).
|
|
2375
2739
|
|
|
2376
2740
|
Result:
|
|
2377
2741
|
"address" (string) The address
|
|
@@ -2410,6 +2774,7 @@ var methods = {
|
|
|
2410
2774
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2411
2775
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2412
2776
|
"ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
|
|
2777
|
+
"poseidonwork" : n, (numeric) reserved Poseidon permutations for this transaction
|
|
2413
2778
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2414
2779
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2415
2780
|
"transactionid", (string) parent transaction id
|
|
@@ -2560,6 +2925,148 @@ var methods = {
|
|
|
2560
2925
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrpcinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2561
2926
|
**/
|
|
2562
2927
|
getrpcinfo: "getrpcinfo",
|
|
2928
|
+
/** getsilentpaymentcode
|
|
2929
|
+
|
|
2930
|
+
Returns the reusable silent payment code of this wallet (NIP-047).
|
|
2931
|
+
Every payment to the code lands on a new strict ECDSA (witness v3) output
|
|
2932
|
+
that only this wallet can link to the code.
|
|
2933
|
+
|
|
2934
|
+
Result:
|
|
2935
|
+
{
|
|
2936
|
+
"code": "str", (string) payment code (nsp1... / tnsp1...)
|
|
2937
|
+
"network": "str", (string) main, test or regtest
|
|
2938
|
+
"scan_pubkey": "hex", (string) B_scan
|
|
2939
|
+
"spend_pubkey": "hex", (string) B_spend
|
|
2940
|
+
"view_only": true|false (boolean) imported view key: payments are detected, not spendable
|
|
2941
|
+
"verified": true (boolean) checked against the wallet seed in this session. An encrypted
|
|
2942
|
+
wallet shows its code only after one unlock in the session
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
Examples:
|
|
2946
|
+
> neurai-cli getsilentpaymentcode
|
|
2947
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentcode", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2948
|
+
**/
|
|
2949
|
+
getsilentpaymentcode: "getsilentpaymentcode",
|
|
2950
|
+
/** getsilentpaymentindexinfo
|
|
2951
|
+
|
|
2952
|
+
State of the NIP-047 silent payment index (-silentpaymentindex).
|
|
2953
|
+
|
|
2954
|
+
Result:
|
|
2955
|
+
{
|
|
2956
|
+
"enabled" : true|false, (boolean) whether the node maintains the index
|
|
2957
|
+
"state" : "str", (string) disabled, ready or incomplete (records missing and their blocks pruned)
|
|
2958
|
+
"schema" : n, (numeric) storage schema of the records
|
|
2959
|
+
"formats" : [n,...], (array) public formats served
|
|
2960
|
+
"context" : "hex", (string) NIP-047 context N: network id, genesis, profile and family
|
|
2961
|
+
"start_height" : n, (numeric) first indexed height: max(1, strict AuthScript activation)
|
|
2962
|
+
"synced_height" : n, (numeric) every active block from start_height to this height has a record
|
|
2963
|
+
"synced_hash" : "hash", (string) hash of the block at synced_height
|
|
2964
|
+
"complete" : true|false, (boolean) ready and synced up to the tip
|
|
2965
|
+
"missing" : [[n,n],...], (array) height ranges without a record or block data to rebuild it
|
|
2966
|
+
"pruned" : true|false (boolean) whether the node has deleted block files
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
Examples:
|
|
2970
|
+
> neurai-cli getsilentpaymentindexinfo
|
|
2971
|
+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsilentpaymentindexinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2972
|
+
**/
|
|
2973
|
+
getsilentpaymentindexinfo: "getsilentpaymentindexinfo",
|
|
2974
|
+
/** getsilentpaymentinfo
|
|
2975
|
+
|
|
2976
|
+
Returns the silent payment scanning state of this wallet.
|
|
2977
|
+
|
|
2978
|
+
Result:
|
|
2979
|
+
{
|
|
2980
|
+
"enabled": true|false, (boolean) the wallet has an identity (own or view key)
|
|
2981
|
+
"view_only": true|false,
|
|
2982
|
+
"code": "str", (string) once checked against the seed in this session and while
|
|
2983
|
+
the identity is sound
|
|
2984
|
+
"code_verified": true|false,(boolean) code checked against the seed in this session
|
|
2985
|
+
"identity_error": "str", (string) damaged identity: the code must not be used
|
|
2986
|
+
"paused": true|false, (boolean) locked wallet: scanning waits for walletpassphrase
|
|
2987
|
+
"scanned_height": n, (numeric) last block really scanned (-1: none)
|
|
2988
|
+
"scanned_hash": "hex",
|
|
2989
|
+
"tip_height": n,
|
|
2990
|
+
"blocks_behind": n,
|
|
2991
|
+
"error": "str", (string) why scanning stopped (missing block or undo data)
|
|
2992
|
+
"payments": n
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
Examples:
|
|
2996
|
+
> neurai-cli getsilentpaymentinfo
|
|
2997
|
+
**/
|
|
2998
|
+
getsilentpaymentinfo: "getsilentpaymentinfo",
|
|
2999
|
+
/** getsilentpaymenttweaks "blockhash" ( "encoding" )
|
|
3000
|
+
|
|
3001
|
+
NIP-047 light client data of one block: every eligible transaction with a native v3 output,
|
|
3002
|
+
its public tweak T = h*A and all its native v3 outputs, plus every native v3 output the block spends.
|
|
3003
|
+
A receiver computes b_scan*T for each entry; the node learns nothing about it.
|
|
3004
|
+
Requires -silentpaymentindex.
|
|
3005
|
+
|
|
3006
|
+
Arguments:
|
|
3007
|
+
1. "blockhash" (string, required) the block hash
|
|
3008
|
+
2. "encoding" (string, optional, default=json) json, or hex for the binary message of type 1
|
|
3009
|
+
|
|
3010
|
+
Result (json):
|
|
3011
|
+
{
|
|
3012
|
+
"format" : 1,
|
|
3013
|
+
"context" : "hex", (string) NIP-047 context N
|
|
3014
|
+
"block" : { (object) immutable for this block hash
|
|
3015
|
+
"height" : n,
|
|
3016
|
+
"hash" : "hash",
|
|
3017
|
+
"prev" : "hash",
|
|
3018
|
+
"entries" : [
|
|
3019
|
+
{
|
|
3020
|
+
"txid" : "hex",
|
|
3021
|
+
"tweak" : "hex", (string) 33-byte compressed point T
|
|
3022
|
+
"outputs" : [{ "vout" : n, "commitment" : "hex", "value_sat" : "n" },...]
|
|
3023
|
+
},...
|
|
3024
|
+
],
|
|
3025
|
+
"spent" : [{ "txid" : "hex", "vout" : n },...],
|
|
3026
|
+
"digest" : "hex" (string) tagged hash of the canonical block bytes
|
|
3027
|
+
},
|
|
3028
|
+
"in_active_chain" : true|false
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
Result (hex):
|
|
3032
|
+
"hex" (string) binary message of type 1
|
|
3033
|
+
|
|
3034
|
+
Examples:
|
|
3035
|
+
> neurai-cli getsilentpaymenttweaks "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
|
|
3036
|
+
> 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/
|
|
3037
|
+
**/
|
|
3038
|
+
getsilentpaymenttweaks: "getsilentpaymenttweaks",
|
|
3039
|
+
/** getsilentpaymenttweaksrange start_height count ( "anchor_hash" "encoding" )
|
|
3040
|
+
|
|
3041
|
+
NIP-047 light client data of consecutive blocks of the active chain, as getsilentpaymenttweaks.
|
|
3042
|
+
The blocks come from one snapshot of the active chain. Whole blocks only: at least one, up to
|
|
3043
|
+
1000 blocks and 4 MB. Requires -silentpaymentindex.
|
|
3044
|
+
|
|
3045
|
+
Arguments:
|
|
3046
|
+
1. start_height (numeric, required) first height, from start_height of getsilentpaymentindexinfo
|
|
3047
|
+
up to the tip + 1 (an empty answer with status "tip")
|
|
3048
|
+
2. count (numeric, required) number of blocks wanted
|
|
3049
|
+
3. "anchor_hash" (string, optional) hash the client has at start_height - 1. If it left the active
|
|
3050
|
+
chain the answer is {"reorg": true, "fork_height": n}: continue from fork_height + 1
|
|
3051
|
+
4. "encoding" (string, optional, default=json) json, or hex for the binary message of type 2
|
|
3052
|
+
|
|
3053
|
+
Result (json):
|
|
3054
|
+
{
|
|
3055
|
+
"format" : 1,
|
|
3056
|
+
"context" : "hex",
|
|
3057
|
+
"snapshot" : { "height" : n, "hash" : "hash" }, (object) tip when the request was served
|
|
3058
|
+
"synced_height" : n,
|
|
3059
|
+
"blocks" : [ {...},... ], (array) as "block" in getsilentpaymenttweaks
|
|
3060
|
+
"next_height" : n, (numeric) height after the last block returned
|
|
3061
|
+
"status" : "str" (string) more: ask again now; tip: wait for a new block;
|
|
3062
|
+
incomplete: the index lacks data from next_height
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
Examples:
|
|
3066
|
+
> neurai-cli getsilentpaymenttweaksrange 1000 100
|
|
3067
|
+
> 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/
|
|
3068
|
+
**/
|
|
3069
|
+
getsilentpaymenttweaksrange: "getsilentpaymenttweaksrange",
|
|
2563
3070
|
/** getsnapshot "asset_name" block_height
|
|
2564
3071
|
|
|
2565
3072
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
@@ -2575,10 +3082,17 @@ var methods = {
|
|
|
2575
3082
|
{
|
|
2576
3083
|
name: (string),
|
|
2577
3084
|
height: (number),
|
|
3085
|
+
block_hash: (string) the block the snapshot was captured on; empty for a legacy snapshot
|
|
3086
|
+
snapshot_hash: (string) commitment to the snapshot content (NIP-048); empty for a legacy snapshot
|
|
3087
|
+
format: (number) 0 legacy, 1 bound to its block, 2 also with holder state (NIP-048 D3)
|
|
3088
|
+
global_frozen: (bool, format 2) the asset was globally frozen
|
|
2578
3089
|
owners: [
|
|
2579
3090
|
{
|
|
2580
3091
|
address: (string),
|
|
2581
3092
|
amount_owned: (number),
|
|
3093
|
+
frozen: (bool, format 2) frozen for the asset (restricted asset or DEPIN owner freeze)
|
|
3094
|
+
self_revoked: (bool, format 2) a DEPIN holder that revoked itself
|
|
3095
|
+
tags: [ (string), ... ] (format 2) qualifier tags of the address
|
|
2582
3096
|
}
|
|
2583
3097
|
}
|
|
2584
3098
|
|
|
@@ -2586,6 +3100,64 @@ var methods = {
|
|
|
2586
3100
|
> 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/
|
|
2587
3101
|
**/
|
|
2588
3102
|
getsnapshot: "getsnapshot",
|
|
3103
|
+
/** getsnapshotannouncement "asset_name" snapshot_height
|
|
3104
|
+
|
|
3105
|
+
Returns the message that announces a snapshot height before the chain reaches it (NIP-048). The holder of the
|
|
3106
|
+
owner token sends it to itself with that message, for instance:
|
|
3107
|
+
transfer "ASSET!" 1 "owner_token_address" "message"
|
|
3108
|
+
Other nodes that see the announcement request the same snapshot and can check the plan independently.
|
|
3109
|
+
A plan names the announcement with its "announcement" option.
|
|
3110
|
+
|
|
3111
|
+
Arguments:
|
|
3112
|
+
1. "asset_name" (string, required) The asset whose holders will be snapshotted
|
|
3113
|
+
2. snapshot_height (number, required) The future snapshot height
|
|
3114
|
+
|
|
3115
|
+
Result:
|
|
3116
|
+
{
|
|
3117
|
+
"asset_name": "name",
|
|
3118
|
+
"snapshot_height": n,
|
|
3119
|
+
"owner_token": "name", (string) the token that must carry the message
|
|
3120
|
+
"message": "hex", (string) SHA-256 of 0x05 || network || asset || height
|
|
3121
|
+
"minimum_notice": n, (number) blocks the announcement must precede the height (-minsnapshotnotice)
|
|
3122
|
+
"notice_if_mined_next": n (number) the notice if the announcement is mined in the next block
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
Examples:
|
|
3126
|
+
> neurai-cli getsnapshotannouncement "TRONCO" 12345
|
|
3127
|
+
**/
|
|
3128
|
+
getsnapshotannouncement: "getsnapshotannouncement",
|
|
3129
|
+
/** getsnapshotrecipients "asset_name" snapshot_height
|
|
3130
|
+
|
|
3131
|
+
The holders in a snapshot with what an encrypted bulletin to them needs (NIP-048 D5). Encryption follows DePIN
|
|
3132
|
+
messaging: a holder is ready when its address is P2PKH or strict ECDSA and its public key is in -pubkeyindex.
|
|
3133
|
+
The others are listed too, so no holder is skipped silently. Needs -pubkeyindex.
|
|
3134
|
+
|
|
3135
|
+
Arguments:
|
|
3136
|
+
1. "asset_name" (string, required) The asset of the snapshot
|
|
3137
|
+
2. snapshot_height (number, required) The snapshot height
|
|
3138
|
+
|
|
3139
|
+
Result:
|
|
3140
|
+
{
|
|
3141
|
+
"asset_name": "name",
|
|
3142
|
+
"height": n,
|
|
3143
|
+
"block_hash": "hash",
|
|
3144
|
+
"snapshot_hash": "hex",
|
|
3145
|
+
"ready": n, "key_not_revealed": n, "unsupported_type": n,
|
|
3146
|
+
"holders": [
|
|
3147
|
+
{
|
|
3148
|
+
"address": "address",
|
|
3149
|
+
"held": x.xxx,
|
|
3150
|
+
"state": "ready"|"key_not_revealed"|"unsupported_type",
|
|
3151
|
+
"pubkey": "hex", (string, when ready)
|
|
3152
|
+
"frozen": bool, "self_revoked": bool (snapshots with holder state)
|
|
3153
|
+
}, ...
|
|
3154
|
+
]
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
Examples:
|
|
3158
|
+
> neurai-cli getsnapshotrecipients "&TOKEN" 12345
|
|
3159
|
+
**/
|
|
3160
|
+
getsnapshotrecipients: "getsnapshotrecipients",
|
|
2589
3161
|
/** getsnapshotrequest "asset_name" block_height
|
|
2590
3162
|
|
|
2591
3163
|
Retrieves the specified snapshot request details.
|
|
@@ -2647,8 +3219,6 @@ var methods = {
|
|
|
2647
3219
|
"txid" : "transactionid", (string) The transaction id.
|
|
2648
3220
|
"time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
|
|
2649
3221
|
"timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
|
|
2650
|
-
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
|
|
2651
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
2652
3222
|
"details" : [
|
|
2653
3223
|
{
|
|
2654
3224
|
"account" : "accountname", (string) DEPRECATED. The account name involved in the transaction, can be "" for the default account.
|
|
@@ -2795,6 +3365,7 @@ var methods = {
|
|
|
2795
3365
|
{
|
|
2796
3366
|
"walletname": xxxxx, (string) the wallet name
|
|
2797
3367
|
"walletversion": xxxxx, (numeric) the wallet version
|
|
3368
|
+
"addresstype": "type", (string) the address type fixed when the wallet was created (-addresstype): legacy, pq or ecdsa
|
|
2798
3369
|
"balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in XNA
|
|
2799
3370
|
"unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in XNA
|
|
2800
3371
|
"immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in XNA
|
|
@@ -2833,6 +3404,7 @@ var methods = {
|
|
|
2833
3404
|
2. "label" (string, optional, default="") An optional label
|
|
2834
3405
|
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
|
|
2835
3406
|
4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well
|
|
3407
|
+
If the wallet already has the keys, registering the redeem script can make its P2SH output spendable.
|
|
2836
3408
|
|
|
2837
3409
|
Note: This call can take minutes to complete if rescan is true.
|
|
2838
3410
|
If you have the full public key, you should call importpubkey instead of this.
|
|
@@ -2950,6 +3522,28 @@ var methods = {
|
|
|
2950
3522
|
> 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/
|
|
2951
3523
|
**/
|
|
2952
3524
|
importpubkey: "importpubkey",
|
|
3525
|
+
/** importsilentpaymentviewkey "scan_private_key" "spend_pubkey" ( start_height )
|
|
3526
|
+
|
|
3527
|
+
Turns this wallet into a watch wallet of a silent payment code: payments are
|
|
3528
|
+
detected and shown as watch-only, never spendable. Only for an unencrypted wallet
|
|
3529
|
+
without its own silent payment identity (or whose stored view key is damaged); the wallet
|
|
3530
|
+
can no longer be encrypted. Pass the secret with "neurai-cli -stdin importsilentpaymentviewkey"
|
|
3531
|
+
(one argument per line) so it stays out of the shell history and the process list.
|
|
3532
|
+
|
|
3533
|
+
Arguments:
|
|
3534
|
+
1. "scan_private_key" (string, required) hex b_scan
|
|
3535
|
+
2. "spend_pubkey" (string, required) hex B_spend
|
|
3536
|
+
3. start_height (numeric, optional, default=0) first block to scan
|
|
3537
|
+
|
|
3538
|
+
Result:
|
|
3539
|
+
{
|
|
3540
|
+
"code": "str", "scanned_height": n, "found": n
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
Examples:
|
|
3544
|
+
> neurai-cli importsilentpaymentviewkey "<hex>" "<hex>" 0
|
|
3545
|
+
**/
|
|
3546
|
+
importsilentpaymentviewkey: "importsilentpaymentviewkey",
|
|
2953
3547
|
/** importwallet "filename"
|
|
2954
3548
|
|
|
2955
3549
|
Imports keys from a wallet dump file (see dumpwallet).
|
|
@@ -3334,6 +3928,7 @@ var methods = {
|
|
|
3334
3928
|
{
|
|
3335
3929
|
"address": "address", (string) The Neurai address
|
|
3336
3930
|
"pubkey": "pubkey_hex" (string) The public key in hex format
|
|
3931
|
+
"valid": 1|0 (numeric) 1 = active/valid, 0 = blocked/revoked (only meaningful for DEPIN assets; always 1 for regular assets)
|
|
3337
3932
|
},
|
|
3338
3933
|
...
|
|
3339
3934
|
]
|
|
@@ -3471,7 +4066,7 @@ var methods = {
|
|
|
3471
4066
|
|
|
3472
4067
|
Result:
|
|
3473
4068
|
[ (json array of strings)
|
|
3474
|
-
"address" (string) A
|
|
4069
|
+
"address" (string) A strict post-quantum (witness v2) address of a PQ key (pq1.../tpq1...)
|
|
3475
4070
|
...
|
|
3476
4071
|
]
|
|
3477
4072
|
|
|
@@ -3539,6 +4134,24 @@ var methods = {
|
|
|
3539
4134
|
> 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/
|
|
3540
4135
|
**/
|
|
3541
4136
|
listreceivedbyaddress: "listreceivedbyaddress",
|
|
4137
|
+
/** listsilentpayments ( include_spent )
|
|
4138
|
+
|
|
4139
|
+
Lists the silent payments received by this wallet.
|
|
4140
|
+
|
|
4141
|
+
Arguments:
|
|
4142
|
+
1. include_spent (boolean, optional, default=true)
|
|
4143
|
+
|
|
4144
|
+
Result:
|
|
4145
|
+
[{
|
|
4146
|
+
"txid": "hex", "vout": n, "k": n, "amount": x.xxx, "address": "str",
|
|
4147
|
+
"status": "pending|unconfirmed|confirmed|spent|conflicted|abandoned|other_chain|unknown",
|
|
4148
|
+
"confirmations": n, "blockhash": "hex", "height": n, "view_only": true|false
|
|
4149
|
+
}, ...]
|
|
4150
|
+
|
|
4151
|
+
Examples:
|
|
4152
|
+
> neurai-cli listsilentpayments
|
|
4153
|
+
**/
|
|
4154
|
+
listsilentpayments: "listsilentpayments",
|
|
3542
4155
|
/** listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
|
|
3543
4156
|
|
|
3544
4157
|
Get all transactions in blocks since block [blockhash], or all transactions if omitted.
|
|
@@ -3570,8 +4183,6 @@ var methods = {
|
|
|
3570
4183
|
"txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
|
|
3571
4184
|
"time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
|
|
3572
4185
|
"timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
|
|
3573
|
-
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
|
|
3574
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
3575
4186
|
"abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
|
|
3576
4187
|
"comment": "...", (string) If a comment is associated with the transaction.
|
|
3577
4188
|
"label" : "label" (string) A comment for the address/transaction, if any
|
|
@@ -3676,8 +4287,6 @@ var methods = {
|
|
|
3676
4287
|
"otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
|
|
3677
4288
|
from (for receiving funds, positive amounts), or went to (for sending funds,
|
|
3678
4289
|
negative amounts).
|
|
3679
|
-
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
|
|
3680
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
3681
4290
|
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
|
|
3682
4291
|
'send' category of transactions.
|
|
3683
4292
|
}
|
|
@@ -3830,6 +4439,28 @@ var methods = {
|
|
|
3830
4439
|
> 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/
|
|
3831
4440
|
**/
|
|
3832
4441
|
move: "move",
|
|
4442
|
+
/** opendepin "asset_name" ("change_address")
|
|
4443
|
+
|
|
4444
|
+
THIS COMMAND IS NOT YET ACTIVE!
|
|
4445
|
+
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
4446
|
+
|
|
4447
|
+
Open transfers of a DEPIN asset (owner only): while open, holders can move
|
|
4448
|
+
the asset like a regular asset without the owner token. Transfers from addresses
|
|
4449
|
+
frozen by the owner or self-revoked stay rejected. Valid from the closed state;
|
|
4450
|
+
takes effect from the block after the one that confirms it.
|
|
4451
|
+
|
|
4452
|
+
Arguments:
|
|
4453
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
4454
|
+
2. "change_address" (string, optional) The change address for the owner token
|
|
4455
|
+
|
|
4456
|
+
Result:
|
|
4457
|
+
"txid" (string) The transaction id
|
|
4458
|
+
|
|
4459
|
+
Examples:
|
|
4460
|
+
> neurai-cli opendepin "&FRANCE"
|
|
4461
|
+
> 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/
|
|
4462
|
+
**/
|
|
4463
|
+
opendepin: "opendepin",
|
|
3833
4464
|
/** ping
|
|
3834
4465
|
|
|
3835
4466
|
Requests that a ping be sent to all other nodes, to measure ping time.
|
|
@@ -3846,15 +4477,15 @@ var methods = {
|
|
|
3846
4477
|
Attempts to submit new block to network mined by kawpow gpu miner via rpc.
|
|
3847
4478
|
|
|
3848
4479
|
Arguments
|
|
3849
|
-
1. "header_hash" (string, required) the
|
|
3850
|
-
2. "mix_hash" (string, required) the mix hash
|
|
3851
|
-
3. "nonce" (string, required)
|
|
4480
|
+
1. "header_hash" (string, required) the header hash given to the GPU miner (exactly 64 hex digits)
|
|
4481
|
+
2. "mix_hash" (string, required) the mix hash mined by the GPU miner (exactly 64 hex digits)
|
|
4482
|
+
3. "nonce" (string, required) 1 to 16 hex digits, optionally prefixed with 0x
|
|
3852
4483
|
|
|
3853
4484
|
Result:
|
|
3854
4485
|
|
|
3855
4486
|
Examples:
|
|
3856
|
-
> neurai-cli pprpcsb "header_hash" "mix_hash"
|
|
3857
|
-
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pprpcsb", "params": ["header_hash" "mix_hash"
|
|
4487
|
+
> neurai-cli pprpcsb "header_hash" "mix_hash" "0x100000"
|
|
4488
|
+
> 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/
|
|
3858
4489
|
**/
|
|
3859
4490
|
pprpcsb: "pprpcsb",
|
|
3860
4491
|
/** preciousblock "blockhash"
|
|
@@ -4022,9 +4653,54 @@ var methods = {
|
|
|
4022
4653
|
> 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/
|
|
4023
4654
|
**/
|
|
4024
4655
|
removetagfromaddress: "removetagfromaddress",
|
|
4656
|
+
/** repairsilentpaymentidentity
|
|
4657
|
+
|
|
4658
|
+
Rewrites the silent payment code of this wallet from its seed after an identity failure
|
|
4659
|
+
("stored silent payment code does not match the wallet seed"). Payments sent to the
|
|
4660
|
+
replaced code did not reach this wallet: check your backups before repairing.
|
|
4661
|
+
|
|
4662
|
+
Result:
|
|
4663
|
+
{
|
|
4664
|
+
"previous_code": "str", (string) the code that was stored (do not use it)
|
|
4665
|
+
"code": "str" (string) the code derived from the seed
|
|
4666
|
+
}
|
|
4667
|
+
|
|
4668
|
+
Examples:
|
|
4669
|
+
> neurai-cli repairsilentpaymentidentity
|
|
4670
|
+
**/
|
|
4671
|
+
repairsilentpaymentidentity: "repairsilentpaymentidentity",
|
|
4672
|
+
/** replaysnapshot "asset_name" snapshot_height ( "expected_snapshot_hash" )
|
|
4673
|
+
|
|
4674
|
+
Rebuilds the holders of an asset at a height from the blocks and their undo data, without using any snapshot,
|
|
4675
|
+
and returns the snapshot hash they give (NIP-048). A node that did not capture the snapshot can so check a
|
|
4676
|
+
plan's snapshot_hash. It reads every block from asset activation to the height: it is slow, and a pruned node
|
|
4677
|
+
cannot do it.
|
|
4678
|
+
|
|
4679
|
+
Arguments:
|
|
4680
|
+
1. "asset_name" (string, required) The asset
|
|
4681
|
+
2. snapshot_height (number, required) The height to rebuild
|
|
4682
|
+
3. "expected_snapshot_hash" (string, optional) A snapshot_hash to compare with, for instance from a plan
|
|
4683
|
+
|
|
4684
|
+
Result:
|
|
4685
|
+
{
|
|
4686
|
+
"asset_name": "name",
|
|
4687
|
+
"height": n,
|
|
4688
|
+
"block_hash": "hash",
|
|
4689
|
+
"snapshot_hash": "hex", (string) as in getsnapshot and getdistributionplan
|
|
4690
|
+
"holders": n,
|
|
4691
|
+
"scanned_blocks": n,
|
|
4692
|
+
"matches_stored": true|false|null, (null: this node holds no snapshot at that height)
|
|
4693
|
+
"matches_expected": true|false|null (null: no expected hash given)
|
|
4694
|
+
}
|
|
4695
|
+
|
|
4696
|
+
Examples:
|
|
4697
|
+
> neurai-cli replaysnapshot "TRONCO" 12345
|
|
4698
|
+
**/
|
|
4699
|
+
replaysnapshot: "replaysnapshot",
|
|
4025
4700
|
/** requestsnapshot "asset_name" block_height
|
|
4026
4701
|
|
|
4027
|
-
Schedules a snapshot of the specified asset at the specified block height.
|
|
4702
|
+
Schedules a snapshot of the specified asset at the specified block height. The node captures it while it
|
|
4703
|
+
connects that block, so at most -maxsnapshotrequests different assets are accepted at one height.
|
|
4028
4704
|
|
|
4029
4705
|
Arguments:
|
|
4030
4706
|
1. "asset_name" (string, required) The asset name for which the snapshot will be taken
|
|
@@ -4059,6 +4735,24 @@ var methods = {
|
|
|
4059
4735
|
> 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/
|
|
4060
4736
|
**/
|
|
4061
4737
|
rescanblockchain: "rescanblockchain",
|
|
4738
|
+
/** rescansilentpayments ( start_height )
|
|
4739
|
+
|
|
4740
|
+
Scans the active chain again for silent payments, from start_height to the tip.
|
|
4741
|
+
Reads blocks and their undo data; -txindex is not needed. Scanning stops, without
|
|
4742
|
+
advancing past it, at the first block whose data is not available (pruned node).
|
|
4743
|
+
|
|
4744
|
+
Arguments:
|
|
4745
|
+
1. start_height (numeric, optional, default=0)
|
|
4746
|
+
|
|
4747
|
+
Result:
|
|
4748
|
+
{
|
|
4749
|
+
"start_height": n, "scanned_height": n, "found": n
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
Examples:
|
|
4753
|
+
> neurai-cli rescansilentpayments 100
|
|
4754
|
+
**/
|
|
4755
|
+
rescansilentpayments: "rescansilentpayments",
|
|
4062
4756
|
/** savemempool
|
|
4063
4757
|
|
|
4064
4758
|
Dumps the mempool to disk.
|
|
@@ -4068,6 +4762,28 @@ var methods = {
|
|
|
4068
4762
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4069
4763
|
**/
|
|
4070
4764
|
savemempool: "savemempool",
|
|
4765
|
+
/** sealdepin "asset_name" ("change_address")
|
|
4766
|
+
|
|
4767
|
+
THIS COMMAND IS NOT YET ACTIVE!
|
|
4768
|
+
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
4769
|
+
|
|
4770
|
+
Seal a DEPIN asset (owner only). WARNING: THIS IS IRREVERSIBLE.
|
|
4771
|
+
A sealed asset is soulbound like a closed one, but no transfer state operation
|
|
4772
|
+
(open, close or seal) is ever accepted for it again. Only valid from the closed
|
|
4773
|
+
state: an open asset must be closed first.
|
|
4774
|
+
|
|
4775
|
+
Arguments:
|
|
4776
|
+
1. "asset_name" (string, required) The DEPIN asset name (must start with &)
|
|
4777
|
+
2. "change_address" (string, optional) The change address for the owner token
|
|
4778
|
+
|
|
4779
|
+
Result:
|
|
4780
|
+
"txid" (string) The transaction id
|
|
4781
|
+
|
|
4782
|
+
Examples:
|
|
4783
|
+
> neurai-cli sealdepin "&FRANCE"
|
|
4784
|
+
> 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/
|
|
4785
|
+
**/
|
|
4786
|
+
sealdepin: "sealdepin",
|
|
4071
4787
|
/** selfrevokedepin "asset_name"
|
|
4072
4788
|
|
|
4073
4789
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
@@ -4135,7 +4851,7 @@ var methods = {
|
|
|
4135
4851
|
> 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/
|
|
4136
4852
|
**/
|
|
4137
4853
|
sendfrom: "sendfrom",
|
|
4138
|
-
/** sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount
|
|
4854
|
+
/** sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
|
|
4139
4855
|
|
|
4140
4856
|
Send an amount from a specific address to a given address. All xna change will get sent back to the from_address
|
|
4141
4857
|
|
|
@@ -4166,7 +4882,7 @@ var methods = {
|
|
|
4166
4882
|
> 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/
|
|
4167
4883
|
**/
|
|
4168
4884
|
sendfromaddress: "sendfromaddress",
|
|
4169
|
-
/** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...]
|
|
4885
|
+
/** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] conf_target "estimate_mode")
|
|
4170
4886
|
|
|
4171
4887
|
Send multiple times. Amounts are double-precision floating point numbers.
|
|
4172
4888
|
|
|
@@ -4259,7 +4975,29 @@ var methods = {
|
|
|
4259
4975
|
> 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/
|
|
4260
4976
|
**/
|
|
4261
4977
|
sendrawtransaction: "sendrawtransaction",
|
|
4262
|
-
/**
|
|
4978
|
+
/** sendsilentpayments [{"code":"str","amount":x},...] ( conf_target "estimate_mode" )
|
|
4979
|
+
|
|
4980
|
+
Pays one or more silent payment codes from strict ECDSA (v3) coins only.
|
|
4981
|
+
Several payments to the same code are allowed (up to 16 per code); the change
|
|
4982
|
+
returns to a new internal v3 address.
|
|
4983
|
+
|
|
4984
|
+
Arguments:
|
|
4985
|
+
1. payments (array, required) [{"code": payment code, "amount": amount in XNA}, ...]
|
|
4986
|
+
2. conf_target (numeric, optional) Confirmation target (in blocks)
|
|
4987
|
+
3. "estimate_mode" (string, optional, default=UNSET) UNSET, ECONOMICAL or CONSERVATIVE
|
|
4988
|
+
|
|
4989
|
+
Result:
|
|
4990
|
+
{
|
|
4991
|
+
"txid": "hex",
|
|
4992
|
+
"fee": x.xxx,
|
|
4993
|
+
"payments": [{"code": "str", "amount": x.xxx, "vout": n, "k": n}, ...]
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4996
|
+
Examples:
|
|
4997
|
+
> neurai-cli sendsilentpayments '[{"code":"tnsp1q...","amount":1.5}]'
|
|
4998
|
+
**/
|
|
4999
|
+
sendsilentpayments: "sendsilentpayments",
|
|
5000
|
+
/** sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount conf_target "estimate_mode")
|
|
4263
5001
|
|
|
4264
5002
|
Send an amount to a given address.
|
|
4265
5003
|
|
|
@@ -4473,8 +5211,7 @@ var methods = {
|
|
|
4473
5211
|
signrawtransaction: "signrawtransaction",
|
|
4474
5212
|
/** stop
|
|
4475
5213
|
|
|
4476
|
-
Stop Neurai server
|
|
4477
|
-
**/
|
|
5214
|
+
Stop Neurai server.**/
|
|
4478
5215
|
stop: "stop",
|
|
4479
5216
|
/** submitblock "hexdata" ( "dummy" )
|
|
4480
5217
|
|
|
@@ -4805,6 +5542,73 @@ var methods = {
|
|
|
4805
5542
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4806
5543
|
**/
|
|
4807
5544
|
verifychain: "verifychain",
|
|
5545
|
+
/** verifydistribution {plan} [batches] ( {options} )
|
|
5546
|
+
|
|
5547
|
+
Classifies the batches of a distribution plan from the operator's batch records (NIP-048): every signed
|
|
5548
|
+
version of each batch. Nothing is broadcast, rebuilt or spent.
|
|
5549
|
+
confirmed a version that pays the batch has the required confirmations
|
|
5550
|
+
confirming a version is in the active chain with fewer confirmations; its recipients stay reserved
|
|
5551
|
+
pending a version is in the mempool, or is signed and all its inputs are unspent; rebroadcast it
|
|
5552
|
+
conflicting every version has an input spent by another transaction (needs -txindex to tell apart
|
|
5553
|
+
from a confirmed version whose outputs were all spent)
|
|
5554
|
+
unknown no recorded version, or the node cannot tell; review before building anything
|
|
5555
|
+
|
|
5556
|
+
Arguments:
|
|
5557
|
+
1. plan (object, required) The plan parameters
|
|
5558
|
+
{
|
|
5559
|
+
"asset_name": "name", (string, required) as in getdistributionplan
|
|
5560
|
+
"snapshot_height": n, (number, required)
|
|
5561
|
+
"distribution_asset_name": "name", (string, required)
|
|
5562
|
+
"amount": x.xxx, (numeric, required) gross_distribution_amount
|
|
5563
|
+
"exception_addresses": "a,b", (string, optional)
|
|
5564
|
+
"remainder": "payer"|"largest", (string, optional, default "payer")
|
|
5565
|
+
"allow_legacy_snapshot": bool, (boolean, optional, default false)
|
|
5566
|
+
"announcement": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
5567
|
+
"qualifier": "#TAG", (string, optional) as in getdistributionplan
|
|
5568
|
+
"weights": {"address": n, ...}, (object, optional) as in getdistributionplan
|
|
5569
|
+
"report": {"txid": "hex", "block_hash": "hex"} (object, optional) as in getdistributionplan
|
|
5570
|
+
"allocation": "holdings"|"equal", (string, optional, default "holdings") as in getdistributionplan
|
|
5571
|
+
"min_held": x.xxx, (numeric, optional) as in getdistributionplan
|
|
5572
|
+
}
|
|
5573
|
+
2. batches (array, required) The operator's batch records
|
|
5574
|
+
[
|
|
5575
|
+
{
|
|
5576
|
+
"index": n, (number, required) batch index
|
|
5577
|
+
"versions": [ (array, required) every signed version, as hex or as
|
|
5578
|
+
"hex" | { "hex": "hex", "block_hash": "hash" }, ... an object with the block it was seen in
|
|
5579
|
+
]
|
|
5580
|
+
}, ...
|
|
5581
|
+
]
|
|
5582
|
+
3. options (object, optional)
|
|
5583
|
+
{
|
|
5584
|
+
"max_outputs": n, (number, default 500) batch size used to build the batches
|
|
5585
|
+
"confirmations": n (number, default 6) confirmations a batch needs to count as paid
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
Result:
|
|
5589
|
+
{
|
|
5590
|
+
"plan_hash": "hex",
|
|
5591
|
+
"complete": true|false, (boolean) every batch is confirmed
|
|
5592
|
+
"paid": x.xxx, (numeric) amount in confirmed batches
|
|
5593
|
+
"reserved": x.xxx, (numeric) amount in confirming and pending batches
|
|
5594
|
+
"unpaid": x.xxx, (numeric) amount in conflicting and unknown batches
|
|
5595
|
+
"batches": [
|
|
5596
|
+
{
|
|
5597
|
+
"index": n,
|
|
5598
|
+
"batch_id": "hex",
|
|
5599
|
+
"state": "confirmed"|"confirming"|"pending"|"conflicting"|"unknown",
|
|
5600
|
+
"txid": "hex", (string, optional) the version that decides the state
|
|
5601
|
+
"confirmations": n, (number, optional)
|
|
5602
|
+
"amount": x.xxx,
|
|
5603
|
+
"issues": [ "text", ... ]
|
|
5604
|
+
}, ...
|
|
5605
|
+
]
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
Examples:
|
|
5609
|
+
> neurai-cli verifydistribution '{"asset_name":"TRONCO","snapshot_height":12345,"distribution_asset_name":"XNA","amount":1000}' '[{"index":0,"versions":["0200..."]}]'
|
|
5610
|
+
**/
|
|
5611
|
+
verifydistribution: "verifydistribution",
|
|
4808
5612
|
/** verifymessage "address" "signature" "message"
|
|
4809
5613
|
|
|
4810
5614
|
Verify a signed message
|