-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathrpchelp.cpp
More file actions
5674 lines (5316 loc) · 376 KB
/
rpchelp.cpp
File metadata and controls
5674 lines (5316 loc) · 376 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2014-2016 The Bitcoin Core developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.
#include "core/main.h"
#include "rpc/rpcserver.h"
#include "rpc/rpcutils.h"
#include "community/community.h"
std::string HelpRequiringPassphraseWrapper()
{
#ifdef ENABLE_WALLET
return HelpRequiringPassphrase();
#else
return "";
#endif
}
std::string mc_RPCHelpString(std::string strMethod)
{
string strHelp="";
map<string, string>::iterator it = mapHelpStrings.find(strMethod);
if (it != mapHelpStrings.end())
{
strHelp=it->second;
}
else
{
throw runtime_error("Help message not found\n");
}
return strHelp;
}
void mc_ThrowHelpMessage(std::string strMethod)
{
if(pMultiChainFilterEngine->m_TxID != 0)
{
throw JSONRPCError(RPC_INVALID_PARAMS, "Wrong number of parameters");
//throw JSONRPCError(RPC_MISC_ERROR, mc_RPCHelpString(strMethod));
}
throw runtime_error("Help message not found\n");
}
void mc_InitRPCHelpMap01()
{
mapHelpStrings.insert(std::make_pair("getbestblockhash",
"getbestblockhash\n"
"\nReturns the hash of the best (tip) block in the longest block chain.\n"
"\nResult\n"
"\"hex\" (string) the block hash hex encoded\n"
"\nExamples\n"
+ HelpExampleCli("getbestblockhash", "")
+ HelpExampleRpc("getbestblockhash", "")
));
mapHelpStrings.insert(std::make_pair("getblock",
"getblock \"hash\"|height ( verbose )\n"
"\nReturns hex-encoded data or json object for block.\n"
"\nArguments:\n"
"1. \"hash\" (string, required) The block hash\n"
" or\n"
"1. height (numeric, required) The block height in active chain\n"
"2. verbose (numeric or boolean, optional, default=1) 0(or false) - encoded data, 1(or true) - json object,\n"
" 2 - with tx encoded data, 4 - with tx json object\n"
"\nResult (for verbose = 1, see help getrawtransaction for details about transactions - verbose = 4):\n"
"{\n"
" \"hash\" : \"hash\", (string) the block hash (same as provided)\n"
" \"miner\" : \"miner\", (string) the address of the miner\n"
" \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n"
" \"size\" : n, (numeric) The block size\n"
" \"height\" : n, (numeric) The block height or index\n"
" \"version\" : n, (numeric) The block version\n"
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
" \"tx\" : [ (array of strings) The transaction ids\n"
" \"transactionid\" (string) The transaction id\n"
" ,...\n"
" ],\n"
" \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"nonce\" : n, (numeric) The nonce\n"
" \"bits\" : \"1d00ffff\", (string) The bits\n"
" \"difficulty\" : x.xxx, (numeric) The difficulty\n"
" \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n"
" \"nextblockhash\" : \"hash\" (string) The hash of the next block\n"
"}\n"
"\nResult (for verbose=false):\n"
"\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n"
"\nExamples:\n"
+ HelpExampleCli("getblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
+ HelpExampleRpc("getblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
));
mapHelpStrings.insert(std::make_pair("getblockchaininfo",
"getblockchaininfo\n"
"Returns an object containing various state info regarding block chain processing.\n"
"\nResult:\n"
"{\n"
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
" \"chainname\": \"xxxx\", (string) multichain network name\n"
" \"description\": \"xxxx\", (string) network desctription\n"
" \"protocol\": \"xxxx\", (string) protocol - multichain or bitcoin\n"
" \"setupblocks\": \"xxxx\", (string) number of network setup blocks\n"
" \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
" \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n"
" \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
" \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n"
" \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getblockchaininfo", "")
+ HelpExampleRpc("getblockchaininfo", "")
));
mapHelpStrings.insert(std::make_pair("getblockcount",
"getblockcount\n"
"\nReturns the number of blocks in the longest block chain.\n"
"\nResult:\n"
"n (numeric) The current block count\n"
"\nExamples:\n"
+ HelpExampleCli("getblockcount", "")
+ HelpExampleRpc("getblockcount", "")
));
mapHelpStrings.insert(std::make_pair("getblockhash",
"getblockhash index\n"
"\nReturns hash of block in best-block-chain at index provided.\n"
"\nArguments:\n"
"1. index (numeric, required) The block index\n"
"\nResult:\n"
"\"hash\" (string) The block hash\n"
"\nExamples:\n"
+ HelpExampleCli("getblockhash", "1000")
+ HelpExampleRpc("getblockhash", "1000")
));
mapHelpStrings.insert(std::make_pair("getchaintips",
"getchaintips\n"
"Return information about all known tips in the block tree,"
" including the main chain as well as orphaned branches.\n"
"\nResult:\n"
"[\n"
" {\n"
" \"height\": xxxx, (numeric) height of the chain tip\n"
" \"hash\": \"xxxx\", (string) block hash of the tip\n"
" \"branchlen\": 0 (numeric) zero for main chain\n"
" \"status\": \"active\" (string) \"active\" for the main chain\n"
" },\n"
" {\n"
" \"height\": xxxx,\n"
" \"hash\": \"xxxx\",\n"
" \"branchlen\": 1 (numeric) length of branch connecting the tip to the main chain\n"
" \"status\": \"xxxx\" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)\n"
" }\n"
"]\n"
"Possible values for status:\n"
"1. \"invalid\" This branch contains at least one invalid block\n"
"2. \"headers-only\" Not all blocks for this branch are available, but the headers are valid\n"
"3. \"valid-headers\" All blocks are available for this branch, but they were never fully validated\n"
"4. \"valid-fork\" This branch is not part of the active chain, but is fully validated\n"
"5. \"active\" This is the tip of the active main chain, which is certainly valid\n"
"\nExamples:\n"
+ HelpExampleCli("getchaintips", "")
+ HelpExampleRpc("getchaintips", "")
));
mapHelpStrings.insert(std::make_pair("getdifficulty",
"getdifficulty\n"
"\nReturns the proof-of-work difficulty as a multiple of the minimum difficulty.\n"
"\nResult:\n"
"n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.\n"
"\nExamples:\n"
+ HelpExampleCli("getdifficulty", "")
+ HelpExampleRpc("getdifficulty", "")
));
mapHelpStrings.insert(std::make_pair("getmempoolinfo",
"getmempoolinfo\n"
"\nReturns details on the active state of the TX memory pool.\n"
"\nResult:\n"
"{\n"
" \"size\": xxxxx (numeric) Current tx count\n"
" \"bytes\": xxxxx (numeric) Sum of all tx sizes\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getmempoolinfo", "")
+ HelpExampleRpc("getmempoolinfo", "")
));
mapHelpStrings.insert(std::make_pair("getrawmempool",
"getrawmempool ( verbose )\n"
"\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n"
"\nArguments:\n"
"1. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n"
"\nResult: (for verbose = false):\n"
"[ (json array of string)\n"
" \"transactionid\" (string) The transaction id\n"
" ,...\n"
"]\n"
"\nResult: (for verbose = true):\n"
"{ (json object)\n"
" \"transactionid\" : { (json object)\n"
" \"size\" : n, (numeric) transaction size in bytes\n"
" \"fee\" : n, (numeric) transaction fee in native currency units\n"
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
" \"height\" : n, (numeric) block height when transaction entered pool\n"
" \"startingpriority\" : n, (numeric) priority when transaction entered pool\n"
" \"currentpriority\" : n, (numeric) transaction priority now\n"
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
" \"transactionid\", (string) parent transaction id\n"
" ... ]\n"
" }, ...\n"
"]\n"
"\nExamples\n"
+ HelpExampleCli("getrawmempool", "true")
+ HelpExampleRpc("getrawmempool", "true")
));
mapHelpStrings.insert(std::make_pair("gettxout",
"gettxout \"txid\" n ( includemempool )\n"
"\nReturns details about an unspent transaction output.\n"
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id\n"
"2. n (numeric, required) vout value\n"
"3. includemempool (boolean, optional, default true) Whether to included the mem pool\n"
"\nResult:\n"
"{\n"
" \"bestblock\" : \"hash\", (string) the block hash\n"
" \"confirmations\" : n, (numeric) The number of confirmations\n"
" \"value\" : x.xxx, (numeric) The transaction value in btc\n"
" \"scriptPubKey\" : { (json object)\n"
" \"asm\" : \"code\", (string) \n"
" \"hex\" : \"hex\", (string) \n"
" \"reqSigs\" : n, (numeric) Number of required signatures\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg pubkeyhash\n"
" \"addresses\" : [ (array of string) array of addresses\n"
" \"address\" (string) address\n"
" ,...\n"
" ]\n"
" },\n"
" \"version\" : n, (numeric) The version\n"
" \"coinbase\" : true|false (boolean) Coinbase or not\n"
"}\n"
"\nExamples:\n"
"\nGet unspent transactions\n"
+ HelpExampleCli("listunspent", "") +
"\nView the details\n"
+ HelpExampleCli("gettxout", "\"txid\" 1") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("gettxout", "\"txid\", 1")
));
}
void mc_InitRPCHelpMap02()
{
mapHelpStrings.insert(std::make_pair("gettxoutsetinfo",
"gettxoutsetinfo\n"
"\nReturns statistics about the unspent transaction output set.\n"
"Note this call may take some time.\n"
"\nResult:\n"
"{\n"
" \"height\":n, (numeric) The current block height (index)\n"
" \"bestblock\": \"hex\", (string) the best block hash hex\n"
" \"transactions\": n, (numeric) The number of transactions\n"
" \"txouts\": n, (numeric) The number of output transactions\n"
" \"bytes_serialized\": n, (numeric) The serialized size\n"
" \"hash_serialized\": \"hash\", (string) The serialized hash\n"
" \"total_amount\": x.xxx (numeric) The total amount\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("gettxoutsetinfo", "")
+ HelpExampleRpc("gettxoutsetinfo", "")
));
mapHelpStrings.insert(std::make_pair("listassets",
"listassets ( asset-identifier(s) verbose count start )\n"
"\nReturns list of defined assets\n"
"\nArguments:\n"
"1. \"asset-identifier\" (string, optional, default=*) Asset identifier - one of: issue txid, asset reference, asset name.\n"
" or\n"
"1. asset-identifier(s) (array, optional) A json array of asset identifiers \n"
"2. verbose (boolean, optional, default=false) If true, returns list of all issue transactions, including follow-ons \n"
"3. count (number, optional, default=INT_MAX - all) The number of assets to display\n"
"4. start (number, optional, default=-count - last) Start from specific asset, 0 based, if negative - from the end\n"
"\nResult:\n"
"An array containing list of defined assets\n"
"\nExamples:\n"
+ HelpExampleCli("listassets", "")
+ HelpExampleRpc("listassets", "")
));
mapHelpStrings.insert(std::make_pair("listpermissions",
"listpermissions ( \"permission(s)\" address(es) verbose )\n"
"\nReturns a list of all permissions which have been explicitly granted to addresses.\n"
"\nArguments:\n"
"1. \"permission(s)\" (string, optional, default=*) Permission strings, comma delimited. \n"
" Global: " + AllowedPermissions() + " \n"
" or per-asset: asset-identifier.issue,admin,activate,send,receive \n"
" or per-stream: stream-identifier.write,read,activate,admin \n"
" or per-variable: variable-identifier.write,activate,admin \n"
" or per-library: library-identifier.write,activate,admin \n"
"2. \"address(es)\" (string, optional, default=*) The addresses to retrieve permissions for. \"*\" for all addresses\n"
" or\n"
"2. address(es) (array, optional) A json array of addresses to return permissions for\n"
"3. verbose (boolean, optional, default=false) If true, returns list of pending grants \n"
"\nResult:\n"
"An array containing list of permissions\n"
"\nExamples:\n"
+ HelpExampleCli("listpermissions", "connect,send,receive")
+ HelpExampleCli("listpermissions", "all \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\"" )
+ HelpExampleRpc("listpermissions", "connect,send,receive")
));
mapHelpStrings.insert(std::make_pair("liststreams",
"liststreams ( stream-identifier(s) verbose count start )\n"
"\nReturns list of defined streams\n"
"\nArguments:\n"
"1. \"stream-identifier(s)\" (string, optional, default=*) Stream identifier - one of: create txid, stream reference, stream name.\n"
" or\n"
"1. stream-identifier(s) (array, optional) A json array of stream identifiers \n"
"2. verbose (boolean, optional, default=false) If true, returns list of stream creators \n"
"3. count (number, optional, default=INT_MAX - all) The number of streams to display\n"
"4. start (number, optional, default=-count - last) Start from specific stream, 0 based, if negative - from the end\n"
"\nResult:\n"
"An array containing list of defined streams\n"
"\nExamples:\n"
+ HelpExampleCli("liststreams", "")
+ HelpExampleRpc("liststreams", "")
));
mapHelpStrings.insert(std::make_pair("verifychain",
"verifychain ( checklevel numblocks )\n"
"\nVerifies blockchain database.\n"
"\nArguments:\n"
"1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.\n"
"2. numblocks (numeric, optional, default=288, 0=all) The number of blocks to check.\n"
"\nResult:\n"
"true|false (boolean) Verified or not\n"
"\nExamples:\n"
+ HelpExampleCli("verifychain", "")
+ HelpExampleRpc("verifychain", "")
));
mapHelpStrings.insert(std::make_pair("clearmempool",
"clearmempool \n"
"\nRemoves all transactions from the TX memory pool.\n"
"Local mining and the processing of incoming transactions and blocks should be paused.\n"
"\nExamples:\n"
+ HelpExampleCli("clearmempool", "")
+ HelpExampleRpc("clearmempool", "")
));
mapHelpStrings.insert(std::make_pair("getblockchainparams",
"getblockchainparams ( displaynames with-upgrades )\n"
"\nReturns a list of values of this blockchain’s parameters\n"
"\nArguments:\n"
"1. displaynames (boolean, optional, default=true) use display names instead of internal\n"
// "2. height (numeric or boolean, optional, default true) The block height in active chain or height before current tip (if negative)\n"
// " false - original configuration (height=0), true - current configuration\n"
"2. with-upgrades (boolean, optional, default=true) Take upgrades into account \n"
"\nResult:\n"
"An object containing various blockchain parameters.\n"
"\nExamples:\n"
+ HelpExampleCli("getblockchainparams", "")
+ HelpExampleRpc("getblockchainparams", "")
));
mapHelpStrings.insert(std::make_pair("getinfo",
"getinfo\n"
"\nReturns general information about this node and blockchain.\n"
"\nResult:\n"
"{\n"
" \"version\": xxxxx, (numeric) the server version\n"
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
" \"chainname\": \"xxxx\", (string) multichain network name\n"
" \"description\": \"xxxx\", (string) network desctription\n"
" \"protocol\": \"xxxx\", (string) protocol - multichain or bitcoin\n"
" \"port\": xxxx, (numeric) network port\n"
" \"setupblocks\": \"xxxx\", (string) number of network setup blocks\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total native currency balance of the wallet\n"
" \"walletdbversion\": xxxxx, (numeric) the wallet database version\n"
" \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
" \"connections\": xxxxx, (numeric) the number of connections\n"
" \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
" \"testnet\": true|false, (boolean) if the server is using testnet or not\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
" \"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\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in btc/kb\n"
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
" \"errors\": \"...\" (string) any error messages\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getinfo", "")
+ HelpExampleRpc("getinfo", "")
));
mapHelpStrings.insert(std::make_pair("help",
"help ( command )\n"
"\nList all commands, or get help for a specified command.\n"
"\nArguments:\n"
"1. \"command\" (string, optional) The command to get help on\n"
"\nResult:\n"
"\"text\" (string) The help text\n"
));
mapHelpStrings.insert(std::make_pair("pause",
"pause \"task(s)\" \n"
"\nPauses local mining or the processing of incoming transactions and blocks.\n"
"\nArguments:\n"
"1. \"task(s)\" (string, required) Task(s) to be paused. Possible values: " + AllowedPausedServices() + " \n"
"\nExamples:\n"
+ HelpExampleCli("pause", "incoming,mining")
+ HelpExampleRpc("pause", "incoming")
));
}
void mc_InitRPCHelpMap03()
{
mapHelpStrings.insert(std::make_pair("resume",
"resume \"task(s)\" \n"
"\nResumes local mining or the processing of incoming transactions and blocks\n"
"\nArguments:\n"
"1. \"task(s)\" (string, required) Task(s) to be resumed. Possible values: " + AllowedPausedServices() + " \n"
"\nExamples:\n"
+ HelpExampleCli("resume", "incoming,mining")
+ HelpExampleRpc("resume", "mining")
));
mapHelpStrings.insert(std::make_pair("setlastblock",
"setlastblock ( \"hash\"|height )\n"
"\nSets last block in the chain.\n"
"Local mining and the processing of incoming transactions and blocks should be paused.\n"
"\nArguments:\n"
"1. \"hash\" (string, optional) The block hash, if omitted - best chain is activated\n"
" or\n"
"1. height (numeric, optional) The block height in active chain or height before current tip (if negative)\n"
"\nResult:\n"
"\"hash\" (string) The block hash of the chain tip\n"
"\nExamples:\n"
+ HelpExampleCli("setlastblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
+ HelpExampleRpc("setlastblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
));
mapHelpStrings.insert(std::make_pair("stop",
"stop\n"
"\nShuts down the this blockchain node. Sends stop signal to MultiChain server."
));
mapHelpStrings.insert(std::make_pair("getgenerate",
"getgenerate\n"
"\nReturn if the server is set to generate coins or not. The default is false.\n"
"It is set with the command line argument -gen (or bitcoin.conf setting gen)\n"
"It can also be set with the setgenerate call.\n"
"\nResult\n"
"true|false (boolean) If the server is set to generate coins or not\n"
"\nExamples:\n"
+ HelpExampleCli("getgenerate", "")
+ HelpExampleRpc("getgenerate", "")
));
mapHelpStrings.insert(std::make_pair("gethashespersec",
"gethashespersec\n"
"\nReturns a recent hashes per second performance measurement while generating.\n"
"See the getgenerate and setgenerate calls to turn generation on and off.\n"
"\nResult:\n"
"n (numeric) The recent hashes per second when generation is on (will return 0 if generation is off)\n"
"\nExamples:\n"
+ HelpExampleCli("gethashespersec", "")
+ HelpExampleRpc("gethashespersec", "")
));
mapHelpStrings.insert(std::make_pair("setgenerate",
"setgenerate generate ( genproclimit )\n"
"\nSet 'generate' true or false to turn generation on or off.\n"
"Generation is limited to 'genproclimit' processors, -1 is unlimited.\n"
"See the getgenerate call for the current setting.\n"
"\nArguments:\n"
"1. generate (boolean, required) Set to true to turn on generation, off to turn off.\n"
"2. genproclimit (numeric, optional, default = 1) Set the processor limit for when generation is on. Can be -1 for unlimited.\n"
"\nResult\n"
"[ blockhashes ] (array, -regtest only) hashes of blocks generated\n"
"\nExamples:\n"
"\nSet the generation on with a limit of one processor\n"
+ HelpExampleCli("setgenerate", "true 1") +
"\nCheck the setting\n"
+ HelpExampleCli("getgenerate", "") +
"\nTurn off generation\n"
+ HelpExampleCli("setgenerate", "false") +
"\nUsing json rpc\n"
+ HelpExampleRpc("setgenerate", "true, 1")
));
mapHelpStrings.insert(std::make_pair("getblocktemplate",
"getblocktemplate ( \"jsonrequestobject\" )\n"
"\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n"
"It returns data needed to construct a block to work on.\n"
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n"
"\nArguments:\n"
"1. \"jsonrequestobject\" (string, optional) A json object in the following spec\n"
" {\n"
" \"mode\":\"template\" (string, optional) This must be set to \"template\" or omitted\n"
" \"capabilities\":[ (array, optional) A list of strings\n"
" \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n"
" ,...\n"
" ]\n"
" }\n"
"\n"
"\nResult:\n"
"{\n"
" \"version\" : n, (numeric) The block version\n"
" \"previousblockhash\" : \"xxxx\", (string) The hash of current highest block\n"
" \"transactions\" : [ (array) contents of non-coinbase transactions that should be included in the next block\n"
" {\n"
" \"data\" : \"xxxx\", (string) transaction data encoded in hexadecimal (byte-for-byte)\n"
" \"hash\" : \"xxxx\", (string) hash/id encoded in little-endian hexadecimal\n"
" \"depends\" : [ (array) array of numbers \n"
" 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\n"
" ,...\n"
" ],\n"
" \"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\n"
" \"sigops\" : n, (numeric) total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any\n"
" \"required\" : true|false (boolean) if provided and true, this transaction must be in the final block\n"
" }\n"
" ,...\n"
" ],\n"
" \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n"
" \"flags\" : \"flags\" (string) \n"
" },\n"
" \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n"
" \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n"
" \"target\" : \"xxxx\", (string) The hash target\n"
" \"mintime\" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"mutable\" : [ (array of string) list of ways the block template may be changed \n"
" \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n"
" ,...\n"
" ],\n"
" \"noncerange\" : \"00000000ffffffff\",(string) A range of valid nonces\n"
" \"sigoplimit\" : n, (numeric) limit of sigops in blocks\n"
" \"sizelimit\" : n, (numeric) limit of block size\n"
" \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
" \"bits\" : \"xxx\", (string) compressed target of next block\n"
" \"height\" : n (numeric) The height of the next block\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getblocktemplate", "")
+ HelpExampleRpc("getblocktemplate", "")
));
mapHelpStrings.insert(std::make_pair("getmininginfo",
"getmininginfo\n"
"\nReturns a json object containing mining-related information."
"\nResult:\n"
"{\n"
" \"blocks\": nnn, (numeric) The current block\n"
" \"currentblocksize\": nnn, (numeric) The last block size\n"
" \"currentblocktx\": nnn, (numeric) The last block transaction\n"
" \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n"
" \"errors\": \"...\" (string) Current errors\n"
" \"generate\": true|false (boolean) If the generation is on or off (see getgenerate or setgenerate calls)\n"
" \"genproclimit\": n (numeric) The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)\n"
" \"hashespersec\": n (numeric) The hashes per second of the generation, or 0 if no generation.\n"
" \"pooledtx\": n (numeric) The size of the mem pool\n"
" \"testnet\": true|false (boolean) If using testnet or not\n"
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getmininginfo", "")
+ HelpExampleRpc("getmininginfo", "")
));
mapHelpStrings.insert(std::make_pair("getnetworkhashps",
"getnetworkhashps ( blocks height )\n"
"\nReturns the estimated network hashes per second based on the last n blocks.\n"
"Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n"
"Pass in [height] to estimate the network speed at the time when a certain block was found.\n"
"\nArguments:\n"
"1. blocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.\n"
"2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n"
"\nResult:\n"
"x (numeric) Hashes per second estimated\n"
"\nExamples:\n"
+ HelpExampleCli("getnetworkhashps", "")
+ HelpExampleRpc("getnetworkhashps", "")
));
mapHelpStrings.insert(std::make_pair("prioritisetransaction",
"prioritisetransaction txid priority-delta fee-delta\n"
"Accepts the transaction into mined blocks at a higher (or lower) priority\n"
"\nArguments:\n"
"1. txid (string, required) The transaction id.\n"
"2. priority-delta (numeric, required) The priority to add or subtract.\n"
" The transaction selection algorithm considers the tx as it would have a higher priority.\n"
" (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n"
"3. fee-delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n"
" The fee is not actually paid, only the algorithm for selecting transactions into a block\n"
" considers the transaction as it would have paid a higher (or lower) fee.\n"
"\nResult\n"
"true (boolean) Returns true\n"
"\nExamples:\n"
+ HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 10000")
+ HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000")
));
}
void mc_InitRPCHelpMap04()
{
mapHelpStrings.insert(std::make_pair("submitblock",
"submitblock hexdata ( \"jsonparametersobject\" )\n"
"\nAttempts to submit new block to network.\n"
"The 'jsonparametersobject' parameter is currently ignored.\n"
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n"
"\nArguments\n"
"1. hexdata (string, required) the hex-encoded block data to submit\n"
"2. \"jsonparametersobject\" (string, optional) object of optional parameters\n"
" {\n"
" \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions\n"
" }\n"
"\nResult:\n"
"\nExamples:\n"
+ HelpExampleCli("submitblock", "\"mydata\"")
+ HelpExampleRpc("submitblock", "\"mydata\"")
));
mapHelpStrings.insert(std::make_pair("addnode",
"addnode \"node\" \"add\"|\"remove\"|\"onetry\"\n"
"\nAttempts add or remove a node from the addnode list.\n"
"Or try a connection to a node once.\n"
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list,\n"
" 'onetry' to try a connection to the node once\n"
"\nExamples:\n"
+ HelpExampleCli("addnode", "\"192.168.0.6:8333\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:8333\", \"onetry\"")
));
mapHelpStrings.insert(std::make_pair("getaddednodeinfo",
"getaddednodeinfo dns ( \"node\" )\n"
"\nReturns information about the given added node, or all added nodes\n"
"(note that onetry addnodes are not listed here)\n"
"If dns is false, only a list of added nodes will be provided,\n"
"otherwise connected information will also be available.\n"
"\nArguments:\n"
"1. dns (boolean, required) If false, only a list of added nodes will be provided,\n "
" otherwise connected information will also be available.\n"
"2. \"node\" (string, optional) If provided, return information about this specific node,\n "
" otherwise all nodes are returned.\n"
"\nResult:\n"
"[\n"
" {\n"
" \"addednode\" : \"192.168.0.201\", (string) The node ip address\n"
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [\n"
" {\n"
" \"address\" : \"192.168.0.201:8333\", (string) The MultiChain server host and port\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ,...\n"
" ]\n"
" }\n"
" ,...\n"
"]\n"
"\nExamples:\n"
+ HelpExampleCli("getaddednodeinfo", "true")
+ HelpExampleCli("getaddednodeinfo", "true \"192.168.0.201\"")
+ HelpExampleRpc("getaddednodeinfo", "true, \"192.168.0.201\"")
));
mapHelpStrings.insert(std::make_pair("getconnectioncount",
"getconnectioncount\n"
"\nReturns the number of connections to other nodes.\n"
"\nbResult:\n"
"n (numeric) The connection count\n"
"\nExamples:\n"
+ HelpExampleCli("getconnectioncount", "")
+ HelpExampleRpc("getconnectioncount", "")
));
mapHelpStrings.insert(std::make_pair("getnettotals",
"getnettotals\n"
"\nReturns information about network traffic, including bytes in, bytes out,\n"
"and current time.\n"
"\nResult:\n"
"{\n"
" \"totalbytesrecv\": n, (numeric) Total bytes received\n"
" \"totalbytessent\": n, (numeric) Total bytes sent\n"
" \"timemillis\": t (numeric) Total cpu time\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getnettotals", "")
+ HelpExampleRpc("getnettotals", "")
));
mapHelpStrings.insert(std::make_pair("getnetworkinfo",
"getnetworkinfo\n"
"Returns an object containing various state info regarding P2P networking.\n"
"\nResult:\n"
"{\n"
" \"version\": xxxxx, (numeric) the server version\n"
" \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n"
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
" \"connections\": xxxxx, (numeric) the number of connections\n"
" \"networks\": [ (array) information per network\n"
" {\n"
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
" \"reachable\": true|false, (boolean) is the network reachable?\n"
" \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
" }\n"
" ,...\n"
" ],\n"
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
" \"localaddresses\": [ (array) list of local addresses\n"
" {\n"
" \"address\": \"xxxx\", (string) network address\n"
" \"port\": xxx, (numeric) network port\n"
" \"score\": xxx (numeric) relative score\n"
" }\n"
" ,...\n"
" ]\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getnetworkinfo", "")
+ HelpExampleRpc("getnetworkinfo", "")
));
mapHelpStrings.insert(std::make_pair("getpeerinfo",
"getpeerinfo\n"
"\nReturns data about each connected network node as a json array of objects.\n"
"\nResult:\n"
"[\n"
" {\n"
" \"id\": n, (numeric) Peer index\n"
" \"addr\":\"host:port\", (string) The ip address and port of the peer\n"
" \"addrlocal\":\"ip:port\", (string) local address\n"
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
" \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n"
" \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n"
" \"bytessent\": n, (numeric) The total bytes sent\n"
" \"bytesrecv\": n, (numeric) The total bytes received\n"
" \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"pingtime\": n, (numeric) ping time\n"
" \"pingwait\": n, (numeric) ping wait\n"
" \"version\": v, (numeric) The peer version, such as 7001\n"
" \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n"
" \"handshakelocal\": n, (string) If protocol is Multichain. Address used by local node for handshake.\n"
" \"handshake\": n, (string) If protocol is Multichain. Address used by remote node for handshake.\n"
" \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n"
" \"startingheight\": n, (numeric) The starting height (block) of the peer\n"
" \"banscore\": n, (numeric) The ban score\n"
" \"synced_headers\": n, (numeric) The last header we have in common with this peer\n"
" \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n"
" \"inflight\": [\n"
" n, (numeric) The heights of blocks we're currently asking from this peer\n"
" ...\n"
" ]\n"
" }\n"
" ,...\n"
"]\n"
"\nExamples:\n"
+ HelpExampleCli("getpeerinfo", "")
+ HelpExampleRpc("getpeerinfo", "")
));
mapHelpStrings.insert(std::make_pair("ping",
"ping\n"
"\nRequests that a ping be sent to all other nodes, to measure ping time.\n"
"Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n"
"Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n"
"\nResult:\n"
"\nExamples:\n"
+ HelpExampleCli("ping", "")
+ HelpExampleRpc("ping", "")
));
mapHelpStrings.insert(std::make_pair("appendrawchange",
"appendrawchange \"tx-hex\" \"address\" ( native-fee )\n"
"\nAppends change output to raw transaction, containing any remaining assets / \n"
"native currency in the inputs that are not already sent to other outputs.\n"
"\nArguments:\n"
"1. \"tx-hex\" (string, required) The hex string of the raw transaction)\n"
"2. \"address\" (string, required) The address to send the change to.\n"
"3. native-fee (numeric, optional) Native currency value deducted from that amount so it becomes a transaction fee.\n"
" Default - calculated automatically\n"
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction\n"
"\nExamples:\n"
+ HelpExampleCli("appendrawchange", "\"hex\"" "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" ")
+ HelpExampleCli("appendrawchange", "\"hex\"" "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01")
+ HelpExampleRpc("appendrawchange", "\"hex\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\"")
));
mapHelpStrings.insert(std::make_pair("appendrawmetadata",
"appendrawmetadata \"tx-hex\" data \n"
"\nAppends new OP_RETURN output to existing raw transaction\n"
"Returns hex-encoded raw transaction.\n"
"\nArguments:\n"
"1. \"tx-hex\" (string, required) The transaction hex string\n"
"2. data (string or object, required) Data, see help data-all for details.\n"
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction\n"
"\nExamples:\n"
+ HelpExampleCli("appendrawmetadata", "\"tx-hexstring\" 48656C6C6F20576F726C64210A" )
+ HelpExampleRpc("appendrawmetadata", "\"tx-hexstring\",\"48656C6C6F20576F726C64210A\"")
));
}
void mc_InitRPCHelpMap05()
{
mapHelpStrings.insert(std::make_pair("appendrawdata",
"appendrawdata tx-hex data \n"
"\nAppends new OP_RETURN output to existing raw transaction\n"
"Returns hex-encoded raw transaction.\n"
"\nArguments:\n"
"1. \"tx-hex\" (string, required) The transaction hex string\n"
"2. data (string or object, required) Data, see help data-all for details.\n"
/*
"2. \"data-hex\" (string, required) Data hex string\n"
" or\n"
"2. data-json (object, required) JSON data object\n"
" {\n"
" \"json\" : json-data (object, required) Valid JSON object\n"
" }\n"
" or\n"
"2. data-text (object, required) Text data object\n"
" {\n"
" \"text\" : text (string, required) Data string\n"
" }\n"
" or\n"
"2. issue-details (object, required) A json object with issue metadata\n"
" {\n"
" \"create\" : asset (string,required) asset\n"
" \"name\" : asset-name (string,optional) Asset name\n"
" \"multiple\" : n (numeric,optional, default 1) Number of raw units in one displayed unit\n"
" \"open\" : true|false (boolean, optional, default false) True if follow-on issues are allowed\n"
" \"details\" : (object, optional) a json object with custom fields\n"
" {\n"
" \"param-name\": \"param-value\" (strings, required) The key is the parameter name, the value is parameter value\n"
" ,...\n"
" }\n"
" }\n"
" or\n"
"2. issuemore-details (object, required) A json object with issuemore metadata\n"
" {\n"
" \"update\" : asset-identifier (string,required) Asset identifier - one of: issue txid, asset reference, asset name.\n"
" \"details\" : (object, optional) a json object with custom fields\n"
" {\n"
" \"param-name\": \"param-value\" (strings, required) The key is the parameter name, the value is parameter value\n"
" ,...\n"
" }\n"
" }\n"
" or\n"
"2. create-new-stream (object, required) A json object with new stream details\n"
" {\n"
" \"create\" : stream (string,required) stream\n"
" \"name\" : stream-name (string,optional) Stream name\n"
" \"open\" : true|false (string,optional, default: false) If true, anyone can publish\n"
" \"details\" : (object,optional) a json object with custom fields\n"
" {\n"
" \"param-name\": \"param-value\" (strings, required) The key is the parameter name, the value is parameter value\n"
" ,...\n"
" }\n"
" }\n"
" or\n"
"2. publish-new-stream-item (object, required) A json object with stream item\n"
" {\n"
" \"for\" : stream-identifier (string,required) Stream identifier - one of: create txid, stream reference, stream name.\n"
" \"key\" : key (string,optional, default: \"\") Item key\n"
" \"keys\" : keys (array,optional) Item keys, array of strings\n"
" \"data\" : data-hex (string,optional, default: \"\") Data hex string\n"
" or\n"
" \"data\" : (object, required) JSON data object\n"
" {\n"
" \"json\" : json-data (object, required) Valid JSON string\n"
" }\n"
" or\n"
" \"data\" : (object, required) JSON data object\n"
" {\n"
" \"text\" : \"text\" (string, required) Data string\n"
" }\n"
" }\n"
" or\n"
"2. create-new-upgrade (object, required) A json object with new upgrade details\n"
" {\n"
" \"create\" : upgrade (string,required) upgrade\n"
" \"name\" : upgrade-name (string,optional) Upgrade name\n"
" \"startblock\" : n (numeric,optional, default: 0) Block to apply upgrade from (inclusive).\n"
" \"details\" : (object,optional) a json object with custom fields\n"
" {\n"
" \"protocol-version\": version (numeric, required) Protocol version to upgrade to \n"
" }\n"
" }\n"
" or\n"
"2. approve-upgrade (object, required) A json object with approval details\n"
" {\n"
" \"approve\" : approve (boolean,required) Approve or disapprove\n"
" \"for\" : upgrade-identifier (string,required) Upgrade identifier - one of: create txid, upgrade name.\n"
" }\n"
*/
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction\n"
"\nExamples:\n"
+ HelpExampleCli("appendrawdata", "\"tx-hexstring\" 48656C6C6F20576F726C64210A" )
+ HelpExampleRpc("appendrawdata", "\"tx-hexstring\",\"48656C6C6F20576F726C64210A\"")
));
mapHelpStrings.insert(std::make_pair("createrawtransaction",
"createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":amount,...} ( [data] \"action\" ) \n"
"\nCreate a transaction spending the given inputs.\n"
"\nArguments:\n"
"1. transactions (array, required) A json array of json objects\n"
" [\n"
" {\n"
" \"txid\":\"id\", (string, required) The transaction id\n"
" \"vout\":n (numeric, required) The output number\n"
" \"scriptPubKey\": \"hex\", (string, optional) script key, used if cache=true or action=sign\n"
" \"redeemScript\": \"hex\" (string, optional) redeem script, used if action=sign\n"
" \"cache\":true|false (boolean, optional) If true - add cached script to tx, if omitted - add automatically if needed\n"
" }\n"
" ,...\n"
" ]\n"
"2. addresses (object, required) Object with addresses as keys, see help addresses-all for details.\n"
" or \n"
"2. addresses (array, required) Array of addresses objects, see help addresses-all for details.\n"
/*
"2. addresses (object, required) a json object with addresses as keys and amounts as values\n"
" {\n"
" \"address\": \n"
" x.xxx (numeric, required) The key is the address, the value is the native currency amount\n"
" or \n"
" { (object) A json object of assets to send\n"
" \"asset-identifier\" : asset-quantity \n"
" ,...\n"
" }\n"
" or \n"
" { (object) A json object describing new asset issue\n"
" \"issue\" : \n"
" {\n"
" \"raw\" : n (numeric, required) The asset total amount in raw units \n"
" ,...\n"
" }\n"
" ,...\n"
" }\n"
" or \n"
" { (object) A json object describing follow-on asset issue\n"
" \"issuemore\" : \n"
" {\n"
" \"asset\" : \"asset-identifier\"(string, required) Asset identifier - one of: issue txid. asset reference, asset name.\n"
" \"raw\" : n (numeric, required) The asset total amount in raw units \n"
" ,...\n"
" }\n"
" ,...\n"
" }\n"
" or \n"
" { (object) A json object describing permission change\n"
" \"permissions\" : \n"
" {\n"
" \"type\" : \"permission(s)\" (string,required) Permission strings, comma delimited. Possible values:\n"
" " + AllowedPermissions() + " \n"
" \"startblock\" : n (numeric, optional) Block to apply permissions from (inclusive). Default - 0\n"
" \"endblock\" : n (numeric, optional) Block to apply permissions to (exclusive). Default - 4294967295\n"
" \"timestamp\" : n (numeric, optional) This helps resolve conflicts between\n"
" permissions assigned by the same administrator. Default - current time\n"
" ,...\n"
" }\n"
" ,...\n"
" }\n"
" ,...\n"
" }\n"
*/
"3. data (array, optional) Array of hexadecimal strings or data objects, see help data-all for details.\n"
"4. \"action\" (string, optional, default \"\") Additional actions: \"lock\", \"sign\", \"lock,sign\", \"sign,lock\", \"send\". \n"
"\nResult:\n"
"\"transaction\" (string) hex string of the transaction (if action= \"\" or \"lock\")\n"
" or \n"
"{ (object) A json object (if action= \"sign\" or \"lock,sign\" or \"sign,lock\")\n"
" \"hex\": \"value\", (string) The raw transaction with signature(s) (hex-encoded string)\n"
" \"complete\": true|false (boolean) if transaction has a complete set of signature (0 if not)\n"
"}\n"
" or \n"
"\"hex\" (string) The transaction hash in hex (if action= \"send\")\n"