-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmirror-node.yaml
5169 lines (5127 loc) · 177 KB
/
mirror-node.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.3
paths:
/api/v1/accounts:
get:
summary: List account entities on network
description: Returns a list of all account entity items on the network.
operationId: getAccounts
parameters:
- $ref: "#/components/parameters/accountBalanceQueryParam"
- $ref: "#/components/parameters/accountIdQueryParam"
- $ref: "#/components/parameters/accountPublicKeyQueryParam"
- $ref: "#/components/parameters/balanceQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/AccountsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}:
get:
summary: Get account by alias, id, or evm address
description: |
Return the account transactions and balance information given an account alias, an account id, or an evm address. The information will be limited to at most 1000 token balances for the account as outlined in HIP-367.
When the timestamp parameter is supplied, we will return transactions and account state for the relevant timestamp query. Balance information will be accurate to within 15 minutes of the provided timestamp query.
Historical ethereum nonce information is currently not available and may not be the exact value at a provided timestamp.
operationId: getAccount
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/transactionTypeQueryParam"
- $ref: "#/components/parameters/transactionsQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/AccountBalanceTransactions"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/nfts:
get:
summary: Get nfts for an account info
description: |
Returns information for all non-fungible tokens for an account.
## Ordering
When considering NFTs, their order is governed by a combination of their numerical **token.Id** and **serialnumber** values, with **token.id** being the parent column.
A serialnumbers value governs its order within the given token.id
In that regard, if a user acquired a set of NFTs in the order (2-2, 2-4 1-5, 1-1, 1-3, 3-3, 3-4), the following layouts illustrate the ordering expectations for ownership listing
1. **All NFTs in ASC order**: 1-1, 1-3, 1-5, 2-2, 2-4, 3-3, 3-4
2. **All NFTs in DESC order**: 3-4, 3-3, 2-4, 2-2, 1-5, 1-3, 1-1
3. **NFTs above 1-1 in ASC order**: 1-3, 1-5, 2-2, 2-4, 3-3, 3-4
4. **NFTs below 3-3 in ASC order**: 1-1, 1-3, 1-5, 2-2, 2-4
5. **NFTs between 1-3 and 3-3 inclusive in DESC order**: 3-4, 3-3, 2-4, 2-2, 1-5, 1-3
Note: The default order for this API is currently DESC
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the NFT ownership endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| token.id | eq | Y | Single occurrence only. | ?token.id=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. | ?token.id=lte:X |
| | gt(e) | Y | Single occurrence only. | ?token.id=gte:X |
| serialnumber | eq | Y | Single occurrence only. Requires the presence of a **token.id** query | ?serialnumber=Y |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **token.id** query | ?token.id=lte:X&serialnumber=lt:Y |
| | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **token.id** query | ?token.id=gte:X&serialnumber=gt:Y |
| spender.id | eq | Y | | ?spender.id=Z |
| | ne | N | | |
| | lt(e) | Y | | ?spender.id=lt:Z |
| | gt(e) | Y | | ?spender.id=gt:Z |
Note: When searching across a range for individual NFTs a **serialnumber** with an additional **token.id** query filter must be provided.
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
operationId: getNftsByAccountId
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/serialNumberQueryParam"
- $ref: "#/components/parameters/spenderIdQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Nfts"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/rewards:
get:
summary: Get past staking reward payouts for an account
description: |
Returns information for all past staking reward payouts for an account.
operationId: getStakingRewards
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/StakingRewardsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/tokens:
get:
summary: Get token relationships info for an account
description: |
Returns information for all token relationships for an account.
operationId: getTokensByAccountId
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/TokenRelationshipResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/airdrops/outstanding:
get:
summary: Get outstanding token airdrops sent by an account
description: |
Returns outstanding token airdrops that have been sent by an account.
operationId: getOutstandingTokenAirdrops
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/receiverIdQueryParam"
- $ref: "#/components/parameters/serialNumberQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/TokenAirdropsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- airdrops
/api/v1/accounts/{idOrAliasOrEvmAddress}/airdrops/pending:
get:
summary: Get pending token airdrops received by an account
description: |
Returns pending token airdrops that have been received by an account.
operationId: getPendingTokenAirdrops
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/senderIdQueryParam"
- $ref: "#/components/parameters/serialNumberQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/TokenAirdropsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- airdrops
/api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/crypto:
get:
summary: Get crypto allowances for an account info
description: Returns information for all crypto allowances for an account.
operationId: getCryptoAllowances
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/spenderIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CryptoAllowancesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/tokens:
get:
summary: Get fungible token allowances for an account
description: |
Returns information for fungible token allowances for an account.
## Ordering
The order is governed by a combination of the spender id and the token id values, with spender id being the parent column.
The token id value governs its order within the given spender id.
Note: The default order for this API is currently ASC
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| spender.id | eq | Y | Single occurrence only. | ?spender.id=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. | ?spender.id=lte:X |
| | gt(e) | Y | Single occurrence only. | ?spender.id=gte:X |
| token.id | eq | Y | Single occurrence only. Requires the presence of a **spender.id** query | ?token.id=lt:Y |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **spender.id** query | ?spender.id=lte:X&token.id=lt:Y |
| | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **spender.id** query | ?spender.id=gte:X&token.id=gt:Y |
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
operationId: getTokenAllowances
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/spenderIdQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/TokenAllowancesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/nfts:
get:
summary: Get non fungible token allowances for an account
description: |
Returns an account's non-fungible token allowances.
## Ordering
The order is governed by a combination of the account ID and the token ID values, with account ID being the parent column.
The token ID value governs its order within the given account ID.
Note: The default order for this API is currently ascending. The account ID can be the owner or the spender ID depending upon the owner flag.
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| account.id | eq | Y | Single occurrence only. | ?account.id=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. | ?account.id=lte:X |
| | gt(e) | Y | Single occurrence only. | ?account.id=gte:X |
| token.id | eq | Y | Single occurrence only. Requires the presence of an **account.id** parameter | ?account.id=X&token.id=eq:Y |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **account.id** parameter | ?account.id=lte:X&token.id=lt:Y |
| | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **account.id** parameter | ?account.id=gte:X&token.id=gt:Y |
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
operationId: getNftAllowances
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/accountIdQueryParam"
- $ref: "#/components/parameters/tokenIdQueryParam"
- $ref: "#/components/parameters/ownerQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NftAllowancesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- accounts
/api/v1/balances:
get:
summary: List account balances
description:
Returns a list of account and token balances on the network. Balance information returned by this API has a 15
minute granularity as it's generated by an asynchronous balance snapshot process. This information is limited to
at most 50 token balances per account as outlined in HIP-367. As such, it's not recommended for general use and
we instead recommend using either `/api/v1/accounts/{id}/tokens` or `/api/v1/tokens/{id}/balances` to obtain
the current token balance information and `/api/v1/accounts/{id}` to return the current account balance.
operationId: getBalances
parameters:
- $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressQueryParam"
- $ref: "#/components/parameters/accountBalanceQueryParam"
- $ref: "#/components/parameters/accountPublicKeyQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/BalancesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- balances
/api/v1/blocks:
get:
summary: List blocks
description: Returns a list of blocks on the network.
operationId: getBlocks
parameters:
- $ref: "#/components/parameters/blockNumberQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/BlocksResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- blocks
/api/v1/blocks/{hashOrNumber}:
get:
summary: Get block by hash or number
description: Returns the block information by given hash or number.
operationId: getBlock
parameters:
- $ref: "#/components/parameters/hashOrNumberPathParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Block"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- blocks
/api/v1/contracts/call:
post:
summary: Invoke a smart contract
description:
Returns a result from EVM execution such as cost-free execution of read-only smart contract queries, gas estimation, and transient simulation of read-write operations. If the `estimate` field is set to true gas estimation is executed. However, gas estimation only supports the `latest` block.
When `estimate` is false, it can process calls against the `earliest` block and specific historical blocks when a hexadecimal or decimal block number is provided in the `block` field for `eth_call` operations.
[Link to Supported/Unsupported Operations Table](https://github.com/hashgraph/hedera-mirror-node/blob/main/docs/web3/README.md#supported/unsupported-operations)
The operations types which are not currently supported should return 501 error status.
operationId: contractCall
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ContractCallRequest"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractCallResponse"
400:
description: Validation error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
404:
description: Not found error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
415:
description: Unsupported media type error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
500:
description: Generic error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
501:
description: Not implemented error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
tags:
- contracts
/api/v1/contracts:
get:
summary: List contract entities on network
description: Returns a list of all contract entity items on the network.
operationId: getContracts
parameters:
- $ref: "#/components/parameters/contractIdQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- contracts
/api/v1/contracts/{contractIdOrAddress}:
get:
summary: Get contract by id
description: Return the contract information given an id
operationId: getContract
parameters:
- $ref: "#/components/parameters/contractIdOrAddressPathParam"
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/{contractIdOrAddress}/results:
get:
summary: List contract results from a contract on the network
description: Returns a list of all ContractResults for a contract's function executions.
operationId: getContractResultsByContractId
parameters:
- $ref: "#/components/parameters/contractIdOrAddressPathParam"
- $ref: "#/components/parameters/blockHashQueryParam"
- $ref: "#/components/parameters/contractsBlockNumberQueryParam"
- $ref: "#/components/parameters/fromQueryParam"
- $ref: "#/components/parameters/internalQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/transactionIndexQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/{contractIdOrAddress}/state:
get:
summary: The contract state from a contract on the network
description: Returns a list of all contract's slots. If no timestamp is provided, returns the current state.
operationId: getContractState
parameters:
- $ref: "#/components/parameters/contractIdOrAddressPathParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/slotQueryParam"
- $ref: "#/components/parameters/stateTimestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractStateResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/{contractIdOrAddress}/results/{timestamp}:
get:
summary: Get the contract result from a contract on the network executed at a given timestamp
description: Returns a single ContractResult for a contract's function executions at a specific timestamp.
operationId: getContractResultByIdAndTimestamp
parameters:
- $ref: "#/components/parameters/contractIdOrAddressPathParam"
- $ref: "#/components/parameters/timestampPathParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultDetails"
206:
description: Partial Content
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultDetails"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/results:
get:
summary: List contract results from all contracts on the network
description: Returns a list of all ContractResults for all contract's function executions.
operationId: getContractsResults
parameters:
- $ref: "#/components/parameters/fromQueryParam"
- $ref: "#/components/parameters/blockHashQueryParam"
- $ref: "#/components/parameters/contractsBlockNumberQueryParam"
- $ref: "#/components/parameters/internalQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/transactionIndexQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- contracts
/api/v1/contracts/results/{transactionIdOrHash}:
get:
summary: Get the contract result from a contract on the network for a given transactionId or ethereum transaction hash
description: Returns a single ContractResult for a contract's function executions for a given transactionId or ethereum transaction hash.
operationId: getContractResultByTransactionIdOrHash
parameters:
- $ref: "#/components/parameters/transactionIdOrEthHashPathParam"
- $ref: "#/components/parameters/nonceQueryParamWithDefault"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultDetails"
206:
description: Partial Content
content:
application/json:
schema:
$ref: "#/components/schemas/ContractResultDetails"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/results/{transactionIdOrHash}/actions:
get:
summary: Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash
description: Returns a list of ContractActions for a contract's function executions for a given transactionId or ethereum transaction hash.
operationId: getContractActions
parameters:
- $ref: "#/components/parameters/transactionIdOrEthHashPathParam"
- $ref: "#/components/parameters/contractActionsIndexQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractActionsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/results/{transactionIdOrHash}/opcodes:
get:
summary: Get the opcode traces for a historical transaction on the network with the given transaction ID or hash
description: |
Re-executes a transaction and returns a result containing detailed information for the execution,
including all values from the {@code stack}, {@code memory} and {@code storage}
and the entire trace of opcodes that were executed during the replay.
Note that to provide the output, the transaction needs to be re-executed on the EVM,
which may take a significant amount of time to complete if stack and memory information is requested.
operationId: getContractOpcodes
parameters:
- $ref: "#/components/parameters/transactionIdOrEthHashPathParam"
- $ref: "#/components/parameters/stack"
- $ref: "#/components/parameters/memory"
- $ref: "#/components/parameters/storage"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OpcodesResponse"
400:
description: Validation error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
404:
description: Transaction or record file not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
tags:
- contracts
/api/v1/contracts/{contractIdOrAddress}/results/logs:
get:
summary: List contract logs from a contract on the network
description: |
Search the logs of a specific contract across multiple contract calls. Chained logs are not
included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`
or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied
and span a time range of at most seven days.
## Ordering
The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.
Note: The default order for this API is currently DESC
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X |
| | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X |
| timestamp | eq | Y | Single occurrence only. | ?timestamp=Y
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y
| | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
operationId: getContractLogsByContractId
parameters:
- $ref: "#/components/parameters/contractIdOrAddressPathParam"
- $ref: "#/components/parameters/#dexQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/logTopic0QueryParam"
- $ref: "#/components/parameters/logTopic1QueryParam"
- $ref: "#/components/parameters/logTopic2QueryParam"
- $ref: "#/components/parameters/logTopic3QueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractLogsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- contracts
/api/v1/contracts/results/logs:
get:
summary: List contracts logs across many contracts on the network
description: |
Search the logs across many contracts with multiple contract calls. Chained logs are not
included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`
or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied
and span a time range of at most seven days.
## Ordering
The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.
Note: The default order for this API is currently DESC
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X |
| | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X |
| timestamp | eq | Y | Single occurrence only. | ?timestamp=Y
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y
| | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
operationId: getContractsLogs
parameters:
- $ref: "#/components/parameters/#dexQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/logTopic0QueryParam"
- $ref: "#/components/parameters/logTopic1QueryParam"
- $ref: "#/components/parameters/logTopic2QueryParam"
- $ref: "#/components/parameters/logTopic3QueryParam"
- $ref: "#/components/parameters/transactionHashQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractLogsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- contracts
/api/v1/network/exchangerate:
get:
summary: Get the network exchange rate to estimate costs
description: Returns the network's exchange rate, current and next.
operationId: getNetworkExchangeRate
parameters:
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NetworkExchangeRateSetResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
500:
$ref: "#/components/responses/ServiceUnavailableError"
tags:
- network
/api/v1/network/fees:
get:
summary: Get the network fees
description: Returns the estimated gas in tinybars per each transaction type. Default order is ASC. Currently only `ContractCall`, `ContractCreate` and `EthereumTransaction` transaction types are supported.
operationId: getNetworkFees
parameters:
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NetworkFeesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
500:
$ref: "#/components/responses/ServiceUnavailableError"
tags:
- network
/api/v1/network/nodes:
get:
summary: Get the network address book nodes
description: Returns the network's list of nodes used in consensus
operationId: getNetworkNodes
parameters:
- $ref: "#/components/parameters/fileIdQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/nodeIdQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NetworkNodesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- network
/api/v1/network/stake:
get:
summary: Get network stake information
description: Returns the network's current stake information.
operationId: getNetworkStake
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NetworkStakeResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
500:
$ref: "#/components/responses/ServiceUnavailableError"
tags:
- network
/api/v1/network/supply:
get:
summary: Get the network supply
description: Returns the network's released supply of hbars
operationId: getNetworkSupply
parameters:
- $ref: "#/components/parameters/timestampQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/NetworkSupplyResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- network
/api/v1/schedules:
get:
summary: List schedules entities
description: Lists schedules on the network that govern the execution logic of scheduled transactions. This includes executed and non executed schedules.
operationId: getSchedules
parameters:
- $ref: "#/components/parameters/accountIdQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParam"
- $ref: "#/components/parameters/scheduleIdQueryParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/SchedulesResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- schedules
/api/v1/schedules/{scheduleId}:
get:
summary: Get schedule by id
description: Returns schedule information based on the given schedule id
operationId: getSchedule
parameters:
- $ref: "#/components/parameters/scheduleIdPathParam"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Schedule"
400:
$ref: "#/components/responses/InvalidParameterError"
404:
$ref: "#/components/responses/NotFoundError"
tags:
- schedules
/api/v1/transactions:
get:
summary: List transactions
description: Lists transactions on the network. This includes successful and unsuccessful transactions.
operationId: getTransactions
parameters:
- $ref: "#/components/parameters/accountIdQueryParam"
- $ref: "#/components/parameters/limitQueryParam"
- $ref: "#/components/parameters/orderQueryParamDesc"
- $ref: "#/components/parameters/timestampQueryParam"
- $ref: "#/components/parameters/transactionTypeQueryParam"
- name: result
in: query
description: The transaction success type.
schema:
enum: [success, fail]
- name: type
in: query
description: The transaction account balance modification type.
schema:
enum: [credit, debit]
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/TransactionsResponse"
400:
$ref: "#/components/responses/InvalidParameterError"
tags:
- transactions
/api/v1/transactions/{transactionId}: