-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchainstack-tron-node-api-openapi.yml
More file actions
9420 lines (9420 loc) · 321 KB
/
chainstack-tron-node-api-openapi.yml
File metadata and controls
9420 lines (9420 loc) · 321 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
openapi: 3.0.3
info:
title: Chainstack TRON Node API
version: 1.0.0
description: Chainstack-managed RPC node API for the TRON blockchain. Endpoints follow the canonical JSON-RPC over HTTPS
interface for the network. Authenticate against your Chainstack node's per-node URL (e.g. https://nd-XXX-XXX-XXX.p2pify.com/<key>).
Merged from the Chainstack Developer Portal per-method fragments at https://github.com/chainstack/dev-portal/tree/main/openapi/tron_node_api.
contact:
name: Chainstack API Support
email: support@chainstack.com
license:
name: Chainstack Terms
url: https://chainstack.com/terms-of-service/
servers:
- url: https://{node_id}.p2pify.com/{api_key}
description: Chainstack-managed node endpoint
variables:
node_id:
default: nd-000-000-000
description: Your Chainstack node identifier
api_key:
default: <api-key>
description: Per-node access key
tags:
- name: General
paths:
/accountpermissionupdate:
post:
tags:
- General
summary: Wallet/Accountpermissionupdate
operationId: accountPermissionUpdate
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- owner_address
properties:
owner_address:
type: string
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
owner:
type: object
properties:
type:
type: integer
default: 0
permission_name:
type: string
default: owner
threshold:
type: integer
default: 1
keys:
type: array
items:
type: object
properties:
address:
type: string
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight:
type: integer
default: 1
default:
- address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight: 1
witness:
type: object
properties:
type:
type: integer
default: 1
permission_name:
type: string
default: witness
threshold:
type: integer
default: 1
keys:
type: array
items:
type: object
properties:
address:
type: string
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight:
type: integer
default: 1
default:
- address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight: 1
actives:
type: array
items:
type: object
properties:
type:
type: integer
default: 2
permission_name:
type: string
default: active
threshold:
type: integer
default: 1
operations:
type: string
description: 32-byte hex bitmask of allowed operations
default: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
keys:
type: array
items:
type: object
properties:
address:
type: string
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight:
type: integer
default: 1
default:
- address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight: 1
default:
- type: 2
permission_name: active
threshold: 1
operations: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
keys:
- address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
weight: 1
visible:
type: boolean
default: true
responses:
'200':
description: Unsigned account permission update transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
txID:
type: string
raw_data:
type: object
raw_data_hex:
type: string
/broadcasthex:
post:
tags:
- General
summary: Wallet/Broadcasthex
operationId: broadcastHex
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
transaction:
type: string
description: The transaction data in hexadecimal format
required:
- transaction
example:
transaction: 0a84010a025e4b220847c9dc89341b300d40f8fed3a2a72e5a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e121541e9d79cc47518930bc322d9bf7cddd260a0260a8d18e8077093afd0a2a72e1241deadbeefcafebabefacec0011234abcd0badf00d9999777755553333222211114321dcba0f0ff0f013579bdf2468ace0987654321a2b3c4d5e6f7a8b9c0deeff1b
responses:
'200':
description: Transaction broadcast result
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
description: Whether the broadcast was successful
txid:
type: string
description: Transaction ID if successful
message:
type: string
description: Status message
/broadcasttransaction:
post:
tags:
- General
summary: Wallet/Broadcasttransaction
operationId: broadcastTransaction
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- raw_data
- raw_data_hex
properties:
raw_data:
type: object
default:
contract:
- parameter:
value:
amount: 1000
owner_address: 41608f8da72479edc7dd921e4c30bb7e7cddbe722e
to_address: 41e9d79cc47518930bc322d9bf7cddd260a0260a8d
type_url: type.googleapis.com/protocol.TransferContract
type: TransferContract
ref_block_bytes: 5e4b
ref_block_hash: 47c9dc89341b300d
expiration: 1591089627000
timestamp: 1591089567635
raw_data_hex:
type: string
default: 0a025e4b220847c9dc89341b300d40f8fed3a2a72e5a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e121541e9d79cc47518930bc322d9bf7cddd260a0260a8d18e8077093afd0a2a72e
signature:
type: array
description: Array of hex-encoded signatures (65-byte secp256k1).
items:
type: string
default:
- deadbeefcafebabefacec0011234abcd0badf00d9999777755553333222211114321dcba0f0ff0f013579bdf2468ace0987654321a2b3c4d5e6f7a8b9c0deeff1b
visible:
type: boolean
default: false
responses:
'200':
description: Transaction broadcast result
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
code:
type: string
message:
type: string
txid:
type: string
/cancelallunfreezev2:
post:
tags:
- General
summary: Wallet/Cancelallunfreezev2
operationId: cancelAllUnfreezeV2
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- owner_address
properties:
owner_address:
type: string
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
visible:
type: boolean
default: true
responses:
'200':
description: Unsigned cancel all unfreeze transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
txID:
type: string
raw_data:
type: object
raw_data_hex:
type: string
/clearabi:
post:
tags:
- General
summary: Wallet/Clearabi
operationId: clearAbi
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
description: Address of the contract owner
contract_address:
type: string
description: Address of the smart contract
visible:
type: boolean
description: Whether to use visible (Base58) address format
required:
- owner_address
- contract_address
example:
owner_address: THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC
contract_address: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
visible: true
responses:
'200':
description: Contract ABI clearing transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
description: Whether addresses are in visible format
txID:
type: string
description: Transaction ID for the ABI clearing
raw_data:
type: object
properties:
contract:
type: array
description: Contract ABI clearing details
ref_block_bytes:
type: string
description: Reference block bytes
ref_block_hash:
type: string
description: Reference block hash
expiration:
type: number
description: Transaction expiration timestamp
timestamp:
type: number
description: Transaction creation timestamp
raw_data_hex:
type: string
description: Raw transaction data in hex format
/createaccount:
post:
tags:
- General
summary: Wallet/Createaccount
operationId: createAccount
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- owner_address
- account_address
properties:
owner_address:
type: string
description: The existing account that pays the account creation fee. Must have sufficient TRX.
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
account_address:
type: string
description: The new account address to be activated.
default: TFgY1uN8buRxAtV2r6Zy5sG3ACko6pJT1y
visible:
type: boolean
description: When true, addresses are base58; when false, hex.
default: true
responses:
'200':
description: Unsigned account creation transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
txID:
type: string
raw_data:
type: object
raw_data_hex:
type: string
'400':
description: Validation error (e.g., insufficient fee)
content:
application/json:
schema:
type: object
properties:
Error:
type: string
example:
Error: 'class org.tron.core.exception.ContractValidateException : Validate CreateAccountActuator error, insufficient
fee.'
/createassetissue:
post:
tags:
- General
summary: Wallet/Createassetissue
operationId: createAssetIssue
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- owner_address
- name
- abbr
- total_supply
- trx_num
- num
- start_time
- end_time
- description
- url
properties:
owner_address:
type: string
description: Address that will issue the token
default: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
name:
type: string
description: Token name
default: MyToken
abbr:
type: string
description: Token symbol/abbreviation
default: MTK
total_supply:
type: integer
description: Total supply of tokens
default: 1000000000000
trx_num:
type: integer
description: TRX amount for exchange rate
default: 1
num:
type: integer
description: Token amount for exchange rate
default: 1000
precision:
type: integer
description: Token decimal places (0-6)
default: 6
start_time:
type: integer
description: ICO start time (timestamp)
default: 1640995200000
end_time:
type: integer
description: ICO end time (timestamp)
default: 1672531200000
description:
type: string
description: Token description
default: A new TRC10 token for the TRON ecosystem
url:
type: string
description: Token project website
default: https://example.com
free_asset_net_limit:
type: integer
description: Free bandwidth for token operations
default: 1000000
public_free_asset_net_limit:
type: integer
description: Public free bandwidth limit
default: 1000000
frozen_supply:
type: array
description: Frozen supply configurations
items:
type: object
properties:
frozen_amount:
type: integer
frozen_days:
type: integer
visible:
type: boolean
description: Use base58 address format
default: true
responses:
'200':
description: Unsigned TRC10 asset issue transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
description: Address format indicator
txID:
type: string
description: Transaction hash
raw_data:
type: object
description: Raw transaction data
properties:
contract:
type: array
description: Contract array
ref_block_bytes:
type: string
description: Reference block bytes
ref_block_hash:
type: string
description: Reference block hash
expiration:
type: number
description: Transaction expiration timestamp
timestamp:
type: number
description: Transaction creation timestamp
fee_limit:
type: number
description: Maximum fee allowed
raw_data_hex:
type: string
description: Hexadecimal raw transaction
/createshieldedcontractparameters:
post:
tags:
- General
summary: Wallet/Createshieldedcontractparameters
operationId: createShieldedContractParameters
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- spend_authority_signature
- view_signature
- proof_generation_key
- payment_address
- rcm
- ar
- alpha
- rsk
- ask
properties:
spend_authority_signature:
type: string
description: Spending authority signature (128 hex characters, no 0x prefix)
example: 08a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
view_signature:
type: string
description: View signature component (64 hex characters, no 0x prefix)
example: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b
proof_generation_key:
type: string
description: Proof generation key (64 hex characters, no 0x prefix)
example: 2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3
payment_address:
type: string
description: Recipient's shielded payment address (ztron1 format, 78 characters)
example: ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs
rcm:
type: string
description: Randomness commitment value (64 hex characters, no 0x prefix)
example: 3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4
ar:
type: string
description: Authentication randomness value (64 hex characters, no 0x prefix)
example: 4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
alpha:
type: string
description: Alpha parameter for proof generation (64 hex characters, no 0x prefix)
example: 5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6
rsk:
type: string
description: Randomness for spending key (64 hex characters, no 0x prefix)
example: 6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7
ask:
type: string
description: Authentication secret key (64 hex characters, no 0x prefix)
example: 7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8
responses:
'200':
description: Successfully created shielded contract parameters
content:
application/json:
schema:
type: object
properties:
receive_description:
type: object
description: Receive description for shielded transaction
spend_description:
type: object
description: Spend description for shielded transaction
binding_signature:
type: string
description: Binding signature for transaction
/createshieldedcontractparameterswithoutask:
post:
tags:
- General
summary: Wallet/Createshieldedcontractparameterswithoutask
operationId: createShieldedContractParametersWithoutAsk
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- ovk
- from_address
- to_address
- amount
properties:
ovk:
type: string
description: Outgoing viewing key (64 hex characters, no 0x prefix)
example: 09b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1
from_address:
type: string
description: Sender's shielded address
example: ztron1a2b3c4d5e6f7g8h9j0k1l2m3n4p5q6r7s8t9u0v1w2x3y4z5a6b7c8d9e0f1g2h3j4k5l6m7n8p9
to_address:
type: string
description: Recipient's shielded address
example: ztron1z9y8x7w6v5u4t3s2r1q0p9n8m7l6k5j4h3g2f1e0d9c8b7a6z5y4x3w2v1u0t9s8r7q6p5n4m3
amount:
type: string
description: Amount to transfer
example: '1000000'
transparent_from_address:
type: string
description: Optional transparent sender address
example: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
transparent_to_address:
type: string
description: Optional transparent recipient address
example: TXYZoPYKcJJvXWc2WqJcqWvHqCqvqP5h3X
responses:
'200':
description: Successfully created shielded contract parameters
content:
application/json:
schema:
type: object
properties:
receive_description:
type: object
description: Receive description for shielded transaction
spend_description:
type: object
description: Spend description for shielded transaction
binding_signature:
type: string
description: Binding signature for transaction
/createspendauthsig:
post:
tags:
- General
summary: Wallet/Createspendauthsig
operationId: createSpendAuthSig
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- ask
- alpha
- tx_hash
properties:
ask:
type: string
description: Authentication secret key for signing (32 bytes, hex without 0x prefix)
example: 0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005
alpha:
type: string
description: Alpha parameter for randomization (32 bytes, hex without 0x prefix)
example: d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907
tx_hash:
type: string
description: Transaction hash being authorized (32 bytes, hex without 0x prefix)
example: 7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337
responses:
'200':
description: Successfully created spending authorization signature
content:
application/json:
schema:
type: object
properties:
value:
type: string
description: Generated spending authorization signature (hex string without 0x prefix)
example: 66c806bc592a7599e65833bf25c3c7005c8b21b7895dd835a84c97d7bec49d0f1493d2c73a68eeb9b9699b92cae42406f9e44ebe19acaea3d5febfe28de57109
/createtransaction:
post:
tags:
- General
summary: Wallet/Createtransaction
operationId: createTransaction
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- to_address
- owner_address
- amount
properties:
to_address:
type: string
default: 41e9d79cc47518930bc322d9bf7cddd260a0260a8d
owner_address:
type: string
default: 41608f8da72479edc7dd921e4c30bb7e7cddbe722e
amount:
type: integer
default: 1000
visible:
type: boolean
default: false
responses:
'200':
description: Unsigned transaction object
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
txID:
type: string
raw_data:
type: object
properties:
contract:
type: array
ref_block_bytes:
type: string
ref_block_hash:
type: string
expiration:
type: integer
timestamp:
type: integer
raw_data_hex:
type: string
/createwitness:
post:
tags:
- General
summary: Wallet/Createwitness
operationId: createWitness
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
description: 'Address that will become a witness. Use base58 with `visible: true`, or hex with `visible:
false`.'
url:
type: string
description: Witness website URL (must be a valid URL)
visible:
type: boolean
description: When true, addresses are base58; when false, hex.
default: true
required:
- owner_address
- url
example:
owner_address: THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC
url: https://mywitness.example.com
visible: true
responses:
'200':
description: Witness creation transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
description: Whether addresses are in visible format
txID:
type: string
description: Transaction ID for witness creation
raw_data:
type: object
properties:
contract:
type: array
description: Contract details for witness creation
ref_block_bytes:
type: string
description: Reference block bytes
ref_block_hash:
type: string
description: Reference block hash
expiration:
type: number
description: Transaction expiration timestamp
timestamp:
type: number
description: Transaction creation timestamp
raw_data_hex:
type: string
description: Raw transaction data in hex format
/delegateresource:
post:
tags:
- General
summary: Wallet/Delegateresource
operationId: delegateResource
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- owner_address
- receiver_address
- balance
- resource
properties:
owner_address:
type: string
default: 41608f8da72479edc7dd921e4c30bb7e7cddbe722e
receiver_address:
type: string
default: 41e9d79cc47518930bc322d9bf7cddd260a0260a8d
balance:
type: integer
default: 1000000
resource:
type: string
enum:
- BANDWIDTH
- ENERGY
default: BANDWIDTH
lock:
type: boolean
default: false
lock_period:
type: integer
default: 0
visible:
type: boolean
default: false
responses:
'200':
description: Resource delegation transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
txID:
type: string
raw_data:
type: object
properties:
contract:
type: array
ref_block_bytes:
type: string
ref_block_hash:
type: string
expiration:
type: integer
timestamp:
type: integer
raw_data_hex:
type: string
/deploycontract:
post:
tags:
- General
summary: Wallet/Deploycontract
operationId: deployContract
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
description: Address deploying the contract in hex format
abi:
type: string
description: Contract ABI (Application Binary Interface) as JSON string
bytecode:
type: string
description: Contract bytecode in hex format
parameter:
type: string
description: Constructor parameters encoded in hex format
call_value:
type: number
description: Amount of TRX to transfer to contract (in SUN)
consume_user_resource_percent:
type: number
description: Percentage of caller's resources used (0-100)
fee_limit:
type: number
description: Maximum energy fee willing to pay (in SUN)
origin_energy_limit:
type: number
description: Energy limit provided by contract creator
name:
type: string
description: Human-readable contract name
required:
- owner_address
- abi
- bytecode
example:
owner_address: 41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b
abi: '[{"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"type":"function"}]'
bytecode: 608060405234801561001057600080fd5b5061012a806100206000396000f3fe6080604052
parameter: ''
call_value: 0
consume_user_resource_percent: 100
fee_limit: 1000000000
origin_energy_limit: 10000000
name: MyContract
responses:
'200':
description: Contract deployment transaction
content:
application/json:
schema:
type: object
properties:
visible:
type: boolean
description: Whether addresses are in visible format
txID:
type: string
description: Transaction ID of the deployment
raw_data:
type: object
description: Raw transaction data
raw_data_hex:
type: string
description: Raw transaction data in hex format
/estimateenergy:
post:
tags:
- General
summary: Wallet/Estimateenergy
operationId: estimateEnergy
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
owner_address:
type: string
description: Address executing the contract call
contract_address:
type: string
description: Address of the smart contract
function_selector:
type: string