@neuraiproject/neurai-rpc 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,4505 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+
6
+ $parcel$export(module.exports, "getRPC", () => $80bd448eb6ea085b$export$eb94c228b080d168);
7
+ $parcel$export(module.exports, "methods", () => $ca417a034047e18f$export$e13b82b2b0368a6a);
8
+ const $ca417a034047e18f$export$e13b82b2b0368a6a = {
9
+ /** abandontransaction "txid"
10
+
11
+ Mark in-wallet transaction <txid> as abandoned
12
+ This will mark this transaction and all its in-wallet descendants as abandoned which will allow
13
+ for their inputs to be respent. It can be used to replace "stuck" or evicted transactions.
14
+ It only works on transactions which are not included in a block and are not currently in the mempool.
15
+ It has no effect on transactions which are already conflicted or abandoned.
16
+
17
+ Arguments:
18
+ 1. "txid" (string, required) The transaction id
19
+
20
+ Result:
21
+
22
+ Examples:
23
+ > neurai-cli abandontransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
24
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
25
+ **/ abandontransaction: "abandontransaction",
26
+ /** abortrescan
27
+
28
+ Stops current wallet rescan triggered e.g. by an importprivkey call.
29
+
30
+ Examples:
31
+
32
+ Import a private key
33
+ > neurai-cli importprivkey "mykey"
34
+
35
+ Abort the running wallet rescan
36
+ > neurai-cli abortrescan
37
+
38
+ As a JSON-RPC call
39
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
40
+ **/ abortrescan: "abortrescan",
41
+ /** addmultisigaddress nrequired ["key",...] ( "account" )
42
+
43
+ Add a nrequired-to-sign multisignature address to the wallet.
44
+ Each key is a Neurai address or hex-encoded public key.
45
+ If 'account' is specified (DEPRECATED), assign address to that account.
46
+
47
+ Arguments:
48
+ 1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
49
+ 2. "keys" (string, required) A json array of neurai addresses or hex-encoded public keys
50
+ [
51
+ "address" (string) neurai address or hex-encoded public key
52
+ ...,
53
+ ]
54
+ 3. "account" (string, optional) DEPRECATED. An account to assign the addresses to.
55
+
56
+ Result:
57
+ "address" (string) A neurai address associated with the keys.
58
+
59
+ Examples:
60
+
61
+ Add a multisig address from 2 addresses
62
+ > neurai-cli addmultisigaddress 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"
63
+
64
+ As json rpc call
65
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
66
+ **/ addmultisigaddress: "addmultisigaddress",
67
+ /** addnode "node" "add|remove|onetry"
68
+
69
+ Attempts to add or remove a node from the addnode list.
70
+ Or try a connection to a node once.
71
+ Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be
72
+ full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
73
+
74
+ Arguments:
75
+ 1. "node" (string, required) The node (see getpeerinfo for nodes)
76
+ 2. "command" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once
77
+
78
+ Examples:
79
+ > neurai-cli addnode "192.168.0.6:8767" "onetry"
80
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:8767", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
81
+ **/ addnode: "addnode",
82
+ /** addtagtoaddress tag_name to_address (change_address) (asset_data)
83
+
84
+ Assign a tag to a address
85
+
86
+ Arguments:
87
+ 1. "tag_name" (string, required) the name of the tag you are assigning to the address, if it doens't have '#' at the front it will be added
88
+ 2. "to_address" (string, required) the address that will be assigned the tag
89
+ 3. "change_address" (string, optional) The change address for the qualifier token to be sent to
90
+ 4. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the qualifier token
91
+
92
+ Result:
93
+ "txid" (string) The transaction id
94
+
95
+ Examples:
96
+ > neurai-cli addtagtoaddress "#TAG" "to_address"
97
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addtagtoaddress", "params": ["#TAG" "to_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
98
+ > neurai-cli addtagtoaddress "#TAG" "to_address" "change_address"
99
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addtagtoaddress", "params": ["#TAG" "to_address" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
100
+ **/ addtagtoaddress: "addtagtoaddress",
101
+ /** addwitnessaddress "address"
102
+
103
+ Add a witness address for a script (with pubkey or redeemscript known).
104
+ It returns the witness script.
105
+
106
+ Arguments:
107
+ 1. "address" (string, required) An address known to the wallet
108
+
109
+ Result:
110
+ "witnessaddress", (string) The value of the new address (P2SH of witness script).
111
+ }
112
+ **/ addwitnessaddress: "addwitnessaddress",
113
+ /** backupwallet "destination"
114
+
115
+ Safely copies current wallet file to destination, which can be a directory or a path with filename.
116
+
117
+ Arguments:
118
+ 1. "destination" (string) The destination directory or file
119
+
120
+ Examples:
121
+ > neurai-cli backupwallet "backup.dat"
122
+ > 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:8766/
123
+ **/ backupwallet: "backupwallet",
124
+ /** bumpfee has been deprecated on the XNA Wallet.**/ bumpfee: "bumpfee",
125
+ /** cancelsnapshotrequest "asset_name" block_height
126
+
127
+ Cancels the specified snapshot request.
128
+
129
+ Arguments:
130
+ 1. "asset_name" (string, required) The asset name for which the snapshot will be taken
131
+ 2. "block_height" (number, required) The block height at which the snapshot will be take
132
+
133
+ Result:
134
+ {
135
+ request_status: (string),
136
+ }
137
+
138
+ Examples:
139
+ > neurai-cli cancelsnapshotrequest "TRONCO" 12345
140
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "cancelsnapshotrequest", "params": ["PHATSTACKS" 34987] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
141
+ **/ cancelsnapshotrequest: "cancelsnapshotrequest",
142
+ /** checkaddressrestriction address restricted_name
143
+
144
+ Checks to see if an address has been frozen by the given restricted asset
145
+
146
+ Arguments:
147
+ 1. "address" (string, required) the XNA address to search
148
+ 1. "restricted_name" (string, required) the restricted asset to search
149
+
150
+ Result:
151
+ "true/false", (boolean) If the address is frozen
152
+
153
+ Examples:
154
+ > neurai-cli checkaddressrestriction "address" "restricted_name"
155
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "checkaddressrestriction", "params": ["address" "restricted_name"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
156
+ **/ checkaddressrestriction: "checkaddressrestriction",
157
+ /** checkaddresstag address tag_name
158
+
159
+ Checks to see if an address has the given tag
160
+
161
+ Arguments:
162
+ 1. "address" (string, required) the XNA address to search
163
+ 1. "tag_name" (string, required) the tag to search
164
+
165
+ Result:
166
+ "true/false", (boolean) If the address has the tag
167
+
168
+ Examples:
169
+ > neurai-cli checkaddresstag "address" "tag_name"
170
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "checkaddresstag", "params": ["address" "tag_name"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
171
+ **/ checkaddresstag: "checkaddresstag",
172
+ /** checkglobalrestriction restricted_name
173
+
174
+ Checks to see if a restricted asset is globally frozen
175
+
176
+ Arguments:
177
+ 1. "restricted_name" (string, required) the restricted asset to search
178
+
179
+ Result:
180
+ "true/false", (boolean) If the restricted asset is frozen globally
181
+
182
+ Examples:
183
+ > neurai-cli checkglobalrestriction "restricted_name"
184
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "checkglobalrestriction", "params": ["restricted_name"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
185
+ **/ checkglobalrestriction: "checkglobalrestriction",
186
+ /** clearbanned
187
+
188
+ Clear all banned IPs.
189
+
190
+ Examples:
191
+ > neurai-cli clearbanned
192
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
193
+ **/ clearbanned: "clearbanned",
194
+ /** clearmempool
195
+
196
+ Removes all transaction from the mempool
197
+
198
+ Examples:
199
+ > neurai-cli clearmempool
200
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
201
+ **/ clearmempool: "clearmempool",
202
+ /** clearmessages
203
+
204
+ Delete current database of messages
205
+
206
+ Result:[
207
+
208
+ ]
209
+
210
+ Examples:
211
+ > neurai-cli clearmessages
212
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
213
+ **/ clearmessages: "clearmessages",
214
+ /** combinerawtransaction ["hexstring",...]
215
+
216
+ Combine multiple partially signed transactions into one transaction.
217
+ The combined transaction may be another partially signed transaction or a
218
+ fully signed transaction.
219
+ Arguments:
220
+ 1. "txs" (string) A json array of hex strings of partially signed transactions
221
+ [
222
+ "hexstring" (string) A transaction hash
223
+ ,...
224
+ ]
225
+
226
+ Result:
227
+ "hex" (string) The hex-encoded raw transaction with signature(s)
228
+
229
+ Examples:
230
+ > neurai-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"]
231
+ **/ combinerawtransaction: "combinerawtransaction",
232
+ /** createmultisig nrequired ["key",...]
233
+
234
+ Creates a multi-signature address with n signature of m keys required.
235
+ It returns a json object with the address and redeemScript.
236
+
237
+ Arguments:
238
+ 1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
239
+ 2. "keys" (string, required) A json array of keys which are neurai addresses or hex-encoded public keys
240
+ [
241
+ "key" (string) neurai address or hex-encoded public key
242
+ ,...
243
+ ]
244
+
245
+ Result:
246
+ {
247
+ "address":"multisigaddress", (string) The value of the new multisig address.
248
+ "redeemScript":"script" (string) The string value of the hex-encoded redemption script.
249
+ }
250
+
251
+ Examples:
252
+
253
+ Create a multisig address from 2 addresses
254
+ > neurai-cli createmultisig 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"
255
+
256
+ As a json rpc call
257
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createmultisig", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
258
+ **/ createmultisig: "createmultisig",
259
+ /** createrawtransaction [{"txid":"id","vout":n},...] {"address":(amount or object),"data":"hex",...}
260
+ ( locktime ) ( replaceable )
261
+
262
+ Create a transaction spending the given inputs and creating new outputs.
263
+ Outputs are addresses (paired with a XNA amount, data or object specifying an asset operation) or data.
264
+ Returns hex-encoded raw transaction.
265
+ Note that the transaction's inputs are not signed, and
266
+ it is not stored in the wallet or transmitted to the network.
267
+
268
+ Paying for Asset Operations:
269
+ Some operations require an amount of XNA to be sent to a burn address:
270
+
271
+ Operation Amount + Burn Address
272
+ transfer 0
273
+ transferwithmessage 0
274
+ issue 500 to RXissueAssetXXXXXXXXXXXXXXXXXhhZGt
275
+ issue (subasset) 100 to RXissueSubAssetXXXXXXXXXXXXXWcwhwL
276
+ issue_unique 5 to RXissueUniqueAssetXXXXXXXXXXWEAe58
277
+ reissue 100 to RXReissueAssetXXXXXXXXXXXXXXVEFAWu
278
+ issue_restricted 1500 to RXissueRestrictedXXXXXXXXXXXXzJZ1q
279
+ reissue_restricted 100 to RXReissueAssetXXXXXXXXXXXXXXVEFAWu
280
+ issue_qualifier 1000 to RXissueQuaLifierXXXXXXXXXXXXUgEDbC
281
+ issue_qualifier (sub) 100 to RXissueSubQuaLifierXXXXXXXXXVTzvv5
282
+ tag_addresses 0.1 to RXaddTagBurnXXXXXXXXXXXXXXXXZQm5ya (per address)
283
+ untag_addresses 0.1 to RXaddTagBurnXXXXXXXXXXXXXXXXZQm5ya (per address)
284
+ freeze_addresses 0
285
+ unfreeze_addresses 0
286
+ freeze_asset 0
287
+ unfreeze_asset 0
288
+
289
+ Assets For Authorization:
290
+ These operations require a specific asset input for authorization:
291
+ Root Owner Token:
292
+ reissue
293
+ issue_unique
294
+ issue_restricted
295
+ reissue_restricted
296
+ freeze_addresses
297
+ unfreeze_addresses
298
+ freeze_asset
299
+ unfreeze_asset
300
+ Root Qualifier Token:
301
+ issue_qualifier (when issuing subqualifier)
302
+ Qualifier Token:
303
+ tag_addresses
304
+ untag_addresses
305
+
306
+ Output Ordering:
307
+ Asset operations require the following:
308
+ 1) All coin outputs come first (including the burn output).
309
+ 2) The owner token change output comes next (if required).
310
+ 3) An issue, reissue, or any number of transfers comes last
311
+ (different types can't be mixed in a single transaction).
312
+
313
+ Arguments:
314
+ 1. "inputs" (array, required) A json array of json objects
315
+ [
316
+ {
317
+ "txid":"id", (string, required) The transaction id
318
+ "vout":n, (number, required) The output number
319
+ "sequence":n (number, optional) The sequence number
320
+ }
321
+ ,...
322
+ ]
323
+ 2. "outputs" (object, required) a json object with outputs
324
+ {
325
+ "address": (string, required) The destination neurai address.
326
+ Each output must have a different address.
327
+ x.xxx (number or string, required) The XNA amount
328
+ or
329
+ { (object) A json object of assets to send
330
+ "transfer":
331
+ {
332
+ "asset-name": (string, required) asset name
333
+ asset-quantity (number, required) the number of raw units to transfer
334
+ ,...
335
+ }
336
+ }
337
+ or
338
+ { (object) A json object of describing the transfer and message contents to send
339
+ "transferwithmessage":
340
+ {
341
+ "asset-name": (string, required) asset name
342
+ asset-quantity, (number, required) the number of raw units to transfer
343
+ "message":"hash", (string, required) ipfs hash or a txid hash
344
+ "expire_time": n (number, required) utc time in seconds to expire the message
345
+ }
346
+ }
347
+ or
348
+ { (object) A json object describing new assets to issue
349
+ "issue":
350
+ {
351
+ "asset_name":"asset-name", (string, required) new asset name
352
+ "asset_quantity":n, (number, required) the number of raw units to issue
353
+ "units":[1-8], (number, required) display units, between 1 (integral) to 8 (max precision)
354
+ "reissuable":[0-1], (number, required) 1=reissuable asset
355
+ "has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
356
+ "ipfs_hash":"hash" (string, optional) an ipfs hash for discovering asset metadata
357
+ }
358
+ }
359
+ or
360
+ { (object) A json object describing new unique assets to issue
361
+ "issue_unique":
362
+ {
363
+ "root_name":"root-name", (string, required) name of the asset the unique asset(s)
364
+ are being issued under
365
+ "asset_tags":["asset_tag", ...], (array, required) the unique tag for each asset which is to be issued
366
+ "ipfs_hashes":["hash", ...], (array, optional) ipfs hashes corresponding to each supplied tag
367
+ (should be same size as "asset_tags")
368
+ }
369
+ }
370
+ or
371
+ { (object) A json object describing follow-on asset issue.
372
+ "reissue":
373
+ {
374
+ "asset_name":"asset-name", (string, required) name of asset to be reissued
375
+ "asset_quantity":n, (number, required) the number of raw units to issue
376
+ "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
377
+ "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
378
+ Overrides the current ipfs hash if given
379
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
380
+ If not given, it will be sent to the output address
381
+ }
382
+ }
383
+ or
384
+ { (object) A json object describing how restricted asset to issue
385
+ "issue_restricted":
386
+ {
387
+ "asset_name":"asset-name",(string, required) new asset name
388
+ "asset_quantity":n, (number, required) the number of raw units to issue
389
+ "verifier_string":"text", (string, required) the verifier string to be used for a restricted
390
+ asset transfer verification
391
+ "units":[0-8], (number, required) display units, between 0 (integral) and 8 (max precision)
392
+ "reissuable":[0-1], (number, required) 1=reissuable asset
393
+ "has_ipfs":[0-1], (number, required) 1=passing ipfs_hash
394
+ "ipfs_hash":"hash", (string, optional) an ipfs hash for discovering asset metadata
395
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
396
+ If not given, it will be sent to the output address
397
+ }
398
+ }
399
+ or
400
+ { (object) A json object describing follow-on asset issue.
401
+ "reissue_restricted":
402
+ {
403
+ "asset_name":"asset-name", (string, required) name of asset to be reissued
404
+ "asset_quantity":n, (number, required) the number of raw units to issue
405
+ "reissuable":[0-1], (number, optional) default is 1, 1=reissuable asset
406
+ "verifier_string":"text", (string, optional) the verifier string to be used for a restricted asset
407
+ transfer verification
408
+ "ipfs_hash":"hash", (string, optional) An ipfs hash for discovering asset metadata,
409
+ Overrides the current ipfs hash if given
410
+ "owner_change_address" (string, optional) the address where the owner token will be sent to.
411
+ If not given, it will be sent to the output address
412
+ }
413
+ }
414
+ or
415
+ { (object) A json object describing a new qualifier to issue.
416
+ "issue_qualifier":
417
+ {
418
+ "asset_name":"asset_name", (string, required) a qualifier name (starts with '#')
419
+ "asset_quantity":n, (numeric, optional, default=1) the number of units to be issued (1 to 10)
420
+ "has_ipfs":[0-1], (boolean, optional, default=false), whether ifps hash is going
421
+ to be added to the asset
422
+ "ipfs_hash":"hash", (string, optional but required if has_ipfs = 1), an ipfs hash or a
423
+ txid hash once RIP5 is activated
424
+ "root_change_address" (string, optional) Only applies when issuing subqualifiers.
425
+ The address where the root qualifier will be sent.
426
+ If not specified, it will be sent to the output address.
427
+ "change_quantity":"qty" (numeric, optional) the asset change amount (defaults to 1)
428
+ }
429
+ }
430
+ or
431
+ { (object) A json object describing addresses to be tagged.
432
+ The address in the key will used as the asset change address.
433
+ "tag_addresses":
434
+ {
435
+ "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
436
+ "addresses":["addr", ...], (array, required) the addresses to be tagged (up to 10)
437
+ "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
438
+ }
439
+ }
440
+ or
441
+ { (object) A json object describing addresses to be untagged.
442
+ The address in the key will be used as the asset change address.
443
+ "untag_addresses":
444
+ {
445
+ "qualifier":"qualifier", (string, required) a qualifier name (starts with '#')
446
+ "addresses":["addr", ...], (array, required) the addresses to be untagged (up to 10)
447
+ "change_quantity":"qty", (numeric, optional) the asset change amount (defaults to 1)
448
+ }
449
+ }
450
+ or
451
+ { (object) A json object describing addresses to be frozen.
452
+ The address in the key will used as the owner change address.
453
+ "freeze_addresses":
454
+ {
455
+ "asset_name":"asset_name", (string, required) a restricted asset name (starts with '$')
456
+ "addresses":["addr", ...], (array, required) the addresses to be frozen (up to 10)
457
+ }
458
+ }
459
+ or
460
+ { (object) A json object describing addresses to be frozen.
461
+ The address in the key will be used as the owner change address.
462
+ "unfreeze_addresses":
463
+ {
464
+ "asset_name":"asset_name", (string, required) a restricted asset name (starts with '$')
465
+ "addresses":["addr", ...], (array, required) the addresses to be untagged (up to 10)
466
+ }
467
+ }
468
+ or
469
+ { (object) A json object describing an asset to be frozen.
470
+ The address in the key will used as the owner change address.
471
+ "freeze_asset":
472
+ {
473
+ "asset_name":"asset_name", (string, required) a restricted asset name (starts with '$')
474
+ }
475
+ }
476
+ or
477
+ { (object) A json object describing an asset to be frozen.
478
+ The address in the key will be used as the owner change address.
479
+ "unfreeze_asset":
480
+ {
481
+ "asset_name":"asset_name", (string, required) a restricted asset name (starts with '$')
482
+ }
483
+ }
484
+ or
485
+ "data": "hex" (string, required) The key is "data", the value is hex encoded data
486
+ ,...
487
+ }
488
+ 3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs
489
+
490
+ Result:
491
+ "transaction" (string) hex string of the transaction
492
+
493
+ Examples:
494
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0}]" "{\"address\":0.01}"
495
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0}]" "{\"data\":\"00010203\"}"
496
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0}]" "{\"RXissueAssetXXXXXXXXXXXXXXXXXhhZGt\":500,\"change_address\":change_amount,\"issuer_address\":{\"issue\":{\"asset_name\":\"MYASSET\",\"asset_quantity\":1000000,\"units\":1,\"reissuable\":0,\"has_ipfs\":1,\"ipfs_hash\":\"43f81c6f2c0593bde5a85e09ae662816eca80797\"}}}"
497
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0}]" "{\"RXissueRestrictedXXXXXXXXXXXXzJZ1q\":1500,\"change_address\":change_amount,\"issuer_address\":{\"issue_restricted\":{\"asset_name\":\"$MYASSET\",\"asset_quantity\":1000000,\"verifier_string\":\"#TAG & !KYC\",\"units\":1,\"reissuable\":0,\"has_ipfs\":1,\"ipfs_hash\":\"43f81c6f2c0593bde5a85e09ae662816eca80797\"}}}"
498
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0}]" "{\"RXissueUniqueAssetXXXXXXXXXXWEAe58\":20,\"change_address\":change_amount,\"issuer_address\":{\"issue_unique\":{\"root_name\":\"MYASSET\",\"asset_tags\":[\"ALPHA\",\"BETA\"],\"ipfs_hashes\":[\"43f81c6f2c0593bde5a85e09ae662816eca80797\",\"43f81c6f2c0593bde5a85e09ae662816eca80797\"]}}}"
499
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0},{\"txid\":\"myasset\",\"vout\":0}]" "{\"address\":{\"transfer\":{\"MYASSET\":50}}}"
500
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0},{\"txid\":\"myasset\",\"vout\":0}]" "{\"address\":{\"transferwithmessage\":{\"MYASSET\":50,\"message\":\"hash\",\"expire_time\": utc_time}}}"
501
+ > neurai-cli createrawtransaction "[{\"txid\":\"mycoin\",\"vout\":0},{\"txid\":\"myownership\",\"vout\":0}]" "{\"issuer_address\":{\"reissue\":{\"asset_name\":\"MYASSET\",\"asset_quantity\":2000000}}}"
502
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"mycoin\",\"vout\":0}]", "{\"data\":\"00010203\"}"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
503
+ **/ createrawtransaction: "createrawtransaction",
504
+ /** decodeblock "blockhex"
505
+
506
+ Arguments:
507
+ 1. "blockhex" (string, required) The block hex
508
+
509
+ Result:
510
+ {
511
+ "hash" : "hash", (string) the block hash (same as provided)
512
+ "size" : n, (numeric) The block size
513
+ "strippedsize" : n, (numeric) The block size excluding witness data
514
+ "weight" : n (numeric) The block weight as defined in BIP 141
515
+ "height" : n, (numeric) The block height or index
516
+ "version" : n, (numeric) The block version
517
+ "versionHex" : "00000000", (string) The block version formatted in hexadecimal
518
+ "merkleroot" : "xxxx", (string) The merkle root
519
+ "tx" : [ (array of string) The transaction ids
520
+ "transactionid" (string) The transaction id
521
+ ,...
522
+ ],
523
+ "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
524
+ "nonce" : n, (numeric) The nonce
525
+ "bits" : "1d00ffff", (string) The bits
526
+ }
527
+
528
+ Examples:
529
+ > neurai-cli decodeblock "xxxx"
530
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodeblock", "params": ["xxxx"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
531
+ **/ decodeblock: "decodeblock",
532
+ /** decoderawtransaction "hexstring"
533
+
534
+ Return a JSON object representing the serialized, hex-encoded transaction.
535
+
536
+ Arguments:
537
+ 1. "hexstring" (string, required) The transaction hex string
538
+
539
+ Result:
540
+ {
541
+ "txid" : "id", (string) The transaction id
542
+ "hash" : "id", (string) The transaction hash (differs from txid for witness transactions)
543
+ "size" : n, (numeric) The transaction size
544
+ "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions)
545
+ "version" : n, (numeric) The version
546
+ "locktime" : ttt, (numeric) The lock time
547
+ "vin" : [ (array of json objects)
548
+ {
549
+ "txid": "id", (string) The transaction id
550
+ "vout": n, (numeric) The output number
551
+ "scriptSig": { (json object) The script
552
+ "asm": "asm", (string) asm
553
+ "hex": "hex" (string) hex
554
+ },
555
+ "txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any)
556
+ "sequence": n (numeric) The script sequence number
557
+ }
558
+ ,...
559
+ ],
560
+ "vout" : [ (array of json objects)
561
+ {
562
+ "value" : x.xxx, (numeric) The value in XNA
563
+ "n" : n, (numeric) index
564
+ "scriptPubKey" : { (json object)
565
+ "asm" : "asm", (string) the asm
566
+ "hex" : "hex", (string) the hex
567
+ "reqSigs" : n, (numeric) The required sigs
568
+ "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
569
+ "asset" : { (json object) optional
570
+ "name" : "name", (string) the asset name
571
+ "amount" : n, (numeric) the amount of asset that was sent
572
+ "message" : "message", (string optional) the message if one was sent
573
+ "expire_time" : n, (numeric optional) the message epoch expiration time if one was set
574
+ "addresses" : [ (json array of string)
575
+ "12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc" (string) neurai address
576
+ ,...
577
+ ]
578
+ }
579
+ }
580
+ ,...
581
+ ],
582
+ }
583
+
584
+ Examples:
585
+ > neurai-cli decoderawtransaction "hexstring"
586
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
587
+ **/ decoderawtransaction: "decoderawtransaction",
588
+ /** decodescript "hexstring"
589
+
590
+ Decode a hex-encoded script.
591
+
592
+ Arguments:
593
+ 1. "hexstring" (string) the hex encoded script
594
+
595
+ Result:
596
+ {
597
+ "asm":"asm", (string) Script public key
598
+ "hex":"hex", (string) hex encoded public key
599
+ "type":"type", (string) The output type
600
+ "asset" : { (json object) optional
601
+ "name" : "name", (string) the asset name
602
+ "amount" : n, (numeric) the amount of asset that was sent
603
+ "message" : "message", (string optional) the message if one was sent
604
+ "expire_time" : n, (numeric optional ) the message epoch expiration time if one was set
605
+ "reqSigs": n, (numeric) The required signatures
606
+ "addresses": [ (json array of string)
607
+ "address" (string) neurai address
608
+ ,...
609
+ ],
610
+ "p2sh":"address", (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
611
+ "(The following only appears if the script is an asset script)
612
+ "asset_name":"name", (string) Name of the asset.
613
+ "amount":"x.xx", (numeric) The amount of assets interacted with.
614
+ "units": n, (numeric) The units of the asset. (Only appears in the type (new_asset))
615
+ "reissuable": true|false, (boolean) If this asset is reissuable. (Only appears in type (new_asset|reissue_asset))
616
+ "hasIPFS": true|false, (boolean) If this asset has an IPFS hash. (Only appears in type (new_asset if hasIPFS is true))
617
+ "ipfs_hash": "hash", (string) The ipfs hash for the new asset. (Only appears in type (new_asset))
618
+ "new_ipfs_hash":"hash", (string) If new ipfs hash (Only appears in type. (reissue_asset))
619
+ }
620
+
621
+ Examples:
622
+ > neurai-cli decodescript "hexstring"
623
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
624
+ **/ decodescript: "decodescript",
625
+ /** disconnectnode "[address]" [nodeid]
626
+
627
+ Immediately disconnects from the specified peer node.
628
+
629
+ Strictly one out of 'address' and 'nodeid' can be provided to identify the node.
630
+
631
+ To disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.
632
+
633
+ Arguments:
634
+ 1. "address" (string, optional) The IP address/port of the node
635
+ 2. "nodeid" (number, optional) The node ID (see getpeerinfo for node IDs)
636
+
637
+ Examples:
638
+ > neurai-cli disconnectnode "192.168.0.6:8767"
639
+ > neurai-cli disconnectnode "" 1
640
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["192.168.0.6:8767"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
641
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
642
+ **/ disconnectnode: "disconnectnode",
643
+ /** distributereward "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" ) ("change_address") ("dry_run")
644
+
645
+ Splits the specified amount of the distribution asset to all owners of asset_name that are not in the optional exclusion_addresses
646
+
647
+ Arguments:
648
+ 1. "asset_name" (string, required) The reward will be distributed all owners of this asset
649
+ 2. "snapshot_height" (number, required) The block height of the ownership snapshot
650
+ 3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
651
+ 4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
652
+ 5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
653
+ 6. "change_address" (string, optional) If the rewards can't be fully distributed. The change will be sent to this address
654
+
655
+ Result:
656
+ {
657
+ error_txn_gen_failed: (string),
658
+ error_nsf: (string),
659
+ error_rejects: (string),
660
+ error_db_update: (string),
661
+ batch_results: [
662
+ {
663
+ transaction_id: (string),
664
+ error_txn_rejected: (string),
665
+ total_amount: (number),
666
+ fee: (number),
667
+ expected_count: (number),
668
+ actual_count: (number),
669
+ }
670
+ ]
671
+ }
672
+
673
+ Examples:
674
+ > neurai-cli distributereward "TRONCO" 12345 "XNA" 1000
675
+ > neurai-cli distributereward "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
676
+ > 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:8766/
677
+ > 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:8766/
678
+ **/ distributereward: "distributereward",
679
+ /** dumpprivkey "address"
680
+
681
+ Reveals the private key corresponding to 'address'.
682
+ Then the importprivkey can be used with this output
683
+
684
+ Arguments:
685
+ 1. "address" (string, required) The neurai address for the private key
686
+
687
+ Result:
688
+ "key" (string) The private key
689
+
690
+ Examples:
691
+ > neurai-cli dumpprivkey "myaddress"
692
+ > neurai-cli importprivkey "mykey"
693
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpprivkey", "params": ["myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
694
+ **/ dumpprivkey: "dumpprivkey",
695
+ /** dumpwallet "filename"
696
+
697
+ Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.
698
+
699
+ Arguments:
700
+ 1. "filename" (string, required) The filename with path (either absolute or relative to neuraid)
701
+
702
+ Result:
703
+ { (json object)
704
+ "filename" : { (string) The filename with full absolute path
705
+ }
706
+
707
+ Examples:
708
+ > neurai-cli dumpwallet "test"
709
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
710
+ **/ dumpwallet: "dumpwallet",
711
+ /** encryptwallet "passphrase"
712
+
713
+ Encrypts the wallet with 'passphrase'. This is for first time encryption.
714
+ After this, any calls that interact with private keys such as sending or signing
715
+ will require the passphrase to be set prior the making these calls.
716
+ Use the walletpassphrase call for this, and then walletlock call.
717
+ If the wallet is already encrypted, use the walletpassphrasechange call.
718
+ Note that this will shutdown the server.
719
+
720
+ Arguments:
721
+ 1. "passphrase" (string) The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.
722
+
723
+ Examples:
724
+
725
+ Encrypt your wallet
726
+ > neurai-cli encryptwallet "my pass phrase"
727
+
728
+ Now set the passphrase to use the wallet, such as for signing or sending neurai
729
+ > neurai-cli walletpassphrase "my pass phrase"
730
+
731
+ Now we can do something like sign
732
+ > neurai-cli signmessage "address" "test message"
733
+
734
+ Now lock the wallet again by removing the passphrase
735
+ > neurai-cli walletlock
736
+
737
+ As a json rpc call
738
+ > 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:8766/
739
+ **/ encryptwallet: "encryptwallet",
740
+ /** estimatefee nblocks
741
+
742
+ DEPRECATED. Please use estimatesmartfee for more intelligent estimates.
743
+ Estimates the approximate fee per kilobyte needed for a transaction to begin
744
+ confirmation within nblocks blocks. Uses virtual transaction size of transaction
745
+ as defined in BIP 141 (witness data is discounted).
746
+
747
+ Arguments:
748
+ 1. nblocks (numeric, required)
749
+
750
+ Result:
751
+ n (numeric) estimated fee-per-kilobyte
752
+
753
+ A negative value is returned if not enough transactions and blocks
754
+ have been observed to make an estimate.
755
+ -1 is always returned for nblocks == 1 as it is impossible to calculate
756
+ a fee that is high enough to get reliably included in the next block.
757
+
758
+ Example:
759
+ > neurai-cli estimatefee 6
760
+ **/ estimatefee: "estimatefee",
761
+ /** estimatesmartfee conf_target ("estimate_mode")
762
+
763
+ Estimates the approximate fee per kilobyte needed for a transaction to begin
764
+ confirmation within conf_target blocks if possible and return the number of blocks
765
+ for which the estimate is valid. Uses virtual transaction size as defined
766
+ in BIP 141 (witness data is discounted).
767
+
768
+ Arguments:
769
+ 1. conf_target (numeric) Confirmation target in blocks (1 - 1008)
770
+ 2. "estimate_mode" (string, optional, default=CONSERVATIVE) The fee estimate mode.
771
+ Whether to return a more conservative estimate which also satisfies
772
+ a longer history. A conservative estimate potentially returns a
773
+ higher feerate and is more likely to be sufficient for the desired
774
+ target, but is not as responsive to short term drops in the
775
+ prevailing fee market. Must be one of:
776
+ "UNSET" (defaults to CONSERVATIVE)
777
+ "ECONOMICAL"
778
+ "CONSERVATIVE"
779
+
780
+ Result:
781
+ {
782
+ "feerate" : x.x, (numeric, optional) estimate fee rate in XNA/kB
783
+ "errors": [ str... ] (json array of strings, optional) Errors encountered during processing
784
+ "blocks" : n (numeric) block number where estimate was found
785
+ }
786
+
787
+ The request target will be clamped between 2 and the highest target
788
+ fee estimation is able to return based on how long it has been running.
789
+ An error is returned if not enough transactions and blocks
790
+ have been observed to make an estimate for any number of blocks.
791
+
792
+ Example:
793
+ > neurai-cli estimatesmartfee 6
794
+ **/ estimatesmartfee: "estimatesmartfee",
795
+ /** freezeaddress asset_name address (change_address) (asset_data)
796
+
797
+ Freeze an address from transferring a restricted asset
798
+
799
+ Arguments:
800
+ 1. "asset_name" (string, required) the name of the restricted asset you want to freeze
801
+ 2. "address" (string, required) the address that will be frozen
802
+ 3. "change_address" (string, optional) The change address for the owner token of the restricted asset
803
+ 4. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the owner token
804
+
805
+ Result:
806
+ "txid" (string) The transaction id
807
+
808
+ Examples:
809
+ > neurai-cli freezeaddress "$RESTRICTED_ASSET" "address"
810
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "freezeaddress", "params": ["$RESTRICTED_ASSET" "address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
811
+ > neurai-cli freezeaddress "$RESTRICTED_ASSET" "address" "change_address"
812
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "freezeaddress", "params": ["$RESTRICTED_ASSET" "address" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
813
+ **/ freezeaddress: "freezeaddress",
814
+ /** freezerestrictedasset asset_name (change_address) (asset_data)
815
+
816
+ Freeze all trading for a specific restricted asset
817
+
818
+ Arguments:
819
+ 1. "asset_name" (string, required) the name of the restricted asset you want to unfreeze
820
+ 2. "change_address" (string, optional) The change address for the owner token of the restricted asset
821
+ 3. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the owner token
822
+
823
+ Result:
824
+ "txid" (string) The transaction id
825
+
826
+ Examples:
827
+ > neurai-cli freezerestrictedasset "$RESTRICTED_ASSET"
828
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "freezerestrictedasset", "params": ["$RESTRICTED_ASSET"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
829
+ > neurai-cli freezerestrictedasset "$RESTRICTED_ASSET" "change_address"
830
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "freezerestrictedasset", "params": ["$RESTRICTED_ASSET" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
831
+ **/ freezerestrictedasset: "freezerestrictedasset",
832
+ /** fundrawtransaction "hexstring" ( options )
833
+
834
+ Add inputs to a transaction until it has enough in value to meet its out value.
835
+ This will not modify existing inputs, and will add at most one change output to the outputs.
836
+ No existing outputs will be modified unless "subtractFeeFromOutputs" is specified.
837
+ Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.
838
+ The inputs added will not be signed, use signrawtransaction for that.
839
+ Note that all existing inputs must have their previous output transaction be in the wallet.
840
+ Note that all inputs selected must be of standard form and P2SH scripts must be
841
+ in the wallet using importaddress or addmultisigaddress (to calculate fees).
842
+ You can see whether this is the case by checking the "solvable" field in the listunspent output.
843
+ Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only
844
+
845
+ Arguments:
846
+ 1. "hexstring" (string, required) The hex string of the raw transaction
847
+ 2. options (object, optional)
848
+ {
849
+ "changeAddress" (string, optional, default pool address) The neurai address to receive the change
850
+ "changePosition" (numeric, optional, default random) The index of the change output
851
+ "includeWatching" (boolean, optional, default false) Also select inputs which are watch only
852
+ "lockUnspents" (boolean, optional, default false) Lock selected unspent outputs
853
+ "feeRate" (numeric, optional, default not set: makes wallet determine the fee) Set a specific fee rate in XNA/kB
854
+ "subtractFeeFromOutputs" (array, optional) A json array of integers.
855
+ The fee will be equally deducted from the amount of each specified output.
856
+ The outputs are specified by their zero-based index, before any change output is added.
857
+ Those recipients will receive less neurais than you enter in their corresponding amount field.
858
+ If no outputs are specified here, the sender pays the fee.
859
+ [vout_index,...]
860
+ Allows this transaction to be replaced by a transaction with higher fees
861
+ "conf_target" (numeric, optional) Confirmation target (in blocks)
862
+ "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
863
+ "UNSET"
864
+ "ECONOMICAL"
865
+ "CONSERVATIVE"
866
+ }
867
+ for backward compatibility: passing in a true instead of an object will result in {"includeWatching":true}
868
+
869
+ Result:
870
+ {
871
+ "hex": "value", (string) The resulting raw transaction (hex-encoded string)
872
+ "fee": n, (numeric) Fee in XNA the resulting transaction pays
873
+ "changepos": n (numeric) The position of the added change output, or -1
874
+ }
875
+
876
+ Examples:
877
+
878
+ Create a transaction with no inputs
879
+ > neurai-cli createrawtransaction "[]" "{\"myaddress\":0.01}"
880
+
881
+ Add sufficient unsigned inputs to meet the output value
882
+ > neurai-cli fundrawtransaction "rawtransactionhex"
883
+
884
+ Sign the transaction
885
+ > neurai-cli signrawtransaction "fundedtransactionhex"
886
+
887
+ Send the transaction
888
+ > neurai-cli sendrawtransaction "signedtransactionhex"
889
+ **/ fundrawtransaction: "fundrawtransaction",
890
+ /** generate nblocks ( maxtries )
891
+
892
+ Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.
893
+
894
+ Arguments:
895
+ 1. nblocks (numeric, required) How many blocks are generated immediately.
896
+ 2. maxtries (numeric, optional) How many iterations to try (default = 1000000).
897
+
898
+ Result:
899
+ [ blockhashes ] (array) hashes of blocks generated
900
+
901
+ Examples:
902
+
903
+ Generate 11 blocks
904
+ > neurai-cli generate 11
905
+ **/ generate: "generate",
906
+ /** generatetoaddress nblocks address (maxtries)
907
+
908
+ Mine blocks immediately to a specified address (before the RPC call returns)
909
+
910
+ Arguments:
911
+ 1. nblocks (numeric, required) How many blocks are generated immediately.
912
+ 2. address (string, required) The address to send the newly generated neurai to.
913
+ 3. maxtries (numeric, optional) How many iterations to try (default = 1000000).
914
+
915
+ Result:
916
+ [ blockhashes ] (array) hashes of blocks generated
917
+
918
+ Examples:
919
+
920
+ Generate 11 blocks to myaddress
921
+ > neurai-cli generatetoaddress 11 "myaddress"
922
+ **/ generatetoaddress: "generatetoaddress",
923
+ /** getaccount "address"
924
+
925
+ DEPRECATED. Returns the account associated with the given address.
926
+
927
+ Arguments:
928
+ 1. "address" (string, required) The neurai address for account lookup.
929
+
930
+ Result:
931
+ "accountname" (string) the account address
932
+
933
+ Examples:
934
+ > neurai-cli getaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"
935
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
936
+ **/ getaccount: "getaccount",
937
+ /** getaccountaddress "account"
938
+
939
+ DEPRECATED. Returns the current Neurai address for receiving payments to this account.
940
+
941
+ Arguments:
942
+ 1. "account" (string, required) The account name for the address. 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 and a new address created if there is no account by the given name.
943
+
944
+ Result:
945
+ "address" (string) The account neurai address
946
+
947
+ Examples:
948
+ > neurai-cli getaccountaddress
949
+ > neurai-cli getaccountaddress ""
950
+ > neurai-cli getaccountaddress "myaccount"
951
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaccountaddress", "params": ["myaccount"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
952
+ **/ getaccountaddress: "getaccountaddress",
953
+ /** getaddednodeinfo ( "node" )
954
+
955
+ Returns information about the given added node, or all added nodes
956
+ (note that onetry addnodes are not listed here)
957
+
958
+ Arguments:
959
+ 1. "node" (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.
960
+
961
+ Result:
962
+ [
963
+ {
964
+ "addednode" : "192.168.0.201", (string) The node IP address or name (as provided to addnode)
965
+ "connected" : true|false, (boolean) If connected
966
+ "addresses" : [ (list of objects) Only when connected = true
967
+ {
968
+ "address" : "192.168.0.201:8767", (string) The neurai server IP and port we're connected to
969
+ "connected" : "outbound" (string) connection, inbound or outbound
970
+ }
971
+ ]
972
+ }
973
+ ,...
974
+ ]
975
+
976
+ Examples:
977
+ > neurai-cli getaddednodeinfo "192.168.0.201"
978
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
979
+ **/ getaddednodeinfo: "getaddednodeinfo",
980
+ /** getaddressbalance
981
+
982
+ Returns the balance for an address(es) (requires addressindex to be enabled).
983
+
984
+ Arguments:
985
+ {
986
+ "addresses:"
987
+ [
988
+ "address" (string) The base58check encoded address
989
+ ,...
990
+ ]
991
+ },
992
+ "includeAssets" (boolean, optional, default false) If true this will return an expanded result which includes asset balances
993
+
994
+
995
+ Result:
996
+ {
997
+ "balance" (string) The current balance in satoshis
998
+ "received" (string) The total number of satoshis received (including change)
999
+ }
1000
+ OR
1001
+ [
1002
+ {
1003
+ "assetName" (string) The asset associated with the balance (XNA for Neurai)
1004
+ "balance" (string) The current balance in satoshis
1005
+ "received" (string) The total number of satoshis received (including change)
1006
+ },...
1007
+
1008
+ ]
1009
+ Examples:
1010
+ > neurai-cli getaddressbalance '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}'
1011
+ > neurai-cli getaddressbalance '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}', true
1012
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1013
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1014
+ **/ getaddressbalance: "getaddressbalance",
1015
+ /** getaddressdeltas
1016
+
1017
+ Returns all changes for an address (requires addressindex to be enabled).
1018
+
1019
+ Arguments:
1020
+ {
1021
+ "addresses"
1022
+ [
1023
+ "address" (string) The base58check encoded address
1024
+ ,...
1025
+ ]
1026
+ "start" (number) The start block height
1027
+ "end" (number) The end block height
1028
+ "chainInfo" (boolean) Include chain info in results, only applies if start and end specified
1029
+ "assetName" (string, optional) Get deltas for a particular asset instead of XNA.
1030
+ }
1031
+
1032
+ Result:
1033
+ [
1034
+ {
1035
+ "assetName" (string) The asset associated with the deltas (XNA for Neurai)
1036
+ "satoshis" (number) The difference of satoshis
1037
+ "txid" (string) The related txid
1038
+ "index" (number) The related input or output index
1039
+ "height" (number) The block height
1040
+ "address" (string) The base58check encoded address
1041
+ }
1042
+ ]
1043
+
1044
+ Examples:
1045
+ > neurai-cli getaddressdeltas '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}'
1046
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1047
+ > neurai-cli getaddressdeltas '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"],"assetName":"MY_ASSET"}'
1048
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"],"assetName":"MY_ASSET"}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1049
+ **/ getaddressdeltas: "getaddressdeltas",
1050
+ /** getaddressesbyaccount "account"
1051
+
1052
+ DEPRECATED. Returns the list of addresses for the given account.
1053
+
1054
+ Arguments:
1055
+ 1. "account" (string, required) The account name.
1056
+
1057
+ Result:
1058
+ [ (json array of string)
1059
+ "address" (string) a neurai address associated with the given account
1060
+ ,...
1061
+ ]
1062
+
1063
+ Examples:
1064
+ > neurai-cli getaddressesbyaccount "tabby"
1065
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressesbyaccount", "params": ["tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1066
+ **/ getaddressesbyaccount: "getaddressesbyaccount",
1067
+ /** getaddressmempool
1068
+
1069
+ Returns all mempool deltas for an address (requires addressindex to be enabled).
1070
+
1071
+ Arguments:
1072
+ {
1073
+ "addresses"
1074
+ [
1075
+ "address" (string) The base58check encoded address
1076
+ ,...
1077
+ ]
1078
+ },
1079
+ "includeAssets" (boolean, optional, default false) If true this will return an expanded result which includes asset deltas
1080
+
1081
+ Result:
1082
+ [
1083
+ {
1084
+ "address" (string) The base58check encoded address
1085
+ "assetName" (string) The name of the associated asset (XNA for Neurai)
1086
+ "txid" (string) The related txid
1087
+ "index" (number) The related input or output index
1088
+ "satoshis" (number) The difference of satoshis
1089
+ "timestamp" (number) The time the transaction entered the mempool (seconds)
1090
+ "prevtxid" (string) The previous txid (if spending)
1091
+ "prevout" (string) The previous transaction output index (if spending)
1092
+ }
1093
+ ]
1094
+
1095
+ Examples:
1096
+ > neurai-cli getaddressmempool '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}'
1097
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressmempool", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1098
+ > neurai-cli getaddressmempool '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}', true
1099
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressmempool", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1100
+ **/ getaddressmempool: "getaddressmempool",
1101
+ /** getaddresstxids
1102
+
1103
+ Returns the txids for an address(es) (requires addressindex to be enabled).
1104
+
1105
+ Arguments:
1106
+ {
1107
+ "addresses"
1108
+ [
1109
+ "address" (string) The base58check encoded address
1110
+ ,...
1111
+ ]
1112
+ "start" (number, optional) The start block height
1113
+ "end" (number, optional) The end block height
1114
+ },
1115
+ "includeAssets" (boolean, optional, default false) If true this will return an expanded result which includes asset transactions
1116
+
1117
+ Result:
1118
+ [
1119
+ "transactionid" (string) The transaction id
1120
+ ,...
1121
+ ]
1122
+
1123
+ Examples:
1124
+ > neurai-cli getaddresstxids '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}'
1125
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddresstxids", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1126
+ > neurai-cli getaddresstxids '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}', true
1127
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddresstxids", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1128
+ **/ getaddresstxids: "getaddresstxids",
1129
+ /** getaddressutxos
1130
+
1131
+ Returns all unspent outputs for an address (requires addressindex to be enabled).
1132
+
1133
+ Arguments:
1134
+ {
1135
+ "addresses"
1136
+ [
1137
+ "address" (string) The base58check encoded address
1138
+ ,...
1139
+ ],
1140
+ "chainInfo", (boolean, optional, default false) Include chain info with results
1141
+ "assetName" (string, optional) Get UTXOs for a particular asset instead of XNA ('*' for all assets).
1142
+ }
1143
+
1144
+ Result
1145
+ [
1146
+ {
1147
+ "address" (string) The address base58check encoded
1148
+ "assetName" (string) The asset associated with the UTXOs (XNA for Neurai)
1149
+ "txid" (string) The output txid
1150
+ "height" (number) The block height
1151
+ "outputIndex" (number) The output index
1152
+ "script" (strin) The script hex encoded
1153
+ "satoshis" (number) The number of satoshis of the output
1154
+ }
1155
+ ]
1156
+
1157
+ Examples:
1158
+ > neurai-cli getaddressutxos '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}'
1159
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressutxos", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1160
+ > neurai-cli getaddressutxos '{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"],"assetName":"MY_ASSET"}'
1161
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressutxos", "params": [{"addresses": ["12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX"],"assetName":"MY_ASSET"}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1162
+ **/ getaddressutxos: "getaddressutxos",
1163
+ /** getassetdata "asset_name"
1164
+
1165
+ Returns assets metadata if that asset exists
1166
+
1167
+ Arguments:
1168
+ 1. "asset_name" (string, required) the name of the asset
1169
+
1170
+ Result:
1171
+ {
1172
+ name: (string),
1173
+ amount: (number),
1174
+ units: (number),
1175
+ reissuable: (number),
1176
+ has_ipfs: (number),
1177
+ ipfs_hash: (hash), (only if has_ipfs = 1 and that data is a ipfs hash)
1178
+ txid_hash: (hash), (only if has_ipfs = 1 and that data is a txid hash)
1179
+ verifier_string: (string)
1180
+ }
1181
+
1182
+ Examples:
1183
+ > neurai-cli getassetdata "ASSET_NAME"
1184
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getassetdata", "params": ["ASSET_NAME"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1185
+ **/ getassetdata: "getassetdata",
1186
+ /** getbalance ( "account" minconf include_watchonly )
1187
+
1188
+ If account is not specified, returns the server's total available balance.
1189
+ If account is specified (DEPRECATED), returns the balance in the account.
1190
+ Note that the account "" is not the same as leaving the parameter out.
1191
+ The server total may be different to the balance in the default "" account.
1192
+
1193
+ Arguments:
1194
+ 1. "account" (string, optional) DEPRECATED. The account string may be given as a
1195
+ specific account name to find the balance associated with wallet keys in
1196
+ a named account, or as the empty string ("") to find the balance
1197
+ associated with wallet keys not in any named account, or as "*" to find
1198
+ the balance associated with all wallet keys regardless of account.
1199
+ When this option is specified, it calculates the balance in a different
1200
+ way than when it is not specified, and which can count spends twice when
1201
+ there are conflicting pending transactions (such as those created by
1202
+ the bumpfee command), temporarily resulting in low or even negative
1203
+ balances. In general, account balance calculation is not considered
1204
+ reliable and has resulted in confusing outcomes, so it is recommended to
1205
+ avoid passing this argument.
1206
+ 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
1207
+ 3. include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses (see 'importaddress')
1208
+
1209
+ Result:
1210
+ amount (numeric) The total amount in XNA received for this account.
1211
+
1212
+ Examples:
1213
+
1214
+ The total amount in the wallet with 1 or more confirmations
1215
+ > neurai-cli getbalance
1216
+
1217
+ The total amount in the wallet at least 6 blocks confirmed
1218
+ > neurai-cli getbalance "*" 6
1219
+
1220
+ As a json rpc call
1221
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1222
+ **/ getbalance: "getbalance",
1223
+ /** getbestblockhash
1224
+
1225
+ Returns the hash of the best (tip) block in the longest blockchain.
1226
+
1227
+ Result:
1228
+ "hex" (string) the block hash hex encoded
1229
+
1230
+ Examples:
1231
+ > neurai-cli getbestblockhash
1232
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1233
+ **/ getbestblockhash: "getbestblockhash",
1234
+ /** getblock "blockhash" ( verbosity )
1235
+
1236
+ If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.
1237
+ If verbosity is 1, returns an Object with information about block <hash>.
1238
+ If verbosity is 2, returns an Object with information about block <hash> and information about each transaction.
1239
+
1240
+ Arguments:
1241
+ 1. "blockhash" (string, required) The block hash
1242
+ 2. verbosity (numeric, optional, default=1) 0 for hex encoded data, 1 for a json object, and 2 for json object with transaction data
1243
+
1244
+ Result (for verbosity = 0):
1245
+ "data" (string) A string that is serialized, hex-encoded data for block 'hash'.
1246
+
1247
+ Result (for verbosity = 1):
1248
+ {
1249
+ "hash" : "hash", (string) the block hash (same as provided)
1250
+ "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
1251
+ "size" : n, (numeric) The block size
1252
+ "strippedsize" : n, (numeric) The block size excluding witness data
1253
+ "weight" : n (numeric) The block weight as defined in BIP 141
1254
+ "height" : n, (numeric) The block height or index
1255
+ "version" : n, (numeric) The block version
1256
+ "versionHex" : "00000000", (string) The block version formatted in hexadecimal
1257
+ "merkleroot" : "xxxx", (string) The merkle root
1258
+ "tx" : [ (array of string) The transaction ids
1259
+ "transactionid" (string) The transaction id
1260
+ ,...
1261
+ ],
1262
+ "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
1263
+ "mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)
1264
+ "nonce" : n, (numeric) The nonce
1265
+ "bits" : "1d00ffff", (string) The bits
1266
+ "difficulty" : x.xxx, (numeric) The difficulty
1267
+ "chainwork" : "xxxx", (string) Expected number of hashes required to produce the chain up to this block (in hex)
1268
+ "previousblockhash" : "hash", (string) The hash of the previous block
1269
+ "nextblockhash" : "hash" (string) The hash of the next block
1270
+ }
1271
+
1272
+ Result (for verbosity = 2):
1273
+ {
1274
+ ..., Same output as verbosity = 1.
1275
+ "tx" : [ (array of Objects) The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result.
1276
+ ,...
1277
+ ],
1278
+ ,... Same output as verbosity = 1.
1279
+ }
1280
+
1281
+ Examples:
1282
+ > neurai-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
1283
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1284
+ **/ getblock: "getblock",
1285
+ /** getblockchaininfo
1286
+ Returns an object containing various state info regarding blockchain processing.
1287
+
1288
+ Result:
1289
+ {
1290
+ "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
1291
+ "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
1292
+ "headers": xxxxxx, (numeric) the current number of headers we have validated
1293
+ "bestblockhash": "...", (string) the hash of the currently best block
1294
+ "difficulty": xxxxxx, (numeric) the current difficulty
1295
+ "mediantime": xxxxxx, (numeric) median time for the current best block
1296
+ "verificationprogress": xxxx, (numeric) estimate of verification progress [0..1]
1297
+ "chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal
1298
+ "size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk
1299
+ "pruned": xx, (boolean) if the blocks are subject to pruning
1300
+ "pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled)
1301
+ "automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
1302
+ "prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
1303
+ "softforks": [ (array) status of softforks in progress
1304
+ {
1305
+ "id": "xxxx", (string) name of softfork
1306
+ "version": xx, (numeric) block version
1307
+ "reject": { (object) progress toward rejecting pre-softfork blocks
1308
+ "status": xx, (boolean) true if threshold reached
1309
+ },
1310
+ }, ...
1311
+ ],
1312
+ "bip9_softforks": { (object) status of BIP9 softforks in progress
1313
+ "xxxx" : { (string) name of the softfork
1314
+ "status": "xxxx", (string) one of "defined", "started", "locked_in", "active", "failed"
1315
+ "bit": xx, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
1316
+ "startTime": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning
1317
+ "timeout": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
1318
+ "since": xx, (numeric) height of the first block to which the status applies
1319
+ "statistics": { (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
1320
+ "period": xx, (numeric) the length in blocks of the BIP9 signalling period
1321
+ "threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature
1322
+ "elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period
1323
+ "count": xx, (numeric) the number of blocks with the version bit set in the current period
1324
+ "possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
1325
+ }
1326
+ }
1327
+ }
1328
+ "warnings" : "...", (string) any network and blockchain warnings.
1329
+ }
1330
+
1331
+ Examples:
1332
+ > neurai-cli getblockchaininfo
1333
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1334
+ **/ getblockchaininfo: "getblockchaininfo",
1335
+ /** getblockcount
1336
+
1337
+ Returns the number of blocks in the longest blockchain.
1338
+
1339
+ Result:
1340
+ n (numeric) The current block count
1341
+
1342
+ Examples:
1343
+ > neurai-cli getblockcount
1344
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1345
+ **/ getblockcount: "getblockcount",
1346
+ /** getblockhash height
1347
+
1348
+ Returns hash of block in best-block-chain at height provided.
1349
+
1350
+ Arguments:
1351
+ 1. height (numeric, required) The height index
1352
+
1353
+ Result:
1354
+ "hash" (string) The block hash
1355
+
1356
+ Examples:
1357
+ > neurai-cli getblockhash 1000
1358
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhash", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1359
+ **/ getblockhash: "getblockhash",
1360
+ /** getblockhashes timestamp
1361
+
1362
+ Returns array of hashes of blocks within the timestamp range provided.
1363
+
1364
+ Arguments:
1365
+ 1. high (numeric, required) The newer block timestamp
1366
+ 2. low (numeric, required) The older block timestamp
1367
+ 3. options (string, required) A json object
1368
+ {
1369
+ "noOrphans":true (boolean) will only include blocks on the main chain
1370
+ "logicalTimes":true (boolean) will include logical timestamps with hashes
1371
+ }
1372
+
1373
+ Result:
1374
+ [
1375
+ "hash" (string) The block hash
1376
+ ]
1377
+ [
1378
+ {
1379
+ "blockhash": (string) The block hash
1380
+ "logicalts": (numeric) The logical timestamp
1381
+ }
1382
+ ]
1383
+
1384
+ Examples:
1385
+ > neurai-cli getblockhashes 1231614698 1231024505
1386
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhashes", "params": [1231614698, 1231024505] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1387
+ > neurai-cli getblockhashes 1231614698 1231024505 '{"noOrphans":false, "logicalTimes":true}'
1388
+ **/ getblockhashes: "getblockhashes",
1389
+ /** getblockheader "hash" ( verbose )
1390
+
1391
+ If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.
1392
+ If verbose is true, returns an Object with information about blockheader <hash>.
1393
+
1394
+ Arguments:
1395
+ 1. "hash" (string, required) The block hash
1396
+ 2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data
1397
+
1398
+ Result (for verbose = true):
1399
+ {
1400
+ "hash" : "hash", (string) the block hash (same as provided)
1401
+ "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
1402
+ "height" : n, (numeric) The block height or index
1403
+ "version" : n, (numeric) The block version
1404
+ "versionHex" : "00000000", (string) The block version formatted in hexadecimal
1405
+ "merkleroot" : "xxxx", (string) The merkle root
1406
+ "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
1407
+ "mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)
1408
+ "nonce" : n, (numeric) The nonce
1409
+ "bits" : "1d00ffff", (string) The bits
1410
+ "difficulty" : x.xxx, (numeric) The difficulty
1411
+ "chainwork" : "0000...1f3" (string) Expected number of hashes required to produce the current chain (in hex)
1412
+ "previousblockhash" : "hash", (string) The hash of the previous block
1413
+ "nextblockhash" : "hash", (string) The hash of the next block
1414
+ }
1415
+
1416
+ Result (for verbose=false):
1417
+ "data" (string) A string that is serialized, hex-encoded data for block 'hash'.
1418
+
1419
+ Examples:
1420
+ > neurai-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
1421
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1422
+ **/ getblockheader: "getblockheader",
1423
+ /** getblocktemplate ( TemplateRequest )
1424
+
1425
+ If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.
1426
+ It returns data needed to construct a block to work on.
1427
+ For full specification, see BIPs 22, 23, 9, and 145:
1428
+ https://github.com/neurai/bips/blob/master/bip-0022.mediawiki
1429
+ https://github.com/neurai/bips/blob/master/bip-0023.mediawiki
1430
+ https://github.com/neurai/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes
1431
+ https://github.com/neurai/bips/blob/master/bip-0145.mediawiki
1432
+
1433
+ Arguments:
1434
+ 1. template_request (json object, optional) A json object in the following spec
1435
+ {
1436
+ "mode":"template" (string, optional) This must be set to "template", "proposal" (see BIP 23), or omitted
1437
+ "capabilities":[ (array, optional) A list of strings
1438
+ "support" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'
1439
+ ,...
1440
+ ],
1441
+ "rules":[ (array, optional) A list of strings
1442
+ "support" (string) client side supported softfork deployment
1443
+ ,...
1444
+ ]
1445
+ }
1446
+
1447
+
1448
+ Result:
1449
+ {
1450
+ "version" : n, (numeric) The preferred block version
1451
+ "rules" : [ "rulename", ... ], (array of strings) specific block rules that are to be enforced
1452
+ "vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments
1453
+ "rulename" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule
1454
+ ,...
1455
+ },
1456
+ "vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions
1457
+ "previousblockhash" : "xxxx", (string) The hash of current highest block
1458
+ "transactions" : [ (array) contents of non-coinbase transactions that should be included in the next block
1459
+ {
1460
+ "data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte)
1461
+ "txid" : "xxxx", (string) transaction id encoded in little-endian hexadecimal
1462
+ "hash" : "xxxx", (string) hash encoded in little-endian hexadecimal (including witness data)
1463
+ "depends" : [ (array) array of numbers
1464
+ 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
1465
+ ,...
1466
+ ],
1467
+ "fee": n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one
1468
+ "sigops" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero
1469
+ "weight" : n, (numeric) total transaction weight, as counted for purposes of block limits
1470
+ "required" : true|false (boolean) if provided and true, this transaction must be in the final block
1471
+ }
1472
+ ,...
1473
+ ],
1474
+ "coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content
1475
+ "flags" : "xx" (string) key name is to be ignored, and value included in scriptSig
1476
+ },
1477
+ "coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)
1478
+ "coinbasetxn" : { ... }, (json object) information for coinbase transaction
1479
+ "target" : "xxxx", (string) The hash target
1480
+ "mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)
1481
+ "mutable" : [ (array of string) list of ways the block template may be changed
1482
+ "value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
1483
+ ,...
1484
+ ],
1485
+ "noncerange" : "00000000ffffffff",(string) A range of valid nonces
1486
+ "sigoplimit" : n, (numeric) limit of sigops in blocks
1487
+ "sizelimit" : n, (numeric) limit of block size
1488
+ "weightlimit" : n, (numeric) limit of block weight
1489
+ "curtime" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)
1490
+ "bits" : "xxxxxxxx", (string) compressed target of next block
1491
+ "height" : n (numeric) The height of the next block
1492
+ }
1493
+
1494
+ Examples:
1495
+ > neurai-cli getblocktemplate
1496
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1497
+ **/ getblocktemplate: "getblocktemplate",
1498
+ /** getcacheinfo
1499
+
1500
+ Result:
1501
+ [
1502
+ uxto cache size:
1503
+ asset total (exclude dirty):
1504
+ asset address map:
1505
+ asset address balance:
1506
+ my unspent asset:
1507
+ reissue data:
1508
+ asset metadata map:
1509
+ asset metadata list (est):
1510
+ dirty cache (est):
1511
+ ]
1512
+
1513
+ Examples:
1514
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getcacheinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1515
+ > neurai-cli getcacheinfo
1516
+ **/ getcacheinfo: "getcacheinfo",
1517
+ /** getchaintips
1518
+ Return information about all known tips in the block tree, including the main chain as well as orphaned branches.
1519
+
1520
+ Result:
1521
+ [
1522
+ {
1523
+ "height": xxxx, (numeric) height of the chain tip
1524
+ "hash": "xxxx", (string) block hash of the tip
1525
+ "branchlen": 0 (numeric) zero for main chain
1526
+ "status": "active" (string) "active" for the main chain
1527
+ },
1528
+ {
1529
+ "height": xxxx,
1530
+ "hash": "xxxx",
1531
+ "branchlen": 1 (numeric) length of branch connecting the tip to the main chain
1532
+ "status": "xxxx" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)
1533
+ }
1534
+ ]
1535
+ Possible values for status:
1536
+ 1. "invalid" This branch contains at least one invalid block
1537
+ 2. "headers-only" Not all blocks for this branch are available, but the headers are valid
1538
+ 3. "valid-headers" All blocks are available for this branch, but they were never fully validated
1539
+ 4. "valid-fork" This branch is not part of the active chain, but is fully validated
1540
+ 5. "active" This is the tip of the active main chain, which is certainly valid
1541
+
1542
+ Examples:
1543
+ > neurai-cli getchaintips
1544
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1545
+ **/ getchaintips: "getchaintips",
1546
+ /** getchaintxstats ( nblocks blockhash )
1547
+
1548
+ Compute statistics about the total number and rate of transactions in the chain.
1549
+
1550
+ Arguments:
1551
+ 1. nblocks (numeric, optional) Size of the window in number of blocks (default: one month).
1552
+ 2. "blockhash" (string, optional) The hash of the block that ends the window.
1553
+
1554
+ Result:
1555
+ {
1556
+ "time": xxxxx, (numeric) The timestamp for the final block in the window in UNIX format.
1557
+ "txcount": xxxxx, (numeric) The total number of transactions in the chain up to that point.
1558
+ "window_block_count": xxxxx, (numeric) Size of the window in number of blocks.
1559
+ "window_tx_count": xxxxx, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0.
1560
+ "window_interval": xxxxx, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0.
1561
+ "txrate": x.xx, (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0.
1562
+ }
1563
+
1564
+ Examples:
1565
+ > neurai-cli getchaintxstats
1566
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintxstats", "params": [2016] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1567
+ **/ getchaintxstats: "getchaintxstats",
1568
+ /** getconnectioncount
1569
+
1570
+ Returns the number of connections to other nodes.
1571
+
1572
+ Result:
1573
+ n (numeric) The connection count
1574
+
1575
+ Examples:
1576
+ > neurai-cli getconnectioncount
1577
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1578
+ **/ getconnectioncount: "getconnectioncount",
1579
+ /** getdifficulty
1580
+
1581
+ Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
1582
+
1583
+ Result:
1584
+ n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.
1585
+
1586
+ Examples:
1587
+ > neurai-cli getdifficulty
1588
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1589
+ **/ getdifficulty: "getdifficulty",
1590
+ /** getdistributestatus "asset_name" snapshot_height "distribution_asset_name" gross_distribution_amount ( "exception_addresses" )
1591
+
1592
+ Give information about the status of the distribution
1593
+
1594
+ Arguments:
1595
+ 1. "asset_name" (string, required) The reward will be distributed all owners of this asset
1596
+ 2. "snapshot_height" (number, required) The block height of the ownership snapshot
1597
+ 3. "distribution_asset_name" (string, required) The name of the asset that will be distributed, or XNA
1598
+ 4. "gross_distribution_amount" (number, required) The amount of the distribution asset that will be split amongst all owners
1599
+ 5. "exception_addresses" (string, optional) Ownership addresses that should be excluded
1600
+
1601
+ Examples:
1602
+ > neurai-cli getdistributestatus "TRONCO" 12345 "XNA" 1000
1603
+ > neurai-cli getdistributestatus "PHATSTACKS" 12345 "DIVIDENDS" 1000 "mwN7xC3yomYdvJuVXkVC7ymY9wNBjWNduD,n4Rf18edydDaRBh7t6gHUbuByLbWEoWUTg"
1604
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdistributestatus", "params": ["TRONCO" 34987 "DIVIDENDS" 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1605
+ > 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:8766/
1606
+ **/ getdistributestatus: "getdistributestatus",
1607
+ /** getgenerate
1608
+
1609
+ Return if the server is set to generate coins or not. The default is false.
1610
+ It is set with the command line argument -gen (or neurai.conf setting gen)
1611
+ It can also be set with the setgenerate call.
1612
+
1613
+ Result
1614
+ true|false (boolean) If the server is set to generate coins or not
1615
+
1616
+ Examples:
1617
+ > neurai-cli getgenerate
1618
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getgenerate", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1619
+ **/ getgenerate: "getgenerate",
1620
+ /** getinfo
1621
+
1622
+ DEPRECATED. Returns an object containing various state info.
1623
+
1624
+ Result:
1625
+ {
1626
+ "deprecation-warning": "..." (string) warning that the getinfo command is deprecated and will be removed in 0.16
1627
+ "version": xxxxx, (numeric) the server version
1628
+ "protocolversion": xxxxx, (numeric) the protocol version
1629
+ "walletversion": xxxxx, (numeric) the wallet version
1630
+ "balance": xxxxxxx, (numeric) the total Neurai balance of the wallet
1631
+ "blocks": xxxxxx, (numeric) the current number of blocks processed in the server
1632
+ "timeoffset": xxxxx, (numeric) the time offset
1633
+ "connections": xxxxx, (numeric) the number of connections
1634
+ "proxy": "host:port", (string, optional) the proxy used by the server
1635
+ "difficulty": xxxxxx, (numeric) the current difficulty
1636
+ "testnet": true|false, (boolean) if the server is using testnet or not
1637
+ "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
1638
+ "keypoolsize": xxxx, (numeric) how many new keys are pre-generated
1639
+ "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
1640
+ "paytxfee": x.xxxx, (numeric) the transaction fee set in XNA/kB
1641
+ "relayfee": x.xxxx, (numeric) minimum relay fee for transactions in XNA/kB
1642
+ "errors": "..." (string) any error messages
1643
+ }
1644
+
1645
+ Examples:
1646
+ > neurai-cli getinfo
1647
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1648
+ **/ getinfo: "getinfo",
1649
+ /** getkawpowhash "header_hash" "mix_hash" nonce, height, "target"
1650
+
1651
+ Get the kawpow hash for a block given its block data
1652
+
1653
+ Arguments
1654
+ 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
1655
+ 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
1656
+ 3. "nonce" (string, required) the hex nonce of the block that hashed the valid block
1657
+ 4. "height" (number, required) the height of the block data that is being hashed
1658
+ 5. "target" (string, optional) the target of the block that is hash is trying to meet
1659
+
1660
+ Result:
1661
+
1662
+ Examples:
1663
+ > neurai-cli getkawpowhash "header_hash" "mix_hash" "0x100000" 2456
1664
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getkawpowhash", "params": ["header_hash" "mix_hash" "0x100000" 2456] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1665
+ **/ getkawpowhash: "getkawpowhash",
1666
+ /** getmasterkeyinfo
1667
+
1668
+ Fetches and displays the master private key and the master public key.
1669
+
1670
+ Result:
1671
+ { (json object)
1672
+ "bip32_root_private" : (string) extended master private key,
1673
+ "bip32_root_public" : (string) extended master public key,
1674
+ "account_derivation_path" : (string) The derivation path to the account public/private keys
1675
+ "account_extended_private_key" : (string) extended account private key,
1676
+ "account_extended_public_key" : (string) extended account public key,
1677
+ }
1678
+
1679
+ Examples:
1680
+ > neurai-cli getmasterkeyinfo
1681
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmasterkeyinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1682
+ **/ getmasterkeyinfo: "getmasterkeyinfo",
1683
+ /** getmemoryinfo ("mode")
1684
+ Returns an object containing information about memory usage.
1685
+ Arguments:
1686
+ 1. "mode" determines what kind of information is returned. This argument is optional, the default mode is "stats".
1687
+ - "stats" returns general statistics about memory usage in the daemon.
1688
+ - "mallocinfo" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+).
1689
+
1690
+ Result (mode "stats"):
1691
+ {
1692
+ "locked": { (json object) Information about locked memory manager
1693
+ "used": xxxxx, (numeric) Number of bytes used
1694
+ "free": xxxxx, (numeric) Number of bytes available in current arenas
1695
+ "total": xxxxxxx, (numeric) Total number of bytes managed
1696
+ "locked": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
1697
+ "chunks_used": xxxxx, (numeric) Number allocated chunks
1698
+ "chunks_free": xxxxx, (numeric) Number unused chunks
1699
+ }
1700
+ }
1701
+
1702
+ Result (mode "mallocinfo"):
1703
+ "<malloc version="1">..."
1704
+
1705
+ Examples:
1706
+ > neurai-cli getmemoryinfo
1707
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1708
+ **/ getmemoryinfo: "getmemoryinfo",
1709
+ /** getmempoolancestors txid (verbose)
1710
+
1711
+ If txid is in the mempool, returns all in-mempool ancestors.
1712
+
1713
+ Arguments:
1714
+ 1. "txid" (string, required) The transaction id (must be in mempool)
1715
+ 2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids
1716
+
1717
+ Result (for verbose=false):
1718
+ [ (json array of strings)
1719
+ "transactionid" (string) The transaction id of an in-mempool ancestor transaction
1720
+ ,...
1721
+ ]
1722
+
1723
+ Result (for verbose=true):
1724
+ { (json object)
1725
+ "transactionid" : { (json object)
1726
+ "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
1727
+ "fee" : n, (numeric) transaction fee in XNA
1728
+ "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority
1729
+ "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
1730
+ "height" : n, (numeric) block height when transaction entered pool
1731
+ "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
1732
+ "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
1733
+ "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
1734
+ "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
1735
+ "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
1736
+ "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
1737
+ "wtxid" : hash, (string) hash of serialized transaction, including witness data
1738
+ "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
1739
+ "transactionid", (string) parent transaction id
1740
+ ... ]
1741
+ }, ...
1742
+ }
1743
+
1744
+ Examples:
1745
+ > neurai-cli getmempoolancestors "mytxid"
1746
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolancestors", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1747
+ **/ getmempoolancestors: "getmempoolancestors",
1748
+ /** getmempooldescendants txid (verbose)
1749
+
1750
+ If txid is in the mempool, returns all in-mempool descendants.
1751
+
1752
+ Arguments:
1753
+ 1. "txid" (string, required) The transaction id (must be in mempool)
1754
+ 2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids
1755
+
1756
+ Result (for verbose=false):
1757
+ [ (json array of strings)
1758
+ "transactionid" (string) The transaction id of an in-mempool descendant transaction
1759
+ ,...
1760
+ ]
1761
+
1762
+ Result (for verbose=true):
1763
+ { (json object)
1764
+ "transactionid" : { (json object)
1765
+ "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
1766
+ "fee" : n, (numeric) transaction fee in XNA
1767
+ "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority
1768
+ "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
1769
+ "height" : n, (numeric) block height when transaction entered pool
1770
+ "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
1771
+ "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
1772
+ "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
1773
+ "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
1774
+ "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
1775
+ "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
1776
+ "wtxid" : hash, (string) hash of serialized transaction, including witness data
1777
+ "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
1778
+ "transactionid", (string) parent transaction id
1779
+ ... ]
1780
+ }, ...
1781
+ }
1782
+
1783
+ Examples:
1784
+ > neurai-cli getmempooldescendants "mytxid"
1785
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempooldescendants", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1786
+ **/ getmempooldescendants: "getmempooldescendants",
1787
+ /** getmempoolentry txid
1788
+
1789
+ Returns mempool data for given transaction
1790
+
1791
+ Arguments:
1792
+ 1. "txid" (string, required) The transaction id (must be in mempool)
1793
+
1794
+ Result:
1795
+ { (json object)
1796
+ "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
1797
+ "fee" : n, (numeric) transaction fee in XNA
1798
+ "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority
1799
+ "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
1800
+ "height" : n, (numeric) block height when transaction entered pool
1801
+ "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
1802
+ "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
1803
+ "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
1804
+ "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
1805
+ "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
1806
+ "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
1807
+ "wtxid" : hash, (string) hash of serialized transaction, including witness data
1808
+ "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
1809
+ "transactionid", (string) parent transaction id
1810
+ ... ]
1811
+ }
1812
+
1813
+ Examples:
1814
+ > neurai-cli getmempoolentry "mytxid"
1815
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolentry", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1816
+ **/ getmempoolentry: "getmempoolentry",
1817
+ /** getmempoolinfo
1818
+
1819
+ Returns details on the active state of the TX memory pool.
1820
+
1821
+ Result:
1822
+ {
1823
+ "size": xxxxx, (numeric) Current tx count
1824
+ "bytes": xxxxx, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
1825
+ "usage": xxxxx, (numeric) Total memory usage for the mempool
1826
+ "maxmempool": xxxxx, (numeric) Maximum memory usage for the mempool
1827
+ "mempoolminfee": xxxxx (numeric) Minimum fee rate in XNA/kB for tx to be accepted
1828
+ }
1829
+
1830
+ Examples:
1831
+ > neurai-cli getmempoolinfo
1832
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1833
+ **/ getmempoolinfo: "getmempoolinfo",
1834
+ /** getmininginfo
1835
+
1836
+ Returns a json object containing mining-related information.
1837
+ Result:
1838
+ {
1839
+ "blocks": nnn, (numeric) The current block
1840
+ "currentblockweight": nnn, (numeric) The last block weight
1841
+ "currentblocktx": nnn, (numeric) The last block transaction
1842
+ "difficulty": xxx.xxxxx (numeric) The current difficulty
1843
+ "networkhashps": nnn, (numeric) The network hashes per second
1844
+ "hashespersec": nnn, (numeric) The hashes per second of built-in miner
1845
+ "pooledtx": n (numeric) The size of the mempool
1846
+ "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)
1847
+ "warnings": "..." (string) any network and blockchain warnings
1848
+ "errors": "..." (string) DEPRECATED. Same as warnings. Only shown when neuraid is started with -deprecatedrpc=getmininginfo
1849
+ }
1850
+
1851
+ Examples:
1852
+ > neurai-cli getmininginfo
1853
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1854
+ **/ getmininginfo: "getmininginfo",
1855
+ /** getmywords ( "account" )
1856
+
1857
+ Returns the 12 words and passphrase used by BIP39 to generate the wallets private keys
1858
+ Only returns value if wallet was created by the 12 words import/generation
1859
+
1860
+ Result:
1861
+ "word_list:" (string) A string of words separated by spaces
1862
+ "passphrase:" (optional) Only show if passphrase was used when creating the wallet
1863
+
1864
+ Examples:
1865
+ > neurai-cli getmywords
1866
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmywords", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1867
+ **/ getmywords: "getmywords",
1868
+ /** getnettotals
1869
+
1870
+ Returns information about network traffic, including bytes in, bytes out,
1871
+ and current time.
1872
+
1873
+ Result:
1874
+ {
1875
+ "totalbytesrecv": n, (numeric) Total bytes received
1876
+ "totalbytessent": n, (numeric) Total bytes sent
1877
+ "timemillis": t, (numeric) Current UNIX time in milliseconds
1878
+ "uploadtarget":
1879
+ {
1880
+ "timeframe": n, (numeric) Length of the measuring timeframe in seconds
1881
+ "target": n, (numeric) Target in bytes
1882
+ "target_reached": true|false, (boolean) True if target is reached
1883
+ "serve_historical_blocks": true|false, (boolean) True if serving historical blocks
1884
+ "bytes_left_in_cycle": t, (numeric) Bytes left in current time cycle
1885
+ "time_left_in_cycle": t (numeric) Seconds left in current time cycle
1886
+ }
1887
+ }
1888
+
1889
+ Examples:
1890
+ > neurai-cli getnettotals
1891
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1892
+ **/ getnettotals: "getnettotals",
1893
+ /** getnetworkhashps ( nblocks height )
1894
+
1895
+ Returns the estimated network hashes per second based on the last n blocks.
1896
+ Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.
1897
+ Pass in [height] to estimate the network speed at the time when a certain block was found.
1898
+
1899
+ Arguments:
1900
+ 1. nblocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.
1901
+ 2. height (numeric, optional, default=-1) To estimate at the time of the given height.
1902
+
1903
+ Result:
1904
+ x (numeric) Hashes per second estimated
1905
+
1906
+ Examples:
1907
+ > neurai-cli getnetworkhashps
1908
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1909
+ **/ getnetworkhashps: "getnetworkhashps",
1910
+ /** getnetworkinfo
1911
+ Returns an object containing various state info regarding P2P networking.
1912
+
1913
+ Result:
1914
+ {
1915
+ "version": xxxxx, (numeric) the server version
1916
+ "subversion": "/Satoshi:x.x.x/", (string) the server subversion string
1917
+ "protocolversion": xxxxx, (numeric) the protocol version
1918
+ "localservices": "xxxxxxxxxxxxxxxx", (string) the services we offer to the network
1919
+ "localrelay": true|false, (bool) true if transaction relay is requested from peers
1920
+ "timeoffset": xxxxx, (numeric) the time offset
1921
+ "connections": xxxxx, (numeric) the number of connections
1922
+ "networkactive": true|false, (bool) whether p2p networking is enabled
1923
+ "networks": [ (array) information per network
1924
+ {
1925
+ "name": "xxx", (string) network (ipv4, ipv6 or onion)
1926
+ "limited": true|false, (boolean) is the network limited using -onlynet?
1927
+ "reachable": true|false, (boolean) is the network reachable?
1928
+ "proxy": "host:port" (string) the proxy that is used for this network, or empty if none
1929
+ "proxy_randomize_credentials": true|false, (string) Whether randomized credentials are used
1930
+ }
1931
+ ,...
1932
+ ],
1933
+ "relayfee": x.xxxxxxxx, (numeric) minimum relay fee for transactions in XNA/kB
1934
+ "incrementalfee": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in XNA/kB
1935
+ "localaddresses": [ (array) list of local addresses
1936
+ {
1937
+ "address": "xxxx", (string) network address
1938
+ "port": xxx, (numeric) network port
1939
+ "score": xxx (numeric) relative score
1940
+ }
1941
+ ,...
1942
+ ]
1943
+ "warnings": "..." (string) any network and blockchain warnings
1944
+ }
1945
+
1946
+ Examples:
1947
+ > neurai-cli getnetworkinfo
1948
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1949
+ **/ getnetworkinfo: "getnetworkinfo",
1950
+ /** getnewaddress ( "account" )
1951
+
1952
+ Returns a new Neurai address for receiving payments.
1953
+ If 'account' is specified (DEPRECATED), it is added to the address book
1954
+ so payments received with the address will be credited to 'account'.
1955
+
1956
+ Arguments:
1957
+ 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.
1958
+
1959
+ Result:
1960
+ "address" (string) The new neurai address
1961
+
1962
+ Examples:
1963
+ > neurai-cli getnewaddress
1964
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
1965
+ **/ getnewaddress: "getnewaddress",
1966
+ /** getpeerinfo
1967
+
1968
+ Returns data about each connected network node as a json array of objects.
1969
+
1970
+ Result:
1971
+ [
1972
+ {
1973
+ "id": n, (numeric) Peer index
1974
+ "addr":"host:port", (string) The IP address and port of the peer
1975
+ "addrbind":"ip:port", (string) Bind address of the connection to the peer
1976
+ "addrlocal":"ip:port", (string) Local address as reported by the peer
1977
+ "services":"xxxxxxxxxxxxxxxx", (string) The services offered
1978
+ "relaytxes":true|false, (boolean) Whether peer has asked us to relay transactions to it
1979
+ "lastsend": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send
1980
+ "lastrecv": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive
1981
+ "bytessent": n, (numeric) The total bytes sent
1982
+ "bytesrecv": n, (numeric) The total bytes received
1983
+ "conntime": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)
1984
+ "timeoffset": ttt, (numeric) The time offset in seconds
1985
+ "pingtime": n, (numeric) ping time (if available)
1986
+ "minping": n, (numeric) minimum observed ping time (if any at all)
1987
+ "pingwait": n, (numeric) ping wait (if non-zero)
1988
+ "version": v, (numeric) The peer version, such as 7001
1989
+ "subver": "/Satoshi:0.8.5/", (string) The string version
1990
+ "inbound": true|false, (boolean) Inbound (true) or Outbound (false)
1991
+ "addnode": true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection
1992
+ "startingheight": n, (numeric) The starting height (block) of the peer
1993
+ "banscore": n, (numeric) The ban score
1994
+ "synced_headers": n, (numeric) The last header we have in common with this peer
1995
+ "synced_blocks": n, (numeric) The last block we have in common with this peer
1996
+ "inflight": [
1997
+ n, (numeric) The heights of blocks we're currently asking from this peer
1998
+ ...
1999
+ ],
2000
+ "whitelisted": true|false, (boolean) Whether the peer is whitelisted
2001
+ "bytessent_per_msg": {
2002
+ "addr": n, (numeric) The total bytes sent aggregated by message type
2003
+ ...
2004
+ },
2005
+ "bytesrecv_per_msg": {
2006
+ "addr": n, (numeric) The total bytes received aggregated by message type
2007
+ ...
2008
+ }
2009
+ }
2010
+ ,...
2011
+ ]
2012
+
2013
+ Examples:
2014
+ > neurai-cli getpeerinfo
2015
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2016
+ **/ getpeerinfo: "getpeerinfo",
2017
+ /** getrawchangeaddress
2018
+
2019
+ Returns a new Neurai address, for receiving change.
2020
+ This is for use with raw transactions, NOT normal use.
2021
+
2022
+ Result:
2023
+ "address" (string) The address
2024
+
2025
+ Examples:
2026
+ > neurai-cli getrawchangeaddress
2027
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2028
+ **/ getrawchangeaddress: "getrawchangeaddress",
2029
+ /** getrawmempool ( verbose )
2030
+
2031
+ Returns all transaction ids in memory pool as a json array of string transaction ids.
2032
+
2033
+ Hint: use getmempoolentry to fetch a specific transaction from the mempool.
2034
+
2035
+ Arguments:
2036
+ 1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids
2037
+
2038
+ Result: (for verbose = false):
2039
+ [ (json array of string)
2040
+ "transactionid" (string) The transaction id
2041
+ ,...
2042
+ ]
2043
+
2044
+ Result: (for verbose = true):
2045
+ { (json object)
2046
+ "transactionid" : { (json object)
2047
+ "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
2048
+ "fee" : n, (numeric) transaction fee in XNA
2049
+ "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority
2050
+ "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
2051
+ "height" : n, (numeric) block height when transaction entered pool
2052
+ "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one)
2053
+ "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
2054
+ "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
2055
+ "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one)
2056
+ "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
2057
+ "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
2058
+ "wtxid" : hash, (string) hash of serialized transaction, including witness data
2059
+ "depends" : [ (array) unconfirmed transactions used as inputs for this transaction
2060
+ "transactionid", (string) parent transaction id
2061
+ ... ]
2062
+ }, ...
2063
+ }
2064
+
2065
+ Examples:
2066
+ > neurai-cli getrawmempool true
2067
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2068
+ **/ getrawmempool: "getrawmempool",
2069
+ /** getrawtransaction "txid" ( verbose )
2070
+
2071
+ NOTE: By default this function only works for mempool transactions. If the -txindex option is
2072
+ enabled, it also works for blockchain transactions.
2073
+ DEPRECATED: for now, it also works for transactions with unspent outputs.
2074
+
2075
+ Return the raw transaction data.
2076
+
2077
+ If verbose is 'true', returns an Object with information about 'txid'.
2078
+ If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.
2079
+
2080
+ Arguments:
2081
+ 1. "txid" (string, required) The transaction id
2082
+ 2. verbose (bool, optional, default=false) If false, return a string, otherwise return a json object
2083
+
2084
+ Result (if verbose is not set or set to false):
2085
+ "data" (string) The serialized, hex-encoded data for 'txid'
2086
+
2087
+ Result (if verbose is set to true):
2088
+ {
2089
+ "hex" : "data", (string) The serialized, hex-encoded data for 'txid'
2090
+ "txid" : "id", (string) The transaction id (same as provided)
2091
+ "hash" : "id", (string) The transaction hash (differs from txid for witness transactions)
2092
+ "size" : n, (numeric) The serialized transaction size
2093
+ "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions)
2094
+ "version" : n, (numeric) The version
2095
+ "locktime" : ttt, (numeric) The lock time
2096
+ "vin" : [ (array of json objects)
2097
+ {
2098
+ "txid": "id", (string) The transaction id
2099
+ "vout": n, (numeric)
2100
+ "scriptSig": { (json object) The script
2101
+ "asm": "asm", (string) asm
2102
+ "hex": "hex" (string) hex
2103
+ },
2104
+ "sequence": n (numeric) The script sequence number
2105
+ "txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any)
2106
+ }
2107
+ ,...
2108
+ ],
2109
+ "vout" : [ (array of json objects)
2110
+ {
2111
+ "value" : x.xxx, (numeric) The value in XNA
2112
+ "n" : n, (numeric) index
2113
+ "scriptPubKey" : { (json object)
2114
+ "asm" : "asm", (string) the asm
2115
+ "hex" : "hex", (string) the hex
2116
+ "reqSigs" : n, (numeric) The required sigs
2117
+ "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash'
2118
+ "addresses" : [ (json array of string)
2119
+ "address" (string) neurai address
2120
+ ,...
2121
+ ]
2122
+ }
2123
+ }
2124
+ ,...
2125
+ ],
2126
+ "blockhash" : "hash", (string) the block hash
2127
+ "confirmations" : n, (numeric) The confirmations
2128
+ "time" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)
2129
+ "blocktime" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
2130
+ }
2131
+
2132
+ Examples:
2133
+ > neurai-cli getrawtransaction "mytxid"
2134
+ > neurai-cli getrawtransaction "mytxid" true
2135
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawtransaction", "params": ["mytxid", true] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2136
+ **/ getrawtransaction: "getrawtransaction",
2137
+ /** getreceivedbyaccount "account" ( minconf )
2138
+
2139
+ DEPRECATED. Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations.
2140
+
2141
+ Arguments:
2142
+ 1. "account" (string, required) The selected account, may be the default account using "".
2143
+ 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
2144
+
2145
+ Result:
2146
+ amount (numeric) The total amount in XNA received for this account.
2147
+
2148
+ Examples:
2149
+
2150
+ Amount received by the default account with at least 1 confirmation
2151
+ > neurai-cli getreceivedbyaccount ""
2152
+
2153
+ Amount received at the tabby account including unconfirmed amounts with zero confirmations
2154
+ > neurai-cli getreceivedbyaccount "tabby" 0
2155
+
2156
+ The amount with at least 6 confirmations
2157
+ > neurai-cli getreceivedbyaccount "tabby" 6
2158
+
2159
+ As a json rpc call
2160
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaccount", "params": ["tabby", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2161
+ **/ getreceivedbyaccount: "getreceivedbyaccount",
2162
+ /** getreceivedbyaddress "address" ( minconf )
2163
+
2164
+ Returns the total amount received by the given address in transactions with at least minconf confirmations.
2165
+
2166
+ Arguments:
2167
+ 1. "address" (string, required) The neurai address for transactions.
2168
+ 2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
2169
+
2170
+ Result:
2171
+ amount (numeric) The total amount in XNA received at this address.
2172
+
2173
+ Examples:
2174
+
2175
+ The amount from transactions with at least 1 confirmation
2176
+ > neurai-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX"
2177
+
2178
+ The amount including unconfirmed transactions, zero confirmations
2179
+ > neurai-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 0
2180
+
2181
+ The amount with at least 6 confirmations
2182
+ > neurai-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 6
2183
+
2184
+ As a json rpc call
2185
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2186
+ **/ getreceivedbyaddress: "getreceivedbyaddress",
2187
+ /** getrpcinfo
2188
+ Returns details of the RPC server.
2189
+
2190
+ Result:
2191
+ {
2192
+ "active_commands" (array) All active commands
2193
+ [
2194
+ { (object) Information about an active command
2195
+ "method" (string) The name of the RPC command
2196
+ "duration" (numeric) The running time in microseconds
2197
+ },...
2198
+ ],
2199
+ }
2200
+ > neurai-cli getrpcinfo
2201
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrpcinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2202
+ **/ getrpcinfo: "getrpcinfo",
2203
+ /** getsnapshot "asset_name" block_height
2204
+
2205
+ Returns details for the asset snapshot, at the specified height
2206
+
2207
+ Arguments:
2208
+ 1. "asset_name" (string, required) the name of the asset
2209
+ 2. block_height (int, required) the block height of the snapshot
2210
+
2211
+ Result:
2212
+ {
2213
+ name: (string),
2214
+ height: (number),
2215
+ owners: [
2216
+ {
2217
+ address: (string),
2218
+ amount_owned: (number),
2219
+ }
2220
+ }
2221
+
2222
+ Examples:
2223
+ > 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:8766/
2224
+ **/ getsnapshot: "getsnapshot",
2225
+ /** getsnapshotrequest "asset_name" block_height
2226
+
2227
+ Retrieves the specified snapshot request details.
2228
+
2229
+ Arguments:
2230
+ 1. "asset_name" (string, required) The asset name for which the snapshot will be taken
2231
+ 2. "block_height" (number, required) The block height at which the snapshot will be take
2232
+
2233
+ Result:
2234
+ {
2235
+ asset_name: (string),
2236
+ block_height: (number),
2237
+ }
2238
+
2239
+ Examples:
2240
+ > neurai-cli getsnapshotrequest "TRONCO" 12345
2241
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getsnapshotrequest", "params": ["PHATSTACKS" 34987] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2242
+ **/ getsnapshotrequest: "getsnapshotrequest",
2243
+ /** getspentinfo
2244
+
2245
+ Returns the txid and index where an output is spent.
2246
+
2247
+ Arguments:
2248
+ {
2249
+ "txid" (string) The hex string of the txid
2250
+ "index" (number) The start block height
2251
+ }
2252
+
2253
+ Result:
2254
+ {
2255
+ "txid" (string) The transaction id
2256
+ "index" (number) The spending input index
2257
+ ,...
2258
+ }
2259
+
2260
+ Examples:
2261
+ > neurai-cli getspentinfo '{"txid": "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9", "index": 0}'
2262
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getspentinfo", "params": [{"txid": "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9", "index": 0}] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2263
+ **/ getspentinfo: "getspentinfo",
2264
+ /** gettransaction "txid" ( include_watchonly )
2265
+
2266
+ Get detailed information about in-wallet transaction <txid>
2267
+
2268
+ Arguments:
2269
+ 1. "txid" (string, required) The transaction id
2270
+ 2. "include_watchonly" (bool, optional, default=false) Whether to include watch-only addresses in balance calculation and details[]
2271
+
2272
+ Result:
2273
+ {
2274
+ "amount" : x.xxx, (numeric) The transaction amount in XNA
2275
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
2276
+ 'send' category of transactions.
2277
+ "confirmations" : n, (numeric) The number of confirmations
2278
+ "blockhash" : "hash", (string) The block hash
2279
+ "blockindex" : xx, (numeric) The index of the transaction in the block that includes it
2280
+ "blocktime" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)
2281
+ "txid" : "transactionid", (string) The transaction id.
2282
+ "time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
2283
+ "timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
2284
+ "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
2285
+ may be unknown for unconfirmed transactions not in the mempool
2286
+ "details" : [
2287
+ {
2288
+ "account" : "accountname", (string) DEPRECATED. The account name involved in the transaction, can be "" for the default account.
2289
+ "address" : "address", (string) The neurai address involved in the transaction
2290
+ "category" : "send|receive", (string) The category, either 'send' or 'receive'
2291
+ "amount" : x.xxx, (numeric) The amount in XNA
2292
+ "label" : "label", (string) A comment for the address/transaction, if any
2293
+ "vout" : n, (numeric) the vout value
2294
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
2295
+ 'send' category of transactions.
2296
+ "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
2297
+ 'send' category of transactions.
2298
+ }
2299
+ ,...
2300
+ ],
2301
+ "asset_details" : [
2302
+ {
2303
+ "asset_type" : "new_asset|transfer_asset|reissue_asset", (string) The type of asset transaction
2304
+ "asset_name" : "asset_name", (string) The name of the asset
2305
+ "amount" : x.xxx, (numeric) The amount in XNA
2306
+ "address" : "address", (string) The neurai address involved in the transaction
2307
+ "vout" : n, (numeric) the vout value
2308
+ "category" : "send|receive", (string) The category, either 'send' or 'receive'
2309
+ }
2310
+ ,...
2311
+ ],
2312
+ "hex" : "data" (string) Raw data for transaction
2313
+ }
2314
+
2315
+ Examples:
2316
+ > neurai-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
2317
+ > neurai-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
2318
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2319
+ **/ gettransaction: "gettransaction",
2320
+ /** gettxout "txid" n ( include_mempool )
2321
+
2322
+ Returns details about an unspent transaction output.
2323
+
2324
+ Arguments:
2325
+ 1. "txid" (string, required) The transaction id
2326
+ 2. "n" (numeric, required) vout number
2327
+ 3. "include_mempool" (boolean, optional) Whether to include the mempool. Default: true. Note that an unspent output that is spent in the mempool won't appear.
2328
+
2329
+ Result:
2330
+ {
2331
+ "bestblock" : "hash", (string) the block hash
2332
+ "confirmations" : n, (numeric) The number of confirmations
2333
+ "value" : x.xxx, (numeric) The transaction value in XNA
2334
+ "scriptPubKey" : { (json object)
2335
+ "asm" : "code", (string)
2336
+ "hex" : "hex", (string)
2337
+ "reqSigs" : n, (numeric) Number of required signatures
2338
+ "type" : "pubkeyhash", (string) The type, eg pubkeyhash
2339
+ "addresses" : [ (array of string) array of neurai addresses
2340
+ "address" (string) neurai address
2341
+ ,...
2342
+ ]
2343
+ },
2344
+ "coinbase" : true|false (boolean) Coinbase or not
2345
+ }
2346
+
2347
+ Examples:
2348
+
2349
+ Get unspent transactions
2350
+ > neurai-cli listunspent
2351
+
2352
+ View the details
2353
+ > neurai-cli gettxout "txid" 1
2354
+
2355
+ As a json rpc call
2356
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxout", "params": ["txid", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2357
+ **/ gettxout: "gettxout",
2358
+ /** gettxoutproof ["txid",...] ( blockhash )
2359
+
2360
+ Returns a hex-encoded proof that "txid" was included in a block.
2361
+
2362
+ NOTE: By default this function only works sometimes. This is when there is an
2363
+ unspent output in the utxo for this transaction. To make it always work,
2364
+ you need to maintain a transaction index, using the -txindex command line option or
2365
+ specify the block in which the transaction is included manually (by blockhash).
2366
+
2367
+ Arguments:
2368
+ 1. "txids" (string) A json array of txids to filter
2369
+ [
2370
+ "txid" (string) A transaction hash
2371
+ ,...
2372
+ ]
2373
+ 2. "blockhash" (string, optional) If specified, looks for txid in the block with this hash
2374
+
2375
+ Result:
2376
+ "data" (string) A string that is a serialized, hex-encoded data for the proof.
2377
+ **/ gettxoutproof: "gettxoutproof",
2378
+ /** gettxoutsetinfo
2379
+
2380
+ Returns statistics about the unspent transaction output set.
2381
+ Note this call may take some time.
2382
+
2383
+ Result:
2384
+ {
2385
+ "height":n, (numeric) The current block height (index)
2386
+ "bestblock": "hex", (string) the best block hash hex
2387
+ "transactions": n, (numeric) The number of transactions
2388
+ "txouts": n, (numeric) The number of output transactions
2389
+ "bogosize": n, (numeric) A meaningless metric for UTXO set size
2390
+ "hash_serialized_2": "hash", (string) The serialized hash
2391
+ "disk_size": n, (numeric) The estimated size of the chainstate on disk
2392
+ "total_amount": x.xxx (numeric) The total amount
2393
+ }
2394
+
2395
+ Examples:
2396
+ > neurai-cli gettxoutsetinfo
2397
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2398
+ **/ gettxoutsetinfo: "gettxoutsetinfo",
2399
+ /** getunconfirmedbalance
2400
+ Returns the server's total unconfirmed balance
2401
+ **/ getunconfirmedbalance: "getunconfirmedbalance",
2402
+ /** getverifierstring restricted_name
2403
+
2404
+ Retrieve the verifier string that belongs to the given restricted asset
2405
+
2406
+ Arguments:
2407
+ 1. "restricted_name" (string, required) the asset_name
2408
+
2409
+ Result:
2410
+ "verifier_string", (string) The verifier for the asset
2411
+
2412
+ Examples:
2413
+ > neurai-cli getverifierstring "restricted_name"
2414
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getverifierstring", "params": ["restricted_name"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2415
+ **/ getverifierstring: "getverifierstring",
2416
+ /** getwalletinfo
2417
+ Returns an object containing various wallet state info.
2418
+
2419
+ Result:
2420
+ {
2421
+ "walletname": xxxxx, (string) the wallet name
2422
+ "walletversion": xxxxx, (numeric) the wallet version
2423
+ "balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in XNA
2424
+ "unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in XNA
2425
+ "immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in XNA
2426
+ "txcount": xxxxxxx, (numeric) the total number of transactions in the wallet
2427
+ "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
2428
+ "keypoolsize": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)
2429
+ "keypoolsize_hd_internal": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
2430
+ "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
2431
+ "paytxfee": x.xxxx, (numeric) the transaction fee configuration, set in XNA/kB
2432
+ "hdseedid": "<hash160>" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)
2433
+ "hdmasterkeyid": "<hash160>" (string, optional) alias for hdseedid retained for backwards-compatibility. Will be removed in V0.18.
2434
+ }
2435
+
2436
+ Examples:
2437
+ > neurai-cli getwalletinfo
2438
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2439
+ **/ getwalletinfo: "getwalletinfo",
2440
+ /** help ( "command" )
2441
+
2442
+ List all commands, or get help for a specified command.
2443
+
2444
+ Arguments:
2445
+ 1. "command" (string, optional) The command to get help on
2446
+
2447
+ Result:
2448
+ "text" (string) The help text
2449
+ **/ help: "help",
2450
+ /** importaddress "address" ( "label" rescan p2sh )
2451
+
2452
+ Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.
2453
+
2454
+ Arguments:
2455
+ 1. "script" (string, required) The hex-encoded script (or address)
2456
+ 2. "label" (string, optional, default="") An optional label
2457
+ 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
2458
+ 4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well
2459
+
2460
+ Note: This call can take minutes to complete if rescan is true.
2461
+ If you have the full public key, you should call importpubkey instead of this.
2462
+
2463
+ Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated
2464
+ as change, and not show up in many RPCs.
2465
+
2466
+ Examples:
2467
+
2468
+ Import a script with rescan
2469
+ > neurai-cli importaddress "myscript"
2470
+
2471
+ Import using a label without rescan
2472
+ > neurai-cli importaddress "myscript" "testing" false
2473
+
2474
+ As a JSON-RPC call
2475
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myscript", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2476
+ **/ importaddress: "importaddress",
2477
+ /** importmulti "requests" ( "options" )
2478
+
2479
+ Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options).
2480
+
2481
+ Arguments:
2482
+ 1. requests (array, required) Data to be imported
2483
+ [ (array of json objects)
2484
+ {
2485
+ "scriptPubKey": "<script>" | { "address":"<address>" }, (string / json, required) Type of scriptPubKey (string for script, json for address)
2486
+ "timestamp": timestamp | "now" , (integer / string, required) Creation time of the key in seconds since epoch (Jan 1 1970 GMT),
2487
+ or the string "now" to substitute the current synced blockchain time. The timestamp of the oldest
2488
+ key will determine how far back blockchain rescans need to begin for missing wallet transactions.
2489
+ "now" can be specified to bypass scanning, for keys which are known to never have been used, and
2490
+ 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key
2491
+ creation time of all keys being imported by the importmulti call will be scanned.
2492
+ "redeemscript": "<script>" , (string, optional) Allowed only if the scriptPubKey is a P2SH address or a P2SH scriptPubKey
2493
+ "pubkeys": ["<pubKey>", ... ] , (array, optional) Array of strings giving pubkeys that must occur in the output or redeemscript
2494
+ "keys": ["<key>", ... ] , (array, optional) Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript
2495
+ "internal": <true> , (boolean, optional, default: false) Stating whether matching outputs should be treated as not incoming payments
2496
+ "watchonly": <true> , (boolean, optional, default: false) Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty
2497
+ "label": <label> , (string, optional, default: '') Label to assign to the address (aka account name, for now), only allowed with internal=false
2498
+ }
2499
+ ,...
2500
+ ]
2501
+ 2. options (json, optional)
2502
+ {
2503
+ "rescan": <false>, (boolean, optional, default: true) Stating if should rescan the blockchain after all imports
2504
+ }
2505
+
2506
+ Examples:
2507
+ > neurai-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }, { "scriptPubKey": { "address": "<my 2nd address>" }, "label": "example 2", "timestamp": 1455191480 }]'
2508
+ > neurai-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }]' '{ "rescan": false}'
2509
+
2510
+ Response is an array with the same size as the input that has the execution result :
2511
+ [{ "success": true } , { "success": false, "error": { "code": -1, "message": "Internal Server Error"} }, ... ]
2512
+ **/ importmulti: "importmulti",
2513
+ /** importprivkey "privkey" ( "label" ) ( rescan )
2514
+
2515
+ Adds a private key (as returned by dumpprivkey) to your wallet.
2516
+
2517
+ Arguments:
2518
+ 1. "privkey" (string, required) The private key (see dumpprivkey)
2519
+ 2. "label" (string, optional, default="") An optional label
2520
+ 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
2521
+
2522
+ Note: This call can take minutes to complete if rescan is true.
2523
+
2524
+ Examples:
2525
+
2526
+ Dump a private key
2527
+ > neurai-cli dumpprivkey "myaddress"
2528
+
2529
+ Import the private key with rescan
2530
+ > neurai-cli importprivkey "mykey"
2531
+
2532
+ Import using a label and without rescan
2533
+ > neurai-cli importprivkey "mykey" "testing" false
2534
+
2535
+ Import using default blank label and without rescan
2536
+ > neurai-cli importprivkey "mykey" "" false
2537
+
2538
+ As a JSON-RPC call
2539
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2540
+ **/ importprivkey: "importprivkey",
2541
+ /** importprunedfunds
2542
+
2543
+ Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.
2544
+
2545
+ Arguments:
2546
+ 1. "rawtransaction" (string, required) A raw transaction in hex funding an already-existing address in wallet
2547
+ 2. "txoutproof" (string, required) The hex output from gettxoutproof that contains the transaction
2548
+ **/ importprunedfunds: "importprunedfunds",
2549
+ /** importpubkey "pubkey" ( "label" rescan )
2550
+
2551
+ Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.
2552
+
2553
+ Arguments:
2554
+ 1. "pubkey" (string, required) The hex-encoded public key
2555
+ 2. "label" (string, optional, default="") An optional label
2556
+ 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
2557
+
2558
+ Note: This call can take minutes to complete if rescan is true.
2559
+
2560
+ Examples:
2561
+
2562
+ Import a public key with rescan
2563
+ > neurai-cli importpubkey "mypubkey"
2564
+
2565
+ Import using a label without rescan
2566
+ > neurai-cli importpubkey "mypubkey" "testing" false
2567
+
2568
+ As a JSON-RPC call
2569
+ > 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:8766/
2570
+ **/ importpubkey: "importpubkey",
2571
+ /** importwallet "filename"
2572
+
2573
+ Imports keys from a wallet dump file (see dumpwallet).
2574
+
2575
+ Arguments:
2576
+ 1. "filename" (string, required) The wallet file
2577
+
2578
+ Examples:
2579
+
2580
+ Dump the wallet
2581
+ > neurai-cli dumpwallet "test"
2582
+
2583
+ Import the wallet
2584
+ > neurai-cli importwallet "test"
2585
+
2586
+ Import using the json rpc call
2587
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2588
+ **/ importwallet: "importwallet",
2589
+ /** issue "asset_name" qty "( to_address )" "( change_address )" ( units ) ( reissuable ) ( has_ipfs ) "( ipfs_hash )"
2590
+
2591
+ Issue an asset, subasset or unique asset.
2592
+ Asset name must not conflict with any existing asset.
2593
+ Unit as the number of decimals precision for the asset (0 for whole units ("1"), 8 for max precision ("1.00000000")
2594
+ Reissuable is true/false for whether additional units can be issued by the original issuer.
2595
+ If issuing a unique asset these values are required (and will be defaulted to): qty=1, units=0, reissuable=false.
2596
+
2597
+ Arguments:
2598
+ 1. "asset_name" (string, required) a unique name
2599
+ 2. "qty" (numeric, optional, default=1) the number of units to be issued
2600
+ 3. "to_address" (string), optional, default=""), address asset will be sent to, if it is empty, address will be generated for you
2601
+ 4. "change_address" (string), optional, default=""), address the the xna change will be sent to, if it is empty, change address will be generated for you
2602
+ 5. "units" (integer, optional, default=0, min=0, max=8), the number of decimals precision for the asset (0 for whole units ("1"), 8 for max precision ("1.00000000")
2603
+ 6. "reissuable" (boolean, optional, default=true (false for unique assets)), whether future reissuance is allowed
2604
+ 7. "has_ipfs" (boolean, optional, default=false), whether ipfs hash is going to be added to the asset
2605
+ 8. "ipfs_hash" (string, optional but required if has_ipfs = 1), an ipfs hash or a txid hash once RIP5 is activated
2606
+
2607
+ Result:
2608
+ "txid" (string) The transaction id
2609
+
2610
+ Examples:
2611
+ > neurai-cli issue "ASSET_NAME" 1000
2612
+ > neurai-cli issue "ASSET_NAME" 1000 "myaddress"
2613
+ > neurai-cli issue "ASSET_NAME" 1000 "myaddress" "changeaddress" 4
2614
+ > neurai-cli issue "ASSET_NAME" 1000 "myaddress" "changeaddress" 2 true
2615
+ > neurai-cli issue "ASSET_NAME" 1000 "myaddress" "changeaddress" 8 false true QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
2616
+ > neurai-cli issue "ASSET_NAME/SUB_ASSET" 1000 "myaddress" "changeaddress" 2 true
2617
+ > neurai-cli issue "ASSET_NAME#uniquetag"
2618
+ **/ issue: "issue",
2619
+ /** issuequalifierasset "asset_name" qty "( to_address )" "( change_address )" ( has_ipfs ) "( ipfs_hash )"
2620
+
2621
+ Issue an qualifier or sub qualifier asset
2622
+ If the '#' character isn't added, it will be added automatically
2623
+ Amount is a number between 1 and 10
2624
+ Asset name must not conflict with any existing asset.
2625
+ Unit is always set to Zero (0) for qualifier assets
2626
+ Reissuable is always set to false for qualifier assets
2627
+
2628
+ Arguments:
2629
+ 1. "asset_name" (string, required) a unique name
2630
+ 2. "qty" (numeric, optional, default=1) the number of units to be issued
2631
+ 3. "to_address" (string), optional, default=""), address asset will be sent to, if it is empty, address will be generated for you
2632
+ 4. "change_address" (string), optional, default=""), address the the xna change will be sent to, if it is empty, change address will be generated for you
2633
+ 5. "has_ipfs" (boolean, optional, default=false), whether ipfs hash is going to be added to the asset
2634
+ 6. "ipfs_hash" (string, optional but required if has_ipfs = 1), an ipfs hash or a txid hash once RIP5 is activated
2635
+
2636
+ Result:
2637
+ "txid" (string) The transaction id
2638
+
2639
+ Examples:
2640
+ > neurai-cli issuequalifierasset "#ASSET_NAME" 1000
2641
+ > neurai-cli issuequalifierasset "ASSET_NAME" 1000 "myaddress"
2642
+ > neurai-cli issuequalifierasset "#ASSET_NAME" 1000 "myaddress" "changeaddress"
2643
+ > neurai-cli issuequalifierasset "ASSET_NAME" 1000 "myaddress" "changeaddress"
2644
+ > neurai-cli issuequalifierasset "#ASSET_NAME" 1000 "myaddress" "changeaddress" true QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
2645
+ > neurai-cli issuequalifierasset "ASSET_NAME/SUB_QUALIFIER" 1000 "myaddress" "changeaddress"
2646
+ > neurai-cli issuequalifierasset "#ASSET_NAME"
2647
+ **/ issuequalifierasset: "issuequalifierasset",
2648
+ /** issuerestrictedasset "asset_name" qty "verifier" "to_address" "( change_address )" (units) ( reissuable ) ( has_ipfs ) "( ipfs_hash )"
2649
+
2650
+ Issue a restricted asset.
2651
+ Restricted asset names must not conflict with any existing restricted asset.
2652
+ Restricted assets have units set to 0.
2653
+ Reissuable is true/false for whether additional asset quantity can be created and if the verifier string can be changed
2654
+
2655
+ Arguments:
2656
+ 1. "asset_name" (string, required) a unique name, starts with '$', if '$' is not there it will be added automatically
2657
+ 2. "qty" (numeric, required) the quantity of the asset to be issued
2658
+ 3. "verifier" (string, required) the verifier string that will be evaluated when restricted asset transfers are made
2659
+ 4. "to_address" (string, required) address asset will be sent to, this address must meet the verifier string requirements
2660
+ 5. "change_address" (string, optional, default="") address that the xna change will be sent to, if it is empty, change address will be generated for you
2661
+ 6. "units" (integer, optional, default=0, min=0, max=8) the number of decimals precision for the asset (0 for whole units ("1"), 8 for max precision ("1.00000000")
2662
+ 7. "reissuable" (boolean, optional, default=true (false for unique assets)) whether future reissuance is allowed
2663
+ 8. "has_ipfs" (boolean, optional, default=false) whether an ipfs hash or txid hash is going to be added to the asset
2664
+ 9. "ipfs_hash" (string, optional but required if has_ipfs = 1) an ipfs hash or a txid hash once RIP5 is activated
2665
+
2666
+ Result:
2667
+ "txid" (string) The transaction id
2668
+
2669
+ Examples:
2670
+ > neurai-cli issuerestrictedasset "$ASSET_NAME" 1000 "#KYC & !#AML" "myaddress"
2671
+ > neurai-cli issuerestrictedasset "$ASSET_NAME" 1000 "#KYC & !#AML" "myaddress"
2672
+ > neurai-cli issuerestrictedasset "$ASSET_NAME" 1000 "#KYC & !#AML" "myaddress" "changeaddress" 5
2673
+ > neurai-cli issuerestrictedasset "$ASSET_NAME" 1000 "#KYC & !#AML" "myaddress" "changeaddress" 8 true
2674
+ > neurai-cli issuerestrictedasset "$ASSET_NAME" 1000 "#KYC & !#AML" "myaddress" "changeaddress" 0 false true QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
2675
+ **/ issuerestrictedasset: "issuerestrictedasset",
2676
+ /** issueunique "root_name" [asset_tags] ( [ipfs_hashes] ) "( to_address )" "( change_address )"
2677
+
2678
+ Issue unique asset(s).
2679
+ root_name must be an asset you own.
2680
+ An asset will be created for each element of asset_tags.
2681
+ If provided ipfs_hashes must be the same length as asset_tags.
2682
+ Five (5) XNA will be burned for each asset created.
2683
+
2684
+ Arguments:
2685
+ 1. "root_name" (string, required) name of the asset the unique asset(s) are being issued under
2686
+ 2. "asset_tags" (array, required) the unique tag for each asset which is to be issued
2687
+ 3. "ipfs_hashes" (array, optional) ipfs hashes or txid hashes corresponding to each supplied tag (should be same size as "asset_tags")
2688
+ 4. "to_address" (string, optional, default=""), address assets will be sent to, if it is empty, address will be generated for you
2689
+ 5. "change_address" (string, optional, default=""), address the the xna change will be sent to, if it is empty, change address will be generated for you
2690
+
2691
+ Result:
2692
+ "txid" (string) The transaction id
2693
+
2694
+ Examples:
2695
+ > neurai-cli issueunique "MY_ASSET" '["primo","secundo"]'
2696
+ > neurai-cli issueunique "MY_ASSET" '["primo","secundo"]' '["first_hash","second_hash"]'
2697
+ **/ issueunique: "issueunique",
2698
+ /** isvalidverifierstring verifier_string
2699
+
2700
+ Checks to see if the given verifier string is valid
2701
+
2702
+ Arguments:
2703
+ 1. "verifier_string" (string, required) the verifier string to check
2704
+
2705
+ Result:
2706
+ "xxxxxxx", (string) If the verifier string is valid, and the reason
2707
+
2708
+ Examples:
2709
+ > neurai-cli isvalidverifierstring "verifier_string"
2710
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "isvalidverifierstring", "params": ["verifier_string"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2711
+ **/ isvalidverifierstring: "isvalidverifierstring",
2712
+ /** keypoolrefill ( newsize )
2713
+
2714
+ Fills the keypool.
2715
+
2716
+ Arguments
2717
+ 1. newsize (numeric, optional, default=100) The new keypool size
2718
+
2719
+ Examples:
2720
+ > neurai-cli keypoolrefill
2721
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "keypoolrefill", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2722
+ **/ keypoolrefill: "keypoolrefill",
2723
+ /** listaccounts ( minconf include_watchonly)
2724
+
2725
+ DEPRECATED. Returns Object that has account names as keys, account balances as values.
2726
+
2727
+ Arguments:
2728
+ 1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations
2729
+ 2. include_watchonly (bool, optional, default=false) Include balances in watch-only addresses (see 'importaddress')
2730
+
2731
+ Result:
2732
+ { (json object where keys are account names, and values are numeric balances
2733
+ "account": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.
2734
+ ...
2735
+ }
2736
+
2737
+ Examples:
2738
+
2739
+ List account balances where there at least 1 confirmation
2740
+ > neurai-cli listaccounts
2741
+
2742
+ List account balances including zero confirmation transactions
2743
+ > neurai-cli listaccounts 0
2744
+
2745
+ List account balances for 6 or more confirmations
2746
+ > neurai-cli listaccounts 6
2747
+
2748
+ As json rpc call
2749
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaccounts", "params": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2750
+ **/ listaccounts: "listaccounts",
2751
+ /** listaddressesbyasset "asset_name" (onlytotal) (count) (start)
2752
+
2753
+ Returns a list of all address that own the given asset (with balances)
2754
+ Or returns the total size of how many address own the given asset
2755
+ Arguments:
2756
+ 1. "asset_name" (string, required) name of asset
2757
+ 2. "onlytotal" (boolean, optional, default=false) when false result is just a list of addresses with balances -- when true the result is just a single number representing the number of addresses
2758
+ 3. "count" (integer, optional, default=50000, MAX=50000) truncates results to include only the first _count_ assets found
2759
+ 4. "start" (integer, optional, default=0) results skip over the first _start_ assets found (if negative it skips back from the end)
2760
+
2761
+ Result:
2762
+ [ (address): balance,
2763
+ ...
2764
+ ]
2765
+
2766
+ Examples:
2767
+ > neurai-cli listaddressesbyasset "ASSET_NAME" false 2 0
2768
+ > neurai-cli listaddressesbyasset "ASSET_NAME" true
2769
+ > neurai-cli listaddressesbyasset "ASSET_NAME"
2770
+ **/ listaddressesbyasset: "listaddressesbyasset",
2771
+ /** listaddressesfortag tag_name
2772
+
2773
+ List all addresses that have been assigned a given tag
2774
+
2775
+ Arguments:
2776
+ 1. "tag_name" (string, required) the tag asset name to search for
2777
+
2778
+ Result:
2779
+ ["address", (string) The address
2780
+ ...,
2781
+ ]
2782
+
2783
+ Examples:
2784
+ > neurai-cli listaddressesfortag "#TAG"
2785
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressesfortag", "params": ["#TAG"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2786
+ **/ listaddressesfortag: "listaddressesfortag",
2787
+ /** listaddressgroupings
2788
+
2789
+ Lists groups of addresses which have had their common ownership
2790
+ made public by common use as inputs or as the resulting change
2791
+ in past transactions
2792
+
2793
+ Result:
2794
+ [
2795
+ [
2796
+ [
2797
+ "address", (string) The neurai address
2798
+ amount, (numeric) The amount in XNA
2799
+ "account" (string, optional) DEPRECATED. The account
2800
+ ]
2801
+ ,...
2802
+ ]
2803
+ ,...
2804
+ ]
2805
+
2806
+ Examples:
2807
+ > neurai-cli listaddressgroupings
2808
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressgroupings", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2809
+ **/ listaddressgroupings: "listaddressgroupings",
2810
+ /** listaddressrestrictions address
2811
+
2812
+ List all assets that have frozen this address
2813
+
2814
+ Arguments:
2815
+ 1. "address" (string), required) the address to list restrictions for
2816
+
2817
+ Result:
2818
+ ["asset_name", (string) The restriction name
2819
+ ...,
2820
+ ]
2821
+
2822
+ Examples:
2823
+ > neurai-cli listaddressrestrictions "address"
2824
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddressrestrictions", "params": ["address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2825
+ **/ listaddressrestrictions: "listaddressrestrictions",
2826
+ /** listassetbalancesbyaddress "address" (onlytotal) (count) (start)
2827
+
2828
+ Returns a list of all asset balances for an address.
2829
+
2830
+ Arguments:
2831
+ 1. "address" (string, required) a neurai address
2832
+ 2. "onlytotal" (boolean, optional, default=false) when false result is just a list of assets balances -- when true the result is just a single number representing the number of assets
2833
+ 3. "count" (integer, optional, default=50000, MAX=50000) truncates results to include only the first _count_ assets found
2834
+ 4. "start" (integer, optional, default=0) results skip over the first _start_ assets found (if negative it skips back from the end)
2835
+
2836
+ Result:
2837
+ {
2838
+ (asset_name) : (quantity),
2839
+ ...
2840
+ }
2841
+
2842
+ Examples:
2843
+ > neurai-cli listassetbalancesbyaddress "myaddress" false 2 0
2844
+ > neurai-cli listassetbalancesbyaddress "myaddress" true
2845
+ > neurai-cli listassetbalancesbyaddress "myaddress"
2846
+ **/ listassetbalancesbyaddress: "listassetbalancesbyaddress",
2847
+ /** listassets "( asset )" ( verbose ) ( count ) ( start )
2848
+
2849
+ Returns a list of all assets
2850
+
2851
+ This could be a slow/expensive operation as it reads from the database
2852
+
2853
+ Arguments:
2854
+ 1. "asset" (string, optional, default="*") filters results -- must be an asset name or a partial asset name followed by '*' ('*' matches all trailing characters)
2855
+ 2. "verbose" (boolean, optional, default=false) when false result is just a list of asset names -- when true results are asset name mapped to metadata
2856
+ 3. "count" (integer, optional, default=ALL) truncates results to include only the first _count_ assets found
2857
+ 4. "start" (integer, optional, default=0) results skip over the first _start_ assets found (if negative it skips back from the end)
2858
+
2859
+ Result (verbose=false):
2860
+ [
2861
+ asset_name,
2862
+ ...
2863
+ ]
2864
+
2865
+ Result (verbose=true):
2866
+ {
2867
+ (asset_name):
2868
+ {
2869
+ amount: (number),
2870
+ units: (number),
2871
+ reissuable: (number),
2872
+ has_ipfs: (number),
2873
+ ipfs_hash: (hash) (only if has_ipfs = 1 and data is a ipfs hash)
2874
+ ipfs_hash: (hash) (only if has_ipfs = 1 and data is a txid hash)
2875
+ },
2876
+ {...}, {...}
2877
+ }
2878
+
2879
+ Examples:
2880
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listassets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2881
+ > neurai-cli listassets ASSET
2882
+ > neurai-cli listassets "ASSET*" true 10 20
2883
+ **/ listassets: "listassets",
2884
+ /** listbanned
2885
+
2886
+ List all banned IPs/Subnets.
2887
+
2888
+ Examples:
2889
+ > neurai-cli listbanned
2890
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2891
+ **/ listbanned: "listbanned",
2892
+ /** listglobalrestrictions
2893
+
2894
+ List all global restricted assets
2895
+
2896
+ Result:
2897
+ ["asset_name", (string) The asset name
2898
+ ...,
2899
+ ]
2900
+
2901
+ Examples:
2902
+ > neurai-cli listglobalrestrictions
2903
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listglobalrestrictions", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2904
+ **/ listglobalrestrictions: "listglobalrestrictions",
2905
+ /** listlockunspent
2906
+
2907
+ Returns list of temporarily unspendable outputs.
2908
+ See the lockunspent call to lock and unlock transactions for spending.
2909
+
2910
+ Result:
2911
+ [
2912
+ {
2913
+ "txid" : "transactionid", (string) The transaction id locked
2914
+ "vout" : n (numeric) The vout value
2915
+ }
2916
+ ,...
2917
+ ]
2918
+
2919
+ Examples:
2920
+
2921
+ List the unspent transactions
2922
+ > neurai-cli listunspent
2923
+
2924
+ Lock an unspent transaction
2925
+ > neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
2926
+
2927
+ List the locked transactions
2928
+ > neurai-cli listlockunspent
2929
+
2930
+ Unlock the transaction again
2931
+ > neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
2932
+
2933
+ As a json rpc call
2934
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listlockunspent", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2935
+ **/ listlockunspent: "listlockunspent",
2936
+ /** listmyassets "( asset )" ( verbose ) ( count ) ( start ) (confs)
2937
+
2938
+ Returns a list of all asset that are owned by this wallet
2939
+
2940
+ Arguments:
2941
+ 1. "asset" (string, optional, default="*") filters results -- must be an asset name or a partial asset name followed by '*' ('*' matches all trailing characters)
2942
+ 2. "verbose" (boolean, optional, default=false) when false results only contain balances -- when true results include outpoints
2943
+ 3. "count" (integer, optional, default=ALL) truncates results to include only the first _count_ assets found
2944
+ 4. "start" (integer, optional, default=0) results skip over the first _start_ assets found (if negative it skips back from the end)
2945
+ 5. "confs" (integet, optional, default=0) results are skipped if they don't have this number of confirmations
2946
+
2947
+ Result (verbose=false):
2948
+ {
2949
+ (asset_name): balance,
2950
+ ...
2951
+ }
2952
+
2953
+ Result (verbose=true):
2954
+ {
2955
+ (asset_name):
2956
+ {
2957
+ "balance": balance,
2958
+ "outpoints":
2959
+ [
2960
+ {
2961
+ "txid": txid,
2962
+ "vout": vout,
2963
+ "amount": amount
2964
+ }
2965
+ {...}, {...}
2966
+ ]
2967
+ }
2968
+ }
2969
+ {...}, {...}
2970
+
2971
+ Examples:
2972
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listmyassets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
2973
+ > neurai-cli listmyassets ASSET
2974
+ > neurai-cli listmyassets "ASSET*" true 10 20
2975
+ > neurai-cli listmyassets "ASSET*" true 10 20 1
2976
+ **/ listmyassets: "listmyassets",
2977
+ /** listreceivedbyaccount ( minconf include_empty include_watchonly)
2978
+
2979
+ DEPRECATED. List balances by account.
2980
+
2981
+ Arguments:
2982
+ 1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.
2983
+ 2. include_empty (bool, optional, default=false) Whether to include accounts that haven't received any payments.
2984
+ 3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').
2985
+
2986
+ Result:
2987
+ [
2988
+ {
2989
+ "involvesWatchonly" : true, (bool) Only returned if imported addresses were involved in transaction
2990
+ "account" : "accountname", (string) The account name of the receiving account
2991
+ "amount" : x.xxx, (numeric) The total amount received by addresses with this account
2992
+ "confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
2993
+ "label" : "label" (string) A comment for the address/transaction, if any
2994
+ }
2995
+ ,...
2996
+ ]
2997
+
2998
+ Examples:
2999
+ > neurai-cli listreceivedbyaccount
3000
+ > neurai-cli listreceivedbyaccount 6 true
3001
+ > 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:8766/
3002
+ **/ listreceivedbyaccount: "listreceivedbyaccount",
3003
+ /** listreceivedbyaddress ( minconf include_empty include_watchonly)
3004
+
3005
+ List balances by receiving address.
3006
+
3007
+ Arguments:
3008
+ 1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.
3009
+ 2. include_empty (bool, optional, default=false) Whether to include addresses that haven't received any payments.
3010
+ 3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').
3011
+
3012
+ Result:
3013
+ [
3014
+ {
3015
+ "involvesWatchonly" : true, (bool) Only returned if imported addresses were involved in transaction
3016
+ "address" : "receivingaddress", (string) The receiving address
3017
+ "account" : "accountname", (string) DEPRECATED. The account of the receiving address. The default account is "".
3018
+ "amount" : x.xxx, (numeric) The total amount in XNA received by the address
3019
+ "confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
3020
+ "label" : "label", (string) A comment for the address/transaction, if any
3021
+ "txids": [
3022
+ n, (numeric) The ids of transactions received with the address
3023
+ ...
3024
+ ]
3025
+ }
3026
+ ,...
3027
+ ]
3028
+
3029
+ Examples:
3030
+ > neurai-cli listreceivedbyaddress
3031
+ > neurai-cli listreceivedbyaddress 6 true
3032
+ > 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:8766/
3033
+ **/ listreceivedbyaddress: "listreceivedbyaddress",
3034
+ /** listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
3035
+
3036
+ Get all transactions in blocks since block [blockhash], or all transactions if omitted.
3037
+ If "blockhash" is no longer a part of the main chain, transactions from the fork point onward are included.
3038
+ Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the "removed" array.
3039
+
3040
+ Arguments:
3041
+ 1. "blockhash" (string, optional) The block hash to list transactions since
3042
+ 2. target_confirmations: (numeric, optional, default=1) Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value
3043
+ 3. include_watchonly: (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')
3044
+ 4. include_removed: (bool, optional, default=true) Show transactions that were removed due to a reorg in the "removed" array
3045
+ (not guaranteed to work on pruned nodes)
3046
+
3047
+ Result:
3048
+ {
3049
+ "transactions": [
3050
+ "account":"accountname", (string) DEPRECATED. The account name associated with the transaction. Will be "" for the default account.
3051
+ "address":"address", (string) The neurai address of the transaction. Not present for move transactions (category = move).
3052
+ "category":"send|receive", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.
3053
+ "amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the 'move' category for moves
3054
+ outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.
3055
+ "vout" : n, (numeric) the vout value
3056
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the 'send' category of transactions.
3057
+ "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.
3058
+ When it's < 0, it means the transaction conflicted that many blocks ago.
3059
+ "blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.
3060
+ "blockindex": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.
3061
+ "blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
3062
+ "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
3063
+ "time": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
3064
+ "timereceived": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.
3065
+ "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3066
+ may be unknown for unconfirmed transactions not in the mempool
3067
+ "abandoned": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.
3068
+ "comment": "...", (string) If a comment is associated with the transaction.
3069
+ "label" : "label" (string) A comment for the address/transaction, if any
3070
+ "to": "...", (string) If a comment to is associated with the transaction.
3071
+ ],
3072
+ "removed": [
3073
+ <structure is the same as "transactions" above, only present if include_removed=true>
3074
+ Note: transactions that were readded in the active chain will appear as-is in this array, and may thus have a positive confirmation count.
3075
+ ],
3076
+ "lastblock": "lastblockhash" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones
3077
+ }
3078
+
3079
+ Examples:
3080
+ > neurai-cli listsinceblock
3081
+ > neurai-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
3082
+ > 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:8766/
3083
+ **/ listsinceblock: "listsinceblock",
3084
+ /** listsnapshotrequests ["asset_name" [block_height]]
3085
+
3086
+ List snapshot request details.
3087
+
3088
+ Arguments:
3089
+ asset_name: (string, optional) List only requests for a specific asset (default is "" for ALL)
3090
+ block_height: (number, optional) List only requests for a particular block height (default is 0 for ALL)
3091
+
3092
+ Result:
3093
+ [
3094
+ {
3095
+ asset_name: (string),
3096
+ block_height: (number)
3097
+ }
3098
+ ]
3099
+
3100
+ Examples:
3101
+ > neurai-cli listsnapshotrequests
3102
+ > 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:8766/
3103
+ **/ listsnapshotrequests: "listsnapshotrequests",
3104
+ /** listtagsforaddress address
3105
+
3106
+ List all tags assigned to an address
3107
+
3108
+ Arguments:
3109
+ 1. "address" (string, required) the address to list tags for
3110
+
3111
+ Result:
3112
+ ["tag_name", (string) The tag name
3113
+ ...,
3114
+ ]
3115
+
3116
+ Examples:
3117
+ > neurai-cli listtagsforaddress "address"
3118
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listtagsforaddress", "params": ["address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3119
+ **/ listtagsforaddress: "listtagsforaddress",
3120
+ /** listtransactions ( "account" count skip include_watchonly)
3121
+
3122
+ Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.
3123
+
3124
+ Arguments:
3125
+ 1. "account" (string, optional) DEPRECATED. The account name. Should be "*".
3126
+ 2. count (numeric, optional, default=10) The number of transactions to return
3127
+ 3. skip (numeric, optional, default=0) The number of transactions to skip
3128
+ 4. include_watchonly (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')
3129
+
3130
+ Result:
3131
+ [
3132
+ {
3133
+ "account":"accountname", (string) DEPRECATED. The account name associated with the transaction.
3134
+ It will be "" for the default account.
3135
+ "address":"address", (string) The neurai address of the transaction. Not present for
3136
+ move transactions (category = move).
3137
+ "category":"send|receive|move", (string) The transaction category. 'move' is a local (off blockchain)
3138
+ transaction between accounts, and not associated with an address,
3139
+ transaction id or block. 'send' and 'receive' transactions are
3140
+ associated with an address, transaction id and block details
3141
+ "amount": x.xxx, (numeric) The amount in XNA. This is negative for the 'send' category, and for the
3142
+ 'move' category for moves outbound. It is positive for the 'receive' category,
3143
+ and for the 'move' category for inbound funds.
3144
+ "label": "label", (string) A comment for the address/transaction, if any
3145
+ "vout": n, (numeric) the vout value
3146
+ "fee": x.xxx, (numeric) The amount of the fee in XNA. This is negative and only available for the
3147
+ 'send' category of transactions.
3148
+ "confirmations": n, (numeric) The number of confirmations for the transaction. Available for 'send' and
3149
+ 'receive' category of transactions. Negative confirmations indicate the
3150
+ transaction conflicts with the block chain
3151
+ "trusted": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.
3152
+ "blockhash": "hashvalue", (string) The block hash containing the transaction. Available for 'send' and 'receive'
3153
+ category of transactions.
3154
+ "blockindex": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'
3155
+ category of transactions.
3156
+ "blocktime": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
3157
+ "txid": "transactionid", (string) The transaction id. Available for 'send' and 'receive' category of transactions.
3158
+ "time": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
3159
+ "timereceived": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
3160
+ for 'send' and 'receive' category of transactions.
3161
+ "comment": "...", (string) If a comment is associated with the transaction.
3162
+ "otheraccount": "accountname", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came
3163
+ from (for receiving funds, positive amounts), or went to (for sending funds,
3164
+ negative amounts).
3165
+ "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
3166
+ may be unknown for unconfirmed transactions not in the mempool
3167
+ "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
3168
+ 'send' category of transactions.
3169
+ }
3170
+ ]
3171
+
3172
+ Examples:
3173
+
3174
+ List the most recent 10 transactions in the systems
3175
+ > neurai-cli listtransactions
3176
+
3177
+ List transactions 100 to 120
3178
+ > neurai-cli listtransactions "*" 20 100
3179
+
3180
+ As a json rpc call
3181
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listtransactions", "params": ["*", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3182
+ **/ listtransactions: "listtransactions",
3183
+ /** listunspent ( minconf maxconf ["addresses",...] [include_unsafe] [query_options])
3184
+
3185
+ Returns array of unspent transaction outputs
3186
+ with between minconf and maxconf (inclusive) confirmations.
3187
+ Optionally filter to only include txouts paid to specified addresses.
3188
+
3189
+ Arguments:
3190
+ 1. minconf (numeric, optional, default=1) The minimum confirmations to filter
3191
+ 2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter
3192
+ 3. "addresses" (string) A json array of neurai addresses to filter
3193
+ [
3194
+ "address" (string) neurai address
3195
+ ,...
3196
+ ]
3197
+ 4. include_unsafe (bool, optional, default=true) Include outputs that are not safe to spend
3198
+ See description of "safe" attribute below.
3199
+ 5. query_options (json, optional) JSON with query options
3200
+ {
3201
+ "minimumAmount" (numeric or string, default=0) Minimum value of each UTXO in XNA
3202
+ "maximumAmount" (numeric or string, default=unlimited) Maximum value of each UTXO in XNA
3203
+ "maximumCount" (numeric or string, default=unlimited) Maximum number of UTXOs
3204
+ "minimumSumAmount" (numeric or string, default=unlimited) Minimum sum value of all UTXOs in XNA
3205
+ }
3206
+
3207
+ Result
3208
+ [ (array of json object)
3209
+ {
3210
+ "txid" : "txid", (string) the transaction id
3211
+ "vout" : n, (numeric) the vout value
3212
+ "address" : "address", (string) the neurai address
3213
+ "account" : "account", (string) DEPRECATED. The associated account, or "" for the default account
3214
+ "scriptPubKey" : "key", (string) the script key
3215
+ "amount" : x.xxx, (numeric) the transaction output amount in XNA
3216
+ "confirmations" : n, (numeric) The number of confirmations
3217
+ "redeemScript" : n (string) The redeemScript if scriptPubKey is P2SH
3218
+ "spendable" : xxx, (bool) Whether we have the private keys to spend this output
3219
+ "solvable" : xxx, (bool) Whether we know how to spend this output, ignoring the lack of keys
3220
+ "safe" : xxx (bool) Whether this output is considered safe to spend. Unconfirmed transactions
3221
+ from outside keys and unconfirmed replacement transactions are considered unsafe
3222
+ and are not eligible for spending by fundrawtransaction and sendtoaddress.
3223
+ }
3224
+ ,...
3225
+ ]
3226
+
3227
+ Examples
3228
+ > neurai-cli listunspent
3229
+ > neurai-cli listunspent 6 9999999 "[\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"
3230
+ > 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:8766/
3231
+ > neurai-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
3232
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3233
+ **/ listunspent: "listunspent",
3234
+ /** listwallets
3235
+ Returns a list of currently loaded wallets.
3236
+ For full information on the wallet, use "getwalletinfo"
3237
+
3238
+ Result:
3239
+ [ (json array of strings)
3240
+ "walletname" (string) the wallet name
3241
+ ...
3242
+ ]
3243
+
3244
+ Examples:
3245
+ > neurai-cli listwallets
3246
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3247
+ **/ listwallets: "listwallets",
3248
+ /** lockunspent unlock ([{"txid":"txid","vout":n},...])
3249
+
3250
+ Updates list of temporarily unspendable outputs.
3251
+ Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.
3252
+ If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.
3253
+ A locked transaction output will not be chosen by automatic coin selection, when spending neurais.
3254
+ Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list
3255
+ is always cleared (by virtue of process exit) when a node stops or fails.
3256
+ Also see the listunspent call
3257
+
3258
+ Arguments:
3259
+ 1. unlock (boolean, required) Whether to unlock (true) or lock (false) the specified transactions
3260
+ 2. "transactions" (string, optional) A json array of objects. Each object the txid (string) vout (numeric)
3261
+ [ (json array of json objects)
3262
+ {
3263
+ "txid":"id", (string) The transaction id
3264
+ "vout": n (numeric) The output number
3265
+ }
3266
+ ,...
3267
+ ]
3268
+
3269
+ Result:
3270
+ true|false (boolean) Whether the command was successful or not
3271
+
3272
+ Examples:
3273
+
3274
+ List the unspent transactions
3275
+ > neurai-cli listunspent
3276
+
3277
+ Lock an unspent transaction
3278
+ > neurai-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
3279
+
3280
+ List the locked transactions
3281
+ > neurai-cli listlockunspent
3282
+
3283
+ Unlock the transaction again
3284
+ > neurai-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
3285
+
3286
+ As a json rpc call
3287
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3288
+ **/ lockunspent: "lockunspent",
3289
+ /** move "fromaccount" "toaccount" amount ( minconf "comment" )
3290
+
3291
+ DEPRECATED. Move a specified amount from one account in your wallet to another.
3292
+
3293
+ Arguments:
3294
+ 1. "fromaccount" (string, required) The name of the account to move funds from. May be the default account using "".
3295
+ 2. "toaccount" (string, required) The name of the account to move funds to. May be the default account using "".
3296
+ 3. amount (numeric) Quantity of XNA to move between accounts.
3297
+ 4. (dummy) (numeric, optional) Ignored. Remains for backward compatibility.
3298
+ 5. "comment" (string, optional) An optional comment, stored in the wallet only.
3299
+
3300
+ Result:
3301
+ true|false (boolean) true if successful.
3302
+
3303
+ Examples:
3304
+
3305
+ Move 0.01 XNA from the default account to the account named tabby
3306
+ > neurai-cli move "" "tabby" 0.01
3307
+
3308
+ Move 0.01 XNA timotei to akiko with a comment and funds have 6 confirmations
3309
+ > neurai-cli move "timotei" "akiko" 0.01 6 "happy birthday!"
3310
+
3311
+ As a json rpc call
3312
+ > 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:8766/
3313
+ **/ move: "move",
3314
+ /** ping
3315
+
3316
+ Requests that a ping be sent to all other nodes, to measure ping time.
3317
+ Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.
3318
+ Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
3319
+
3320
+ Examples:
3321
+ > neurai-cli ping
3322
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "ping", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3323
+ **/ ping: "ping",
3324
+ /** pprpcsb "header_hash" "mix_hash" "nonce"
3325
+
3326
+ Attempts to submit new block to network mined by kawpow gpu miner via rpc.
3327
+
3328
+ Arguments
3329
+ 1. "header_hash" (string, required) the prow_pow header hash that was given to the gpu miner from this rpc client
3330
+ 2. "mix_hash" (string, required) the mix hash that was mined by the gpu miner via rpc
3331
+ 3. "nonce" (string, required) the nonce of the block that hashed the valid block
3332
+
3333
+ Result:
3334
+
3335
+ Examples:
3336
+ > neurai-cli pprpcsb "header_hash" "mix_hash" 100000
3337
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pprpcsb", "params": ["header_hash" "mix_hash" 100000] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3338
+ **/ pprpcsb: "pprpcsb",
3339
+ /** preciousblock "blockhash"
3340
+
3341
+ Treats a block as if it were received before others with the same work.
3342
+
3343
+ A later preciousblock call can override the effect of an earlier one.
3344
+
3345
+ The effects of preciousblock are not retained across restarts.
3346
+
3347
+ Arguments:
3348
+ 1. "blockhash" (string, required) the hash of the block to mark as precious
3349
+
3350
+ Result:
3351
+
3352
+ Examples:
3353
+ > neurai-cli preciousblock "blockhash"
3354
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "preciousblock", "params": ["blockhash"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3355
+ **/ preciousblock: "preciousblock",
3356
+ /** prioritisetransaction <txid> <dummy value> <fee delta>
3357
+ Accepts the transaction into mined blocks at a higher (or lower) priority
3358
+
3359
+ Arguments:
3360
+ 1. "txid" (string, required) The transaction id.
3361
+ 2. dummy (numeric, optional) API-Compatibility for previous API. Must be zero or null.
3362
+ DEPRECATED. For forward compatibility use named arguments and omit this parameter.
3363
+ 3. fee_delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).
3364
+ The fee is not actually paid, only the algorithm for selecting transactions into a block
3365
+ considers the transaction as it would have paid a higher (or lower) fee.
3366
+
3367
+ Result:
3368
+ true (boolean) Returns true
3369
+
3370
+ Examples:
3371
+ > neurai-cli prioritisetransaction "txid" 0.0 10000
3372
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "prioritisetransaction", "params": ["txid", 0.0, 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3373
+ **/ prioritisetransaction: "prioritisetransaction",
3374
+ /** pruneblockchain
3375
+
3376
+ Arguments:
3377
+ 1. "height" (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp
3378
+ to prune blocks whose block time is at least 2 hours older than the provided timestamp.
3379
+
3380
+ Result:
3381
+ n (numeric) Height of the last block pruned.
3382
+
3383
+ Examples:
3384
+ > neurai-cli pruneblockchain 1000
3385
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pruneblockchain", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3386
+ **/ pruneblockchain: "pruneblockchain",
3387
+ /** purgesnapshot "asset_name" block_height
3388
+
3389
+ Removes details for the asset snapshot, at the specified height
3390
+
3391
+ Arguments:
3392
+ 1. "asset_name" (string, required) the name of the asset
3393
+ 2. block_height (int, required) the block height of the snapshot
3394
+
3395
+ Result:
3396
+ {
3397
+ name: (string),
3398
+ height: (number),
3399
+ }
3400
+
3401
+ Examples:
3402
+ > neurai-cli purgesnapshot "ASSET_NAME" 28546
3403
+ > 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:8766/
3404
+ **/ purgesnapshot: "purgesnapshot",
3405
+ /** reissue "asset_name" qty "to_address" "change_address" ( reissuable ) ( new_units) "( new_ipfs )"
3406
+
3407
+ Reissues a quantity of an asset to an owned address if you own the Owner Token
3408
+ Can change the reissuable flag during reissuance
3409
+ Can change the ipfs hash during reissuance
3410
+ Arguments:
3411
+ 1. "asset_name" (string, required) name of asset that is being reissued
3412
+ 2. "qty" (numeric, required) number of assets to reissue
3413
+ 3. "to_address" (string, required) address to send the asset to
3414
+ 4. "change_address" (string, optional) address that the change of the transaction will be sent to
3415
+ 5. "reissuable" (boolean, optional, default=true), whether future reissuance is allowed
3416
+ 6. "new_units" (numeric, optional, default=-1), the new units that will be associated with the asset
3417
+ 7. "new_ipfs" (string, optional, default=""), whether to update the current ipfs hash or txid once RIP5 is active
3418
+
3419
+ Result:
3420
+ "txid" (string) The transaction id
3421
+
3422
+ Examples:
3423
+ > neurai-cli reissue "ASSET_NAME" 20 "address"
3424
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "reissue", "params": ["ASSET_NAME" 20 "address" "change_address" "true" 8 "Qmd286K6pohQcTKYqnS1YhWrCiS4gz7Xi34sdwMe9USZ7u"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3425
+ **/ reissue: "reissue",
3426
+ /** reissuerestrictedasset "asset_name" qty to_address ( change_verifier ) ( "new_verifier" ) "( change_address )" ( new_units ) ( reissuable ) "( new_ipfs )"
3427
+
3428
+ Reissue an already created restricted asset
3429
+ Reissuable is true/false for whether additional asset quantity can be created and if the verifier string can be changed
3430
+
3431
+ Arguments:
3432
+ 1. "asset_name" (string, required) a unique name, starts with '$'
3433
+ 2. "qty" (numeric, required) the additional quantity of the asset to be issued
3434
+ 3. "to_address" (string, required) address asset will be sent to, this address must meet the verifier string requirements
3435
+ 4. "change_verifier" (boolean, optional, default=false) if the verifier string will get changed
3436
+ 5. "new_verifier" (string, optional, default="") the new verifier string that will be evaluated when restricted asset transfers are made
3437
+ 6. "change_address" (string, optional, default="") address that the xna change will be sent to, if it is empty, change address will be generated for you
3438
+ 7. "new_units" (numeric, optional, default=-1) the new units that will be associated with the asset
3439
+ 8. "reissuable" (boolean, optional, default=true (false for unique assets)) whether future reissuance is allowed
3440
+ 9. "new_ipfs" (string, optional, default="") whether to update the current ipfs hash or txid once RIP5 is active
3441
+
3442
+ Result:
3443
+ "txid" (string) The transaction id
3444
+
3445
+ Examples:
3446
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
3447
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML"
3448
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress"
3449
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" true "KYC & !AML" "changeaddress" -1 true
3450
+ > neurai-cli reissuerestrictedasset "$ASSET_NAME" 1000 "myaddress" false "" "changeaddress" -1 false QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E
3451
+ **/ reissuerestrictedasset: "reissuerestrictedasset",
3452
+ /** removeprunedfunds "txid"
3453
+
3454
+ Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.
3455
+
3456
+ Arguments:
3457
+ 1. "txid" (string, required) The hex-encoded id of the transaction you are deleting
3458
+
3459
+ Examples:
3460
+ > neurai-cli removeprunedfunds "a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"
3461
+
3462
+ As a JSON-RPC call
3463
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removeprunedfunds", "params": ["a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3464
+ **/ removeprunedfunds: "removeprunedfunds",
3465
+ /** removetagfromaddress tag_name to_address (change_address) (asset_data)
3466
+
3467
+ Remove a tag from a address
3468
+
3469
+ Arguments:
3470
+ 1. "tag_name" (string, required) the name of the tag you are removing from the address
3471
+ 2. "to_address" (string, required) the address that the tag will be removed from
3472
+ 3. "change_address" (string, optional) The change address for the qualifier token to be sent to
3473
+ 4. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the qualifier token
3474
+
3475
+ Result:
3476
+ "txid" (string) The transaction id
3477
+
3478
+ Examples:
3479
+ > neurai-cli removetagfromaddress "#TAG" "to_address"
3480
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removetagfromaddress", "params": ["#TAG" "to_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3481
+ > neurai-cli removetagfromaddress "#TAG" "to_address" "change_address"
3482
+ > 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:8766/
3483
+ **/ removetagfromaddress: "removetagfromaddress",
3484
+ /** requestsnapshot "asset_name" block_height
3485
+
3486
+ Schedules a snapshot of the specified asset at the specified block height.
3487
+
3488
+ Arguments:
3489
+ 1. "asset_name" (string, required) The asset name for which the snapshot will be taken
3490
+ 2. "block_height" (number, required) The block height at which the snapshot will be take
3491
+
3492
+ Result:
3493
+ {
3494
+ request_status: "Added",
3495
+ }
3496
+
3497
+ Examples:
3498
+ > neurai-cli requestsnapshot "TRONCO" 12345
3499
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "requestsnapshot", "params": ["PHATSTACKS" 34987] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3500
+ **/ requestsnapshot: "requestsnapshot",
3501
+ /** rescanblockchain ("start_height") ("stop_height")
3502
+
3503
+ Rescan the local blockchain for wallet related transactions.
3504
+
3505
+ Arguments:
3506
+ 1. "start_height" (numeric, optional) block height where the rescan should start
3507
+ 2. "stop_height" (numeric, optional) the last block height that should be scanned
3508
+
3509
+ Result:
3510
+ {
3511
+ "start_height" (numeric) The block height where the rescan has started. If omitted, rescan started from the genesis block.
3512
+ "stop_height" (numeric) The height of the last rescanned block. If omitted, rescan stopped at the chain tip.
3513
+ }
3514
+
3515
+ Examples:
3516
+ > neurai-cli rescanblockchain 100000 120000
3517
+ > 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:8766/
3518
+ **/ rescanblockchain: "rescanblockchain",
3519
+ /** savemempool
3520
+
3521
+ Dumps the mempool to disk.
3522
+
3523
+ Examples:
3524
+ > neurai-cli savemempool
3525
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "savemempool", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3526
+ **/ savemempool: "savemempool",
3527
+ /** sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" )
3528
+
3529
+ DEPRECATED (use sendtoaddress). Sent an amount from an account to a neurai address.
3530
+
3531
+ Arguments:
3532
+ 1. "fromaccount" (string, required) The name of the account to send funds from. May be the default account using "".
3533
+ Specifying an account does not influence coin selection, but it does associate the newly created
3534
+ transaction with the account, so the account's balance computation and transaction history can reflect
3535
+ the spend.
3536
+ 2. "toaddress" (string, required) The neurai address to send funds to.
3537
+ 3. amount (numeric or string, required) The amount in XNA (transaction fee is added on top).
3538
+ 4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
3539
+ 5. "comment" (string, optional) A comment used to store what the transaction is for.
3540
+ This is not part of the transaction, just kept in your wallet.
3541
+ 6. "comment_to" (string, optional) An optional comment to store the name of the person or organization
3542
+ to which you're sending the transaction. This is not part of the transaction,
3543
+ it is just kept in your wallet.
3544
+
3545
+ Result:
3546
+ "txid" (string) The transaction id.
3547
+
3548
+ Examples:
3549
+
3550
+ Send 0.01 XNA from the default account to the address, must have at least 1 confirmation
3551
+ > neurai-cli sendfrom "" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01
3552
+
3553
+ Send 0.01 from the tabby account to the given address, funds must have at least 6 confirmations
3554
+ > neurai-cli sendfrom "tabby" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.01 6 "donation" "seans outpost"
3555
+
3556
+ As a json rpc call
3557
+ > 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:8766/
3558
+ **/ sendfrom: "sendfrom",
3559
+ /** sendfromaddress "from_address" "to_address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
3560
+
3561
+ Send an amount from a specific address to a given address. All xna change will get sent back to the from_address
3562
+
3563
+ Arguments:
3564
+ 1. "from_address" (string, required) The neurai address to send from.
3565
+ 2. "to_address" (string, required) The neurai address to send to.
3566
+ 3. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
3567
+ 4. "comment" (string, optional) A comment used to store what the transaction is for.
3568
+ This is not part of the transaction, just kept in your wallet.
3569
+ 5. "comment_to" (string, optional) A comment to store the name of the person or organization
3570
+ to which you're sending the transaction. This is not part of the
3571
+ transaction, just kept in your wallet.
3572
+ 6. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
3573
+ The recipient will receive less neurais than you enter in the amount field.
3574
+ 7. conf_target (numeric, optional) Confirmation target (in blocks)
3575
+ 8. "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
3576
+ "UNSET"
3577
+ "ECONOMICAL"
3578
+ "CONSERVATIVE"
3579
+
3580
+ Result:
3581
+ "txid" (string) The transaction id.
3582
+
3583
+ Examples:
3584
+ > neurai-cli sendfromaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1
3585
+ > neurai-cli sendfromaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "donation" "seans outpost"
3586
+ > neurai-cli sendfromaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "" "" true
3587
+ > 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:8766/
3588
+ **/ sendfromaddress: "sendfromaddress",
3589
+ /** sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")
3590
+
3591
+ Send multiple times. Amounts are double-precision floating point numbers.
3592
+
3593
+ Arguments:
3594
+ 1. "fromaccount" (string, required) DEPRECATED. The account to send the funds from. Should be "" for the default account
3595
+ 2. "amounts" (string, required) A json object with addresses and amounts
3596
+ {
3597
+ "address":amount (numeric or string) The neurai address is the key, the numeric amount (can be string) in XNA is the value
3598
+ ,...
3599
+ }
3600
+ 3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.
3601
+ 4. "comment" (string, optional) A comment
3602
+ 5. subtractfeefrom (array, optional) A json array with addresses.
3603
+ The fee will be equally deducted from the amount of each selected address.
3604
+ Those recipients will receive less neurais than you enter in their corresponding amount field.
3605
+ If no addresses are specified here, the sender pays the fee.
3606
+ [
3607
+ "address" (string) Subtract fee from this address
3608
+ ,...
3609
+ ]
3610
+ 6. conf_target (numeric, optional) Confirmation target (in blocks)
3611
+ 7. "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
3612
+ "UNSET"
3613
+ "ECONOMICAL"
3614
+ "CONSERVATIVE"
3615
+
3616
+ Result:
3617
+ "txid" (string) The transaction id for the send. Only 1 transaction is created regardless of
3618
+ the number of addresses.
3619
+
3620
+ Examples:
3621
+
3622
+ Send two amounts to two different addresses:
3623
+ > neurai-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}"
3624
+
3625
+ Send two amounts to two different addresses setting the confirmation and comment:
3626
+ > neurai-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" 6 "testing"
3627
+
3628
+ Send two amounts to two different addresses, subtract fee from amount:
3629
+ > neurai-cli sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}" 1 "" "[\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\",\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\"]"
3630
+
3631
+ As a json rpc call
3632
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendmany", "params": ["", "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.02}", 6, "testing"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3633
+ **/ sendmany: "sendmany",
3634
+ /** sendmessage "channel_name" "ipfs_hash" (expire_time)
3635
+
3636
+ Creates and broadcasts a message transaction to the network for a channel this wallet owns
3637
+ Arguments:
3638
+ 1. "channel_name" (string, required) Name of the channel that you want to send a message with (message channel, administrator asset), if a non administrator asset name is given, the administrator '!' will be added to it
3639
+ 2. "ipfs_hash" (string, required) The IPFS hash of the message
3640
+ 3. "expire_time" (numeric, optional) UTC timestamp of when the message expires
3641
+
3642
+ Result:[
3643
+ txid
3644
+ ]
3645
+
3646
+ Examples:
3647
+ > neurai-cli sendmessage "ASSET_NAME!" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
3648
+ > neurai-cli sendmessage "ASSET_NAME!" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
3649
+ **/ sendmessage: "sendmessage",
3650
+ /** sendrawtransaction "hexstring" ( allowhighfees )
3651
+
3652
+ Submits raw transaction (serialized, hex-encoded) to local node and network.
3653
+
3654
+ Also see createrawtransaction and signrawtransaction calls.
3655
+
3656
+ Arguments:
3657
+ 1. "hexstring" (string, required) The hex string of the raw transaction)
3658
+ 2. allowhighfees (boolean, optional, default=false) Allow high fees
3659
+
3660
+ Result:
3661
+ "hex" (string) The transaction hash in hex
3662
+
3663
+ Examples:
3664
+
3665
+ Create a transaction
3666
+ > neurai-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
3667
+ Sign the transaction, and get back the hex
3668
+ > neurai-cli signrawtransaction "myhex"
3669
+
3670
+ Send the transaction (signed hex)
3671
+ > neurai-cli sendrawtransaction "signedhex"
3672
+
3673
+ As a json rpc call
3674
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3675
+ **/ sendrawtransaction: "sendrawtransaction",
3676
+ /** sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")
3677
+
3678
+ Send an amount to a given address.
3679
+
3680
+ Arguments:
3681
+ 1. "address" (string, required) The neurai address to send to.
3682
+ 2. "amount" (numeric or string, required) The amount in XNA to send. eg 0.1
3683
+ 3. "comment" (string, optional) A comment used to store what the transaction is for.
3684
+ This is not part of the transaction, just kept in your wallet.
3685
+ 4. "comment_to" (string, optional) A comment to store the name of the person or organization
3686
+ to which you're sending the transaction. This is not part of the
3687
+ transaction, just kept in your wallet.
3688
+ 5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
3689
+ The recipient will receive less neurais than you enter in the amount field.
3690
+ 6. conf_target (numeric, optional) Confirmation target (in blocks)
3691
+ 7. "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
3692
+ "UNSET"
3693
+ "ECONOMICAL"
3694
+ "CONSERVATIVE"
3695
+
3696
+ Result:
3697
+ "txid" (string) The transaction id.
3698
+
3699
+ Examples:
3700
+ > neurai-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1
3701
+ > neurai-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "donation" "seans outpost"
3702
+ > neurai-cli sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 0.1 "" "" true
3703
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendtoaddress", "params": ["1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3704
+ **/ sendtoaddress: "sendtoaddress",
3705
+ /** setaccount "address" "account"
3706
+
3707
+ DEPRECATED. Sets the account associated with the given address.
3708
+
3709
+ Arguments:
3710
+ 1. "address" (string, required) The neurai address to be associated with an account.
3711
+ 2. "account" (string, required) The account to assign the address to.
3712
+
3713
+ Examples:
3714
+ > neurai-cli setaccount "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "tabby"
3715
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setaccount", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3716
+ **/ setaccount: "setaccount",
3717
+ /** setban "subnet" "add|remove" (bantime) (absolute)
3718
+
3719
+ Attempts to add or remove an IP/Subnet from the banned list.
3720
+
3721
+ Arguments:
3722
+ 1. "subnet" (string, required) The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)
3723
+ 2. "command" (string, required) 'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list
3724
+ 3. "bantime" (numeric, optional) time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
3725
+ 4. "absolute" (boolean, optional) If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)
3726
+
3727
+ Examples:
3728
+ > neurai-cli setban "192.168.0.6" "add" 86400
3729
+ > neurai-cli setban "192.168.0.0/24" "add"
3730
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setban", "params": ["192.168.0.6", "add", 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3731
+ **/ setban: "setban",
3732
+ /** setgenerate generate ( genproclimit )
3733
+
3734
+ Set 'generate' true or false to turn generation on or off.
3735
+ Generation is limited to 'genproclimit' processors, -1 is unlimited.
3736
+ See the getgenerate call for the current setting.
3737
+
3738
+ Arguments:
3739
+ 1. generate (boolean, required) Set to true to turn on generation, false to turn off.
3740
+ 2. genproclimit (numeric, optional) Set the processor limit for when generation is on. Can be -1 for unlimited.
3741
+
3742
+ Examples:
3743
+
3744
+ Set the generation on with a limit of one processor
3745
+ > neurai-cli setgenerate true 1
3746
+
3747
+ Check the setting
3748
+ > neurai-cli getgenerate
3749
+
3750
+ Turn off generation
3751
+ > neurai-cli setgenerate false
3752
+
3753
+ Using json rpc
3754
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setgenerate", "params": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3755
+ **/ setgenerate: "setgenerate",
3756
+ /** setnetworkactive true|false
3757
+
3758
+ Disable/enable all p2p network activity.
3759
+
3760
+ Arguments:
3761
+ 1. "state" (boolean, required) true to enable networking, false to disable
3762
+ **/ setnetworkactive: "setnetworkactive",
3763
+ /** settxfee amount
3764
+
3765
+ Set the transaction fee per kB. Overwrites the paytxfee parameter.
3766
+
3767
+ Arguments:
3768
+ 1. amount (numeric or string, required) The transaction fee in XNA/kB
3769
+
3770
+ Result
3771
+ true|false (boolean) Returns true if successful
3772
+
3773
+ Examples:
3774
+ > neurai-cli settxfee 0.00001
3775
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "settxfee", "params": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3776
+ **/ settxfee: "settxfee",
3777
+ /** signmessage "address" "message"
3778
+
3779
+ Sign a message with the private key of an address
3780
+
3781
+ Arguments:
3782
+ 1. "address" (string, required) The neurai address to use for the private key.
3783
+ 2. "message" (string, required) The message to create a signature of.
3784
+
3785
+ Result:
3786
+ "signature" (string) The signature of the message encoded in base 64
3787
+
3788
+ Examples:
3789
+
3790
+ Unlock the wallet for 30 seconds
3791
+ > neurai-cli walletpassphrase "mypassphrase" 30
3792
+
3793
+ Create the signature
3794
+ > neurai-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
3795
+
3796
+ Verify the signature
3797
+ > neurai-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
3798
+
3799
+ As json rpc
3800
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3801
+ **/ signmessage: "signmessage",
3802
+ /** signmessagewithprivkey "privkey" "message"
3803
+
3804
+ Sign a message with the private key of an address
3805
+
3806
+ Arguments:
3807
+ 1. "privkey" (string, required) The private key to sign the message with.
3808
+ 2. "message" (string, required) The message to create a signature of.
3809
+
3810
+ Result:
3811
+ "signature" (string) The signature of the message encoded in base 64
3812
+
3813
+ Examples:
3814
+
3815
+ Create the signature
3816
+ > neurai-cli signmessagewithprivkey "privkey" "my message"
3817
+
3818
+ Verify the signature
3819
+ > neurai-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
3820
+
3821
+ As json rpc
3822
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessagewithprivkey", "params": ["privkey", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3823
+ **/ signmessagewithprivkey: "signmessagewithprivkey",
3824
+ /** signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )
3825
+
3826
+ Sign inputs for raw transaction (serialized, hex-encoded).
3827
+ The second optional argument (may be null) is an array of previous transaction outputs that
3828
+ this transaction depends on but may not yet be in the block chain.
3829
+ The third optional argument (may be null) is an array of base58-encoded private
3830
+ keys that, if given, will be the only keys used to sign the transaction.
3831
+
3832
+
3833
+ Arguments:
3834
+ 1. "hexstring" (string, required) The transaction hex string
3835
+ 2. "prevtxs" (string, optional) An json array of previous dependent transaction outputs
3836
+ [ (json array of json objects, or 'null' if none provided)
3837
+ {
3838
+ "txid":"id", (string, required) The transaction id
3839
+ "vout":n, (numeric, required) The output number
3840
+ "scriptPubKey": "hex", (string, required) script key
3841
+ "redeemScript": "hex", (string, required for P2SH or P2WSH) redeem script
3842
+ "amount": value (numeric, required) The amount spent
3843
+ }
3844
+ ,...
3845
+ ]
3846
+ 3. "privkeys" (string, optional) A json array of base58-encoded private keys for signing
3847
+ [ (json array of strings, or 'null' if none provided)
3848
+ "privatekey" (string) private key in base58-encoding
3849
+ ,...
3850
+ ]
3851
+ 4. "sighashtype" (string, optional, default=ALL) The signature hash type. Must be one of
3852
+ "ALL"
3853
+ "NONE"
3854
+ "SINGLE"
3855
+ "ALL|ANYONECANPAY"
3856
+ "NONE|ANYONECANPAY"
3857
+ "SINGLE|ANYONECANPAY"
3858
+
3859
+ Result:
3860
+ {
3861
+ "hex" : "value", (string) The hex-encoded raw transaction with signature(s)
3862
+ "complete" : true|false, (boolean) If the transaction has a complete set of signatures
3863
+ "errors" : [ (json array of objects) Script verification errors (if there are any)
3864
+ {
3865
+ "txid" : "hash", (string) The hash of the referenced, previous transaction
3866
+ "vout" : n, (numeric) The index of the output to spent and used as input
3867
+ "scriptSig" : "hex", (string) The hex-encoded signature script
3868
+ "sequence" : n, (numeric) Script sequence number
3869
+ "error" : "text" (string) Verification or signing error related to the input
3870
+ }
3871
+ ,...
3872
+ ]
3873
+ }
3874
+
3875
+ Examples:
3876
+ > neurai-cli signrawtransaction "myhex"
3877
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signrawtransaction", "params": ["myhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3878
+ **/ signrawtransaction: "signrawtransaction",
3879
+ /** stop
3880
+
3881
+ Stop Neurai server.**/ stop: "stop",
3882
+ /** submitblock "hexdata" ( "dummy" )
3883
+
3884
+ Attempts to submit new block to network.
3885
+ See https://en.neurai.it/wiki/BIP_0022 for full specification.
3886
+
3887
+ Arguments
3888
+ 1. "hexdata" (string, required) the hex-encoded block data to submit
3889
+ 2. "dummy" (optional) dummy value, for compatibility with BIP22. This value is ignored.
3890
+
3891
+ Result:
3892
+
3893
+ Examples:
3894
+ > neurai-cli submitblock "mydata"
3895
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitblock", "params": ["mydata"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3896
+ **/ submitblock: "submitblock",
3897
+ /** subscribetochannel
3898
+
3899
+ Subscribe to a certain message channel
3900
+
3901
+ Arguments:
3902
+ 1. "channel_name" (string, required) The channel name to subscribe to, it must end with '!' or have an '~' in the name
3903
+
3904
+ Result:[
3905
+
3906
+ ]
3907
+
3908
+ Examples:
3909
+ > neurai-cli subscribetochannel "ASSET_NAME!"
3910
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "subscribetochannel", "params": ["ASSET_NAME!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3911
+ **/ subscribetochannel: "subscribetochannel",
3912
+ /** testmempoolaccept ["rawtxs"] ( allowhighfees )
3913
+
3914
+ Returns if raw transaction (serialized, hex-encoded) would be accepted by mempool.
3915
+
3916
+ This checks if the transaction violates the consensus or policy rules.
3917
+
3918
+ See sendrawtransaction call.
3919
+
3920
+ Arguments:
3921
+ 1. ["rawtxs"] (array, required) An array of hex strings of raw transactions.
3922
+ Length must be one for now.
3923
+ 2. allowhighfees (boolean, optional, default=false) Allow high fees
3924
+
3925
+ Result:
3926
+ [ (array) The result of the mempool acceptance test for each raw transaction in the input array.
3927
+ Length is exactly one for now.
3928
+ {
3929
+ "txid" (string) The transaction hash in hex
3930
+ "allowed" (boolean) If the mempool allows this tx to be inserted
3931
+ "reject-reason" (string) Rejection string (only present when 'allowed' is false)
3932
+ }
3933
+ ]
3934
+
3935
+ Examples:
3936
+
3937
+ Create a transaction
3938
+ > neurai-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
3939
+ Sign the transaction, and get back the hex
3940
+ > neurai-cli signrawtransaction "myhex"
3941
+
3942
+ Test acceptance of the transaction (signed hex)
3943
+ > neurai-cli testmempoolaccept "signedhex"
3944
+
3945
+ As a json rpc call
3946
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "testmempoolaccept", "params": [["signedhex"]] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3947
+ **/ testmempoolaccept: "testmempoolaccept",
3948
+ /** transfer "asset_name" qty "to_address" "message" expire_time "change_address" "asset_change_address"
3949
+
3950
+ Transfers a quantity of an owned asset to a given address
3951
+ Arguments:
3952
+ 1. "asset_name" (string, required) name of asset
3953
+ 2. "qty" (numeric, required) number of assets you want to send to the address
3954
+ 3. "to_address" (string, required) address to send the asset to
3955
+ 4. "message" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer
3956
+ 5. "expire_time" (numeric, optional) UTC timestamp of when the message expires
3957
+ 6. "change_address" (string, optional, default = "") the transactions XNA change will be sent to this address
3958
+ 7. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
3959
+
3960
+ Result:
3961
+ txid[
3962
+ txid
3963
+ ]
3964
+
3965
+ Examples:
3966
+ > neurai-cli transfer "ASSET_NAME" 20 "address" "" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
3967
+ > neurai-cli transfer "ASSET_NAME" 20 "address" "" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
3968
+ **/ transfer: "transfer",
3969
+ /** transferfromaddress "asset_name" "from_address" qty "to_address" "message" expire_time "xna_change_address" "asset_change_address"
3970
+
3971
+ Transfer a quantity of an owned asset in a specific address to a given address
3972
+ Arguments:
3973
+ 1. "asset_name" (string, required) name of asset
3974
+ 2. "from_address" (string, required) address that the asset will be transferred from
3975
+ 3. "qty" (numeric, required) number of assets you want to send to the address
3976
+ 4. "to_address" (string, required) address to send the asset to
3977
+ 5. "message" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer
3978
+ 6. "expire_time" (numeric, optional) UTC timestamp of when the message expires
3979
+ 7. "xna_change_address" (string, optional, default = "") the transaction XNA change will be sent to this address
3980
+ 8. "asset_change_address" (string, optional, default = "") the transaction Asset change will be sent to this address
3981
+
3982
+ Result:
3983
+ txid[
3984
+ txid
3985
+ ]
3986
+
3987
+ Examples:
3988
+ > neurai-cli transferfromaddress "ASSET_NAME" "fromaddress" 20 "address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E", 156545652
3989
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "transferfromaddress", "params": ["ASSET_NAME" "fromaddress" 20 "address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E", 156545652] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
3990
+ **/ transferfromaddress: "transferfromaddress",
3991
+ /** transferfromaddresses "asset_name" ["from_addresses"] qty "to_address" "message" expire_time "xna_change_address" "asset_change_address"
3992
+
3993
+ Transfer a quantity of an owned asset in specific address(es) to a given address
3994
+ Arguments:
3995
+ 1. "asset_name" (string, required) name of asset
3996
+ 2. "from_addresses" (array, required) list of from addresses to send from
3997
+ 3. "qty" (numeric, required) number of assets you want to send to the address
3998
+ 4. "to_address" (string, required) address to send the asset to
3999
+ 5. "message" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer
4000
+ 6. "expire_time" (numeric, optional) UTC timestamp of when the message expires
4001
+ 7. "xna_change_address" (string, optional, default = "") the transactions XNA change will be sent to this address
4002
+ 8. "asset_change_address" (string, optional, default = "") the transactions Asset change will be sent to this address
4003
+
4004
+ Result:
4005
+ txid[
4006
+ txid
4007
+ ]
4008
+
4009
+ Examples:
4010
+ > neurai-cli transferfromaddresses "ASSET_NAME" '["fromaddress1", "fromaddress2"]' 20 "to_address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 154652365
4011
+ > 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:8766/
4012
+ **/ transferfromaddresses: "transferfromaddresses",
4013
+ /** transferqualifier "qualifier_name" qty "to_address" ("change_address") ("message") (expire_time)
4014
+
4015
+ Transfer a qualifier asset owned by this wallet to the given address
4016
+ Arguments:
4017
+ 1. "qualifier_name" (string, required) name of qualifier asset
4018
+ 2. "qty" (numeric, required) number of assets you want to send to the address
4019
+ 3. "to_address" (string, required) address to send the asset to
4020
+ 4. "change_address" (string, optional, default = "") the transaction change will be sent to this address
4021
+ 5. "message" (string, optional) Once RIP5 is voted in ipfs hash or txid hash to send along with the transfer
4022
+ 6. "expire_time" (numeric, optional) UTC timestamp of when the message expires
4023
+
4024
+ Result:
4025
+ txid[
4026
+ txid
4027
+ ]
4028
+
4029
+ Examples:
4030
+ > neurai-cli transferqualifier "#QUALIFIER" 20 "to_address" "" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
4031
+ > neurai-cli transferqualifier "#QUALIFIER" 20 "to_address" "change_address" "QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E" 15863654
4032
+ **/ transferqualifier: "transferqualifier",
4033
+ /** unfreezeaddress asset_name address (change_address) (asset_data)
4034
+
4035
+ Unfreeze an address from transferring a restricted asset
4036
+
4037
+ Arguments:
4038
+ 1. "asset_name" (string, required) the name of the restricted asset you want to unfreeze
4039
+ 2. "address" (string, required) the address that will be unfrozen
4040
+ 3. "change_address" (string, optional) The change address for the owner token of the restricted asset
4041
+ 4. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the owner token
4042
+
4043
+ Result:
4044
+ "txid" (string) The transaction id
4045
+
4046
+ Examples:
4047
+ > neurai-cli unfreezeaddress "$RESTRICTED_ASSET" "address"
4048
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unfreezeaddress", "params": ["$RESTRICTED_ASSET" "address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4049
+ > neurai-cli unfreezeaddress "$RESTRICTED_ASSET" "address" "change_address"
4050
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unfreezeaddress", "params": ["$RESTRICTED_ASSET" "address" "change_address"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4051
+ **/ unfreezeaddress: "unfreezeaddress",
4052
+ /** unfreezerestrictedasset asset_name (change_address) (asset_data)
4053
+
4054
+ Unfreeze all trading for a specific restricted asset
4055
+
4056
+ Arguments:
4057
+ 1. "asset_name" (string, required) the name of the restricted asset you want to unfreeze
4058
+ 2. "change_address" (string, optional) The change address for the owner token of the restricted asset
4059
+ 4. "asset_data" (string, optional) The asset data (ipfs or a hash) to be applied to the transfer of the owner token
4060
+
4061
+ Result:
4062
+ "txid" (string) The transaction id
4063
+
4064
+ Examples:
4065
+ > neurai-cli unfreezerestrictedasset "$RESTRICTED_ASSET"
4066
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unfreezerestrictedasset", "params": ["$RESTRICTED_ASSET"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4067
+ > neurai-cli unfreezerestrictedasset "$RESTRICTED_ASSET" "change_address"
4068
+ > 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:8766/
4069
+ **/ unfreezerestrictedasset: "unfreezerestrictedasset",
4070
+ /** unsubscribefromchannel
4071
+
4072
+ Unsubscribe from a certain message channel
4073
+
4074
+ Arguments:
4075
+ 1. "channel_name" (string, required) The channel name to unsubscribe from, must end with '!' or have an '~' in the name
4076
+
4077
+ Result:[
4078
+
4079
+ ]
4080
+
4081
+ Examples:
4082
+ > neurai-cli unsubscribefromchannel "ASSET_NAME!"
4083
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "unsubscribefromchannel", "params": ["ASSET_NAME!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4084
+ **/ unsubscribefromchannel: "unsubscribefromchannel",
4085
+ /** uptime
4086
+
4087
+ Returns the total uptime of the server.
4088
+
4089
+ Result:
4090
+ ttt (numeric) The number of seconds that the server has been running
4091
+
4092
+ Examples:
4093
+ > neurai-cli uptime
4094
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4095
+ **/ uptime: "uptime",
4096
+ /** validateaddress "address"
4097
+
4098
+ Return information about the given neurai address.
4099
+
4100
+ Arguments:
4101
+ 1. "address" (string, required) The neurai address to validate
4102
+
4103
+ Result:
4104
+ {
4105
+ "isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
4106
+ "address" : "address", (string) The neurai address validated
4107
+ "scriptPubKey" : "hex", (string) The hex encoded scriptPubKey generated by the address
4108
+ "ismine" : true|false, (boolean) If the address is yours or not
4109
+ "iswatchonly" : true|false, (boolean) If the address is watchonly
4110
+ "isscript" : true|false, (boolean) If the key is a script
4111
+ "script" : "type" (string, optional) The output script type. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash
4112
+ "hex" : "hex", (string, optional) The redeemscript for the p2sh address
4113
+ "addresses" (string, optional) Array of addresses associated with the known redeemscript
4114
+ [
4115
+ "address"
4116
+ ,...
4117
+ ]
4118
+ "sigsrequired" : xxxxx (numeric, optional) Number of signatures required to spend multisig output
4119
+ "pubkey" : "publickeyhex", (string) The hex value of the raw public key
4120
+ "iscompressed" : true|false, (boolean) If the address is compressed
4121
+ "account" : "account" (string) DEPRECATED. The account associated with the address, "" is the default account
4122
+ "timestamp" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)
4123
+ "hdkeypath" : "keypath" (string, optional) The HD keypath if the key is HD and available
4124
+ "hdmasterkeyid" : "<hash160>" (string, optional) The Hash160 of the HD master pubkey
4125
+ }
4126
+
4127
+ Examples:
4128
+ > neurai-cli validateaddress "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"
4129
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4130
+ **/ validateaddress: "validateaddress",
4131
+ /** verifychain ( checklevel nblocks )
4132
+
4133
+ Verifies blockchain database.
4134
+
4135
+ Arguments:
4136
+ 1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.
4137
+ 2. nblocks (numeric, optional, default=6, 0=all) The number of blocks to check.
4138
+
4139
+ Result:
4140
+ true|false (boolean) Verified or not
4141
+
4142
+ Examples:
4143
+ > neurai-cli verifychain
4144
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifychain", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4145
+ **/ verifychain: "verifychain",
4146
+ /** verifymessage "address" "signature" "message"
4147
+
4148
+ Verify a signed message
4149
+
4150
+ Arguments:
4151
+ 1. "address" (string, required) The neurai address to use for the signature.
4152
+ 2. "signature" (string, required) The signature provided by the signer in base 64 encoding (see signmessage).
4153
+ 3. "message" (string, required) The message that was signed.
4154
+
4155
+ Result:
4156
+ true|false (boolean) If the signature is verified or not.
4157
+
4158
+ Examples:
4159
+
4160
+ Unlock the wallet for 30 seconds
4161
+ > neurai-cli walletpassphrase "mypassphrase" 30
4162
+
4163
+ Create the signature
4164
+ > neurai-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
4165
+
4166
+ Verify the signature
4167
+ > neurai-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
4168
+
4169
+ As json rpc
4170
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifymessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "signature", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4171
+ **/ verifymessage: "verifymessage",
4172
+ /** verifytxoutproof "proof"
4173
+
4174
+ Verifies that a proof points to a transaction in a block, returning the transaction it commits to
4175
+ and throwing an RPC error if the block is not in our best chain
4176
+
4177
+ Arguments:
4178
+ 1. "proof" (string, required) The hex-encoded proof generated by gettxoutproof
4179
+
4180
+ Result:
4181
+ ["txid"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid
4182
+ **/ verifytxoutproof: "verifytxoutproof",
4183
+ /** viewallmessagechannels
4184
+
4185
+ View all message channels the wallet is subscribed to
4186
+
4187
+ Result:[
4188
+ "Asset Name" (string) The asset channel name
4189
+
4190
+ ]
4191
+
4192
+ Examples:
4193
+ > neurai-cli viewallmessagechannels
4194
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessagechannels", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4195
+ **/ viewallmessagechannels: "viewallmessagechannels",
4196
+ /** viewallmessages
4197
+
4198
+ View all messages that the wallet contains
4199
+
4200
+ Result:
4201
+ "Asset Name:" (string) The name of the asset the message was sent on
4202
+ "Message:" (string) The IPFS hash of the message
4203
+ "Time:" (Date) The time as a date in the format (YY-mm-dd Hour-minute-second)
4204
+ "Block Height:" (number) The height of the block the message was included in
4205
+ "Status:" (string) Status of the message (READ, UNREAD, ORPHAN, EXPIRED, SPAM, HIDDEN, ERROR)
4206
+ "Expire Time:" (Date, optional) If the message had an expiration date assigned, it will be shown here in the format (YY-mm-dd Hour-minute-second)
4207
+ "Expire UTC Time:" (Date, optional) If the message contains an expire date that is too large, the UTC number will be displayed
4208
+
4209
+ Examples:
4210
+ > neurai-cli viewallmessages
4211
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewallmessages", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4212
+ **/ viewallmessages: "viewallmessages",
4213
+ /** viewmyrestrictedaddresses
4214
+
4215
+ View all addresses this wallet owns that have been restricted
4216
+
4217
+ Result:
4218
+ {
4219
+ "Address:" (string) The address that was restricted
4220
+ "Asset Name:" (string) The asset that the restriction applies to
4221
+ "[Restricted|Derestricted]:" (Date) The UTC datetime of the restriction or derestriction in the format (YY-mm-dd HH:MM:SS))
4222
+ (Only the most recent restriction/derestriction event will be returned for each address)
4223
+ }...
4224
+
4225
+ Examples:
4226
+ > neurai-cli viewmyrestrictedaddresses
4227
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmyrestrictedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4228
+ **/ viewmyrestrictedaddresses: "viewmyrestrictedaddresses",
4229
+ /** viewmytaggedaddresses
4230
+
4231
+ View all addresses this wallet owns that have been tagged
4232
+
4233
+ Result:
4234
+ {
4235
+ "Address:" (string) The address that was tagged
4236
+ "Tag Name:" (string) The asset name
4237
+ "[Assigned|Removed]:" (Date) The UTC datetime of the assignment or removal of the tag in the format (YY-mm-dd HH:MM:SS)
4238
+ (Only the most recent tagging/untagging event will be returned for each address)
4239
+ }...
4240
+
4241
+ Examples:
4242
+ > neurai-cli viewmytaggedaddresses
4243
+ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "viewmytaggedaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8766/
4244
+ **/ viewmytaggedaddresses: "viewmytaggedaddresses"
4245
+ };
4246
+
4247
+
4248
+ function $80bd448eb6ea085b$var$throwSyntaxError() {
4249
+ throw new Error("Syntax error, call getRPC with (username, password, URL)");
4250
+ }
4251
+ function $80bd448eb6ea085b$export$eb94c228b080d168(username, password, URL) {
4252
+ if (!username) $80bd448eb6ea085b$var$throwSyntaxError();
4253
+ if (!password) $80bd448eb6ea085b$var$throwSyntaxError();
4254
+ if (!URL) $80bd448eb6ea085b$var$throwSyntaxError();
4255
+ return async function rpc(method, params) {
4256
+ const promise = new Promise((resolutionFunc, rejectionFunc)=>{
4257
+ const data = {
4258
+ jsonrpc: "2.0",
4259
+ id: Math.random(),
4260
+ method: method,
4261
+ params: params
4262
+ };
4263
+ try {
4264
+ const rpcResponse = $80bd448eb6ea085b$var$postData(URL, data, username, password);
4265
+ rpcResponse.then(async (response)=>{
4266
+ /*
4267
+ This means that we got a response.
4268
+ The response can still be an error/problem but the server responded
4269
+
4270
+ */ if (response.ok) {
4271
+ //Happy flow
4272
+ const obj = await response.json(); //Convert to JSON
4273
+ resolutionFunc(obj.result);
4274
+ } else if (response.status !== 200) {
4275
+ //OK something is wrong
4276
+ let obj = {
4277
+ error: null,
4278
+ description: null
4279
+ };
4280
+ try {
4281
+ obj = await response.json();
4282
+ } catch (e) {}
4283
+ const myError = {
4284
+ statusText: response.statusText,
4285
+ status: response.status,
4286
+ description: obj.description,
4287
+ error: obj.error
4288
+ };
4289
+ rejectionFunc(myError);
4290
+ }
4291
+ }).catch((e)=>{
4292
+ rejectionFunc({
4293
+ originalError: e,
4294
+ type: "ServerUnreachable",
4295
+ error: "Could not communicate with Neurai core node",
4296
+ description: "Are you sure that the URL is correct? The URL is usually mainnet = http://127.0.0.1:8766 and testnet = http://127.0.0.1:18766"
4297
+ });
4298
+ });
4299
+ } catch (e) {
4300
+ rejectionFunc(e.response);
4301
+ }
4302
+ });
4303
+ return promise;
4304
+ };
4305
+ }
4306
+ function $80bd448eb6ea085b$var$getValidMethods() {
4307
+ const keys = Object.keys((0, $ca417a034047e18f$export$e13b82b2b0368a6a)).sort();
4308
+ return keys.join(" ");
4309
+ }
4310
+ // Example POST method implementation:
4311
+ async function $80bd448eb6ea085b$var$postData(url = "", data = {}, username, password) {
4312
+ let base64Credentials = "";
4313
+ //btoa or Buffer, depends if we are in Node.js or in the browser
4314
+ if (typeof btoa === "function") base64Credentials = btoa(`${username}:${password}`);
4315
+ else if (Buffer) base64Credentials = Buffer.from(`${username}:${password}`).toString("base64");
4316
+ // Default options are marked with *
4317
+ const response = await fetch(url, {
4318
+ method: "POST",
4319
+ mode: "cors",
4320
+ headers: {
4321
+ Authorization: "Basic " + base64Credentials,
4322
+ "Content-Type": "application/json"
4323
+ },
4324
+ redirect: "follow",
4325
+ referrerPolicy: "no-referrer",
4326
+ body: JSON.stringify(data)
4327
+ });
4328
+ return response;
4329
+ } /*
4330
+ export const methods = {
4331
+ "getaddressbalance": "getaddressbalance",
4332
+ "getaddressdeltas": "getaddressdeltas",
4333
+ "getaddressmempool": "getaddressmempool",
4334
+ "getaddresstxids": "getaddresstxids",
4335
+ "getaddressutxos": "getaddressutxos",
4336
+ "getassetdata": "getassetdata",
4337
+ "getcacheinfo": "getcacheinfo",
4338
+ "getsnapshot": "getsnapshot",
4339
+ "issue": "issue",
4340
+ "issueunique": "issueunique",
4341
+ "listaddressesbyasset": "listaddressesbyasset",
4342
+ "listassetbalancesbyaddress": "listassetbalancesbyaddress",
4343
+ "listassets": "listassets",
4344
+ "listmyassets": "listmyassets",
4345
+ "purgesnapshot": "purgesnapshot",
4346
+ "reissue": "reissue",
4347
+ "transfer": "transfer",
4348
+ "transferfromaddress": "transferfromaddress",
4349
+ "transferfromaddresses": "transferfromaddresses",
4350
+ "clearmempool": "clearmempool",
4351
+ "decodeblock": "decodeblock",
4352
+ "getbestblockhash": "getbestblockhash",
4353
+ "getblock": "getblock",
4354
+ "getblockchaininfo": "getblockchaininfo",
4355
+ "getblockcount": "getblockcount",
4356
+ "getblockhash": "getblockhash",
4357
+ "getblockhashes": "getblockhashes",
4358
+ "getblockheader": "getblockheader",
4359
+ "getchaintips": "getchaintips",
4360
+ "getchaintxstats": "getchaintxstats",
4361
+ "getdifficulty": "getdifficulty",
4362
+ "getmempoolancestors": "getmempoolancestors",
4363
+ "getmempooldescendants": "getmempooldescendants",
4364
+ "getmempoolentry": "getmempoolentry",
4365
+ "getmempoolinfo": "getmempoolinfo",
4366
+ "getrawmempool": "getrawmempool",
4367
+ "getspentinfo": "getspentinfo",
4368
+ "gettxout": "gettxout",
4369
+ "gettxoutproof": "gettxoutproof",
4370
+ "gettxoutsetinfo": "gettxoutsetinfo",
4371
+ "preciousblock": "preciousblock",
4372
+ "pruneblockchain": "pruneblockchain",
4373
+ "savemempool": "savemempool",
4374
+ "verifychain": "verifychain",
4375
+ "verifytxoutproof": "verifytxoutproof",
4376
+ "getinfo": "getinfo",
4377
+ "getmemoryinfo": "getmemoryinfo",
4378
+ "getrpcinfo": "getrpcinfo",
4379
+ "help": "help",
4380
+ "stop": "stop",
4381
+ "uptime": "uptime",
4382
+ "generate": "generate",
4383
+ "generatetoaddress": "generatetoaddress",
4384
+ "getgenerate": "getgenerate",
4385
+ "setgenerate": "setgenerate",
4386
+ "clearmessages": "clearmessages",
4387
+ "sendmessage": "sendmessage",
4388
+ "subscribetochannel": "subscribetochannel",
4389
+ "unsubscribefromchannel": "unsubscribefromchannel",
4390
+ "viewallmessagechannels": "viewallmessagechannels",
4391
+ "viewallmessages": "viewallmessages",
4392
+ "getblocktemplate": "getblocktemplate",
4393
+ "getkawpowhash": "getkawpowhash",
4394
+ "getmininginfo": "getmininginfo",
4395
+ "getnetworkhashps": "getnetworkhashps",
4396
+ "pprpcsb": "pprpcsb",
4397
+ "prioritisetransaction": "prioritisetransaction",
4398
+ "submitblock": "submitblock",
4399
+ "addnode": "addnode",
4400
+ "clearbanned": "clearbanned",
4401
+ "disconnectnode": "disconnectnode",
4402
+ "getaddednodeinfo": "getaddednodeinfo",
4403
+ "getconnectioncount": "getconnectioncount",
4404
+ "getnettotals": "getnettotals",
4405
+ "getnetworkinfo": "getnetworkinfo",
4406
+ "getpeerinfo": "getpeerinfo",
4407
+ "listbanned": "listbanned",
4408
+ "ping": "ping",
4409
+ "setban": "setban",
4410
+ "setnetworkactive": "setnetworkactive",
4411
+ "combinerawtransaction": "combinerawtransaction",
4412
+ "createrawtransaction": "createrawtransaction",
4413
+ "decoderawtransaction": "decoderawtransaction",
4414
+ "decodescript": "decodescript",
4415
+ "fundrawtransaction": "fundrawtransaction",
4416
+ "getrawtransaction": "getrawtransaction",
4417
+ "sendrawtransaction": "sendrawtransaction",
4418
+ "signrawtransaction": "signrawtransaction",
4419
+ "testmempoolaccept": "testmempoolaccept",
4420
+ "addtagtoaddress": "addtagtoaddress",
4421
+ "checkaddressrestriction": "checkaddressrestriction",
4422
+ "checkaddresstag": "checkaddresstag",
4423
+ "checkglobalrestriction": "checkglobalrestriction",
4424
+ "freezeaddress": "freezeaddress",
4425
+ "freezerestrictedasset": "freezerestrictedasset",
4426
+ "getverifierstring": "getverifierstring",
4427
+ "issuequalifierasset": "issuequalifierasset",
4428
+ "issuerestrictedasset": "issuerestrictedasset",
4429
+ "isvalidverifierstring": "isvalidverifierstring",
4430
+ "listaddressesfortag": "listaddressesfortag",
4431
+ "listaddressrestrictions": "listaddressrestrictions",
4432
+ "listglobalrestrictions": "listglobalrestrictions",
4433
+ "listtagsforaddress": "listtagsforaddress",
4434
+ "reissuerestrictedasset": "reissuerestrictedasset",
4435
+ "removetagfromaddress": "removetagfromaddress",
4436
+ "transferqualifier": "transferqualifier",
4437
+ "unfreezeaddress": "unfreezeaddress",
4438
+ "unfreezerestrictedasset": "unfreezerestrictedasset",
4439
+ "viewmyrestrictedaddresses": "viewmyrestrictedaddresses",
4440
+ "viewmytaggedaddresses": "viewmytaggedaddresses",
4441
+ "cancelsnapshotrequest": "cancelsnapshotrequest",
4442
+ "distributereward": "distributereward",
4443
+ "getdistributestatus": "getdistributestatus",
4444
+ "getsnapshotrequest": "getsnapshotrequest",
4445
+ "listsnapshotrequests": "listsnapshotrequests",
4446
+ "requestsnapshot": "requestsnapshot",
4447
+ "createmultisig": "createmultisig",
4448
+ "estimatefee": "estimatefee",
4449
+ "estimatesmartfee": "estimatesmartfee",
4450
+ "signmessagewithprivkey": "signmessagewithprivkey",
4451
+ "validateaddress": "validateaddress",
4452
+ "verifymessage": "verifymessage",
4453
+ "abandontransaction": "abandontransaction",
4454
+ "abortrescan": "abortrescan",
4455
+ "addmultisigaddress": "addmultisigaddress",
4456
+ "addwitnessaddress": "addwitnessaddress",
4457
+ "backupwallet": "backupwallet",
4458
+ "bumpfee": "bumpfee",
4459
+ "dumpprivkey": "dumpprivkey",
4460
+ "dumpwallet": "dumpwallet",
4461
+ "encryptwallet": "encryptwallet",
4462
+ "getaccount": "getaccount",
4463
+ "getaccountaddress": "getaccountaddress",
4464
+ "getaddressesbyaccount": "getaddressesbyaccount",
4465
+ "getbalance": "getbalance",
4466
+ "getmasterkeyinfo": "getmasterkeyinfo",
4467
+ "getmywords": "getmywords",
4468
+ "getnewaddress": "getnewaddress",
4469
+ "getrawchangeaddress": "getrawchangeaddress",
4470
+ "getreceivedbyaccount": "getreceivedbyaccount",
4471
+ "getreceivedbyaddress": "getreceivedbyaddress",
4472
+ "gettransaction": "gettransaction",
4473
+ "getunconfirmedbalance": "getunconfirmedbalance",
4474
+ "getwalletinfo": "getwalletinfo",
4475
+ "importaddress": "importaddress",
4476
+ "importmulti": "importmulti",
4477
+ "importprivkey": "importprivkey",
4478
+ "importprunedfunds": "importprunedfunds",
4479
+ "importpubkey": "importpubkey",
4480
+ "importwallet": "importwallet",
4481
+ "keypoolrefill": "keypoolrefill",
4482
+ "listaccounts": "listaccounts",
4483
+ "listaddressgroupings": "listaddressgroupings",
4484
+ "listlockunspent": "listlockunspent",
4485
+ "listreceivedbyaccount": "listreceivedbyaccount",
4486
+ "listreceivedbyaddress": "listreceivedbyaddress",
4487
+ "listsinceblock": "listsinceblock",
4488
+ "listtransactions": "listtransactions",
4489
+ "listunspent": "listunspent",
4490
+ "listwallets": "listwallets",
4491
+ "lockunspent": "lockunspent",
4492
+ "move": "move",
4493
+ "removeprunedfunds": "removeprunedfunds",
4494
+ "rescanblockchain": "rescanblockchain",
4495
+ "sendfrom": "sendfrom",
4496
+ "sendfromaddress": "sendfromaddress",
4497
+ "sendmany": "sendmany",
4498
+ "sendtoaddress": "sendtoaddress",
4499
+ "setaccount": "setaccount",
4500
+ "settxfee": "settxfee",
4501
+ "signmessage": "signmessage"
4502
+ }*/
4503
+
4504
+
4505
+ //# sourceMappingURL=index.cjs.map