-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnode-rpc-api.yaml
1222 lines (1192 loc) · 38.6 KB
/
node-rpc-api.yaml
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
openapi: 3.0.1
servers:
- url: 'https://mainnet.mcash.network'
- url: 'https://testnet.mcash.network'
info:
description: |
# Introduction
Welcome to the reference for the Node Rpc API!.
You can access API via one of the following endpoints
| Network | Base URL for API Endpoints |
|-----------|-------------------------------|
|Mainnet | https://mainnet.mcash.network |
|Testnet | https://testnet.mcash.network |
version: 1.0.0
title: McashChain RPC API
contact:
url: 'https://developer.mcash.network'
email: [email protected]
tags:
- name: Addresses & Accounts
- name: Query Network
- name: Smart Contracts
- name: Voting & Supper nodes
- name: Token
paths:
# Addresses & Accounts
/wallet/generateaddress:
post:
tags:
- Addresses & Accounts
operationId: wallet-generateaddress
description: >-
Generates a random private key and address pair. Returns a private key, the corresponding address in hex and base58.
summary: Generate Address
responses:
'200':
content:
application/json:
schema:
type: object
properties:
address:
type: string
format: base58
private_key:
type: string
format: hex
hex_address:
type: string
format: hex
examples:
Success:
value:
address: MGQwSVjwEvNdWnL9gAYNCLcTHUyvNauUVT
private_key: d0fcb53be111a10dcbf735f528d36b9ef5baff4ed1f50b8fbc6ec49fffa5873c
hex_address: 325d62ce9307aff0ec378fd96209b0fd3027f46c60
x-code-samples:
- lang: Curl
source: |
curl -X POST -H "Content-Type: application/json" \
"https://mainnet.mcash.network/wallet/generateaddress"
/wallet/createaccount:
post:
tags:
- Addresses & Accounts
operationId: wallet-createaccount
description: >-
Activate account.
summary: Activate Address
requestBody:
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
format: hex
description: Activated account
account_address:
type: string
format: hex
description: Address of the new account, this address needs to be activated
examples:
first:
value:
owner_address: 321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702
account_address: 325d62ce9307aff0ec378fd96209b0fd3027f46c60
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/transactionResponse'
examples:
first:
value: null
x-code-samples:
- lang: Curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "owner_address" : "321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702", "account_address": "325d62ce9307aff0ec378fd96209b0fd3027f46c60" }' \
"https://mainnet.mcash.network/wallet/createaccount"
- lang: mcashweb
source: |
mcashweb.transactionBuilder.createAccount(
'325d62ce9307aff0ec378fd96209b0fd3027f46c60',
'321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702').then(data => {
console.log(data);
})
/wallet/broadcasttransaction:
post:
tags:
- Addresses & Accounts
operationId: wallet-broadcasttransaction
description: >-
Broadcast signed transaction.
summary: Broadcast Transaction
requestBody:
content:
application/json:
schema:
type: object
properties:
signature:
type: array
items:
type: string
format: hex
tx_id:
type: string
format: hex
raw_data:
type: object
raw_data_hex:
type: string
format: hex
examples:
first:
value: null
responses:
'200':
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
examples:
first:
value:
result: true
x-code-samples:
- lang: Curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ }' \
"https://mainnet.mcash.network/wallet/broadcasttransaction"
- lang: mcashweb
source: |
mcashweb.mcash.sendRawTransaction().then(data => {
console.log(data);
})
/wallet/getaccount:
post:
tags:
- Addresses & Accounts
operationId: wallet-getaccount
description: >-
Queries information about an account. Returns the account object.
summary: Get Account
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/addressRequestBody'
examples:
first:
value:
address: 321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702
responses:
'200':
description: >-
The results returned from this API are unconfirmed and subject to change if the network forks.
content:
application/json:
schema:
$ref: '#/components/schemas/account'
examples:
Success:
value:
address: 321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702
balance: 31000793
vote:
vote_address: 32e093bdddd1d36afbb3d6c65d4569dc2dc2987c55
vote_count: 20000
create_time: 1561720485000
latest_operation_time: 1562030079000
allowance: 9578823211345
latest_withdraw_time: 1561996848000
is_committee: true
account_resource:
latest_bandwidth_consume_time: 1561521600000
latest_free_bandwidth_consume_time: 1562030079000
latest_energy_consume_time: 1561521600000
stake:
stake_amount: 209000000000000
expiration_time: 1562257185000
witness_stake:
stake_amount: 500000000000000
expiration_time: -1
'Not found':
value: {}
x-code-samples:
- lang: Curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "address" : "321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702"}' \
"https://mainnet.mcash.network/wallet/getaccount"
- lang: mcashweb
source: |
mcashweb.mcash.getAccount('321e5a1fc4aa2d5f801ae1f28cfa40e39248bb4702').then(data => {
console.log(data);
})
/wallet/getaccountresource:
post:
tags:
- Addresses & Accounts
operationId: wallet-getaccountresource
description: >-
Queries the resource information of an account.
summary: Account Resources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/addressRequestBody'
examples:
first:
value:
address: 325d62ce9307aff0ec378fd96209b0fd3027f46c60
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/accountResourceResponse'
examples:
first:
value:
free_bandwidth_limit: 10000
bandwidth_limit: 5709
asset_bandwidth_used:
- key: 1000001
value: 0
asset_bandwidth_limit:
- key: 1000001
value: 0
total_bandwidth_limit: 43200000000
total_bandwidth_weight: 151321793
energy_limit: 11037405
total_energy_limit: 50000000000
total_energy_weight: 181202
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "address": "325d62ce9307aff0ec378fd96209b0fd3027f46c60" }' \
"https://mainnet.mcash.network/wallet/getaccountresource"
- lang: mcashweb
source: |
mcashweb.mcash.getAccountResources('325d62ce9307aff0ec378fd96209b0fd3027f46c60').then(data => {
console.log(data);
})
/wallet/createtransaction:
post:
tags:
- Addresses & Accounts
operationId: wallet-createtransaction
description: >-
Create a transfer transaction.
summary: Transfer
requestBody:
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
format: hex
description: Sender address
to_address:
type: string
format: hex
description: Receive address
amount:
type: integer
description: Amount, in matoshi
examples:
first:
value:
owner_address: 325d62ce9307aff0ec378fd96209b0fd3027f46c60
to_address: 32a5801ea2895198f9c35035a66e01bc1cca4dd84c
amount: 100000000
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/transactionResponse'
examples:
first:
value: null
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "owner_address": "325d62ce9307aff0ec378fd96209b0fd3027f46c60", "to_address": "32a5801ea2895198f9c35035a66e01bc1cca4dd84c", "amount": 100000000 }' \
"https://mainnet.mcash.network/wallet/createtransaction"
- lang: mcashweb
source: |
mcashweb.mcash.sendMcash('32a5801ea2895198f9c35035a66e01bc1cca4dd84c', 100000000, '325d62ce9307aff0ec378fd96209b0fd3027f46c60').then(data => {
console.log(data);
})
# Query Network
/wallet/getblockbynum:
post:
tags:
- Query Network
operationId: wallet-getblockbynum
description: >-
Queries information about a block by 'Block Height'. Returns the block object.
summary: Get Block By Height
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/numRequestBody'
examples:
first:
value:
num: 1000000
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/block'
examples:
Success:
value:
block_header:
raw_data:
number: 1000000
witness_address: 3211da43f143deb847555977cb32258c4c9251acfe
version: 2
parent_hash: 00000000000f423fdd3d41f74cb113aa7ddf4e2ddbdb9b0450b70da3646296f4
timestamp: 1564524456000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
witness_signature: f7223564b31a0205b83b6c4da3b5eb39ef676da5e05806f45b51065c98d7f67f78650e9664ea51fecd3c62cc1c4f7395ccc07f81eed886137871321ab925175f00
block_id: 00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "num" : 1000000}' \
"https://mainnet.mcash.network/wallet/getblockbynum"
- lang: mcashweb
source: |
mcashweb.mcash.getBlockByNumber(1000000).then(data => {
console.log(data);
})
/wallet/getblockbyid:
post:
tags:
- Query Network
operationId: wallet-getblockbyid
description: >-
Queries information about a block by 'Block Hash'. Returns the block object.
summary: Get Block By Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/idRequestBody'
examples:
first:
value:
value: 00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/block'
examples:
Success:
value:
block_header:
raw_data:
number: 1000000
witness_address: 3211da43f143deb847555977cb32258c4c9251acfe
version: 2
parent_hash: 00000000000f423fdd3d41f74cb113aa7ddf4e2ddbdb9b0450b70da3646296f4
timestamp: 1564524456000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
witness_signature: f7223564b31a0205b83b6c4da3b5eb39ef676da5e05806f45b51065c98d7f67f78650e9664ea51fecd3c62cc1c4f7395ccc07f81eed886137871321ab925175f00
block_id: 00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "value" : "00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec"}' \
"https://mainnet.mcash.network/wallet/getblockbynum"
- lang: mcashweb
source: |
mcashweb.mcash.getBlockByHash("00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec").then(data => {
console.log(data);
})
/wallet/getblockbylatestnum:
post:
tags:
- Query Network
operationId: wallet-getblockbylatestnum
description: >-
Queries information about latest blocks. Returns the array of block objects.
summary: Get Latest Blocks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/numRequestBody'
examples:
first:
value:
value: 2
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/block'
examples:
Success:
value:
block:
- block_header:
raw_data:
timestamp: 1588567500000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
parent_hash: 00000000008942937f5bc6754784e6592f8122f31940ec99f83a09302e7305ec
number: 8995476
witness_address: 32da42ec4b01995df24748247c488674dd287e9191
version: 3
witness_signature: 7e95d98c8e7c84a811a835794ab0df8138d2405efb998427caf42d69f24ee97f23f3ba00cce3363e1da4de0fb83463822bf6532214e2471f61db2efd8503efa600
- block_header:
raw_data:
timestamp: 1588567503000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
parent_hash: 000000000089429408a25a8832cdb2ad410c86c41b9f072faec868190b26e8f2
number: 8995477
witness_address: 323fd23b408d2334a7d83889ada6e2c104c8717a9f
version: 3
witness_signature: fea341d2f8e918215be47c7ae22a7135155804c06b08f87000fb9365d49718d0532b2bbe6a57230c68be30913e2413e86d20a7a415b07bf8bc2417b988b7fe9301
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "num": 2}' \
"https://mainnet.mcash.network/wallet/getblockbylatestnum"
/wallet/getblockbylimitnext:
post:
tags:
- Query Network
operationId: wallet-getblockbylimitnext
description: >-
Queries information about blocks, included in the specified range. Returns the array of block objects.
summary: Get Blocks In Range
requestBody:
content:
application/json:
schema:
type: object
properties:
start_num:
type: integer
format: int32
end_num:
type: integer
format: int32
examples:
first:
value:
start_num: 8995476
end_num: 8995478
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/block'
examples:
Success:
value:
block:
- block_header:
raw_data:
timestamp: 1588567500000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
parent_hash: 00000000008942937f5bc6754784e6592f8122f31940ec99f83a09302e7305ec
number: 8995476
witness_address: 32da42ec4b01995df24748247c488674dd287e9191
version: 3
witness_signature: 7e95d98c8e7c84a811a835794ab0df8138d2405efb998427caf42d69f24ee97f23f3ba00cce3363e1da4de0fb83463822bf6532214e2471f61db2efd8503efa600
- block_header:
raw_data:
timestamp: 1588567503000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
parent_hash: 000000000089429408a25a8832cdb2ad410c86c41b9f072faec868190b26e8f2
number: 8995477
witness_address: 323fd23b408d2334a7d83889ada6e2c104c8717a9f
version: 3
witness_signature: fea341d2f8e918215be47c7ae22a7135155804c06b08f87000fb9365d49718d0532b2bbe6a57230c68be30913e2413e86d20a7a415b07bf8bc2417b988b7fe9301
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "start_num": 8995476, "end_num": 8995478 }' \
"https://mainnet.mcash.network/wallet/getblockbylimitnext"
/wallet/getnowblock:
post:
tags:
- Query Network
operationId: wallet-getnowblock
description: >-
Queries information about latest block. Returns the block object.
summary: Get Latest Block
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/block'
examples:
Success:
value:
block_header:
raw_data:
number: 1000000
witness_address: 3211da43f143deb847555977cb32258c4c9251acfe
version: 2
parent_hash: 00000000000f423fdd3d41f74cb113aa7ddf4e2ddbdb9b0450b70da3646296f4
timestamp: 1564524456000
tx_trie_root: 0000000000000000000000000000000000000000000000000000000000000000
witness_signature: f7223564b31a0205b83b6c4da3b5eb39ef676da5e05806f45b51065c98d7f67f78650e9664ea51fecd3c62cc1c4f7395ccc07f81eed886137871321ab925175f00
block_id: 00000000000f4240914f382a811b0391e803ef96ccb9f9a37934442097a2b9ec
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
"https://mainnet.mcash.network/wallet/getnowblock"
- lang: mcashweb
source: |
mcashweb.mcash.getCurrentBlock().then(data => {
console.log(data);
})
/wallet/gettransactionbyid:
post:
tags:
- Query Network
operationId: wallet-gettransactionbyid
description: >-
Queries information about a transaction by 'Transaction Hash'. Returns the transaction object.
summary: Get Transaction By Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/idRequestBody'
examples:
first:
value:
value: 001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/transaction'
examples:
Success:
value:
ret:
- contract_result: OK
signature:
- 018690c78dd2e5388fad6eb292024c10b775ebf329cf8805b0666f42523c751834bfb313bf19cdb06449f3cd56d1e5a2559961afd7de52c3b99a8b759fcebdea01
tx_id: 001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c
raw_data:
contract:
- parameter:
value:
amount: 20000000
memo: 653263343839613730376665
owner_address: 32985ce02cba3b266feb908cbfc86474033c6c5b22
to_address: 322f15d0a02aeaeb770bdeea29fefc947661a48f94
asset_id: 1000011
type_url: "type.googleapis.com/protocol.TransferAssetContract"
type: TransferAssetContract
ref_block_bytes: 43f3
ref_block_hash: efcf10a359c9ee00
expiration: 1588568613000
timestamp: 1588568553395
raw_data_hex: 0a0243f32208efcf10a359c9ee004088c1c5f09d2e5a7f0802127b0a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e736665724173736574436f6e7472616374124508cb843d121532985ce02cba3b266feb908cbfc86474033c6c5b221a15322f15d0a02aeaeb770bdeea29fefc947661a48f942080dac4092a0c65326334383961373037666570b3efc1f09d2e
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "value" : "001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c"}' \
"https://mainnet.mcash.network/wallet/gettransactionbyid"
- lang: mcashweb
source: |
mcashweb.mcash.getTransaction("001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c").then(data => {
console.log(data);
})
/wallet/gettransactioninfobyid:
post:
tags:
- Query Network
operationId: wallet-gettransactioninfobyid
description: >-
Queries information about transaction fee, internal transactions, transaction logs by 'Transaction Hash'.
summary: Get Transaction Info By Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/idRequestBody'
examples:
first:
value:
value: 001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/transactionInfo'
examples:
Success:
value:
id: 001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c
block_number: 8995829
block_time_stamp: 1588568559000
contract_result:
- ""
receipt:
bandwidth_usage: 291
'Not found':
value: {}
x-code-samples:
- lang: curl
source: |
curl -X POST -H "Content-Type: application/json" \
-d '{ "value" : "001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c"}' \
"https://mainnet.mcash.network/wallet/gettransactioninfobyid"
- lang: mcashweb
source: |
mcashweb.mcash.getTransactionInfo("001dc599fb47371f611c49e04ca42b9e8812394cca8e68851c8553715a5aba7c").then(data => {
console.log(data);
})
components:
parameters:
schemas:
address:
description: Account address, converted to a hex string.
type: string
format: hex
vote_address:
description: Vote address, converted to a hex string.
type: string
format: hex
vote:
type: object
properties:
vote_address:
type: string
format: hex
vote_count:
type: integer
format: int64
permission:
type: object
properties:
type:
type: string
enum:
- "Owner"
- "Witness"
- "Active"
id:
type: integer
format: int32
description: Owner id=0, Witness id=1, Active id start by 2
permission_name:
type: string
threshold:
type: integer
format: int64
parent_id:
type: integer
format: int32
operations:
type: string
format: hex
keys:
type: array
items:
type: object
properties:
address:
$ref: '#/components/schemas/address'
weight:
type: integer
format: int64
accountResource:
type: object
properties:
bandwidth_usage:
type: integer
format: int64
latest_bandwidth_consume_time:
type: integer
format: int64
free_bandwidth_usage:
type: integer
format: int64
latest_free_bandwidth_consume_time:
type: integer
format: int64
energy_usage:
type: integer
format: int64
latest_energy_consume_time:
type: integer
format: int64
asset_free_bandwidth_usage:
type: object
description: Return Map values (Map<int64,int64>) with key is assetId and value is bandwidth usage
latest_asset_operation_time:
type: object
description: Return Map values (Map<int64,int64>) with key is assetId and value is operation time
stake:
type: object
properties:
stake_amount:
type: interger
format: int64
expiration_time:
type: interger
format: int64
frozens:
type: array
items:
type: object
properties:
frozen_balance:
type: interger
format: int64
expire_time:
type: interger
format: int64
delegatedFrozens:
type: array
items:
type: object
properties:
acquired_delegated_balance:
type: interger
format: int64
delegated_balance:
type: interger
format: int64
addressObject:
type: object
properties:
address:
description: >-
Account address, converted to a hex string.
type: string
format: hex
required:
- address
account:
type: object
properties:
account_name:
type: string
account_type:
type: string
enum:
- Normal
- AssetIssue
- Contract
address:
$ref: '#/components/schemas/address'
balance:
description: Balance of account expressed in Matoshi
type: interger
format: int64
vote:
$ref: '#/components/schemas/vote'
assets:
type: object
description: Return Map values (Map<int64,int64>) with key is assetId and value is balance of the asset which user own
frozen_for_bandwidth:
$ref: '#/components/schemas/frozens'
frozen_for_energy:
$ref: '#/components/schemas/frozens'
frozen_assets:
$ref: '#/components/schemas/frozens'
delegated_frozen_for_bandwidth:
$ref: '#/components/schemas/delegatedFrozens'
delegated_frozen_for_energy:
$ref: '#/components/schemas/delegatedFrozens'
create_time:
description: Created time
type: interger
format: int64
latest_operation_time:
type: interger
format: int64
allowance:
type: interger
format: int64
latest_withdraw_time:
type: interger
format: int64
is_witness:
type: boolean
is_committee:
type: boolean
asset_issued_id:
type: integer
format: int64
account_id:
type: string
format: hex
account_resource:
$ref: '#/components/schemas/accountResource'
codeHash:
type: string
format: hex
stake:
$ref: '#/components/schemas/stake'
witness_stake:
$ref: '#/components/schemas/stake'
owner_permission:
$ref: '#/components/schemas/permission'
witness_permission:
$ref: '#/components/schemas/permission'
active_permission:
$ref: '#/components/schemas/permission'
required:
- address
dataSetList:
type: object
properties:
total:
type: integer
apis:
type: array
items:
type: object
properties:
apiKey:
type: string
description: To be used as a dataset parameter value
apiVersionNumber:
type: string
description: To be used as a version parameter value
apiUrl:
type: string
format: uriref
description: "The URL describing the dataset's fields"
apiDocumentationUrl:
type: string
format: uriref
description: A URL to the API console for each API
numRequestBody:
type: object
properties:
num:
type: integer
format: int64
idRequestBody:
type: object
properties:
value:
type: string
format: hex
addressRequestBody:
type: object
properties:
address:
type: string
format: hex
block:
type: object
properties:
block_header:
$ref: '#/components/schemas/blockHeader'
transactions:
type: array
items:
$ref: '#/components/schemas/transaction'
block_id:
type: string
format: hex
blockHeader:
type: object
properties:
raw_data:
type: object
properties:
timestamp:
type: integer
format: int64
tx_trie_root:
type: string
format: hex
parent_hash:
type: string
format: hex
number:
type: integer
format: int64
witness_address:
type: string
format: hex
version:
type: integer
format: int32
witness_signature:
type: string
format: hex
transaction:
type: object
properties:
ret:
type: array
items:
type: object
properties:
contract_result:
type: string
signature:
type: array