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