forked from multiversx/mx-chain-mainnet-config
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.toml
107 lines (82 loc) · 3.86 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
# 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/statistics will return statistics about the chain, such as the peak TPS
{ Name = "/statistics", 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 }
]
[APIPackages.address]
Routes = [
# /address/:address will return data about a given account
{ Name = "/:address", Open = true },
# /address/:address/balance will return the balance of a given account
{ Name = "/:address/balance", Open = true },
# /address/:address/key/:key will return the value of a key for a given account
{ Name = "/:address/key/:key", 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/config will return metrics related to current configuration of the network (number of shards,
# consensus group size and so on)
{ Name = "/config", 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 }
]
[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/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/:txhash will return the transaction in JSON format based on its hash
{ Name = "/: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 nonce
{ Name = "/by-hash/:hash", Open = true },
]