forked from tendermint/tendermint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
2981 lines (2953 loc) · 94.7 KB
/
swagger.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.0
info:
title: RPC client for Tendermint
description: A REST interface for state queries, transaction generation and broadcasting.
version: "Master"
license:
name: Apache 2.0
url: https://github.com/tendermint/tendermint/blob/master/LICENSE
servers:
- url: https://rpc.cosmos.network
description: Cosmos mainnet node to interact with the Tendermint RPC
- url: http://localhost:26657
description: Interact with the Tendermint RPC locally on your device
tags:
- name: Websocket
description: Subscribe/unsubscribe are reserved for websocket events.
- name: Info
description: Informations about the node APIs
- name: Tx
description: Transactions broadcast APIs
- name: ABCI
description: ABCI APIs
- name: Evidence
description: Evidence APIs
paths:
/broadcast_tx_sync:
get:
summary: Returns with the response from CheckTx. Does not wait for DeliverTx result.
tags:
- Tx
operationId: broadcast_tx_sync
description: |
If you want to be sure that the transaction is included in a block, you can
subscribe for the result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
If you haven't received anything after a couple of blocks, resend it. If the
same happens again, send it to some other node. A few reasons why it could
happen:
1. malicious node can drop or pretend it had committed your tx
2. malicious proposer (not necessary the one you're communicating with) can
drop transactions, which might become valid in the future
(https://github.com/tendermint/tendermint/issues/3322)
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
name: tx
required: true
schema:
type: string
example: "456"
description: The transaction
responses:
200:
description: Empty
content:
application/json:
schema:
$ref: "#/components/schemas/BroadcastTxResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/broadcast_tx_async:
get:
summary: Returns right away, with no response. Does not wait for CheckTx nor DeliverTx results.
tags:
- Tx
operationId: broadcast_tx_async
description: |
If you want to be sure that the transaction is included in a block, you can
subscribe for the result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
If you haven't received anything after a couple of blocks, resend it. If the
same happens again, send it to some other node. A few reasons why it could
happen:
1. malicious node can drop or pretend it had committed your tx
2. malicious proposer (not necessary the one you're communicating with) can
drop transactions, which might become valid in the future
(https://github.com/tendermint/tendermint/issues/3322)
3. node can be offline
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
name: tx
required: true
schema:
type: string
example: "123"
description: The transaction
responses:
200:
description: empty answer
content:
application/json:
schema:
$ref: "#/components/schemas/BroadcastTxResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/broadcast_tx_commit:
get:
summary: Returns with the responses from CheckTx and DeliverTx.
tags:
- Tx
operationId: broadcast_tx_commit
description: |
IMPORTANT: use only for testing and development. In production, use
BroadcastTxSync or BroadcastTxAsync. You can subscribe for the transaction
result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout
waiting for tx to commit.
If CheckTx or DeliverTx fail, no error will be returned, but the returned result
will contain a non-OK ABCI code.
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
name: tx
required: true
schema:
type: string
example: "785"
description: The transaction
responses:
200:
description: empty answer
content:
application/json:
schema:
$ref: "#/components/schemas/BroadcastTxCommitResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/subscribe:
get:
summary: Subscribe for events via WebSocket.
tags:
- Websocket
operationId: subscribe
description: |
To tell which events you want, you need to provide a query. query is a
string, which has a form: "condition AND condition ..." (no OR at the
moment). condition has a form: "key operation operand". key is a string with
a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS" AND "EXISTS". operand
can be a string (escaped with single quotes), number, date or time.
Examples:
tm.event = 'NewBlock' # new blocks
tm.event = 'CompleteProposal' # node got a complete proposal
tm.event = 'Tx' AND tx.hash = 'XYZ' # single transaction
tm.event = 'Tx' AND tx.height = 5 # all txs of the fifth block
tx.height = 5 # all txs of the fifth block
Tendermint provides a few predefined keys: tm.event, tx.hash and tx.height.
Note for transactions, you can define additional keys by providing events with
DeliverTx response.
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/pubsub/query"
)
abci.ResponseDeliverTx{
Events: []abci.Event{
{
Type: "rewards.withdraw",
Attributes: kv.Pairs{
kv.Pair{Key: []byte("address"), Value: []byte("AddrA")},
kv.Pair{Key: []byte("source"), Value: []byte("SrcX")},
kv.Pair{Key: []byte("amount"), Value: []byte("...")},
kv.Pair{Key: []byte("balance"), Value: []byte("...")},
},
},
{
Type: "rewards.withdraw",
Attributes: kv.Pairs{
kv.Pair{Key: []byte("address"), Value: []byte("AddrB")},
kv.Pair{Key: []byte("source"), Value: []byte("SrcY")},
kv.Pair{Key: []byte("amount"), Value: []byte("...")},
kv.Pair{Key: []byte("balance"), Value: []byte("...")},
},
},
{
Type: "transfer",
Attributes: kv.Pairs{
kv.Pair{Key: []byte("sender"), Value: []byte("AddrC")},
kv.Pair{Key: []byte("recipient"), Value: []byte("AddrD")},
kv.Pair{Key: []byte("amount"), Value: []byte("...")},
},
},
},
}
All events are indexed by a composite key of the form {eventType}.{evenAttrKey}.
In the above examples, the following keys would be indexed:
- rewards.withdraw.address
- rewards.withdraw.source
- rewards.withdraw.amount
- rewards.withdraw.balance
- transfer.sender
- transfer.recipient
- transfer.amount
Multiple event types with duplicate keys are allowed and are meant to
categorize unique and distinct events. In the above example, all events
indexed under the key `rewards.withdraw.address` will have the following
values stored and queryable:
- AddrA
- AddrB
To create a query for txs where address AddrA withdrew rewards:
query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrA'")
To create a query for txs where address AddrA withdrew rewards from source Y:
query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrA' AND rewards.withdraw.source = 'Y'")
To create a query for txs where AddrA transferred funds:
query.MustParse("tm.event = 'Tx' AND transfer.sender = 'AddrA'")
The following queries would return no results:
query.MustParse("tm.event = 'Tx' AND transfer.sender = 'AddrZ'")
query.MustParse("tm.event = 'Tx' AND rewards.withdraw.address = 'AddrZ'")
query.MustParse("tm.event = 'Tx' AND rewards.withdraw.source = 'W'")
See list of all possible events here
https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants
For complete query syntax, check out
https://godoc.org/github.com/tendermint/tendermint/libs/pubsub/query.
```go
import "github.com/tendermint/tendermint/types"
client := client.NewHTTP("tcp:0.0.0.0:26657", "/websocket")
err := client.Start()
if err != nil {
handle error
}
defer client.Stop()
ctx, cancel := context.WithTimeout(context.Background(), 1 * time.Second)
defer cancel()
query := "tm.event = 'Tx' AND tx.height = 3"
txs, err := client.Subscribe(ctx, "test-client", query)
if err != nil {
handle error
}
go func() {
for e := range txs {
fmt.Println("got ", e.Data.(types.EventDataTx))
}
}()
```
parameters:
- in: query
name: query
required: true
schema:
type: string
example: tm.event = 'Tx' AND tx.height = 5
description: |
query is a string, which has a form: "condition AND condition ..." (no OR at the
moment). condition has a form: "key operation operand". key is a string with
a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a
string (escaped with single quotes), number, date or time.
responses:
200:
description: empty answer
content:
application/json:
schema:
$ref: "#/components/schemas/EmptyResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/unsubscribe:
get:
summary: Unsubscribe from event on Websocket
tags:
- Websocket
operationId: unsubscribe
description: |
```go
client := client.NewHTTP("tcp:0.0.0.0:26657", "/websocket")
err := client.Start()
if err != nil {
handle error
}
defer client.Stop()
query := "tm.event = 'Tx' AND tx.height = 3"
err = client.Unsubscribe(context.Background(), "test-client", query)
if err != nil {
handle error
}
```
parameters:
- in: query
name: query
required: true
schema:
type: string
example: tm.event = 'Tx' AND tx.height = 5
description: |
query is a string, which has a form: "condition AND condition ..." (no OR at the
moment). condition has a form: "key operation operand". key is a string with
a restricted set of possible symbols ( \t\n\r\\()"'=>< are not allowed).
operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a
string (escaped with single quotes), number, date or time.
responses:
200:
description: Answer
content:
application/json:
schema:
$ref: "#/components/schemas/EmptyResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/unsubscribe_all:
get:
summary: Unsubscribe from all events via WebSocket
tags:
- Websocket
operationId: unsubscribe_all
description: |
Unsubscribe from all events via WebSocket
responses:
200:
description: empty answer
content:
application/json:
schema:
$ref: "#/components/schemas/EmptyResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/health:
get:
summary: Node heartbeat
tags:
- Info
operationId: health
description: |
Get node health. Returns empty result (200 OK) on success, no response - in case of an error.
responses:
200:
description: Gets Node Health
content:
application/json:
schema:
$ref: "#/components/schemas/EmptyResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/status:
get:
summary: Node Status
operationId: status
tags:
- Info
description: |
Get Tendermint status including node info, pubkey, latest block hash, app hash, block height and time.
responses:
200:
description: Status of the node
content:
application/json:
schema:
$ref: "#/components/schemas/StatusResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/net_info:
get:
summary: Network informations
operationId: net_info
tags:
- Info
description: |
Get network info.
responses:
200:
description: empty answer
content:
application/json:
schema:
$ref: "#/components/schemas/NetInfoResponse"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/dial_seeds:
post:
summary: Dial Seeds (Unsafe)
operationId: dial_seeds
tags:
- unsafe
description: |
Dial a peer, this route in under unsafe, and has to manually enabled to use
parameters:
- description: string of possible peers
in: body
name: Array of peers to connect to
required: true
schema:
$ref: "#/components/schemas/dialSeedsPost"
responses:
200:
description: Dialing seeds in progress. See /net_info for details
content:
application/json:
schema:
$ref: "#/components/schemas/dialResp"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/dial_peers:
post:
summary: Add Peers/Persistent Peers (unsafe)
operationId: dial_peers
tags:
- unsafe
description: |
Set a persistent peer, this route in under unsafe, and has to manually enabled to use
parameters:
- description: string of possible peers, bool argument if they should be added as persistent
in: body
name: Array of peers to connect to & if they should be persistent
required: true
schema:
$ref: "#/components/schemas/dialPeersPost"
responses:
200:
description: Dialing seeds in progress. See /net_info for details
content:
application/json:
schema:
$ref: "#/components/schemas/dialResp"
500:
description: empty error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/blockchain:
get:
summary: Get block headers for minHeight <= height <= maxHeight.
operationId: blockchain
parameters:
- in: query
name: minHeight
description: Minimum block height to return
schema:
type: number
example: 1
- in: query
name: maxHeight
description: Maximum block height to return
schema:
type: number
example: 2
tags:
- Info
description: |
Get Blockchain info.
responses:
200:
description: Block headers, returned in descending order (highest first).
content:
application/json:
schema:
$ref: "#/components/schemas/BlockchainResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/block:
get:
summary: Get block at a specified height
operationId: block
parameters:
- in: query
name: height
schema:
type: number
default: 0
example: 1
description: height to return. If no height is provided, it will fetch the latest block.
tags:
- Info
description: |
Get Block.
responses:
200:
description: Block informations.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/block_by_hash:
get:
summary: Get block by hash
operationId: block_by_hash
parameters:
- in: query
name: hash
description: block hash
required: true
schema:
type: string
example: "0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"
tags:
- Info
description: |
Get Block By Hash.
responses:
200:
description: Block informations.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/block_results:
get:
summary: Get block results at a specified height
operationId: block_results
parameters:
- in: query
name: height
description: height to return. If no height is provided, it will fetch informations regarding the latest block.
schema:
type: number
default: 0
example: 1
tags:
- Info
description: |
Get block_results.
responses:
200:
description: Block results.
content:
application/json:
schema:
$ref: "#/components/schemas/BlockResultsResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/commit:
get:
summary: Get commit results at a specified height
operationId: commit
parameters:
- in: query
name: height
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block.
schema:
type: number
default: 0
example: 1
tags:
- Info
description: |
Get Commit.
responses:
200:
description: Commit results.
content:
application/json:
schema:
$ref: "#/components/schemas/CommitResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/validators:
get:
summary: Get validator set at a specified height
operationId: validators
parameters:
- in: query
name: height
description: height to return. If no height is provided, it will fetch validator set which corresponds to the latest block.
schema:
type: number
default: 0
example: 1
- in: query
name: page
description: "Page number (1-based)"
required: false
schema:
type: number
default: 0
example: 1
- in: query
name: per_page
description: "Number of entries per page (max: 100)"
required: false
schema:
type: number
example: 30
default: 30
tags:
- Info
description: |
Get Validators.
responses:
200:
description: Commit results.
content:
application/json:
schema:
$ref: "#/components/schemas/ValidatorsResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/genesis:
get:
summary: Get Genesis
operationId: genesis
tags:
- Info
description: |
Get genesis.
responses:
200:
description: Genesis results.
content:
application/json:
schema:
$ref: "#/components/schemas/GenesisResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/dump_consensus_state:
get:
summary: Get consensus state
operationId: dump_consensus_state
tags:
- Info
description: |
Get consensus state.
responses:
200:
description: consensus state results.
content:
application/json:
schema:
$ref: "#/components/schemas/DumpConsensusResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/consensus_state:
get:
summary: Get consensus state
operationId: consensus_state
tags:
- Info
description: |
Get consensus state.
responses:
200:
description: consensus state results.
content:
application/json:
schema:
$ref: "#/components/schemas/ConsensusStateResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/consensus_params:
get:
summary: Get consensus parameters
operationId: consensus_params
parameters:
- in: query
name: height
description: height to return. If no height is provided, it will fetch commit informations regarding the latest block.
schema:
type: number
default: 0
example: 1
tags:
- Info
description: |
Get consensus parameters.
responses:
200:
description: consensus parameters results.
content:
application/json:
schema:
$ref: "#/components/schemas/ConsensusParamsResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/unconfirmed_txs:
get:
summary: Get the list of unconfirmed transactions
operationId: unconfirmed_txs
parameters:
- in: query
name: limit
description: Maximum number of unconfirmed transactions to return
schema:
type: number
example: 1
tags:
- Info
description: |
Get list of unconfirmed transactions
responses:
200:
description: List of unconfirmed transactions
content:
application/json:
schema:
$ref: "#/components/schemas/UnconfirmedTransactionsResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/num_unconfirmed_txs:
get:
summary: Get data about unconfirmed transactions
operationId: num_unconfirmed_txs
tags:
- Info
description: |
Get data about unconfirmed transactions
responses:
200:
description: status about unconfirmed transactions
content:
application/json:
schema:
$ref: "#/components/schemas/NumUnconfirmedTransactionsResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/tx_search:
get:
summary: Search for transactions
operationId: tx_search
parameters:
- in: query
name: query
description: Query
required: true
schema:
type: string
example: "tx.height=1000"
- in: query
name: prove
description: Include proofs of the transactions inclusion in the block
required: false
schema:
type: boolean
default: false
example: true
- in: query
name: page
description: "Page number (1-based)"
required: false
schema:
type: number
default: 1
example: 1
- in: query
name: per_page
description: "Number of entries per page (max: 100)"
required: false
schema:
type: number
default: 30
example: 30
- in: query
name: order_by
description: Order in which transactions are sorted ("asc" or "desc"), by height & index. If empty, default sorting will be still applied.
required: false
schema:
type: string
default: "asc"
example: "asc"
tags:
- Info
description: |
Get list of unconfirmed transactions
responses:
200:
description: List of unconfirmed transactions
content:
application/json:
schema:
$ref: "#/components/schemas/TxSearchResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/tx:
get:
summary: Get transactions by hash
operationId: tx
parameters:
- in: query
name: hash
description: transaction Hash to retrive
required: true
schema:
type: string
example: "0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"
- in: query
name: prove
description: Include proofs of the transactions inclusion in the block
required: false
schema:
type: boolean
example: true
default: false
tags:
- Info
description: |
Get a trasasction
responses:
200:
description: Get a transaction`
content:
application/json:
schema:
$ref: "#/components/schemas/TxResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/abci_info:
get:
summary: Get some info about the application.
operationId: abci_info
tags:
- ABCI
description: |
Get some info about the application.
responses:
200:
description: Get some info about the application.
content:
application/json:
schema:
$ref: "#/components/schemas/ABCIInfoResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/abci_query:
get:
summary: Query the application for some information.
operationId: abci_query
parameters:
- in: query
name: path
description: Path to the data ("/a/b/c")
required: true
schema:
type: string
example: "/a/b/c"
- in: query
name: data
description: Data
required: true
schema:
type: string
example: "IHAVENOIDEA"
- in: query
name: height
description: Height (0 means latest)
required: false
schema:
type: number
example: 1
default: 0
- in: query
name: prove
description: Include proofs of the transactions inclusion in the block
required: false
schema:
type: boolean
example: true
default: false
tags:
- ABCI
description: |
Query the application for some information.
responses:
200:
description: Response of the submitted query
content:
application/json:
schema:
$ref: "#/components/schemas/ABCIQueryResponse"
500:
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/broadcast_evidence:
get:
summary: Broadcast evidence of the misbehavior.
operationId: broadcast_evidence