@neuraiproject/neurai-rpc 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/DEPIN_EXAMPLES.md +45 -127
- package/DEPIN_IMPLEMENTATION_GUIDE_EN.md +19 -93
- package/README.md +29 -113
- package/depin.ts +144 -0
- package/dist/index.cjs +1223 -409
- package/dist/index.d.cts +94 -5
- package/dist/index.d.ts +94 -5
- package/dist/index.mjs +1217 -409
- package/docs.json +223 -198
- package/docs.ts +2425 -1633
- package/index.ts +44 -39
- package/json.ts +29 -0
- package/neurai_methods.md +1654 -954
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ var methods = {
|
|
|
31
31
|
> neurai-cli importprivkey "mykey"
|
|
32
32
|
|
|
33
33
|
Abort the running wallet rescan
|
|
34
|
-
> neurai-cli abortrescan
|
|
34
|
+
> neurai-cli abortrescan
|
|
35
35
|
|
|
36
36
|
As a JSON-RPC call
|
|
37
37
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
@@ -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.
|
|
@@ -234,7 +231,7 @@ var methods = {
|
|
|
234
231
|
Clear all banned IPs.
|
|
235
232
|
|
|
236
233
|
Examples:
|
|
237
|
-
> neurai-cli clearbanned
|
|
234
|
+
> neurai-cli clearbanned
|
|
238
235
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
239
236
|
**/
|
|
240
237
|
clearbanned: "clearbanned",
|
|
@@ -243,11 +240,11 @@ var methods = {
|
|
|
243
240
|
Removes all transaction from the mempool
|
|
244
241
|
|
|
245
242
|
Examples:
|
|
246
|
-
> neurai-cli clearmempool
|
|
243
|
+
> neurai-cli clearmempool
|
|
247
244
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
248
245
|
**/
|
|
249
246
|
clearmempool: "clearmempool",
|
|
250
|
-
/** clearmessages
|
|
247
|
+
/** clearmessages
|
|
251
248
|
|
|
252
249
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
253
250
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -259,14 +256,36 @@ var methods = {
|
|
|
259
256
|
]
|
|
260
257
|
|
|
261
258
|
Examples:
|
|
262
|
-
> neurai-cli clearmessages
|
|
259
|
+
> neurai-cli clearmessages
|
|
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.
|
|
269
|
-
The combined transaction may be another partially signed transaction or a
|
|
288
|
+
The combined transaction may be another partially signed transaction or a
|
|
270
289
|
fully signed transaction.
|
|
271
290
|
Arguments:
|
|
272
291
|
1. "txs" (string) A json array of hex strings of partially signed transactions
|
|
@@ -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,8 +448,10 @@ 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
|
|
375
|
-
|
|
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)
|
|
454
|
+
}
|
|
376
455
|
,...
|
|
377
456
|
]
|
|
378
457
|
2. "outputs" (object or array, required) outputs in object or ordered-array form
|
|
@@ -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
|
|
@@ -416,10 +495,10 @@ var methods = {
|
|
|
416
495
|
{ (object) A json object describing new unique assets to issue
|
|
417
496
|
"issue_unique":
|
|
418
497
|
{
|
|
419
|
-
"root_name":"root-name", (string, required) name of the asset the unique asset(s)
|
|
498
|
+
"root_name":"root-name", (string, required) name of the asset the unique asset(s)
|
|
420
499
|
are being issued under
|
|
421
500
|
"asset_tags":["asset_tag", ...], (array, required) the unique tag for each asset which is to be issued
|
|
422
|
-
"ipfs_hashes":["hash", ...], (array, optional) ipfs hashes corresponding to each supplied tag
|
|
501
|
+
"ipfs_hashes":["hash", ...], (array, optional) ipfs hashes corresponding to each supplied tag
|
|
423
502
|
(should be same size as "asset_tags")
|
|
424
503
|
}
|
|
425
504
|
}
|
|
@@ -428,11 +507,12 @@ 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
|
|
433
|
-
"
|
|
512
|
+
"units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
|
|
513
|
+
"ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
|
|
434
514
|
Overrides the current ipfs hash if given
|
|
435
|
-
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
515
|
+
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
436
516
|
If not given, it will be sent to the output address
|
|
437
517
|
}
|
|
438
518
|
}
|
|
@@ -441,14 +521,14 @@ 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
|
|
445
|
-
"verifier_string":"text", (string, required) the verifier string to be used for a restricted
|
|
524
|
+
"asset_quantity":n, (number or string, required) the number of raw units to issue
|
|
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)
|
|
448
528
|
"reissuable":[0-1], (number, required) 1=reissuable asset
|
|
449
529
|
"has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
|
|
450
530
|
"ipfs_hash":"hash", (string, optional) an ipfs hash for discovering asset metadata
|
|
451
|
-
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
531
|
+
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
452
532
|
If not given, it will be sent to the output address
|
|
453
533
|
}
|
|
454
534
|
}
|
|
@@ -457,13 +537,14 @@ 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
|
|
462
|
-
"
|
|
542
|
+
"units":[-1-8], (number, optional) default is -1: keep the current units; 0-8 sets new units (never fewer than now)
|
|
543
|
+
"verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
|
|
463
544
|
transfer verification
|
|
464
|
-
"ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
|
|
545
|
+
"ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
|
|
465
546
|
Overrides the current ipfs hash if given
|
|
466
|
-
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
547
|
+
"owner_change_address" (string, optional) the address where the owner token will be sent to.
|
|
467
548
|
If not given, it will be sent to the output address
|
|
468
549
|
}
|
|
469
550
|
}
|
|
@@ -472,15 +553,15 @@ 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, (
|
|
476
|
-
"has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
|
|
556
|
+
"asset_quantity":n, (number or string, optional, default=1) the number of units to be issued (1 to 10)
|
|
557
|
+
"has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
|
|
477
558
|
to be added to the asset
|
|
478
|
-
"ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
|
|
559
|
+
"ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
|
|
479
560
|
txid hash once RIP5 is activated
|
|
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,216 +788,132 @@ 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",
|
|
702
|
-
/**
|
|
703
|
-
|
|
704
|
-
Issues a single-use challenge for authenticated DePIN RPCs. The request must be signed over:
|
|
705
|
-
"DEPIN-REQ|<type>|<token>|<address>|<timestamp>", where timestamp is Unix time in milliseconds and type is "receive" (default) or "admin".
|
|
706
|
-
|
|
707
|
-
The encrypted result contains challenge, expires_in and type. Decrypt it with depindecrypt, then sign the challenge with depinsignchallenge or signmessage.
|
|
708
|
-
|
|
709
|
-
Examples:
|
|
710
|
-
> neurai-cli depinchallenge "&TOKEN/SECTION" "NXholder..." 1730000000000 "<signature>"
|
|
711
|
-
**/
|
|
712
|
-
depinchallenge: "depinchallenge",
|
|
713
|
-
/** depinclearmsg "scope" "address" "challenge" "signature" ( "all" | hours )
|
|
714
|
-
|
|
715
|
-
Removes messages from a DePIN pool. This owner-level operation requires an admin challenge issued for the exact scope. Use an empty scope for the pool root. Omit mode to remove expired messages, use "all" to remove every message in scope, or pass an age in hours.
|
|
716
|
-
|
|
717
|
-
Result:
|
|
718
|
-
{
|
|
719
|
-
"removed": n,
|
|
720
|
-
"remaining": n
|
|
721
|
-
}
|
|
722
|
-
**/
|
|
723
|
-
depinclearmsg: "depinclearmsg",
|
|
724
|
-
/** depindecrypt "address" "encrypted"
|
|
791
|
+
/** decodesilentpaymentcode "code"
|
|
725
792
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
Result:
|
|
729
|
-
The decrypted JSON value, or a string when the plaintext is not JSON.
|
|
730
|
-
**/
|
|
731
|
-
depindecrypt: "depindecrypt",
|
|
732
|
-
/** depingetancestorrecipients "token" ( max_results ) ( "stop_at" )
|
|
733
|
-
|
|
734
|
-
List the active holders of a DEPIN branch: the deduplicated union of the
|
|
735
|
-
holders of the given token and of every one of its '/'-separated ancestors,
|
|
736
|
-
each with the public key it has revealed on chain.
|
|
737
|
-
|
|
738
|
-
Active means: positive balance, public key revealed, and not blocked by an
|
|
739
|
-
owner freeze or by self-revocation. Restriction is per (asset, address), so an
|
|
740
|
-
address that is active in at least one ancestor is returned even if it revoked
|
|
741
|
-
itself in another -- holding the root already grants visibility over the branch.
|
|
742
|
-
|
|
743
|
-
The query is exact: '&TEST' returns holders of '&TEST' only, never of
|
|
744
|
-
'&TEST/APPLE', '&TESTING' or '&TEST.FOO'. Every derived ancestor must exist; a
|
|
745
|
-
missing intermediate level is an error rather than something skipped.
|
|
746
|
-
|
|
747
|
-
This command is informational. It does not know about -depinmsgmaxusers, does
|
|
748
|
-
not decide whether a message fits in a pool, and a truncated result must not be
|
|
749
|
-
treated as a complete recipient set.
|
|
750
|
-
|
|
751
|
-
Requires -assetindex and -pubkeyindex.
|
|
793
|
+
Validates a silent payment code for this network and returns its keys.
|
|
752
794
|
|
|
753
795
|
Arguments:
|
|
754
|
-
1. "
|
|
755
|
-
2. max_results (numeric, optional, default=1000) Maximum recipients to return
|
|
756
|
-
(1..10000)
|
|
757
|
-
3. "stop_at" (string, optional) Stop deriving ancestors at this token,
|
|
758
|
-
inclusive. Must be the token itself or one of its ancestors.
|
|
759
|
-
Omitted: derive up to the absolute root.
|
|
796
|
+
1. "code" (string, required) payment code
|
|
760
797
|
|
|
761
798
|
Result:
|
|
762
799
|
{
|
|
763
|
-
"
|
|
764
|
-
"
|
|
765
|
-
"
|
|
766
|
-
"recipients": [ (array) Active holders, ordered by address
|
|
767
|
-
{
|
|
768
|
-
"address": "address", (string) Holder address
|
|
769
|
-
"pubkey": "hex" (string) Public key revealed on chain
|
|
770
|
-
}, ...
|
|
771
|
-
],
|
|
772
|
-
"returned": n, (numeric) Number of recipients returned
|
|
773
|
-
"max_results": n, (numeric) Limit applied
|
|
774
|
-
"truncated": true|false, (boolean) True if more eligible recipients exist
|
|
775
|
-
"skipped_no_pubkey": n, (numeric) Addresses dropped for lacking a usable
|
|
776
|
-
revealed public key
|
|
777
|
-
"skipped_no_pubkey_complete": bool, (boolean) False when truncated: the count then
|
|
778
|
-
covers only the addresses examined
|
|
779
|
-
"skipped_restricted": n, (numeric) Addresses dropped as frozen or
|
|
780
|
-
self-revoked in every ancestor they hold
|
|
781
|
-
"skipped_restricted_complete": bool (boolean) Same rule as above
|
|
800
|
+
"isvalid": true|false, (boolean)
|
|
801
|
+
"error": "str", (string) reason when invalid
|
|
802
|
+
"network", "scan_pubkey", "spend_pubkey" when valid
|
|
782
803
|
}
|
|
783
804
|
|
|
784
805
|
Examples:
|
|
785
|
-
> neurai-cli
|
|
786
|
-
> neurai-cli depingetancestorrecipients "&TEST/APPLE/GOLDEN" 50 "&TEST/APPLE"
|
|
787
|
-
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depingetancestorrecipients", "params": ["&TEST/APPLE/GOLDEN", 50, "&TEST/APPLE"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
806
|
+
> neurai-cli decodesilentpaymentcode "tnsp1q..."
|
|
788
807
|
**/
|
|
808
|
+
decodesilentpaymentcode: "decodesilentpaymentcode",
|
|
809
|
+
/**
|
|
810
|
+
* depinchallenge request
|
|
811
|
+
*
|
|
812
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
813
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
814
|
+
*/
|
|
815
|
+
depinchallenge: "depinchallenge",
|
|
816
|
+
/**
|
|
817
|
+
* depinclearmsg request
|
|
818
|
+
*
|
|
819
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
820
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
821
|
+
*/
|
|
822
|
+
depinclearmsg: "depinclearmsg",
|
|
823
|
+
/**
|
|
824
|
+
* depindecrypt "address" "encrypted"
|
|
825
|
+
*
|
|
826
|
+
* Decrypts an encrypted DePIN reply with a wallet key. Verify the reply's poolsig before using this method; depindecrypt does not verify it.
|
|
827
|
+
*
|
|
828
|
+
* Result:
|
|
829
|
+
* The decrypted JSON value, or a string when the plaintext is not JSON.
|
|
830
|
+
*/
|
|
831
|
+
depindecrypt: "depindecrypt",
|
|
832
|
+
/**
|
|
833
|
+
* depingetancestorrecipients request
|
|
834
|
+
*
|
|
835
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
836
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
837
|
+
*/
|
|
789
838
|
depingetancestorrecipients: "depingetancestorrecipients",
|
|
790
|
-
/**
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
839
|
+
/**
|
|
840
|
+
* depingetmsg "token" ( "fromaddress" )
|
|
841
|
+
*
|
|
842
|
+
* Uses the local node wallet to decrypt messages from the local DePIN pool. The optional address must belong to the wallet and hold the requested token or a related branch token.
|
|
843
|
+
*/
|
|
794
844
|
depingetmsg: "depingetmsg",
|
|
795
|
-
/**
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
845
|
+
/**
|
|
846
|
+
* depingetmsginfo request
|
|
847
|
+
*
|
|
848
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
849
|
+
* Bootstrap fields: protocol=5, request_id (32 random bytes in lowercase hex), timestamp_ms (integer milliseconds). Verify the response with the local request hash, expected genesis and pinned pool key before using its context.
|
|
850
|
+
*/
|
|
799
851
|
depingetmsginfo: "depingetmsginfo",
|
|
800
|
-
/**
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
852
|
+
/**
|
|
853
|
+
* depinlistsections request
|
|
854
|
+
*
|
|
855
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
856
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
857
|
+
*/
|
|
804
858
|
depinlistsections: "depinlistsections",
|
|
805
|
-
/**
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
"enabled": true|false, (boolean) Whether MCP worker is enabled
|
|
812
|
-
"running": true|false, (boolean) Whether MCP worker is running
|
|
813
|
-
"mcp_url": "url", (string) MCP server URL
|
|
814
|
-
"model_name": "name", (string) Name of the loaded AI model
|
|
815
|
-
"command_key": "key", (string) Command prefix (e.g. /ai)
|
|
816
|
-
"depin_token": "token", (string) DePIN token being monitored
|
|
817
|
-
"poll_interval": n, (numeric) Polling interval in seconds
|
|
818
|
-
"commands_processed": n, (numeric) Total commands processed
|
|
819
|
-
"total_errors": n, (numeric) Total errors encountered
|
|
820
|
-
"rate_limited": n, (numeric) Commands rejected by rate limiting
|
|
821
|
-
"concurrency": n, (numeric) Number of parallel task threads
|
|
822
|
-
"tasks_in_flight": n, (numeric) AI requests currently being processed
|
|
823
|
-
"processed_cache": n, (numeric) Size of the processed-message dedup cache
|
|
824
|
-
"context_sessions": n, (numeric) Active conversation contexts
|
|
825
|
-
"last_poll_time": n (numeric) Unix timestamp of last poll
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
Examples:
|
|
829
|
-
> neurai-cli depinmcpstatus
|
|
830
|
-
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinmcpstatus", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
831
|
-
**/
|
|
859
|
+
/**
|
|
860
|
+
* depinmcpstatus request
|
|
861
|
+
*
|
|
862
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
863
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
864
|
+
*/
|
|
832
865
|
depinmcpstatus: "depinmcpstatus",
|
|
833
|
-
/**
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
866
|
+
/**
|
|
867
|
+
* depinpoolpkey
|
|
868
|
+
*
|
|
869
|
+
* Wallet-only operator helper that derives the dedicated DePIN pool public key from the loaded service wallet.
|
|
870
|
+
*
|
|
871
|
+
* Result:
|
|
872
|
+
* {
|
|
873
|
+
* "pubkey": "hex",
|
|
874
|
+
* "address": "address",
|
|
875
|
+
* "path": "derivation_path"
|
|
876
|
+
* }
|
|
877
|
+
*/
|
|
844
878
|
depinpoolpkey: "depinpoolpkey",
|
|
845
|
-
/**
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
"enabled": true|false,
|
|
852
|
-
"token": "string",
|
|
853
|
-
"total_messages": n,
|
|
854
|
-
"total_size_bytes": n,
|
|
855
|
-
"memory_usage_bytes": n,
|
|
856
|
-
"oldest_message": "YYYY-MM-DD HH:MM:SS",
|
|
857
|
-
"newest_message": "YYYY-MM-DD HH:MM:SS",
|
|
858
|
-
"messages_by_age": {
|
|
859
|
-
"last_hour": n,
|
|
860
|
-
"last_day": n,
|
|
861
|
-
"last_week": n
|
|
862
|
-
},
|
|
863
|
-
"unique_senders": n,
|
|
864
|
-
"unique_recipients": n,
|
|
865
|
-
"avg_recipients_per_message": n.nn,
|
|
866
|
-
"avg_message_size": n,
|
|
867
|
-
"expiring_in_24h": n
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
Examples:
|
|
871
|
-
> neurai-cli depinpoolstats
|
|
872
|
-
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "depinpoolstats", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
873
|
-
**/
|
|
879
|
+
/**
|
|
880
|
+
* depinpoolstats request
|
|
881
|
+
*
|
|
882
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
883
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
884
|
+
*/
|
|
874
885
|
depinpoolstats: "depinpoolstats",
|
|
875
|
-
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
886
|
+
/**
|
|
887
|
+
* depinreceivemsg request
|
|
888
|
+
*
|
|
889
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
890
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
891
|
+
*/
|
|
879
892
|
depinreceivemsg: "depinreceivemsg",
|
|
880
|
-
/**
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
893
|
+
/**
|
|
894
|
+
* depinreceiveseq request
|
|
895
|
+
*
|
|
896
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
897
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
898
|
+
*/
|
|
899
|
+
depinreceiveseq: "depinreceiveseq",
|
|
900
|
+
/**
|
|
901
|
+
* depinsendmsg "token" "message" "fromaddress"
|
|
902
|
+
*
|
|
903
|
+
* Uses the local node wallet to sign and encrypt a message for eligible recipients, then adds it to the local DePIN pool. Remote host and port parameters were removed in protocol 2.
|
|
904
|
+
*/
|
|
884
905
|
depinsendmsg: "depinsendmsg",
|
|
885
|
-
/**
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
/** depinsignrequest "address" "token" ( "type" )
|
|
897
|
-
|
|
898
|
-
Wallet helper that signs a depinchallenge request over the current Unix time in milliseconds.
|
|
899
|
-
|
|
900
|
-
Result:
|
|
901
|
-
{
|
|
902
|
-
"timestamp": n,
|
|
903
|
-
"signature": "base64",
|
|
904
|
-
"preimage": "DEPIN-REQ|..."
|
|
905
|
-
}
|
|
906
|
-
**/
|
|
907
|
-
depinsignrequest: "depinsignrequest",
|
|
908
|
-
/** depinsubmitmsg {"sender":"...","encrypted":"..."}
|
|
909
|
-
|
|
910
|
-
Submits a client-prepared, signed DePIN message wrapped in an ECIES envelope for the pool key published by depingetmsginfo. Bare serialized hex is no longer accepted.
|
|
911
|
-
**/
|
|
906
|
+
/**
|
|
907
|
+
* depinsignrpc "method" request
|
|
908
|
+
* Local unlocked-wallet helper: sign a complete RPC 5 request. Returns request, preimage and request_hash. Never expose this wallet helper through a public HTTP/WSS proxy.
|
|
909
|
+
*/
|
|
910
|
+
depinsignrpc: "depinsignrpc",
|
|
911
|
+
/**
|
|
912
|
+
* depinsubmitmsg request
|
|
913
|
+
*
|
|
914
|
+
* DePIN RPC protocol 5. Exactly one request object, passed as [request] or {"request": request}. Legacy positional arguments and protocols 2/3/4 are rejected.
|
|
915
|
+
* Request fields: protocol, network (genesis), pool_pubkey, pool_root, instance_id, membership_revision, request_id, timestamp_ms, token, address, challenge, args, signature. Every private operation signs its method, target identity, revision and arguments. Public authentication fields are empty. Replies sign the exact request hash and served membership metadata. Verify before decoding/decrypting. See DEPIN_EXAMPLES.md for method-specific args and neurai-depin-msg integration.
|
|
916
|
+
*/
|
|
912
917
|
depinsubmitmsg: "depinsubmitmsg",
|
|
913
918
|
/** disconnectnode "[address]" [nodeid]
|
|
914
919
|
|
|
@@ -929,41 +934,10 @@ var methods = {
|
|
|
929
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/
|
|
930
935
|
**/
|
|
931
936
|
disconnectnode: "disconnectnode",
|
|
932
|
-
/** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ("change_address"
|
|
933
|
-
|
|
934
|
-
Splits the specified amount of the distribution asset to all owners of asset_name that are not in the optional exclusion_addresses
|
|
937
|
+
/** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ( "change_address" )
|
|
935
938
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
2. "snapshot_height" (number, required) The block height of the ownership snapshot
|
|
939
|
-
3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
|
|
940
|
-
4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
|
|
941
|
-
5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
|
|
942
|
-
6. "change_address" (string, optional) If the rewards can't be fully distributed. The change will be sent to this address
|
|
943
|
-
|
|
944
|
-
Result:
|
|
945
|
-
{
|
|
946
|
-
error_txn_gen_failed: (string),
|
|
947
|
-
error_nsf: (string),
|
|
948
|
-
error_rejects: (string),
|
|
949
|
-
error_db_update: (string),
|
|
950
|
-
batch_results: [
|
|
951
|
-
{
|
|
952
|
-
transaction_id: (string),
|
|
953
|
-
error_txn_rejected: (string),
|
|
954
|
-
total_amount: (number),
|
|
955
|
-
fee: (number),
|
|
956
|
-
expected_count: (number),
|
|
957
|
-
actual_count: (number),
|
|
958
|
-
}
|
|
959
|
-
]
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
Examples:
|
|
963
|
-
> neurai-cli distributereward "TRONCO" 12345 "XNA" 1000
|
|
964
|
-
> neurai-cli distributereward "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
|
|
965
|
-
> 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/
|
|
966
|
-
> 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.
|
|
967
941
|
**/
|
|
968
942
|
distributereward: "distributereward",
|
|
969
943
|
/** dumpextkeypq
|
|
@@ -975,7 +949,7 @@ var methods = {
|
|
|
975
949
|
"xpqpriv..." (string) Base58Check-encoded master CExtKeyPQ
|
|
976
950
|
|
|
977
951
|
Examples:
|
|
978
|
-
> neurai-cli dumpextkeypq
|
|
952
|
+
> neurai-cli dumpextkeypq
|
|
979
953
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpextkeypq", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
980
954
|
**/
|
|
981
955
|
dumpextkeypq: "dumpextkeypq",
|
|
@@ -1016,7 +990,7 @@ var methods = {
|
|
|
1016
990
|
/** encryptwallet "passphrase"
|
|
1017
991
|
|
|
1018
992
|
Encrypts the wallet with 'passphrase'. This is for first time encryption.
|
|
1019
|
-
After this, any calls that interact with private keys such as sending or signing
|
|
993
|
+
After this, any calls that interact with private keys such as sending or signing
|
|
1020
994
|
will require the passphrase to be set prior the making these calls.
|
|
1021
995
|
Use the walletpassphrase call for this, and then walletlock call.
|
|
1022
996
|
If the wallet is already encrypted, use the walletpassphrasechange call.
|
|
@@ -1037,7 +1011,7 @@ var methods = {
|
|
|
1037
1011
|
> neurai-cli signmessage "address" "test message"
|
|
1038
1012
|
|
|
1039
1013
|
Now lock the wallet again by removing the passphrase
|
|
1040
|
-
> neurai-cli walletlock
|
|
1014
|
+
> neurai-cli walletlock
|
|
1041
1015
|
|
|
1042
1016
|
As a json rpc call
|
|
1043
1017
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "encryptwallet", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
@@ -1100,6 +1074,25 @@ var methods = {
|
|
|
1100
1074
|
> neurai-cli estimatesmartfee 6
|
|
1101
1075
|
**/
|
|
1102
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",
|
|
1103
1096
|
/** exportxpqpub count ( chain offset )
|
|
1104
1097
|
|
|
1105
1098
|
Generates a batch of count ML-DSA-44 public keys and returns the xpqpub blob.
|
|
@@ -1214,7 +1207,6 @@ var methods = {
|
|
|
1214
1207
|
Those recipients will receive less neurais than you enter in their corresponding amount field.
|
|
1215
1208
|
If no outputs are specified here, the sender pays the fee.
|
|
1216
1209
|
[vout_index,...]
|
|
1217
|
-
Allows this transaction to be replaced by a transaction with higher fees
|
|
1218
1210
|
"conf_target" (numeric, optional) Confirmation target (in blocks)
|
|
1219
1211
|
"estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
|
|
1220
1212
|
"UNSET"
|
|
@@ -1306,7 +1298,7 @@ var methods = {
|
|
|
1306
1298
|
"address" (string) The account neurai address
|
|
1307
1299
|
|
|
1308
1300
|
Examples:
|
|
1309
|
-
> neurai-cli getaccountaddress
|
|
1301
|
+
> neurai-cli getaccountaddress
|
|
1310
1302
|
> neurai-cli getaccountaddress ""
|
|
1311
1303
|
> neurai-cli getaccountaddress "myaccount"
|
|
1312
1304
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccountaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
@@ -1549,6 +1541,7 @@ var methods = {
|
|
|
1549
1541
|
ipfs_hash: (hash), (only if has_ipfs = 1 and that data is a ipfs hash)
|
|
1550
1542
|
txid_hash: (hash), (only if has_ipfs = 1 and that data is a txid hash)
|
|
1551
1543
|
verifier_string: (string)
|
|
1544
|
+
transfer_state: (string) "closed" | "open" | "sealed" (only for DEPIN assets, names starting with &)
|
|
1552
1545
|
}
|
|
1553
1546
|
|
|
1554
1547
|
Examples:
|
|
@@ -1585,7 +1578,7 @@ var methods = {
|
|
|
1585
1578
|
Examples:
|
|
1586
1579
|
|
|
1587
1580
|
The total amount in the wallet with 1 or more confirmations
|
|
1588
|
-
> neurai-cli getbalance
|
|
1581
|
+
> neurai-cli getbalance
|
|
1589
1582
|
|
|
1590
1583
|
The total amount in the wallet at least 6 blocks confirmed
|
|
1591
1584
|
> neurai-cli getbalance "*" 6
|
|
@@ -1602,19 +1595,21 @@ var methods = {
|
|
|
1602
1595
|
"hex" (string) the block hash hex encoded
|
|
1603
1596
|
|
|
1604
1597
|
Examples:
|
|
1605
|
-
> neurai-cli getbestblockhash
|
|
1598
|
+
> neurai-cli getbestblockhash
|
|
1606
1599
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1607
1600
|
**/
|
|
1608
1601
|
getbestblockhash: "getbestblockhash",
|
|
1609
|
-
/** getblock "blockhash" ( verbosity )
|
|
1602
|
+
/** getblock "blockhash" ( verbosity )
|
|
1610
1603
|
|
|
1611
1604
|
If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
|
|
1612
1605
|
If verbosity is 1, returns an Object with information about block <hash>.
|
|
1613
|
-
If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
|
|
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.
|
|
1614
1609
|
|
|
1615
1610
|
Arguments:
|
|
1616
1611
|
1. "blockhash" (string, required) The block hash
|
|
1617
|
-
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
|
|
1618
1613
|
|
|
1619
1614
|
Result (for verbosity = 0):
|
|
1620
1615
|
"data" (string) A string that is serialized, hex-encoded data for block 'hash'.
|
|
@@ -1665,6 +1660,7 @@ var methods = {
|
|
|
1665
1660
|
{
|
|
1666
1661
|
"chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
|
|
1667
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")
|
|
1668
1664
|
"headers": xxxxxx, (numeric) the current number of headers we have validated
|
|
1669
1665
|
"bestblockhash": "...", (string) the hash of the currently best block
|
|
1670
1666
|
"difficulty": xxxxxx, (numeric) the current difficulty
|
|
@@ -1673,6 +1669,11 @@ var methods = {
|
|
|
1673
1669
|
"chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
|
|
1674
1670
|
"size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
|
|
1675
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
|
+
},
|
|
1676
1677
|
"pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
|
|
1677
1678
|
"automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
|
|
1678
1679
|
"prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
|
|
@@ -1693,19 +1694,30 @@ var methods = {
|
|
|
1693
1694
|
"timeout": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
|
|
1694
1695
|
"since": xx, (numeric) height of the first block to which the status applies
|
|
1695
1696
|
"statistics": { (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
|
|
1696
|
-
"period": xx, (numeric) the length in blocks of the BIP9 signalling period
|
|
1697
|
-
"threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
|
|
1698
|
-
"elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
|
|
1699
|
-
"count": xx, (numeric) the number of blocks with the version bit set in the current period
|
|
1700
|
-
"possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
|
|
1697
|
+
"period": xx, (numeric) the length in blocks of the BIP9 signalling period
|
|
1698
|
+
"threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
|
|
1699
|
+
"elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
|
|
1700
|
+
"count": xx, (numeric) the number of blocks with the version bit set in the current period
|
|
1701
|
+
"possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
|
|
1701
1702
|
}
|
|
1702
1703
|
}
|
|
1703
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
|
+
},
|
|
1704
1716
|
"warnings" : "...", (string) any network and blockchain warnings.
|
|
1705
1717
|
}
|
|
1706
1718
|
|
|
1707
1719
|
Examples:
|
|
1708
|
-
> neurai-cli getblockchaininfo
|
|
1720
|
+
> neurai-cli getblockchaininfo
|
|
1709
1721
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1710
1722
|
**/
|
|
1711
1723
|
getblockchaininfo: "getblockchaininfo",
|
|
@@ -1717,7 +1729,7 @@ var methods = {
|
|
|
1717
1729
|
n (numeric) The current block count
|
|
1718
1730
|
|
|
1719
1731
|
Examples:
|
|
1720
|
-
> neurai-cli getblockcount
|
|
1732
|
+
> neurai-cli getblockcount
|
|
1721
1733
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1722
1734
|
**/
|
|
1723
1735
|
getblockcount: "getblockcount",
|
|
@@ -1841,7 +1853,7 @@ var methods = {
|
|
|
1841
1853
|
"data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte)
|
|
1842
1854
|
"txid" : "xxxx", (string) transaction id encoded in little-endian hexadecimal
|
|
1843
1855
|
"hash" : "xxxx", (string) hash encoded in little-endian hexadecimal (including witness data)
|
|
1844
|
-
"depends" : [ (array) array of numbers
|
|
1856
|
+
"depends" : [ (array) array of numbers
|
|
1845
1857
|
n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
|
|
1846
1858
|
,...
|
|
1847
1859
|
],
|
|
@@ -1859,7 +1871,7 @@ var methods = {
|
|
|
1859
1871
|
"coinbasetxn" : { ... }, (json object) information for coinbase transaction
|
|
1860
1872
|
"target" : "xxxx", (string) The hash target
|
|
1861
1873
|
"mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)
|
|
1862
|
-
"mutable" : [ (array of string) list of ways the block template may be changed
|
|
1874
|
+
"mutable" : [ (array of string) list of ways the block template may be changed
|
|
1863
1875
|
"value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
|
|
1864
1876
|
,...
|
|
1865
1877
|
],
|
|
@@ -1873,11 +1885,11 @@ var methods = {
|
|
|
1873
1885
|
}
|
|
1874
1886
|
|
|
1875
1887
|
Examples:
|
|
1876
|
-
> neurai-cli getblocktemplate
|
|
1888
|
+
> neurai-cli getblocktemplate
|
|
1877
1889
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1878
1890
|
**/
|
|
1879
1891
|
getblocktemplate: "getblocktemplate",
|
|
1880
|
-
/** getcacheinfo
|
|
1892
|
+
/** getcacheinfo
|
|
1881
1893
|
|
|
1882
1894
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
1883
1895
|
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
@@ -1897,7 +1909,7 @@ var methods = {
|
|
|
1897
1909
|
|
|
1898
1910
|
Examples:
|
|
1899
1911
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getcacheinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1900
|
-
> neurai-cli getcacheinfo
|
|
1912
|
+
> neurai-cli getcacheinfo
|
|
1901
1913
|
**/
|
|
1902
1914
|
getcacheinfo: "getcacheinfo",
|
|
1903
1915
|
/** getchaintips
|
|
@@ -1926,7 +1938,7 @@ var methods = {
|
|
|
1926
1938
|
5. "active" This is the tip of the active main chain, which is certainly valid
|
|
1927
1939
|
|
|
1928
1940
|
Examples:
|
|
1929
|
-
> neurai-cli getchaintips
|
|
1941
|
+
> neurai-cli getchaintips
|
|
1930
1942
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1931
1943
|
**/
|
|
1932
1944
|
getchaintips: "getchaintips",
|
|
@@ -1949,10 +1961,62 @@ var methods = {
|
|
|
1949
1961
|
}
|
|
1950
1962
|
|
|
1951
1963
|
Examples:
|
|
1952
|
-
> neurai-cli getchaintxstats
|
|
1964
|
+
> neurai-cli getchaintxstats
|
|
1953
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/
|
|
1954
1966
|
**/
|
|
1955
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",
|
|
1956
2020
|
/** getconnectioncount
|
|
1957
2021
|
|
|
1958
2022
|
Returns the number of connections to other nodes.
|
|
@@ -1961,7 +2025,7 @@ var methods = {
|
|
|
1961
2025
|
n (numeric) The connection count
|
|
1962
2026
|
|
|
1963
2027
|
Examples:
|
|
1964
|
-
> neurai-cli getconnectioncount
|
|
2028
|
+
> neurai-cli getconnectioncount
|
|
1965
2029
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1966
2030
|
**/
|
|
1967
2031
|
getconnectioncount: "getconnectioncount",
|
|
@@ -1973,7 +2037,7 @@ var methods = {
|
|
|
1973
2037
|
n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.
|
|
1974
2038
|
|
|
1975
2039
|
Examples:
|
|
1976
|
-
> neurai-cli getdifficulty
|
|
2040
|
+
> neurai-cli getdifficulty
|
|
1977
2041
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
1978
2042
|
**/
|
|
1979
2043
|
getdifficulty: "getdifficulty",
|
|
@@ -1995,6 +2059,179 @@ var methods = {
|
|
|
1995
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/
|
|
1996
2060
|
**/
|
|
1997
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",
|
|
1998
2235
|
/** getgenerate
|
|
1999
2236
|
|
|
2000
2237
|
Return if the server is set to generate coins or not. The default is false.
|
|
@@ -2005,29 +2242,28 @@ var methods = {
|
|
|
2005
2242
|
true|false (boolean) If the server is set to generate coins or not
|
|
2006
2243
|
|
|
2007
2244
|
Examples:
|
|
2008
|
-
> neurai-cli getgenerate
|
|
2245
|
+
> neurai-cli getgenerate
|
|
2009
2246
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getgenerate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2010
2247
|
**/
|
|
2011
2248
|
getgenerate: "getgenerate",
|
|
2012
2249
|
/** getibdstatus
|
|
2013
|
-
|
|
2014
2250
|
Returns header synchronization timing collected since process start.
|
|
2251
|
+
request_to_response_us includes peer response and local queueing time.
|
|
2015
2252
|
|
|
2016
2253
|
Result:
|
|
2017
2254
|
{
|
|
2018
|
-
"blocks": n,
|
|
2019
|
-
"headers": n,
|
|
2020
|
-
"header_batches": n,
|
|
2021
|
-
"headers_in_batches": n,
|
|
2022
|
-
"
|
|
2023
|
-
"
|
|
2024
|
-
"
|
|
2025
|
-
"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
|
|
2026
2262
|
}
|
|
2027
2263
|
|
|
2028
2264
|
Examples:
|
|
2029
2265
|
> neurai-cli getibdstatus
|
|
2030
|
-
> 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/
|
|
2031
2267
|
**/
|
|
2032
2268
|
getibdstatus: "getibdstatus",
|
|
2033
2269
|
/** getinfo
|
|
@@ -2056,7 +2292,7 @@ var methods = {
|
|
|
2056
2292
|
}
|
|
2057
2293
|
|
|
2058
2294
|
Examples:
|
|
2059
|
-
> neurai-cli getinfo
|
|
2295
|
+
> neurai-cli getinfo
|
|
2060
2296
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2061
2297
|
**/
|
|
2062
2298
|
getinfo: "getinfo",
|
|
@@ -2065,11 +2301,11 @@ var methods = {
|
|
|
2065
2301
|
Get the kawpow hash for a block given its block data
|
|
2066
2302
|
|
|
2067
2303
|
Arguments
|
|
2068
|
-
1. "header_hash" (string, required) the
|
|
2069
|
-
2. "mix_hash" (string, required) the mix hash
|
|
2070
|
-
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
|
|
2071
2307
|
4. "height" (number, required) the height of the block data that is being hashed
|
|
2072
|
-
5. "target" (string, optional) the target
|
|
2308
|
+
5. "target" (string, optional) the target to meet (exactly 64 hex digits)
|
|
2073
2309
|
|
|
2074
2310
|
Result:
|
|
2075
2311
|
|
|
@@ -2086,6 +2322,8 @@ var methods = {
|
|
|
2086
2322
|
{ (json object)
|
|
2087
2323
|
"bip32_root_private" : (string) extended master private key,
|
|
2088
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
|
|
2089
2327
|
"account_derivation_path" : (string) The derivation path to the account public/private keys
|
|
2090
2328
|
"external_derivation_path" : (string) The derivation path prefix for receiving addresses
|
|
2091
2329
|
"internal_derivation_path" : (string) The derivation path prefix for change addresses
|
|
@@ -2094,7 +2332,7 @@ var methods = {
|
|
|
2094
2332
|
}
|
|
2095
2333
|
|
|
2096
2334
|
Examples:
|
|
2097
|
-
> neurai-cli getmasterkeyinfo
|
|
2335
|
+
> neurai-cli getmasterkeyinfo
|
|
2098
2336
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmasterkeyinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2099
2337
|
**/
|
|
2100
2338
|
getmasterkeyinfo: "getmasterkeyinfo",
|
|
@@ -2121,7 +2359,7 @@ var methods = {
|
|
|
2121
2359
|
"<malloc version="1">..."
|
|
2122
2360
|
|
|
2123
2361
|
Examples:
|
|
2124
|
-
> neurai-cli getmemoryinfo
|
|
2362
|
+
> neurai-cli getmemoryinfo
|
|
2125
2363
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2126
2364
|
**/
|
|
2127
2365
|
getmemoryinfo: "getmemoryinfo",
|
|
@@ -2153,6 +2391,7 @@ var methods = {
|
|
|
2153
2391
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2154
2392
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2155
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
|
|
2156
2395
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2157
2396
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2158
2397
|
"transactionid", (string) parent transaction id
|
|
@@ -2193,6 +2432,7 @@ var methods = {
|
|
|
2193
2432
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2194
2433
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2195
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
|
|
2196
2436
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2197
2437
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2198
2438
|
"transactionid", (string) parent transaction id
|
|
@@ -2225,6 +2465,7 @@ var methods = {
|
|
|
2225
2465
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2226
2466
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2227
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
|
|
2228
2469
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2229
2470
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2230
2471
|
"transactionid", (string) parent transaction id
|
|
@@ -2250,7 +2491,7 @@ var methods = {
|
|
|
2250
2491
|
}
|
|
2251
2492
|
|
|
2252
2493
|
Examples:
|
|
2253
|
-
> neurai-cli getmempoolinfo
|
|
2494
|
+
> neurai-cli getmempoolinfo
|
|
2254
2495
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2255
2496
|
**/
|
|
2256
2497
|
getmempoolinfo: "getmempoolinfo",
|
|
@@ -2272,7 +2513,7 @@ var methods = {
|
|
|
2272
2513
|
}
|
|
2273
2514
|
|
|
2274
2515
|
Examples:
|
|
2275
|
-
> neurai-cli getmininginfo
|
|
2516
|
+
> neurai-cli getmininginfo
|
|
2276
2517
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2277
2518
|
**/
|
|
2278
2519
|
getmininginfo: "getmininginfo",
|
|
@@ -2286,7 +2527,7 @@ var methods = {
|
|
|
2286
2527
|
"passphrase:" (optional) Only show if passphrase was used when creating the wallet
|
|
2287
2528
|
|
|
2288
2529
|
Examples:
|
|
2289
|
-
> neurai-cli getmywords
|
|
2530
|
+
> neurai-cli getmywords
|
|
2290
2531
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmywords", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2291
2532
|
**/
|
|
2292
2533
|
getmywords: "getmywords",
|
|
@@ -2312,7 +2553,7 @@ var methods = {
|
|
|
2312
2553
|
}
|
|
2313
2554
|
|
|
2314
2555
|
Examples:
|
|
2315
|
-
> neurai-cli getnettotals
|
|
2556
|
+
> neurai-cli getnettotals
|
|
2316
2557
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2317
2558
|
**/
|
|
2318
2559
|
getnettotals: "getnettotals",
|
|
@@ -2330,7 +2571,7 @@ var methods = {
|
|
|
2330
2571
|
x (numeric) Hashes per second estimated
|
|
2331
2572
|
|
|
2332
2573
|
Examples:
|
|
2333
|
-
> neurai-cli getnetworkhashps
|
|
2574
|
+
> neurai-cli getnetworkhashps
|
|
2334
2575
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2335
2576
|
**/
|
|
2336
2577
|
getnetworkhashps: "getnetworkhashps",
|
|
@@ -2371,25 +2612,25 @@ var methods = {
|
|
|
2371
2612
|
}
|
|
2372
2613
|
|
|
2373
2614
|
Examples:
|
|
2374
|
-
> neurai-cli getnetworkinfo
|
|
2615
|
+
> neurai-cli getnetworkinfo
|
|
2375
2616
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2376
2617
|
**/
|
|
2377
2618
|
getnetworkinfo: "getnetworkinfo",
|
|
2378
2619
|
/** getnewaddress ( "account" "address_type" )
|
|
2379
2620
|
|
|
2380
2621
|
Returns a new Neurai address for receiving payments.
|
|
2381
|
-
If 'account' is specified (DEPRECATED), it is added to the address book
|
|
2622
|
+
If 'account' is specified (DEPRECATED), it is added to the address book
|
|
2382
2623
|
so payments received with the address will be credited to 'account'.
|
|
2383
2624
|
|
|
2384
2625
|
Arguments:
|
|
2385
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.
|
|
2386
|
-
2. "address_type" (string, optional) The address family: "legacy" (Base58, secp256k1), "pq" (strict post-quantum, witness v2, pq1.../tpq1...) or "ecdsa" (strict ECDSA, witness v3, nq1r.../tnq1r...). If omitted, the wallet's
|
|
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.
|
|
2387
2628
|
|
|
2388
2629
|
Result:
|
|
2389
2630
|
"address" (string) The new neurai address
|
|
2390
2631
|
|
|
2391
2632
|
Examples:
|
|
2392
|
-
> neurai-cli getnewaddress
|
|
2633
|
+
> neurai-cli getnewaddress
|
|
2393
2634
|
> neurai-cli getnewaddress "" "ecdsa"
|
|
2394
2635
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": ["", "pq"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2395
2636
|
**/
|
|
@@ -2442,13 +2683,34 @@ var methods = {
|
|
|
2442
2683
|
]
|
|
2443
2684
|
|
|
2444
2685
|
Examples:
|
|
2445
|
-
> neurai-cli getpeerinfo
|
|
2686
|
+
> neurai-cli getpeerinfo
|
|
2446
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/
|
|
2447
2688
|
**/
|
|
2448
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",
|
|
2449
2711
|
/** getpubkey "address"
|
|
2450
2712
|
|
|
2451
|
-
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).
|
|
2452
2714
|
|
|
2453
2715
|
Arguments:
|
|
2454
2716
|
1. "address" (string, required) The Neurai address
|
|
@@ -2473,13 +2735,13 @@ var methods = {
|
|
|
2473
2735
|
This is for use with raw transactions, NOT normal use.
|
|
2474
2736
|
|
|
2475
2737
|
Arguments:
|
|
2476
|
-
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).
|
|
2477
2739
|
|
|
2478
2740
|
Result:
|
|
2479
2741
|
"address" (string) The address
|
|
2480
2742
|
|
|
2481
2743
|
Examples:
|
|
2482
|
-
> neurai-cli getrawchangeaddress
|
|
2744
|
+
> neurai-cli getrawchangeaddress
|
|
2483
2745
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2484
2746
|
**/
|
|
2485
2747
|
getrawchangeaddress: "getrawchangeaddress",
|
|
@@ -2512,6 +2774,7 @@ var methods = {
|
|
|
2512
2774
|
"ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
|
|
2513
2775
|
"ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
|
|
2514
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
|
|
2515
2778
|
"wtxid" : hash, (string) hash of serialized transaction, including witness data
|
|
2516
2779
|
"depends" : [ (array) unconfirmed transactions used as inputs for this transaction
|
|
2517
2780
|
"transactionid", (string) parent transaction id
|
|
@@ -2554,7 +2817,7 @@ var methods = {
|
|
|
2554
2817
|
"vin" : [ (array of json objects)
|
|
2555
2818
|
{
|
|
2556
2819
|
"txid": "id", (string) The transaction id
|
|
2557
|
-
"vout": n, (numeric)
|
|
2820
|
+
"vout": n, (numeric)
|
|
2558
2821
|
"scriptSig": { (json object) The script
|
|
2559
2822
|
"asm": "asm", (string) asm
|
|
2560
2823
|
"hex": "hex" (string) hex
|
|
@@ -2653,15 +2916,157 @@ var methods = {
|
|
|
2653
2916
|
"active_commands" (array) All active commands
|
|
2654
2917
|
[
|
|
2655
2918
|
{ (object) Information about an active command
|
|
2656
|
-
"method" (string) The name of the RPC command
|
|
2919
|
+
"method" (string) The name of the RPC command
|
|
2657
2920
|
"duration" (numeric) The running time in microseconds
|
|
2658
2921
|
},...
|
|
2659
2922
|
],
|
|
2660
2923
|
}
|
|
2661
|
-
> neurai-cli getrpcinfo
|
|
2924
|
+
> neurai-cli getrpcinfo
|
|
2662
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/
|
|
2663
2926
|
**/
|
|
2664
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",
|
|
2665
3070
|
/** getsnapshot "asset_name" block_height
|
|
2666
3071
|
|
|
2667
3072
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
@@ -2677,10 +3082,17 @@ var methods = {
|
|
|
2677
3082
|
{
|
|
2678
3083
|
name: (string),
|
|
2679
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
|
|
2680
3089
|
owners: [
|
|
2681
3090
|
{
|
|
2682
3091
|
address: (string),
|
|
2683
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
|
|
2684
3096
|
}
|
|
2685
3097
|
}
|
|
2686
3098
|
|
|
@@ -2688,6 +3100,64 @@ var methods = {
|
|
|
2688
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/
|
|
2689
3101
|
**/
|
|
2690
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",
|
|
2691
3161
|
/** getsnapshotrequest "asset_name" block_height
|
|
2692
3162
|
|
|
2693
3163
|
Retrieves the specified snapshot request details.
|
|
@@ -2740,7 +3210,7 @@ var methods = {
|
|
|
2740
3210
|
Result:
|
|
2741
3211
|
{
|
|
2742
3212
|
"amount" : x.xxx, (numeric) The transaction amount in XNA
|
|
2743
|
-
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
3213
|
+
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
2744
3214
|
'send' category of transactions.
|
|
2745
3215
|
"confirmations" : n, (numeric) The number of confirmations
|
|
2746
3216
|
"blockhash" : "hash", (string) The block hash
|
|
@@ -2749,8 +3219,6 @@ var methods = {
|
|
|
2749
3219
|
"txid" : "transactionid", (string) The transaction id.
|
|
2750
3220
|
"time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
|
|
2751
3221
|
"timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
|
|
2752
|
-
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
|
|
2753
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
2754
3222
|
"details" : [
|
|
2755
3223
|
{
|
|
2756
3224
|
"account" : "accountname", (string) DEPRECATED. The account name involved in the transaction, can be "" for the default account.
|
|
@@ -2759,9 +3227,9 @@ var methods = {
|
|
|
2759
3227
|
"amount" : x.xxx, (numeric) The amount in XNA
|
|
2760
3228
|
"label" : "label", (string) A comment for the address/transaction, if any
|
|
2761
3229
|
"vout" : n, (numeric) the vout value
|
|
2762
|
-
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
3230
|
+
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
2763
3231
|
'send' category of transactions.
|
|
2764
|
-
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
|
|
3232
|
+
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
|
|
2765
3233
|
'send' category of transactions.
|
|
2766
3234
|
}
|
|
2767
3235
|
,...
|
|
@@ -2801,8 +3269,8 @@ var methods = {
|
|
|
2801
3269
|
"confirmations" : n, (numeric) The number of confirmations
|
|
2802
3270
|
"value" : x.xxx, (numeric) The transaction value in XNA
|
|
2803
3271
|
"scriptPubKey" : { (json object)
|
|
2804
|
-
"asm" : "code", (string)
|
|
2805
|
-
"hex" : "hex", (string)
|
|
3272
|
+
"asm" : "code", (string)
|
|
3273
|
+
"hex" : "hex", (string)
|
|
2806
3274
|
"reqSigs" : n, (numeric) Number of required signatures
|
|
2807
3275
|
"type" : "pubkeyhash", (string) The type, eg pubkeyhash
|
|
2808
3276
|
"addresses" : [ (array of string) array of neurai addresses
|
|
@@ -2816,7 +3284,7 @@ var methods = {
|
|
|
2816
3284
|
Examples:
|
|
2817
3285
|
|
|
2818
3286
|
Get unspent transactions
|
|
2819
|
-
> neurai-cli listunspent
|
|
3287
|
+
> neurai-cli listunspent
|
|
2820
3288
|
|
|
2821
3289
|
View the details
|
|
2822
3290
|
> neurai-cli gettxout "txid" 1
|
|
@@ -2864,7 +3332,7 @@ var methods = {
|
|
|
2864
3332
|
}
|
|
2865
3333
|
|
|
2866
3334
|
Examples:
|
|
2867
|
-
> neurai-cli gettxoutsetinfo
|
|
3335
|
+
> neurai-cli gettxoutsetinfo
|
|
2868
3336
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2869
3337
|
**/
|
|
2870
3338
|
gettxoutsetinfo: "gettxoutsetinfo",
|
|
@@ -2897,6 +3365,7 @@ var methods = {
|
|
|
2897
3365
|
{
|
|
2898
3366
|
"walletname": xxxxx, (string) the wallet name
|
|
2899
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
|
|
2900
3369
|
"balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in XNA
|
|
2901
3370
|
"unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in XNA
|
|
2902
3371
|
"immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in XNA
|
|
@@ -2911,7 +3380,7 @@ var methods = {
|
|
|
2911
3380
|
}
|
|
2912
3381
|
|
|
2913
3382
|
Examples:
|
|
2914
|
-
> neurai-cli getwalletinfo
|
|
3383
|
+
> neurai-cli getwalletinfo
|
|
2915
3384
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
2916
3385
|
**/
|
|
2917
3386
|
getwalletinfo: "getwalletinfo",
|
|
@@ -2935,6 +3404,7 @@ var methods = {
|
|
|
2935
3404
|
2. "label" (string, optional, default="") An optional label
|
|
2936
3405
|
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
|
|
2937
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.
|
|
2938
3408
|
|
|
2939
3409
|
Note: This call can take minutes to complete if rescan is true.
|
|
2940
3410
|
If you have the full public key, you should call importpubkey instead of this.
|
|
@@ -3052,6 +3522,28 @@ var methods = {
|
|
|
3052
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/
|
|
3053
3523
|
**/
|
|
3054
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",
|
|
3055
3547
|
/** importwallet "filename"
|
|
3056
3548
|
|
|
3057
3549
|
Imports keys from a wallet dump file (see dumpwallet).
|
|
@@ -3222,7 +3714,7 @@ var methods = {
|
|
|
3222
3714
|
1. newsize (numeric, optional, default=100) The new keypool size
|
|
3223
3715
|
|
|
3224
3716
|
Examples:
|
|
3225
|
-
> neurai-cli keypoolrefill
|
|
3717
|
+
> neurai-cli keypoolrefill
|
|
3226
3718
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3227
3719
|
**/
|
|
3228
3720
|
keypoolrefill: "keypoolrefill",
|
|
@@ -3243,7 +3735,7 @@ var methods = {
|
|
|
3243
3735
|
Examples:
|
|
3244
3736
|
|
|
3245
3737
|
List account balances where there at least 1 confirmation
|
|
3246
|
-
> neurai-cli listaccounts
|
|
3738
|
+
> neurai-cli listaccounts
|
|
3247
3739
|
|
|
3248
3740
|
List account balances including zero confirmation transactions
|
|
3249
3741
|
> neurai-cli listaccounts 0
|
|
@@ -3319,7 +3811,7 @@ var methods = {
|
|
|
3319
3811
|
]
|
|
3320
3812
|
|
|
3321
3813
|
Examples:
|
|
3322
|
-
> neurai-cli listaddressgroupings
|
|
3814
|
+
> neurai-cli listaddressgroupings
|
|
3323
3815
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3324
3816
|
**/
|
|
3325
3817
|
listaddressgroupings: "listaddressgroupings",
|
|
@@ -3414,7 +3906,7 @@ var methods = {
|
|
|
3414
3906
|
List all banned IPs/Subnets.
|
|
3415
3907
|
|
|
3416
3908
|
Examples:
|
|
3417
|
-
> neurai-cli listbanned
|
|
3909
|
+
> neurai-cli listbanned
|
|
3418
3910
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3419
3911
|
**/
|
|
3420
3912
|
listbanned: "listbanned",
|
|
@@ -3436,6 +3928,7 @@ var methods = {
|
|
|
3436
3928
|
{
|
|
3437
3929
|
"address": "address", (string) The Neurai address
|
|
3438
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)
|
|
3439
3932
|
},
|
|
3440
3933
|
...
|
|
3441
3934
|
]
|
|
@@ -3486,7 +3979,7 @@ var methods = {
|
|
|
3486
3979
|
]
|
|
3487
3980
|
|
|
3488
3981
|
Examples:
|
|
3489
|
-
> neurai-cli listglobalrestrictions
|
|
3982
|
+
> neurai-cli listglobalrestrictions
|
|
3490
3983
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listglobalrestrictions", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3491
3984
|
**/
|
|
3492
3985
|
listglobalrestrictions: "listglobalrestrictions",
|
|
@@ -3507,13 +4000,13 @@ var methods = {
|
|
|
3507
4000
|
Examples:
|
|
3508
4001
|
|
|
3509
4002
|
List the unspent transactions
|
|
3510
|
-
> neurai-cli listunspent
|
|
4003
|
+
> neurai-cli listunspent
|
|
3511
4004
|
|
|
3512
4005
|
Lock an unspent transaction
|
|
3513
4006
|
> neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
|
|
3514
4007
|
|
|
3515
4008
|
List the locked transactions
|
|
3516
|
-
> neurai-cli listlockunspent
|
|
4009
|
+
> neurai-cli listlockunspent
|
|
3517
4010
|
|
|
3518
4011
|
Unlock the transaction again
|
|
3519
4012
|
> neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
|
|
@@ -3522,7 +4015,7 @@ var methods = {
|
|
|
3522
4015
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3523
4016
|
**/
|
|
3524
4017
|
listlockunspent: "listlockunspent",
|
|
3525
|
-
/** listmyassets "( asset )" ( verbose ) ( count ) ( start ) (confs)
|
|
4018
|
+
/** listmyassets "( asset )" ( verbose ) ( count ) ( start ) (confs)
|
|
3526
4019
|
|
|
3527
4020
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
3528
4021
|
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
@@ -3573,12 +4066,12 @@ var methods = {
|
|
|
3573
4066
|
|
|
3574
4067
|
Result:
|
|
3575
4068
|
[ (json array of strings)
|
|
3576
|
-
"address" (string) A
|
|
4069
|
+
"address" (string) A strict post-quantum (witness v2) address of a PQ key (pq1.../tpq1...)
|
|
3577
4070
|
...
|
|
3578
4071
|
]
|
|
3579
4072
|
|
|
3580
4073
|
Examples:
|
|
3581
|
-
> neurai-cli listpqaddresses
|
|
4074
|
+
> neurai-cli listpqaddresses
|
|
3582
4075
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listpqaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3583
4076
|
**/
|
|
3584
4077
|
listpqaddresses: "listpqaddresses",
|
|
@@ -3604,7 +4097,7 @@ var methods = {
|
|
|
3604
4097
|
]
|
|
3605
4098
|
|
|
3606
4099
|
Examples:
|
|
3607
|
-
> neurai-cli listreceivedbyaccount
|
|
4100
|
+
> neurai-cli listreceivedbyaccount
|
|
3608
4101
|
> neurai-cli listreceivedbyaccount 6 true
|
|
3609
4102
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaccount", "params": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3610
4103
|
**/
|
|
@@ -3628,7 +4121,7 @@ var methods = {
|
|
|
3628
4121
|
"confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
|
|
3629
4122
|
"label" : "label", (string) A comment for the address/transaction, if any
|
|
3630
4123
|
"txids": [
|
|
3631
|
-
n, (numeric) The ids of transactions received with the address
|
|
4124
|
+
n, (numeric) The ids of transactions received with the address
|
|
3632
4125
|
...
|
|
3633
4126
|
]
|
|
3634
4127
|
}
|
|
@@ -3636,11 +4129,29 @@ var methods = {
|
|
|
3636
4129
|
]
|
|
3637
4130
|
|
|
3638
4131
|
Examples:
|
|
3639
|
-
> neurai-cli listreceivedbyaddress
|
|
4132
|
+
> neurai-cli listreceivedbyaddress
|
|
3640
4133
|
> neurai-cli listreceivedbyaddress 6 true
|
|
3641
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/
|
|
3642
4135
|
**/
|
|
3643
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",
|
|
3644
4155
|
/** listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
|
|
3645
4156
|
|
|
3646
4157
|
Get all transactions in blocks since block [blockhash], or all transactions if omitted.
|
|
@@ -3660,7 +4171,7 @@ var methods = {
|
|
|
3660
4171
|
"account":"accountname", (string) DEPRECATED. The account name associated with the transaction. Will be "" for the default account.
|
|
3661
4172
|
"address":"address", (string) The neurai address of the transaction. Not present for move transactions (category = move).
|
|
3662
4173
|
"category":"send|receive", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.
|
|
3663
|
-
"amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves
|
|
4174
|
+
"amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves
|
|
3664
4175
|
outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.
|
|
3665
4176
|
"vout" : n, (numeric) the vout value
|
|
3666
4177
|
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the 'send' category of transactions.
|
|
@@ -3672,8 +4183,6 @@ var methods = {
|
|
|
3672
4183
|
"txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
|
|
3673
4184
|
"time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
|
|
3674
4185
|
"timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
|
|
3675
|
-
"bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
|
|
3676
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
3677
4186
|
"abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
|
|
3678
4187
|
"comment": "...", (string) If a comment is associated with the transaction.
|
|
3679
4188
|
"label" : "label" (string) A comment for the address/transaction, if any
|
|
@@ -3687,7 +4196,7 @@ var methods = {
|
|
|
3687
4196
|
}
|
|
3688
4197
|
|
|
3689
4198
|
Examples:
|
|
3690
|
-
> neurai-cli listsinceblock
|
|
4199
|
+
> neurai-cli listsinceblock
|
|
3691
4200
|
> neurai-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
|
|
3692
4201
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3693
4202
|
**/
|
|
@@ -3709,7 +4218,7 @@ var methods = {
|
|
|
3709
4218
|
]
|
|
3710
4219
|
|
|
3711
4220
|
Examples:
|
|
3712
|
-
> neurai-cli listsnapshotrequests
|
|
4221
|
+
> neurai-cli listsnapshotrequests
|
|
3713
4222
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listsnapshotrequests", "params": ["TRONCO" 345333] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3714
4223
|
**/
|
|
3715
4224
|
listsnapshotrequests: "listsnapshotrequests",
|
|
@@ -3746,22 +4255,22 @@ var methods = {
|
|
|
3746
4255
|
Result:
|
|
3747
4256
|
[
|
|
3748
4257
|
{
|
|
3749
|
-
"account":"accountname", (string) DEPRECATED. The account name associated with the transaction.
|
|
4258
|
+
"account":"accountname", (string) DEPRECATED. The account name associated with the transaction.
|
|
3750
4259
|
It will be "" for the default account.
|
|
3751
|
-
"address":"address", (string) The neurai address of the transaction. Not present for
|
|
4260
|
+
"address":"address", (string) The neurai address of the transaction. Not present for
|
|
3752
4261
|
move transactions (category = move).
|
|
3753
4262
|
"category":"send|receive|move", (string) The transaction category. 'move' is a local (off blockchain)
|
|
3754
4263
|
transaction between accounts, and not associated with an address,
|
|
3755
|
-
transaction id or block. 'send' and 'receive' transactions are
|
|
4264
|
+
transaction id or block. 'send' and 'receive' transactions are
|
|
3756
4265
|
associated with an address, transaction id and block details
|
|
3757
4266
|
"amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the
|
|
3758
4267
|
'move' category for moves outbound. It is positive for the 'receive' category,
|
|
3759
4268
|
and for the 'move' category for inbound funds.
|
|
3760
4269
|
"label": "label", (string) A comment for the address/transaction, if any
|
|
3761
4270
|
"vout": n, (numeric) the vout value
|
|
3762
|
-
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
4271
|
+
"fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
|
|
3763
4272
|
'send' category of transactions.
|
|
3764
|
-
"confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
|
|
4273
|
+
"confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
|
|
3765
4274
|
'receive' category of transactions. Negative confirmations indicate the
|
|
3766
4275
|
transaction conflicts with the block chain
|
|
3767
4276
|
"trusted": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.
|
|
@@ -3772,15 +4281,13 @@ var methods = {
|
|
|
3772
4281
|
"blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
|
|
3773
4282
|
"txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
|
|
3774
4283
|
"time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
|
|
3775
|
-
"timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
|
|
4284
|
+
"timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
|
|
3776
4285
|
for 'send' and 'receive' category of transactions.
|
|
3777
4286
|
"comment": "...", (string) If a comment is associated with the transaction.
|
|
3778
|
-
"otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
|
|
4287
|
+
"otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
|
|
3779
4288
|
from (for receiving funds, positive amounts), or went to (for sending funds,
|
|
3780
4289
|
negative amounts).
|
|
3781
|
-
"
|
|
3782
|
-
may be unknown for unconfirmed transactions not in the mempool
|
|
3783
|
-
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
|
|
4290
|
+
"abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
|
|
3784
4291
|
'send' category of transactions.
|
|
3785
4292
|
}
|
|
3786
4293
|
]
|
|
@@ -3788,7 +4295,7 @@ var methods = {
|
|
|
3788
4295
|
Examples:
|
|
3789
4296
|
|
|
3790
4297
|
List the most recent 10 transactions in the systems
|
|
3791
|
-
> neurai-cli listtransactions
|
|
4298
|
+
> neurai-cli listtransactions
|
|
3792
4299
|
|
|
3793
4300
|
List transactions 100 to 120
|
|
3794
4301
|
> neurai-cli listtransactions "*" 20 100
|
|
@@ -3824,7 +4331,7 @@ var methods = {
|
|
|
3824
4331
|
Result
|
|
3825
4332
|
[ (array of json object)
|
|
3826
4333
|
{
|
|
3827
|
-
"txid" : "txid", (string) the transaction id
|
|
4334
|
+
"txid" : "txid", (string) the transaction id
|
|
3828
4335
|
"vout" : n, (numeric) the vout value
|
|
3829
4336
|
"address" : "address", (string) the neurai address
|
|
3830
4337
|
"account" : "account", (string) DEPRECATED. The associated account, or "" for the default account
|
|
@@ -3842,7 +4349,7 @@ var methods = {
|
|
|
3842
4349
|
]
|
|
3843
4350
|
|
|
3844
4351
|
Examples
|
|
3845
|
-
> neurai-cli listunspent
|
|
4352
|
+
> neurai-cli listunspent
|
|
3846
4353
|
> neurai-cli listunspent 6 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"
|
|
3847
4354
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3848
4355
|
> neurai-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
|
|
@@ -3860,7 +4367,7 @@ var methods = {
|
|
|
3860
4367
|
]
|
|
3861
4368
|
|
|
3862
4369
|
Examples:
|
|
3863
|
-
> neurai-cli listwallets
|
|
4370
|
+
> neurai-cli listwallets
|
|
3864
4371
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3865
4372
|
**/
|
|
3866
4373
|
listwallets: "listwallets",
|
|
@@ -3891,13 +4398,13 @@ var methods = {
|
|
|
3891
4398
|
Examples:
|
|
3892
4399
|
|
|
3893
4400
|
List the unspent transactions
|
|
3894
|
-
> neurai-cli listunspent
|
|
4401
|
+
> neurai-cli listunspent
|
|
3895
4402
|
|
|
3896
4403
|
Lock an unspent transaction
|
|
3897
4404
|
> neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
|
|
3898
4405
|
|
|
3899
4406
|
List the locked transactions
|
|
3900
|
-
> neurai-cli listlockunspent
|
|
4407
|
+
> neurai-cli listlockunspent
|
|
3901
4408
|
|
|
3902
4409
|
Unlock the transaction again
|
|
3903
4410
|
> neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
|
|
@@ -3932,6 +4439,28 @@ var methods = {
|
|
|
3932
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/
|
|
3933
4440
|
**/
|
|
3934
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",
|
|
3935
4464
|
/** ping
|
|
3936
4465
|
|
|
3937
4466
|
Requests that a ping be sent to all other nodes, to measure ping time.
|
|
@@ -3939,7 +4468,7 @@ var methods = {
|
|
|
3939
4468
|
Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
|
|
3940
4469
|
|
|
3941
4470
|
Examples:
|
|
3942
|
-
> neurai-cli ping
|
|
4471
|
+
> neurai-cli ping
|
|
3943
4472
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
3944
4473
|
**/
|
|
3945
4474
|
ping: "ping",
|
|
@@ -3948,15 +4477,15 @@ var methods = {
|
|
|
3948
4477
|
Attempts to submit new block to network mined by kawpow gpu miner via rpc.
|
|
3949
4478
|
|
|
3950
4479
|
Arguments
|
|
3951
|
-
1. "header_hash" (string, required) the
|
|
3952
|
-
2. "mix_hash" (string, required) the mix hash
|
|
3953
|
-
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
|
|
3954
4483
|
|
|
3955
4484
|
Result:
|
|
3956
4485
|
|
|
3957
4486
|
Examples:
|
|
3958
|
-
> neurai-cli pprpcsb "header_hash" "mix_hash"
|
|
3959
|
-
> 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/
|
|
3960
4489
|
**/
|
|
3961
4490
|
pprpcsb: "pprpcsb",
|
|
3962
4491
|
/** preciousblock "blockhash"
|
|
@@ -4032,7 +4561,7 @@ var methods = {
|
|
|
4032
4561
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "purgesnapshot", "params": ["ASSET_NAME" 28546] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4033
4562
|
**/
|
|
4034
4563
|
purgesnapshot: "purgesnapshot",
|
|
4035
|
-
/** reissue "asset_name" qty "to_address" "change_address" ( reissuable ) ( new_units) "( new_ipfs )"
|
|
4564
|
+
/** reissue "asset_name" qty "to_address" "change_address" ( reissuable ) ( new_units) "( new_ipfs )"
|
|
4036
4565
|
|
|
4037
4566
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4038
4567
|
https://github.com/NeuraiProject/rips/blob/master/rip-0002.mediawiki
|
|
@@ -4081,7 +4610,7 @@ var methods = {
|
|
|
4081
4610
|
|
|
4082
4611
|
Examples:
|
|
4083
4612
|
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
|
|
4084
|
-
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
|
|
4613
|
+
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
|
|
4085
4614
|
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress"
|
|
4086
4615
|
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress" -1 true
|
|
4087
4616
|
> neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" false "" "changeaddress" -1 false QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
|
|
@@ -4124,9 +4653,54 @@ var methods = {
|
|
|
4124
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/
|
|
4125
4654
|
**/
|
|
4126
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",
|
|
4127
4700
|
/** requestsnapshot "asset_name" block_height
|
|
4128
4701
|
|
|
4129
|
-
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.
|
|
4130
4704
|
|
|
4131
4705
|
Arguments:
|
|
4132
4706
|
1. "asset_name" (string, required) The asset name for which the snapshot will be taken
|
|
@@ -4161,15 +4735,55 @@ var methods = {
|
|
|
4161
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/
|
|
4162
4736
|
**/
|
|
4163
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",
|
|
4164
4756
|
/** savemempool
|
|
4165
4757
|
|
|
4166
4758
|
Dumps the mempool to disk.
|
|
4167
4759
|
|
|
4168
4760
|
Examples:
|
|
4169
|
-
> neurai-cli savemempool
|
|
4761
|
+
> neurai-cli savemempool
|
|
4170
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/
|
|
4171
4763
|
**/
|
|
4172
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",
|
|
4173
4787
|
/** selfrevokedepin "asset_name"
|
|
4174
4788
|
|
|
4175
4789
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
@@ -4216,10 +4830,10 @@ var methods = {
|
|
|
4216
4830
|
2. "toaddress" (string, required) The neurai address to send funds to.
|
|
4217
4831
|
3. amount (numeric or string, required) The amount in XNA (transaction fee is added on top).
|
|
4218
4832
|
4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
|
|
4219
|
-
5. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
4833
|
+
5. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
4220
4834
|
This is not part of the transaction, just kept in your wallet.
|
|
4221
|
-
6. "comment_to" (string, optional) An optional comment to store the name of the person or organization
|
|
4222
|
-
to which you're sending the transaction. This is not part of the transaction,
|
|
4835
|
+
6. "comment_to" (string, optional) An optional comment to store the name of the person or organization
|
|
4836
|
+
to which you're sending the transaction. This is not part of the transaction,
|
|
4223
4837
|
it is just kept in your wallet.
|
|
4224
4838
|
|
|
4225
4839
|
Result:
|
|
@@ -4237,7 +4851,7 @@ var methods = {
|
|
|
4237
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/
|
|
4238
4852
|
**/
|
|
4239
4853
|
sendfrom: "sendfrom",
|
|
4240
|
-
/** 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")
|
|
4241
4855
|
|
|
4242
4856
|
Send an amount from a specific address to a given address. All xna change will get sent back to the from_address
|
|
4243
4857
|
|
|
@@ -4245,10 +4859,10 @@ var methods = {
|
|
|
4245
4859
|
1. "from_address" (string, required) The neurai address to send from.
|
|
4246
4860
|
2. "to_address" (string, required) The neurai address to send to.
|
|
4247
4861
|
3. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
|
|
4248
|
-
4. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
4862
|
+
4. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
4249
4863
|
This is not part of the transaction, just kept in your wallet.
|
|
4250
|
-
5. "comment_to" (string, optional) A comment to store the name of the person or organization
|
|
4251
|
-
to which you're sending the transaction. This is not part of the
|
|
4864
|
+
5. "comment_to" (string, optional) A comment to store the name of the person or organization
|
|
4865
|
+
to which you're sending the transaction. This is not part of the
|
|
4252
4866
|
transaction, just kept in your wallet.
|
|
4253
4867
|
6. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
|
|
4254
4868
|
The recipient will receive less neurais than you enter in the amount field.
|
|
@@ -4268,7 +4882,7 @@ var methods = {
|
|
|
4268
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/
|
|
4269
4883
|
**/
|
|
4270
4884
|
sendfromaddress: "sendfromaddress",
|
|
4271
|
-
/** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...]
|
|
4885
|
+
/** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] conf_target "estimate_mode")
|
|
4272
4886
|
|
|
4273
4887
|
Send multiple times. Amounts are double-precision floating point numbers.
|
|
4274
4888
|
|
|
@@ -4296,7 +4910,7 @@ var methods = {
|
|
|
4296
4910
|
"CONSERVATIVE"
|
|
4297
4911
|
|
|
4298
4912
|
Result:
|
|
4299
|
-
"txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
|
|
4913
|
+
"txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
|
|
4300
4914
|
the number of addresses.
|
|
4301
4915
|
|
|
4302
4916
|
Examples:
|
|
@@ -4361,17 +4975,39 @@ var methods = {
|
|
|
4361
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/
|
|
4362
4976
|
**/
|
|
4363
4977
|
sendrawtransaction: "sendrawtransaction",
|
|
4364
|
-
/**
|
|
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")
|
|
4365
5001
|
|
|
4366
5002
|
Send an amount to a given address.
|
|
4367
5003
|
|
|
4368
5004
|
Arguments:
|
|
4369
5005
|
1. "address" (string, required) The neurai address to send to.
|
|
4370
5006
|
2. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
|
|
4371
|
-
3. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
5007
|
+
3. "comment" (string, optional) A comment used to store what the transaction is for.
|
|
4372
5008
|
This is not part of the transaction, just kept in your wallet.
|
|
4373
|
-
4. "comment_to" (string, optional) A comment to store the name of the person or organization
|
|
4374
|
-
to which you're sending the transaction. This is not part of the
|
|
5009
|
+
4. "comment_to" (string, optional) A comment to store the name of the person or organization
|
|
5010
|
+
to which you're sending the transaction. This is not part of the
|
|
4375
5011
|
transaction, just kept in your wallet.
|
|
4376
5012
|
5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
|
|
4377
5013
|
The recipient will receive less neurais than you enter in the amount field.
|
|
@@ -4436,7 +5072,7 @@ var methods = {
|
|
|
4436
5072
|
> neurai-cli setgenerate true 1
|
|
4437
5073
|
|
|
4438
5074
|
Check the setting
|
|
4439
|
-
> neurai-cli getgenerate
|
|
5075
|
+
> neurai-cli getgenerate
|
|
4440
5076
|
|
|
4441
5077
|
Turn off generation
|
|
4442
5078
|
> neurai-cli setgenerate false
|
|
@@ -4575,8 +5211,7 @@ var methods = {
|
|
|
4575
5211
|
signrawtransaction: "signrawtransaction",
|
|
4576
5212
|
/** stop
|
|
4577
5213
|
|
|
4578
|
-
Stop Neurai server
|
|
4579
|
-
**/
|
|
5214
|
+
Stop Neurai server.**/
|
|
4580
5215
|
stop: "stop",
|
|
4581
5216
|
/** submitblock "hexdata" ( "dummy" )
|
|
4582
5217
|
|
|
@@ -4594,7 +5229,7 @@ var methods = {
|
|
|
4594
5229
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4595
5230
|
**/
|
|
4596
5231
|
submitblock: "submitblock",
|
|
4597
|
-
/** subscribetochannel
|
|
5232
|
+
/** subscribetochannel
|
|
4598
5233
|
|
|
4599
5234
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4600
5235
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -4666,7 +5301,7 @@ var methods = {
|
|
|
4666
5301
|
7. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
|
|
4667
5302
|
|
|
4668
5303
|
Result:
|
|
4669
|
-
txid[
|
|
5304
|
+
txid[
|
|
4670
5305
|
txid
|
|
4671
5306
|
]
|
|
4672
5307
|
|
|
@@ -4692,7 +5327,7 @@ var methods = {
|
|
|
4692
5327
|
8. "asset_change_address" (string, optional, default = "") the transaction Asset change will be sent to this address
|
|
4693
5328
|
|
|
4694
5329
|
Result:
|
|
4695
|
-
txid[
|
|
5330
|
+
txid[
|
|
4696
5331
|
txid
|
|
4697
5332
|
]
|
|
4698
5333
|
|
|
@@ -4718,7 +5353,7 @@ var methods = {
|
|
|
4718
5353
|
8. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
|
|
4719
5354
|
|
|
4720
5355
|
Result:
|
|
4721
|
-
txid[
|
|
5356
|
+
txid[
|
|
4722
5357
|
txid
|
|
4723
5358
|
]
|
|
4724
5359
|
|
|
@@ -4727,7 +5362,7 @@ var methods = {
|
|
|
4727
5362
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "transferfromaddresses", "params": ["ASSET_NAME" '["fromaddress1", "fromaddress2"]' 20 "to_address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 154652365] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4728
5363
|
**/
|
|
4729
5364
|
transferfromaddresses: "transferfromaddresses",
|
|
4730
|
-
/** transferqualifier "qualifier_name" qty "to_address" ("change_address") ("message") (expire_time)
|
|
5365
|
+
/** transferqualifier "qualifier_name" qty "to_address" ("change_address") ("message") (expire_time)
|
|
4731
5366
|
|
|
4732
5367
|
THIS COMMAND IS NOT YET ACTIVE! Restricted assets must be active
|
|
4733
5368
|
|
|
@@ -4742,7 +5377,7 @@ var methods = {
|
|
|
4742
5377
|
6. "expire_time" (numeric, optional) UTC timestamp of when the message expires
|
|
4743
5378
|
|
|
4744
5379
|
Result:
|
|
4745
|
-
txid[
|
|
5380
|
+
txid[
|
|
4746
5381
|
txid
|
|
4747
5382
|
]
|
|
4748
5383
|
|
|
@@ -4820,7 +5455,7 @@ var methods = {
|
|
|
4820
5455
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unfreezerestrictedasset", "params": ["$RESTRICTED_ASSET" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4821
5456
|
**/
|
|
4822
5457
|
unfreezerestrictedasset: "unfreezerestrictedasset",
|
|
4823
|
-
/** unsubscribefromchannel
|
|
5458
|
+
/** unsubscribefromchannel
|
|
4824
5459
|
|
|
4825
5460
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4826
5461
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -4847,7 +5482,7 @@ var methods = {
|
|
|
4847
5482
|
ttt (numeric) The number of seconds that the server has been running
|
|
4848
5483
|
|
|
4849
5484
|
Examples:
|
|
4850
|
-
> neurai-cli uptime
|
|
5485
|
+
> neurai-cli uptime
|
|
4851
5486
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4852
5487
|
**/
|
|
4853
5488
|
uptime: "uptime",
|
|
@@ -4903,10 +5538,77 @@ var methods = {
|
|
|
4903
5538
|
true|false (boolean) Verified or not
|
|
4904
5539
|
|
|
4905
5540
|
Examples:
|
|
4906
|
-
> neurai-cli verifychain
|
|
5541
|
+
> neurai-cli verifychain
|
|
4907
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/
|
|
4908
5543
|
**/
|
|
4909
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",
|
|
4910
5612
|
/** verifymessage "address" "signature" "message"
|
|
4911
5613
|
|
|
4912
5614
|
Verify a signed message
|
|
@@ -4946,7 +5648,7 @@ var methods = {
|
|
|
4946
5648
|
["txid"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid
|
|
4947
5649
|
**/
|
|
4948
5650
|
verifytxoutproof: "verifytxoutproof",
|
|
4949
|
-
/** viewallmessagechannels
|
|
5651
|
+
/** viewallmessagechannels
|
|
4950
5652
|
|
|
4951
5653
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4952
5654
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -4959,11 +5661,11 @@ var methods = {
|
|
|
4959
5661
|
]
|
|
4960
5662
|
|
|
4961
5663
|
Examples:
|
|
4962
|
-
> neurai-cli viewallmessagechannels
|
|
5664
|
+
> neurai-cli viewallmessagechannels
|
|
4963
5665
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessagechannels", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4964
5666
|
**/
|
|
4965
5667
|
viewallmessagechannels: "viewallmessagechannels",
|
|
4966
|
-
/** viewallmessages
|
|
5668
|
+
/** viewallmessages
|
|
4967
5669
|
|
|
4968
5670
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4969
5671
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -4980,11 +5682,11 @@ var methods = {
|
|
|
4980
5682
|
"Expire UTC Time:" (Date, optional) If the message contains an expire date that is too large, the UTC number will be displayed
|
|
4981
5683
|
|
|
4982
5684
|
Examples:
|
|
4983
|
-
> neurai-cli viewallmessages
|
|
5685
|
+
> neurai-cli viewallmessages
|
|
4984
5686
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
4985
5687
|
**/
|
|
4986
5688
|
viewallmessages: "viewallmessages",
|
|
4987
|
-
/** viewmyrestrictedaddresses
|
|
5689
|
+
/** viewmyrestrictedaddresses
|
|
4988
5690
|
|
|
4989
5691
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
4990
5692
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -5000,11 +5702,11 @@ var methods = {
|
|
|
5000
5702
|
}...
|
|
5001
5703
|
|
|
5002
5704
|
Examples:
|
|
5003
|
-
> neurai-cli viewmyrestrictedaddresses
|
|
5705
|
+
> neurai-cli viewmyrestrictedaddresses
|
|
5004
5706
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmyrestrictedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
5005
5707
|
**/
|
|
5006
5708
|
viewmyrestrictedaddresses: "viewmyrestrictedaddresses",
|
|
5007
|
-
/** viewmytaggedaddresses
|
|
5709
|
+
/** viewmytaggedaddresses
|
|
5008
5710
|
|
|
5009
5711
|
THIS COMMAND IS NOT YET ACTIVE!
|
|
5010
5712
|
https://github.com/NeuraiProject/rips/blob/master/rip-0005.mediawiki
|
|
@@ -5020,12 +5722,110 @@ var methods = {
|
|
|
5020
5722
|
}...
|
|
5021
5723
|
|
|
5022
5724
|
Examples:
|
|
5023
|
-
> neurai-cli viewmytaggedaddresses
|
|
5725
|
+
> neurai-cli viewmytaggedaddresses
|
|
5024
5726
|
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmytaggedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:19001/
|
|
5025
5727
|
**/
|
|
5026
5728
|
viewmytaggedaddresses: "viewmytaggedaddresses"
|
|
5027
5729
|
};
|
|
5028
5730
|
|
|
5731
|
+
// depin.ts
|
|
5732
|
+
var DEPIN_RPC_PROTOCOL = 5;
|
|
5733
|
+
var DEPIN_REMOTE_METHODS = Object.freeze([
|
|
5734
|
+
"depingetmsginfo",
|
|
5735
|
+
"depinpoolstats",
|
|
5736
|
+
"depinmcpstatus",
|
|
5737
|
+
"depinchallenge",
|
|
5738
|
+
"depinreceivemsg",
|
|
5739
|
+
"depinreceiveseq",
|
|
5740
|
+
"depinlistsections",
|
|
5741
|
+
"depinclearmsg",
|
|
5742
|
+
"depinsubmitmsg",
|
|
5743
|
+
"depingetancestorrecipients"
|
|
5744
|
+
]);
|
|
5745
|
+
function isDepinRemoteMethod(method) {
|
|
5746
|
+
return DEPIN_REMOTE_METHODS.includes(method);
|
|
5747
|
+
}
|
|
5748
|
+
function getDepinRequest(params) {
|
|
5749
|
+
const request = Array.isArray(params) && params.length === 1 ? params[0] : params && typeof params === "object" && Object.keys(params).length === 1 ? params.request : null;
|
|
5750
|
+
const protocol = request?.protocol;
|
|
5751
|
+
if (!request || typeof request !== "object" || Array.isArray(request) || !(protocol === 5 || protocol?.isLosslessNumber === true && protocol.value === "5" && typeof protocol.toString === "function" && protocol.toString() === "5")) {
|
|
5752
|
+
throw Object.assign(new Error("DePIN protocol 5 requires one request object"), {
|
|
5753
|
+
code: -8,
|
|
5754
|
+
data: { depin_error: "unsupported_protocol", expected_protocol: 5 }
|
|
5755
|
+
});
|
|
5756
|
+
}
|
|
5757
|
+
return request;
|
|
5758
|
+
}
|
|
5759
|
+
function createDepinNodeRouter(healthyNodes, randomId) {
|
|
5760
|
+
const identities = /* @__PURE__ */ new WeakMap();
|
|
5761
|
+
const pending = /* @__PURE__ */ new WeakMap();
|
|
5762
|
+
const discoveredAt = /* @__PURE__ */ new WeakMap();
|
|
5763
|
+
async function discover(node) {
|
|
5764
|
+
let promise = pending.get(node);
|
|
5765
|
+
if (!promise && Date.now() - (discoveredAt.get(node) ?? 0) < 1e3) return;
|
|
5766
|
+
if (!promise) {
|
|
5767
|
+
discoveredAt.set(node, Date.now());
|
|
5768
|
+
promise = (async () => {
|
|
5769
|
+
const reply = await node.rpc("depingetmsginfo", [{ protocol: 5, request_id: randomId(), timestamp_ms: Date.now() }]);
|
|
5770
|
+
if (reply?.protocol !== 5 || typeof reply.network !== "string" || typeof reply.pool_pubkey !== "string" || typeof reply.pool_root !== "string" || typeof reply.instance_id !== "string")
|
|
5771
|
+
throw new Error("Node has no RPC 5 pool identity");
|
|
5772
|
+
identities.set(node, reply);
|
|
5773
|
+
})().finally(() => pending.delete(node));
|
|
5774
|
+
pending.set(node, promise);
|
|
5775
|
+
}
|
|
5776
|
+
await promise;
|
|
5777
|
+
}
|
|
5778
|
+
return async function route(method, params) {
|
|
5779
|
+
const request = getDepinRequest(params);
|
|
5780
|
+
const nodes = healthyNodes();
|
|
5781
|
+
if (!nodes.length) throw new Error("No healthy RPC node");
|
|
5782
|
+
if (method === "depingetmsginfo") return nodes[0];
|
|
5783
|
+
const target = request;
|
|
5784
|
+
const matches = (node) => {
|
|
5785
|
+
const identity = identities.get(node);
|
|
5786
|
+
return identity && ["network", "pool_pubkey", "pool_root", "instance_id"].every((key) => identity[key] === target[key]);
|
|
5787
|
+
};
|
|
5788
|
+
let found = nodes.find(matches);
|
|
5789
|
+
if (found) return found;
|
|
5790
|
+
await Promise.all(nodes.map((node) => discover(node).catch(() => identities.delete(node))));
|
|
5791
|
+
found = nodes.find(matches);
|
|
5792
|
+
if (!found)
|
|
5793
|
+
throw Object.assign(new Error("DePIN service_mismatch: target pool or instance is unavailable; refresh bootstrap"), {
|
|
5794
|
+
code: -32600,
|
|
5795
|
+
data: { depin_error: "service_mismatch", expected_protocol: 5 }
|
|
5796
|
+
});
|
|
5797
|
+
return found;
|
|
5798
|
+
};
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
// json.ts
|
|
5802
|
+
function assertNoDuplicateJsonKeys(text) {
|
|
5803
|
+
const stack = [];
|
|
5804
|
+
for (let i = 0; i < text.length; i++) {
|
|
5805
|
+
const ch = text[i];
|
|
5806
|
+
if (ch === '"') {
|
|
5807
|
+
const start = i++;
|
|
5808
|
+
while (i < text.length && text[i] !== '"') {
|
|
5809
|
+
if (text[i] === "\\") i++;
|
|
5810
|
+
i++;
|
|
5811
|
+
}
|
|
5812
|
+
if (i >= text.length) throw new SyntaxError("Unterminated JSON string");
|
|
5813
|
+
const top = stack[stack.length - 1];
|
|
5814
|
+
if (top?.keys && top.expectKey) {
|
|
5815
|
+
const key = JSON.parse(text.slice(start, i + 1));
|
|
5816
|
+
if (top.keys.has(key)) throw new SyntaxError("Duplicate JSON key");
|
|
5817
|
+
top.keys.add(key);
|
|
5818
|
+
top.expectKey = false;
|
|
5819
|
+
}
|
|
5820
|
+
} else if (ch === "{" || ch === "[") {
|
|
5821
|
+
if (stack.length >= 128) throw new SyntaxError("JSON nesting limit exceeded");
|
|
5822
|
+
stack.push(ch === "{" ? { keys: /* @__PURE__ */ new Set(), expectKey: true, close: "}" } : { close: "]" });
|
|
5823
|
+
} else if (ch === "}" || ch === "]") {
|
|
5824
|
+
if (stack.pop()?.close !== ch) throw new SyntaxError("Invalid JSON nesting");
|
|
5825
|
+
} else if (ch === "," && stack[stack.length - 1]?.keys) stack[stack.length - 1].expectKey = true;
|
|
5826
|
+
}
|
|
5827
|
+
}
|
|
5828
|
+
|
|
5029
5829
|
// index.ts
|
|
5030
5830
|
var MAINNET_GENESIS_HASH = "00000044d33c0c0ba019be5c0249730424a69cb4c222153322f68c6104484806";
|
|
5031
5831
|
var TESTNET_GENESIS_HASH = "0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021";
|
|
@@ -5079,7 +5879,9 @@ function getRPC(username, password, URL) {
|
|
|
5079
5879
|
const rpcResponse = postData(URL, data, username, password);
|
|
5080
5880
|
rpcResponse.then(async (response) => {
|
|
5081
5881
|
if (response.ok) {
|
|
5082
|
-
const
|
|
5882
|
+
const responseText = await response.text();
|
|
5883
|
+
if (isDepinRemoteMethod(method)) assertNoDuplicateJsonKeys(responseText);
|
|
5884
|
+
const obj = parseRpcJson(responseText);
|
|
5083
5885
|
if (obj && obj.error) {
|
|
5084
5886
|
rejectionFunc({
|
|
5085
5887
|
error: obj.error,
|
|
@@ -5094,7 +5896,9 @@ function getRPC(username, password, URL) {
|
|
|
5094
5896
|
description: null
|
|
5095
5897
|
};
|
|
5096
5898
|
try {
|
|
5097
|
-
|
|
5899
|
+
const responseText = await response.text();
|
|
5900
|
+
if (isDepinRemoteMethod(method)) assertNoDuplicateJsonKeys(responseText);
|
|
5901
|
+
obj = parseRpcJson(responseText);
|
|
5098
5902
|
} catch (e) {
|
|
5099
5903
|
}
|
|
5100
5904
|
const myError = {
|
|
@@ -5125,9 +5929,7 @@ async function postData(url = "", data = {}, username, password) {
|
|
|
5125
5929
|
if (typeof btoa === "function") {
|
|
5126
5930
|
base64Credentials = btoa(`${username}:${password}`);
|
|
5127
5931
|
} else if (Buffer) {
|
|
5128
|
-
base64Credentials = Buffer.from(`${username}:${password}`).toString(
|
|
5129
|
-
"base64"
|
|
5130
|
-
);
|
|
5932
|
+
base64Credentials = Buffer.from(`${username}:${password}`).toString("base64");
|
|
5131
5933
|
}
|
|
5132
5934
|
const response = await fetch(url, {
|
|
5133
5935
|
method: "POST",
|
|
@@ -5149,10 +5951,16 @@ async function postData(url = "", data = {}, username, password) {
|
|
|
5149
5951
|
return response;
|
|
5150
5952
|
}
|
|
5151
5953
|
export {
|
|
5954
|
+
DEPIN_REMOTE_METHODS,
|
|
5955
|
+
DEPIN_RPC_PROTOCOL,
|
|
5152
5956
|
MAINNET_GENESIS_HASH,
|
|
5153
5957
|
TESTNET_GENESIS_HASH,
|
|
5958
|
+
assertNoDuplicateJsonKeys,
|
|
5154
5959
|
assertRpcGenesis,
|
|
5960
|
+
createDepinNodeRouter,
|
|
5961
|
+
getDepinRequest,
|
|
5155
5962
|
getRPC,
|
|
5963
|
+
isDepinRemoteMethod,
|
|
5156
5964
|
methods,
|
|
5157
5965
|
parseRpcJson,
|
|
5158
5966
|
rpcNumber,
|