-
Notifications
You must be signed in to change notification settings - Fork 5
/
api.toml
315 lines (226 loc) · 15 KB
/
api.toml
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
# Logging holds settings related to api requests logging
[Logging]
# LoggingEnabled - if this flag is set to true, then if a requests exceeds a threshold or it is unsuccessful, then
# a log will be printed
LoggingEnabled = false
# ThresholdInMicroSeconds represents the maximum duration to consider a request as normal. Above this, if the LoggingEnabled
# flag is set to true, then a log will be printed
ThresholdInMicroSeconds = 1000
# API routes configuration
[APIPackages]
[APIPackages.node]
Routes = [
# /node/status will return all metrics stored inside a node
{ Name = "/status", Open = true },
# /node/metrics will return all metrics stored inside a node in the format that Prometheus expects them
{ Name = "/metrics", Open = true },
# /node/heartbeatstatus will return all heartbeats messages from the nodes in the network
{ Name = "/heartbeatstatus", Open = true },
# /node/p2pstatus will return the metrics related to p2p
{ Name = "/p2pstatus", Open = true },
# /node/debug will return the debug information after the query has been interpreted
{ Name = "/debug", Open = true },
# /node/peerinfo will return the p2p peer info of the provided pid
{ Name = "/peerinfo", Open = true },
# /node/epoch-start/:epoch will return the epoch start data for a given epoch
{ Name = "/epoch-start/:epoch", Open = true },
# /node/bootstrapstatus will return all metrics available during bootstrap
{ Name = "/bootstrapstatus", Open = true },
# /node/connected-peers-ratings will return the peers ratings
{ Name = "/connected-peers-ratings", Open = true },
# /node/managed-keys will return the keys managed by the node
{ Name = "/managed-keys", Open = true },
# /node/loaded-keys will return the keys loaded by the node
{ Name = "/loaded-keys", Open = true },
# /node/managed-keys/count will return the number of keys managed by the node
{ Name = "/managed-keys/count", Open = true },
# /node/managed-keys/eligible will return the eligible keys managed by the node on the current epoch
{ Name = "/managed-keys/eligible", Open = true },
# /node/managed-keys/waiting will return the waiting keys managed by the node on the current epoch
{ Name = "/managed-keys/waiting", Open = true },
# /waiting-epochs-left/:key will return the number of epochs left in waiting state for the provided key
{ Name = "/waiting-epochs-left/:key", Open = true }
]
[APIPackages.address]
Routes = [
# /address/:address will return data about a given account
{ Name = "/:address", Open = true },
# /address/bulk will return the state of the accounts provided in the bulk
{ Name = "/bulk", Open = true },
# /address/:address/balance will return the balance of a given account
{ Name = "/:address/balance", Open = true },
# /address/:address/username will return the username of a given account
{ Name = "/:address/username", Open = true },
# /address/:address/code-hash will return the code hash of a given account
{ Name = "/:address/code-hash", Open = true },
# /address/:address/keys will return all the key-value pairs of a given account
{ Name = "/:address/keys", Open = true },
# /address/:address/key/:key will return the value of a key for a given account
{ Name = "/:address/key/:key", Open = true },
# /:address/guardian-data will return the guardian data for the given account
{ Name = "/:address/guardian-data", Open = true},
# /address/:address/esdt will return the list of esdt tokens for a given account
{ Name = "/:address/esdt", Open = true },
# /:address/esdts/roles will return the list of esdt tokens and roles for a given account
{ Name = "/:address/esdts/roles", Open = true },
# /address/:address/esdt/:tokenIdentifier will return the balance for a given account and esdt tokenID
{ Name = "/:address/esdt/:tokenIdentifier", Open = true },
# /address/:address/nft/:tokenIdentifier/nonce/:nonce will return data of an nft esdt token for a given account, tokenID and nonce
{ Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true },
# /address/:address/esdts-with-role/:role will return the token identifiers with the given role for an address
{ Name = "/:address/esdts-with-role/:role", Open = true },
# /address/:address/registered-nfts will return the token identifiers of the tokens registered by the address
{ Name = "/:address/registered-nfts", Open = true },
# /address/:address/is-data-trie-migrated will return the status of the data trie migration for the given address
{ Name = "/:address/is-data-trie-migrated", Open = true }
]
[APIPackages.hardfork]
Routes = [
# /hardfork/trigger will receive a trigger request from the client and propagate it for processing
{ Name = "/trigger", Open = true }
]
[APIPackages.network]
Routes = [
# /network/status will return metrics related to current status of the chain (epoch, nonce, round)
{ Name = "/status", Open = true },
# /network/economics will return all economics related metrics
{ Name = "/economics", Open = true },
# /network/config will return metrics related to current configuration of the network (number of shards,
# consensus group size and so on)
{ Name = "/config", Open = true },
# /network/enable-epochs will return metrics related to activation epochs
{ Name = "/enable-epochs", Open = true },
# /network/esdts will return all the issued esdts on the protocol
{ Name = "/esdts", Open = true },
# /network/fungible-tokens will return all the issued fungible tokens on the protocol
{ Name = "/esdt/fungible-tokens", Open = true },
# /network/semi-fungible-tokens will return all the issued semi fungible tokens on the protocol
{ Name = "/esdt/semi-fungible-tokens", Open = true },
# /network/non-fungible-tokens will return all the issued non fungible tokens on the protocol
{ Name = "/esdt/non-fungible-tokens", Open = true },
# /network/esdt/supply/:token will return the supply for a given token
{ Name = "/esdt/supply/:token", Open = true },
# /network/direct-staked-info will return a list containing direct staked list of addresses
# and their staked values
{ Name = "/direct-staked-info", Open = true},
# /network/delegated-info will return a list containing delegated list of addresses
# and their staked values on the system delegation smart contracts
{ Name = "/delegated-info", Open = true},
# /network/ratings will return metrics related to ratings config
{ Name = "/ratings", Open = true },
# /network/genesis-nodes will return the genesis nodes public keys
{ Name = "/genesis-nodes", Open = true },
# /network/genesis-balances will return the balances minted at genesis
{ Name = "/genesis-balances", Open = true },
# /network/gas-configs will return currently scheduled gas configs
{ Name = "/gas-configs", Open = true }
]
[APIPackages.log]
Routes = [
# /log will handle sending the log information
{ Name = "/log", Open = true }
]
[APIPackages.validator]
Routes = [
# /validator/statistics will return a list of validators statistics for all validators
{ Name = "/statistics", Open = true },
# /validator/auction will return a list of nodes that are in the auction list
{ Name = "/auction", Open = true },
]
[APIPackages.vm-values]
Routes = [
# /vm-values/hex will return the data as bytes in hex format
{ Name = "/hex", Open = true },
# /vm-values/string will return the data in string format
{ Name = "/string", Open = true },
# /vm-values/int will return the data as big int
{ Name = "/int", Open = true },
# /vm-values/query will return the data in string format
{ Name = "/query", Open = true }
]
[APIPackages.transaction]
Routes = [
# /transaction/send will receive a single transaction in JSON format and will propagate it through the network
# if it's fields are valid. It will return the hash of the transaction
{ Name = "/send", Open = true },
# /transaction/simulate will receive a single transaction in JSON format and will simulate it's execution
# in order to check that it will be successfully executed when sending it for propagation
{ Name = "/simulate", Open = true },
# /transaction/send-multiple will receive an array of transactions in JSON format and will propagate through
# the network those whose fields are valid. It will return the number of valid transactions propagated
{ Name = "/send-multiple", Open = true },
# /transaction/cost will receive a single transaction in JSON format and will return the estimated cost of it
{ Name = "/cost", Open = true },
# /transaction/pool will return the hashes of the transactions that are currently in the pool
# /transaction/pool?fields=sender,receiver,gaslimit,gasprice will return hashes and all the optional fields mentioned that are currently in the pool
# /transaction/pool?by-sender=erd1... will return the hashes of the transactions that are currently in the pool for the sender
# /transaction/pool?by-sender=erd1...&fields=sender,receiver,gaslimit,gasprice will return the hashes and all the optional fields mentioned of the transactions that are currently in the pool for the sender
# /transaction/pool?by-sender=erd1...&last-nonce=true will return the last nonce for the sender from the pool
# /transaction/pool?by-sender=erd1...&nonce-gaps=true will return all nonce gaps for the sender from the pool, if applicable
{ Name = "/pool", Open = true },
# /transaction/:txhash will return the transaction in JSON format based on its hash
{ Name = "/:txhash", Open = true },
# /transaction/scrs-by-tx-hash/:txhash will return the smart contract results generated by the provided transaction hash
{ Name = "/scrs-by-tx-hash/:txhash", Open = true },
]
[APIPackages.block]
Routes = [
# /block/by-nonce/:nonce will return the block in JSON format based on its nonce
{ Name = "/by-nonce/:nonce", Open = true },
# /block/by-hash/:hash will return the block in JSON format based on its hash
{ Name = "/by-hash/:hash", Open = true },
# /block/by-round/:round will return the block in JSON format based on round
{ Name = "/by-round/:round", Open = true },
# /altered-accounts/by-nonce/:nonce will return the altered accounts of a block with the provided nonce
{ Name = "/altered-accounts/by-nonce/:nonce", Open = true },
# /altered-accounts/by-hash/:hash will return the altered accounts of a block with the provided hash
{ Name = "/altered-accounts/by-hash/:hash", Open = true }
]
[APIPackages.internal]
Routes = [
# /internal/raw/metablock/by-nonce/:nonce will return the meta block in raw format based on its nonce
{ Name = "/raw/metablock/by-nonce/:nonce", Open = true },
# /internal/raw/metablock/by-hash/:hash will return the meta block in raw format based on its hash
{ Name = "/raw/metablock/by-hash/:hash", Open = true },
# /internal/raw/metablock/by-round/:round will return the meta block in raw format based on round
{ Name = "/raw/metablock/by-round/:round", Open = true },
# /internal/raw/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in raw format based on epoch
{ Name = "/raw/startofepoch/metablock/by-epoch/:epoch", Open = true },
# /internal/raw/shardblock/by-nonce/:nonce will return the shard block in raw format based on its nonce
{ Name = "/raw/shardblock/by-nonce/:nonce", Open = true },
# /internal/raw/shardblock/by-hash/:hash will return the shard block in raw format based on its hash
{ Name = "/raw/shardblock/by-hash/:hash", Open = true },
# /internal/raw/shardblock/by-round/:round will return the shard block in raw format based on round
{ Name = "/raw/shardblock/by-round/:round", Open = true },
# /internal/json/metablock/by-round/:nonce will return the meta block in JSON format based on nonce
{ Name = "/json/metablock/by-nonce/:nonce", Open = true },
# /internal/json/metablock/by-round/:hash will return the meta block in JSON format based on hash
{ Name = "/json/metablock/by-hash/:hash", Open = true },
# /internal/json/metablock/by-round/:round will return the meta block in JSON format based on roud
{ Name = "/json/metablock/by-round/:round", Open = true },
# /internal/json/startofepoch/metablock/by-epoch/:epoch will return the start of epoch meta block in json format based on epoch
{ Name = "/json/startofepoch/metablock/by-epoch/:epoch", Open = true },
# /internal/json/shardblock/by-round/:nonce will return the shard block in JSON format based on nonce
{ Name = "/json/shardblock/by-nonce/:nonce", Open = true },
# /internal/json/shardblock/by-round/:hash will return the shard block in JSON format based on hash
{ Name = "/json/shardblock/by-hash/:hash", Open = true },
# /internal/json/shardblock/by-round/:round will return the shard block in JSON format based on round
{ Name = "/json/shardblock/by-round/:round", Open = true },
# /internal/raw/miniblock/by-hash/:hash will return the miniblock in raw format based on hash for a specified epoch
{ Name = "/raw/miniblock/by-hash/:hash/epoch/:epoch", Open = true },
# /internal/json/miniblock/by-hash/:hash will return the miniblock in JSON format based on hash for a specified epoch
{ Name = "/json/miniblock/by-hash/:hash/epoch/:epoch", Open = true },
# /internal/raw/startofepoch/validators/by-epoch/:epoch will return the start of epoch validators info in json format based on epoch
{ Name = "/json/startofepoch/validators/by-epoch/:epoch", Open = true }
]
[APIPackages.proof]
Routes = [
# /proof/root-hash/:roothash/address/:address will compute and return the proof in JSON format
{ Name = "/root-hash/:roothash/address/:address", Open = true },
# /proof/root-hash/:roothash/address/:address/key/:key will compute and return the proof in JSON format
{ Name = "/root-hash/:roothash/address/:address/key/:key", Open = true },
# /proof/address/:address will compute and return the proof and root hash in JSON format
{ Name = "/address/:address", Open = true },
# /proof/verify will return the response from Merkle proof verification in JSON format
{ Name = "/verify", Open = true },
]