-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.ts
313 lines (312 loc) · 9.6 KB
/
constant.ts
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
import { AddressEventNotificationChain, Chain, Network } from '../dto'
export const Constant = {
WEB5JS_API_URL: {
V3: 'https://api.tatum.io/v3/',
V4: 'https://api.tatum.io/v4/',
},
NETWORK: {
ChainMapInverse: {
[AddressEventNotificationChain.ETH]: Chain.Ethereum,
[AddressEventNotificationChain.SOL]: Chain.Solana,
[AddressEventNotificationChain.MATIC]: Chain.Polygon,
[AddressEventNotificationChain.CELO]: Chain.Celo,
[AddressEventNotificationChain.KLAY]: Chain.Klaytn,
[AddressEventNotificationChain.BTC]: Chain.Bitcoin,
[AddressEventNotificationChain.LTC]: Chain.Litecoin,
[AddressEventNotificationChain.BCH]: Chain.BitcoinCash,
[AddressEventNotificationChain.DOGE]: Chain.Dogecoin,
[AddressEventNotificationChain.TRON]: Chain.Tron,
[AddressEventNotificationChain.BSC]: Chain.BinanceSmartChain,
[AddressEventNotificationChain.FLR]: Chain.Flare,
},
},
DECIMALS: {
[Network.BITCOIN]: 8,
[Network.BITCOIN_TESTNET]: 8,
[Network.MULTIVERSX]: 18,
[Network.MULTIVERSX_TESTNET]: 18,
[Network.NEAR]: 24,
[Network.NEAR_TESTNET]: 24,
[Network.BITCOIN_CASH]: 8,
[Network.BITCOIN_CASH_TESTNET]: 8,
[Network.LITECOIN]: 8,
[Network.LITECOIN_TESTNET]: 8,
[Network.DOGECOIN]: 8,
[Network.DOGECOIN_TESTNET]: 8,
[Network.ZCASH]: 8,
[Network.ZCASH_TESTNET]: 8,
[Network.ETHEREUM]: 18,
[Network.ETHEREUM_SEPOLIA]: 18,
[Network.ETHEREUM_HOLESKY]: 18,
[Network.POLYGON]: 18,
[Network.POLYGON_MUMBAI]: 18,
[Network.CELO]: 18,
[Network.CELO_ALFAJORES]: 18,
[Network.SOLANA]: 9,
[Network.SOLANA_DEVNET]: 9,
[Network.XRP]: 6,
[Network.XRP_TESTNET]: 6,
[Network.KLAYTN]: 18,
[Network.KLAYTN_BAOBAB]: 18,
[Network.TRON]: 6,
[Network.TRON_SHASTA]: 6,
[Network.BINANCE_SMART_CHAIN]: 18,
[Network.BINANCE_SMART_CHAIN_TESTNET]: 18,
[Network.AVALANCHE_C]: 18,
[Network.AVALANCHE_C_TESTNET]: 18,
[Network.AVALANCHE_P]: 18,
[Network.AVALANCHE_P_TESTNET]: 18,
[Network.AVALANCHE_X]: 18,
[Network.AVALANCHE_X_TESTNET]: 18,
[Network.FANTOM]: 18,
[Network.FANTOM_TESTNET]: 18,
[Network.HARMONY_ONE_SHARD_0]: 18,
[Network.HARMONY_ONE_TESTNET_SHARD_0]: 18,
[Network.ALGORAND_ALGOD]: 6,
[Network.ALGORAND_ALGOD_TESTNET]: 6,
[Network.ALGORAND_INDEXER]: 6,
[Network.ALGORAND_INDEXER_TESTNET]: 6,
[Network.ARBITRUM_ONE]: 18,
[Network.ARBITRUM_NOVA_TESTNET]: 18,
[Network.ARBITRUM_NOVA]: 18,
[Network.AURORA]: 18,
[Network.AURORA_TESTNET]: 18,
[Network.CARDANO_ROSETTA]: 6,
[Network.CARDANO_ROSETTA_PREPROD]: 6,
[Network.GNOSIS]: 18,
[Network.GNOSIS_TESTNET]: 18,
[Network.FLOW]: 8,
[Network.FLOW_TESTNET]: 8,
[Network.CRONOS]: 18,
[Network.CRONOS_TESTNET]: 18,
[Network.KUCOIN]: 18,
[Network.KUCOIN_TESTNET]: 18,
[Network.ETHEREUM_CLASSIC]: 18,
[Network.EOS]: 4,
[Network.HORIZEN_EON]: 18,
[Network.HORIZEN_EON_GOBI]: 18,
[Network.EOS_TESTNET]: 4,
[Network.TEZOS]: 6,
[Network.TEZOS_TESTNET]: 6,
[Network.STELLAR]: 6,
[Network.STELLAR_TESTNET]: 6,
[Network.OASIS]: 18,
[Network.OASIS_TESTNET]: 18,
[Network.OPTIMISM]: 18,
[Network.OPTIMISM_TESTNET]: 18,
[Network.PALM]: 18,
[Network.PALM_TESTNET]: 18,
[Network.POLKADOT]: 18,
[Network.POLKADOT_TESTNET]: 18,
[Network.RSK]: 18,
[Network.RSK_TESTNET]: 18,
[Network.VECHAIN]: 18,
[Network.VECHAIN_TESTNET]: 18,
[Network.XINFIN]: 18,
[Network.XINFIN_TESTNET]: 18,
[Network.ZILLIQA]: 12,
[Network.ZILLIQA_TESTNET]: 12,
[Network.FLARE]: 18,
[Network.FLARE_COSTON]: 18,
[Network.FLARE_COSTON_2]: 18,
[Network.FLARE_SONGBIRD]: 18,
[Network.HAQQ]: 18,
[Network.HAQQ_TESTNET]: 18,
[Network.CHILIZ]: 18,
[Network.BNB]: 18,
},
CURRENCY_NAMES: {
[Network.BITCOIN]: 'BTC',
[Network.BITCOIN_TESTNET]: 'BTC',
[Network.NEAR]: 'NEAR',
[Network.NEAR_TESTNET]: 'NEAR',
[Network.MULTIVERSX]: 'EGLD',
[Network.MULTIVERSX_TESTNET]: 'EGLD',
[Network.BITCOIN_CASH]: 'BCH',
[Network.BITCOIN_CASH_TESTNET]: 'BCH',
[Network.LITECOIN]: 'LTC',
[Network.LITECOIN_TESTNET]: 'LTC',
[Network.DOGECOIN]: 'DOGE',
[Network.DOGECOIN_TESTNET]: 'DOGE',
[Network.ZCASH]: 'ZEC',
[Network.ZCASH_TESTNET]: 'ZEC',
[Network.ETHEREUM]: 'ETH',
[Network.ETHEREUM_SEPOLIA]: 'ETH',
[Network.ETHEREUM_HOLESKY]: 'ETH',
[Network.POLYGON]: 'MATIC',
[Network.POLYGON_MUMBAI]: 'MATIC',
[Network.CELO]: 'CELO',
[Network.CELO_ALFAJORES]: 'CELO',
[Network.SOLANA]: 'SOL',
[Network.SOLANA_DEVNET]: 'SOL',
[Network.XRP]: 'XRP',
[Network.XRP_TESTNET]: 'XRP',
[Network.KLAYTN]: 'KLAY',
[Network.KLAYTN_BAOBAB]: 'KLAY',
[Network.TRON]: 'TRX',
[Network.TRON_SHASTA]: 'TRX',
[Network.BINANCE_SMART_CHAIN]: 'BNB',
[Network.BINANCE_SMART_CHAIN_TESTNET]: 'BNB',
[Network.AVALANCHE_C]: 'AVAX',
[Network.AVALANCHE_C_TESTNET]: 'AVAX',
[Network.AVALANCHE_P]: 'AVAX',
[Network.AVALANCHE_P_TESTNET]: 'AVAX',
[Network.AVALANCHE_X]: 'AVAX',
[Network.AVALANCHE_X_TESTNET]: 'AVAX',
[Network.FANTOM]: 'FTM',
[Network.FANTOM_TESTNET]: 'FTM',
[Network.HARMONY_ONE_SHARD_0]: 'ONE',
[Network.HARMONY_ONE_TESTNET_SHARD_0]: 'ONE',
[Network.ALGORAND_ALGOD]: 'ALGO',
[Network.ALGORAND_ALGOD_TESTNET]: 'ALGO',
[Network.ALGORAND_INDEXER]: 'ALGO',
[Network.ALGORAND_INDEXER_TESTNET]: 'ALGO',
[Network.ARBITRUM_ONE]: 'ARB',
[Network.ARBITRUM_NOVA_TESTNET]: 'ARB',
[Network.ARBITRUM_NOVA]: 'ARB',
[Network.AURORA]: 'AURA',
[Network.AURORA_TESTNET]: 'AURA',
[Network.CARDANO_ROSETTA]: 'ADA',
[Network.CARDANO_ROSETTA_PREPROD]: 'ADA',
[Network.GNOSIS]: 'GNO',
[Network.GNOSIS_TESTNET]: 'GNO',
[Network.FLOW]: 'FLOW',
[Network.FLARE]: 'FLARE',
[Network.FLARE_COSTON]: 'FLARE',
[Network.FLARE_COSTON_2]: 'FLARE',
[Network.FLARE_SONGBIRD]: 'FLARE',
[Network.FLOW_TESTNET]: 'FLOW',
[Network.CRONOS]: 'CRO',
[Network.CRONOS_TESTNET]: 'CRO',
[Network.KUCOIN]: 'KCS',
[Network.KUCOIN_TESTNET]: 'KCS',
[Network.ETHEREUM_CLASSIC]: 'ETC',
[Network.EOS]: 'EOS',
[Network.HORIZEN_EON]: 'EON',
[Network.HORIZEN_EON_GOBI]: 'EON',
[Network.EOS_TESTNET]: 'EOS',
[Network.TEZOS]: 'XTZ',
[Network.TEZOS_TESTNET]: 'XTZ',
[Network.STELLAR]: 'XLM',
[Network.STELLAR_TESTNET]: 'XLM',
[Network.OASIS]: 'ROSE',
[Network.OASIS_TESTNET]: 'ROSE',
[Network.OPTIMISM]: 'OPT',
[Network.OPTIMISM_TESTNET]: 'OPT',
[Network.PALM]: 'PALM',
[Network.PALM_TESTNET]: 'PALM',
[Network.POLKADOT]: 'DOT',
[Network.POLKADOT_TESTNET]: 'DOT',
[Network.RSK]: 'RBTC',
[Network.RSK_TESTNET]: 'RBTC',
[Network.VECHAIN]: 'VET',
[Network.VECHAIN_TESTNET]: 'VET',
[Network.XINFIN]: 'XDC',
[Network.XINFIN_TESTNET]: 'XDC',
[Network.ZILLIQA]: 'ZIL',
[Network.ZILLIQA_TESTNET]: 'ZIL',
[Network.HAQQ]: 'HAQQ',
[Network.HAQQ_TESTNET]: 'HAQQ',
[Network.CHILIZ]: 'CHILIZ',
[Network.BNB]: 'BNB',
},
RPC: {
MAINNETS: [
Network.ALGORAND_ALGOD,
Network.ARBITRUM_NOVA,
Network.ARBITRUM_ONE,
Network.AURORA,
Network.AVALANCHE_C,
Network.AVALANCHE_P,
Network.AVALANCHE_X,
Network.BINANCE_SMART_CHAIN,
Network.BITCOIN,
Network.BITCOIN_CASH,
Network.CARDANO_ROSETTA,
Network.CELO,
Network.CRONOS,
Network.DOGECOIN,
Network.EOS,
Network.ETHEREUM,
Network.ETHEREUM_CLASSIC,
Network.FANTOM,
Network.FLOW,
Network.GNOSIS,
Network.HARMONY_ONE_SHARD_0,
Network.KLAYTN,
Network.KUCOIN,
Network.LITECOIN,
Network.MULTIVERSX,
Network.NEAR,
Network.OASIS,
Network.OPTIMISM,
Network.PALM,
Network.POLYGON,
Network.POLKADOT,
Network.RSK,
Network.SOLANA,
Network.STELLAR,
Network.TEZOS,
Network.TRON,
Network.VECHAIN,
Network.XINFIN,
Network.XRP,
Network.ZCASH,
Network.ZILLIQA,
Network.CHILIZ,
],
TESTNETS: [
Network.ALGORAND_ALGOD_TESTNET,
Network.ARBITRUM_NOVA_TESTNET,
Network.AURORA_TESTNET,
Network.AVALANCHE_C_TESTNET,
Network.AVALANCHE_P_TESTNET,
Network.AVALANCHE_X_TESTNET,
Network.BINANCE_SMART_CHAIN_TESTNET,
Network.BITCOIN_TESTNET,
Network.BITCOIN_CASH_TESTNET,
Network.CARDANO_ROSETTA_PREPROD,
Network.CELO_ALFAJORES,
Network.CRONOS_TESTNET,
Network.DOGECOIN_TESTNET,
Network.ETHEREUM_SEPOLIA,
Network.ETHEREUM_HOLESKY,
Network.EOS_TESTNET,
Network.FANTOM_TESTNET,
Network.FLOW_TESTNET,
Network.GNOSIS_TESTNET,
Network.HARMONY_ONE_TESTNET_SHARD_0,
Network.KLAYTN_BAOBAB,
Network.KUCOIN_TESTNET,
Network.LITECOIN_TESTNET,
Network.MULTIVERSX_TESTNET,
Network.NEAR_TESTNET,
Network.OASIS_TESTNET,
Network.OPTIMISM_TESTNET,
Network.PALM_TESTNET,
Network.POLYGON_MUMBAI,
Network.POLKADOT_TESTNET,
Network.RSK_TESTNET,
Network.SOLANA_DEVNET,
Network.TEZOS_TESTNET,
Network.TRON_SHASTA,
Network.VECHAIN_TESTNET,
Network.XINFIN_TESTNET,
Network.XRP_TESTNET,
Network.ZCASH_TESTNET,
Network.ZILLIQA_TESTNET,
Network.HORIZEN_EON_GOBI,
],
METHOD_PREFIX: 'eth_',
},
OPEN_RPC: {
LB_INTERVAL: 60_000,
ALLOWED_BLOCKS_BEHIND: 10,
},
TRON_SHASTA_BASE_URL: {
BASE: 'https://api.shasta.trongrid.io',
RPC: 'https://api.shasta.trongrid.io/jsonrpc',
},
EOS_PREFIX: 'v1/chain/',
BEACON_PREFIX: '/eth/v1/beacon',
}