@swapkit/types 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ import { Chain, ChainId, StagenetChain } from "./_enums";
2
+ export * from "./_enums";
1
3
  export * from "./cosmos";
2
4
  export * from "./evm";
3
5
  export * from "./others";
@@ -6,8 +8,9 @@ export * from "./utxo";
6
8
  export declare const AllChainConfigs: (({
7
9
  readonly baseDecimal: 6;
8
10
  readonly blockExplorerUrl: "https://www.mintscan.io/cosmos";
9
- readonly chain: "GAIA";
10
- readonly chainId: "cosmoshub-4";
11
+ readonly blockTime: 2;
12
+ readonly chain: Chain.Cosmos;
13
+ readonly chainId: ChainId.GAIA;
11
14
  readonly explorerUrl: "https://www.mintscan.io/cosmos";
12
15
  readonly name: "Cosmos";
13
16
  readonly nativeCurrency: "ATOM";
@@ -18,8 +21,9 @@ export declare const AllChainConfigs: (({
18
21
  }) | ({
19
22
  readonly baseDecimal: 8;
20
23
  readonly blockExplorerUrl: "https://runescan.io";
21
- readonly chain: "THOR";
22
- readonly chainId: "thorchain-1";
24
+ readonly blockTime: 6;
25
+ readonly chain: Chain.THORChain;
26
+ readonly chainId: ChainId.THOR;
23
27
  readonly explorerUrl: "https://runescan.io";
24
28
  readonly name: "THORChain";
25
29
  readonly nativeCurrency: "RUNE";
@@ -30,8 +34,9 @@ export declare const AllChainConfigs: (({
30
34
  }) | ({
31
35
  readonly baseDecimal: 8;
32
36
  readonly blockExplorerUrl: "https://www.mayascan.org";
33
- readonly chain: "MAYA";
34
- readonly chainId: "mayachain-mainnet-v1";
37
+ readonly blockTime: 6;
38
+ readonly chain: Chain.Maya;
39
+ readonly chainId: ChainId.MAYA;
35
40
  readonly explorerUrl: "https://www.mayascan.org";
36
41
  readonly name: "Maya";
37
42
  readonly nativeCurrency: "CACAO";
@@ -42,8 +47,9 @@ export declare const AllChainConfigs: (({
42
47
  }) | ({
43
48
  readonly baseDecimal: 6;
44
49
  readonly blockExplorerUrl: "https://finder.kujira.network/kaiyo-1";
45
- readonly chain: "KUJI";
46
- readonly chainId: "kaiyo-1";
50
+ readonly blockTime: 2.2;
51
+ readonly chain: Chain.Kujira;
52
+ readonly chainId: ChainId.KUJI;
47
53
  readonly explorerUrl: "https://finder.kujira.network/kaiyo-1";
48
54
  readonly name: "Kujira";
49
55
  readonly nativeCurrency: "KUJI";
@@ -54,8 +60,9 @@ export declare const AllChainConfigs: (({
54
60
  }) | ({
55
61
  readonly baseDecimal: 6;
56
62
  readonly blockExplorerUrl: "https://www.mintscan.io/noble";
57
- readonly chain: "NOBLE";
58
- readonly chainId: "noble-1";
63
+ readonly blockTime: 1.3;
64
+ readonly chain: Chain.Noble;
65
+ readonly chainId: ChainId.NOBLE;
59
66
  readonly explorerUrl: "https://www.mintscan.io/noble";
60
67
  readonly name: "Noble";
61
68
  readonly nativeCurrency: "USDC";
@@ -66,8 +73,9 @@ export declare const AllChainConfigs: (({
66
73
  }) | ({
67
74
  readonly baseDecimal: 18;
68
75
  readonly blockExplorerUrl: "https://etherscan.io";
69
- readonly chain: "ETH";
70
- readonly chainId: "1";
76
+ readonly blockTime: 12.5;
77
+ readonly chain: Chain.Ethereum;
78
+ readonly chainId: ChainId.ETH;
71
79
  readonly chainIdHex: "0x1";
72
80
  readonly explorerUrl: "https://etherscan.io";
73
81
  readonly name: "Ethereum";
@@ -79,8 +87,9 @@ export declare const AllChainConfigs: (({
79
87
  }) | ({
80
88
  readonly baseDecimal: 18;
81
89
  readonly blockExplorerUrl: "https://bscscan.com";
82
- readonly chain: "BSC";
83
- readonly chainId: "56";
90
+ readonly blockTime: 3;
91
+ readonly chain: Chain.BinanceSmartChain;
92
+ readonly chainId: ChainId.BSC;
84
93
  readonly chainIdHex: "0x38";
85
94
  readonly explorerUrl: "https://bscscan.com";
86
95
  readonly name: "BinanceSmartChain";
@@ -92,8 +101,9 @@ export declare const AllChainConfigs: (({
92
101
  }) | ({
93
102
  readonly baseDecimal: 18;
94
103
  readonly blockExplorerUrl: "https://snowtrace.io";
95
- readonly chain: "AVAX";
96
- readonly chainId: "43114";
104
+ readonly blockTime: 3;
105
+ readonly chain: Chain.Avalanche;
106
+ readonly chainId: ChainId.AVAX;
97
107
  readonly chainIdHex: "0xa86a";
98
108
  readonly explorerUrl: "https://snowtrace.io";
99
109
  readonly name: "Avalanche";
@@ -105,8 +115,9 @@ export declare const AllChainConfigs: (({
105
115
  }) | ({
106
116
  readonly baseDecimal: 18;
107
117
  readonly blockExplorerUrl: "https://polygonscan.com";
108
- readonly chain: "POL";
109
- readonly chainId: "137";
118
+ readonly blockTime: 2.1;
119
+ readonly chain: Chain.Polygon;
120
+ readonly chainId: ChainId.POL;
110
121
  readonly chainIdHex: "0x89";
111
122
  readonly explorerUrl: "https://polygonscan.com";
112
123
  readonly name: "Polygon";
@@ -118,8 +129,9 @@ export declare const AllChainConfigs: (({
118
129
  }) | ({
119
130
  readonly baseDecimal: 18;
120
131
  readonly blockExplorerUrl: "https://arbiscan.io";
121
- readonly chain: "ARB";
122
- readonly chainId: "42161";
132
+ readonly blockTime: 0.3;
133
+ readonly chain: Chain.Arbitrum;
134
+ readonly chainId: ChainId.ARB;
123
135
  readonly chainIdHex: "0xa4b1";
124
136
  readonly explorerUrl: "https://arbiscan.io";
125
137
  readonly name: "Arbitrum";
@@ -131,8 +143,9 @@ export declare const AllChainConfigs: (({
131
143
  }) | ({
132
144
  readonly baseDecimal: 18;
133
145
  readonly blockExplorerUrl: "https://optimistic.etherscan.io";
134
- readonly chain: "OP";
135
- readonly chainId: "10";
146
+ readonly blockTime: 2;
147
+ readonly chain: Chain.Optimism;
148
+ readonly chainId: ChainId.OP;
136
149
  readonly chainIdHex: "0xa";
137
150
  readonly explorerUrl: "https://optimistic.etherscan.io";
138
151
  readonly name: "Optimism";
@@ -144,8 +157,9 @@ export declare const AllChainConfigs: (({
144
157
  }) | ({
145
158
  readonly baseDecimal: 18;
146
159
  readonly blockExplorerUrl: "https://basescan.org";
147
- readonly chain: "BASE";
148
- readonly chainId: "8453";
160
+ readonly blockTime: 2;
161
+ readonly chain: Chain.Base;
162
+ readonly chainId: ChainId.BASE;
149
163
  readonly chainIdHex: "0x2105";
150
164
  readonly explorerUrl: "https://basescan.org";
151
165
  readonly name: "Base";
@@ -157,8 +171,9 @@ export declare const AllChainConfigs: (({
157
171
  }) | ({
158
172
  readonly baseDecimal: 18;
159
173
  readonly blockExplorerUrl: "https://gnosisscan.io";
160
- readonly chain: "GNO";
161
- readonly chainId: "100";
174
+ readonly blockTime: 5.2;
175
+ readonly chain: Chain.Gnosis;
176
+ readonly chainId: ChainId.GNO;
162
177
  readonly chainIdHex: "0x64";
163
178
  readonly explorerUrl: "https://gnosisscan.io";
164
179
  readonly name: "Gnosis";
@@ -170,8 +185,9 @@ export declare const AllChainConfigs: (({
170
185
  }) | ({
171
186
  readonly baseDecimal: 18;
172
187
  readonly blockExplorerUrl: "https://explorer.mainnet.aurora.dev";
173
- readonly chain: "AURORA";
174
- readonly chainId: "1313161554";
188
+ readonly blockTime: 1;
189
+ readonly chain: Chain.Aurora;
190
+ readonly chainId: ChainId.AURORA;
175
191
  readonly chainIdHex: "0x4e454152";
176
192
  readonly explorerUrl: "https://explorer.mainnet.aurora.dev";
177
193
  readonly name: "Aurora";
@@ -183,8 +199,9 @@ export declare const AllChainConfigs: (({
183
199
  }) | ({
184
200
  readonly baseDecimal: 18;
185
201
  readonly blockExplorerUrl: "https://berascan.com";
186
- readonly chain: "BERA";
187
- readonly chainId: "80094";
202
+ readonly blockTime: 2;
203
+ readonly chain: Chain.Berachain;
204
+ readonly chainId: ChainId.BERA;
188
205
  readonly chainIdHex: "0x138de";
189
206
  readonly explorerUrl: "https://berascan.com";
190
207
  readonly name: "Berachain";
@@ -196,8 +213,9 @@ export declare const AllChainConfigs: (({
196
213
  }) | ({
197
214
  readonly baseDecimal: 24;
198
215
  readonly blockExplorerUrl: "https://nearblocks.io";
199
- readonly chain: "NEAR";
200
- readonly chainId: "near";
216
+ readonly blockTime: 1;
217
+ readonly chain: Chain.Near;
218
+ readonly chainId: ChainId.NEAR;
201
219
  readonly explorerUrl: "https://nearblocks.io";
202
220
  readonly name: "Near";
203
221
  readonly nativeCurrency: "NEAR";
@@ -208,8 +226,9 @@ export declare const AllChainConfigs: (({
208
226
  }) | ({
209
227
  readonly baseDecimal: 18;
210
228
  readonly blockExplorerUrl: "https://dashboard.radixdlt.com";
211
- readonly chain: "XRD";
212
- readonly chainId: "radix-mainnet";
229
+ readonly blockTime: 5;
230
+ readonly chain: Chain.Radix;
231
+ readonly chainId: ChainId.XRD;
213
232
  readonly explorerUrl: "https://dashboard.radixdlt.com";
214
233
  readonly name: "Radix";
215
234
  readonly nativeCurrency: "XRD";
@@ -220,8 +239,9 @@ export declare const AllChainConfigs: (({
220
239
  }) | ({
221
240
  readonly baseDecimal: 6;
222
241
  readonly blockExplorerUrl: "https://livenet.xrpl.org/";
223
- readonly chain: "XRP";
224
- readonly chainId: "ripple";
242
+ readonly blockTime: 5;
243
+ readonly chain: Chain.Ripple;
244
+ readonly chainId: ChainId.XRP;
225
245
  readonly explorerUrl: "https://livenet.xrpl.org/";
226
246
  readonly name: "Ripple";
227
247
  readonly nativeCurrency: "XRP";
@@ -232,8 +252,9 @@ export declare const AllChainConfigs: (({
232
252
  }) | ({
233
253
  readonly baseDecimal: 9;
234
254
  readonly blockExplorerUrl: "https://solscan.io";
235
- readonly chain: "SOL";
236
- readonly chainId: "solana";
255
+ readonly blockTime: 0.4;
256
+ readonly chain: Chain.Solana;
257
+ readonly chainId: ChainId.SOL;
237
258
  readonly explorerUrl: "https://solscan.io";
238
259
  readonly name: "Solana";
239
260
  readonly nativeCurrency: "SOL";
@@ -244,8 +265,9 @@ export declare const AllChainConfigs: (({
244
265
  }) | ({
245
266
  readonly baseDecimal: 6;
246
267
  readonly blockExplorerUrl: "https://tronscan.org";
247
- readonly chain: "TRON";
248
- readonly chainId: "728126428";
268
+ readonly blockTime: 3;
269
+ readonly chain: Chain.Tron;
270
+ readonly chainId: ChainId.TRON;
249
271
  readonly chainIdHex: "0x2b6653dc";
250
272
  readonly explorerUrl: "https://tronscan.org";
251
273
  readonly name: "Tron";
@@ -254,23 +276,12 @@ export declare const AllChainConfigs: (({
254
276
  readonly type: "others";
255
277
  } & {
256
278
  chainIdHex: "0x2b6653dc";
257
- }) | ({
258
- readonly baseDecimal: 2;
259
- readonly blockExplorerUrl: "";
260
- readonly chain: "FIAT";
261
- readonly chainId: "fiat";
262
- readonly explorerUrl: "";
263
- readonly name: "Fiat";
264
- readonly nativeCurrency: "USD";
265
- readonly rpcUrl: "";
266
- readonly type: "others";
267
- } & {
268
- chainIdHex: undefined;
269
279
  }) | ({
270
280
  readonly baseDecimal: 10;
271
281
  readonly blockExplorerUrl: "https://polkadot.subscan.io";
272
- readonly chain: "DOT";
273
- readonly chainId: "polkadot";
282
+ readonly blockTime: 6;
283
+ readonly chain: Chain.Polkadot;
284
+ readonly chainId: ChainId.DOT;
274
285
  readonly explorerUrl: "https://polkadot.subscan.io";
275
286
  readonly name: "Polkadot";
276
287
  readonly nativeCurrency: "DOT";
@@ -281,8 +292,9 @@ export declare const AllChainConfigs: (({
281
292
  }) | ({
282
293
  readonly baseDecimal: 18;
283
294
  readonly blockExplorerUrl: "https://explorer.polkascan.io/polkadot";
284
- readonly chain: "FLIP";
285
- readonly chainId: "chainflip";
295
+ readonly blockTime: 5;
296
+ readonly chain: Chain.Chainflip;
297
+ readonly chainId: ChainId.FLIP;
286
298
  readonly explorerUrl: "https://explorer.polkascan.io/polkadot";
287
299
  readonly name: "Chainflip";
288
300
  readonly nativeCurrency: "FLIP";
@@ -293,8 +305,9 @@ export declare const AllChainConfigs: (({
293
305
  }) | ({
294
306
  readonly baseDecimal: 8;
295
307
  readonly blockExplorerUrl: "https://blockchair.com/bitcoin";
296
- readonly chain: "BTC";
297
- readonly chainId: "bitcoin";
308
+ readonly blockTime: 600;
309
+ readonly chain: Chain.Bitcoin;
310
+ readonly chainId: ChainId.BTC;
298
311
  readonly explorerUrl: "https://blockchair.com/bitcoin";
299
312
  readonly name: "Bitcoin";
300
313
  readonly nativeCurrency: "BTC";
@@ -305,8 +318,9 @@ export declare const AllChainConfigs: (({
305
318
  }) | ({
306
319
  readonly baseDecimal: 8;
307
320
  readonly blockExplorerUrl: "https://www.blockchair.com/bitcoin-cash";
308
- readonly chain: "BCH";
309
- readonly chainId: "bitcoincash";
321
+ readonly blockTime: 600;
322
+ readonly chain: Chain.BitcoinCash;
323
+ readonly chainId: ChainId.BCH;
310
324
  readonly explorerUrl: "https://www.blockchair.com/bitcoin-cash";
311
325
  readonly name: "BitcoinCash";
312
326
  readonly nativeCurrency: "BCH";
@@ -317,8 +331,9 @@ export declare const AllChainConfigs: (({
317
331
  }) | ({
318
332
  readonly baseDecimal: 8;
319
333
  readonly blockExplorerUrl: "https://blockchair.com/litecoin";
320
- readonly chain: "LTC";
321
- readonly chainId: "litecoin";
334
+ readonly blockTime: 150;
335
+ readonly chain: Chain.Litecoin;
336
+ readonly chainId: ChainId.LTC;
322
337
  readonly explorerUrl: "https://blockchair.com/litecoin";
323
338
  readonly name: "Litecoin";
324
339
  readonly nativeCurrency: "LTC";
@@ -329,8 +344,9 @@ export declare const AllChainConfigs: (({
329
344
  }) | ({
330
345
  readonly baseDecimal: 8;
331
346
  readonly blockExplorerUrl: "https://blockchair.com/dogecoin";
332
- readonly chain: "DOGE";
333
- readonly chainId: "dogecoin";
347
+ readonly blockTime: 600;
348
+ readonly chain: Chain.Dogecoin;
349
+ readonly chainId: ChainId.DOGE;
334
350
  readonly explorerUrl: "https://blockchair.com/dogecoin";
335
351
  readonly name: "Dogecoin";
336
352
  readonly nativeCurrency: "DOGE";
@@ -341,8 +357,9 @@ export declare const AllChainConfigs: (({
341
357
  }) | ({
342
358
  readonly baseDecimal: 8;
343
359
  readonly blockExplorerUrl: "https://blockchair.com/dash";
344
- readonly chain: "DASH";
345
- readonly chainId: "dash";
360
+ readonly blockTime: 150;
361
+ readonly chain: Chain.Dash;
362
+ readonly chainId: ChainId.DASH;
346
363
  readonly explorerUrl: "https://blockchair.com/dash";
347
364
  readonly name: "Dash";
348
365
  readonly nativeCurrency: "DASH";
@@ -353,8 +370,9 @@ export declare const AllChainConfigs: (({
353
370
  }) | ({
354
371
  readonly baseDecimal: 8;
355
372
  readonly blockExplorerUrl: "https://blockchair.com/zcash";
356
- readonly chain: "ZEC";
357
- readonly chainId: "zcash";
373
+ readonly blockTime: 150;
374
+ readonly chain: Chain.Zcash;
375
+ readonly chainId: ChainId.ZEC;
358
376
  readonly explorerUrl: "https://blockchair.com/zcash";
359
377
  readonly name: "Zcash";
360
378
  readonly nativeCurrency: "ZEC";
@@ -364,48 +382,59 @@ export declare const AllChainConfigs: (({
364
382
  chainIdHex: undefined;
365
383
  }))[];
366
384
  export type AllChainConfigs = typeof AllChainConfigs;
367
- export declare const AllChains: ("GAIA" | "THOR" | "MAYA" | "KUJI" | "NOBLE" | "ETH" | "BSC" | "AVAX" | "POL" | "ARB" | "OP" | "BASE" | "GNO" | "AURORA" | "BERA" | "NEAR" | "XRD" | "XRP" | "SOL" | "TRON" | "FIAT" | "DOT" | "FLIP" | "BTC" | "BCH" | "LTC" | "DOGE" | "DASH" | "ZEC")[];
368
- export declare const StagenetChainConfigs: (({
369
- readonly baseDecimal: 8;
370
- readonly blockExplorerUrl: "https://runescan.io";
371
- readonly chain: "THOR";
372
- readonly chainId: "thorchain-stagenet-v2";
373
- readonly explorerUrl: "https://runescan.io";
374
- readonly name: "THORChain";
375
- readonly nativeCurrency: "RUNE";
376
- readonly rpcUrl: "https://rpc.thorswap.net";
377
- readonly type: "cosmos";
378
- } & {
379
- chainIdHex: undefined;
380
- }) | ({
381
- readonly baseDecimal: 8;
382
- readonly blockExplorerUrl: "https://www.mayascan.org";
383
- readonly chain: "MAYA";
384
- readonly chainId: "mayachain-stagenet-v1";
385
- readonly explorerUrl: "https://www.mayascan.org";
386
- readonly name: "Maya";
387
- readonly nativeCurrency: "CACAO";
388
- readonly rpcUrl: "https://tendermint.mayachain.info";
389
- readonly type: "cosmos";
390
- } & {
391
- chainIdHex: undefined;
392
- }))[];
393
- export type StagenetChainConfigs = typeof StagenetChainConfigs;
394
- export declare const StagenetChains: ("THOR" | "MAYA")[];
395
- export declare const Chain: { readonly [K in AllChainConfigs[number]["name"]]: Extract<AllChainConfigs[number], {
396
- name: K;
397
- }>["chain"]; };
398
- export type Chain = AllChainConfigs[number]["chain"];
399
- export declare const ChainId: { readonly [K in AllChainConfigs[number]["chain"]]: Extract<AllChainConfigs[number], {
400
- chain: K;
401
- }>["chainId"]; };
402
- export type ChainId = AllChainConfigs[number]["chainId"];
403
- export declare const StagenetChain: { readonly [K in StagenetChainConfigs[number]["name"]]: `${StagenetChainConfigs[number]["chain"]}_STAGENET`; };
404
- export type StagenetChain = StagenetChainConfigs[number]["chain"];
385
+ export type ChainConfig = AllChainConfigs[number];
386
+ export declare const AllChains: Chain[];
387
+ export declare const StagenetChains: readonly [StagenetChain.THORChain, StagenetChain.Maya];
405
388
  type ChainConfigMap = {
406
- [K in AllChainConfigs[number]["chain"]]: Extract<AllChainConfigs[number], {
389
+ [K in ChainConfig["chain"]]: Extract<ChainConfig, {
407
390
  chain: K;
408
391
  }>;
392
+ } & {
393
+ [K in ChainConfig["chainId"]]: Extract<ChainConfig, {
394
+ chainId: K;
395
+ }>;
409
396
  };
410
- export declare function getChainConfig<T extends AllChainConfigs[number]["chain"]>(chain: T): ChainConfigMap[T];
397
+ export declare function getChainConfig<T extends keyof ChainConfigMap>(chainOrChainId: T): ChainConfigMap[T];
398
+ /**
399
+ * @deprecated use getChainConfig instead
400
+ * @example
401
+ * ```diff
402
+ * -const chainId = ChainToChainId[Chain.Ethereum];
403
+ * +const { chainId } = getChainConfig(Chain.Ethereum);
404
+ * ```
405
+ */
406
+ export declare const ChainToChainId: typeof ChainId;
407
+ /**
408
+ * @deprecated use getChainConfig instead
409
+ * @example
410
+ * ```diff
411
+ * -const chain = ChainIdToChain[ChainId.Ethereum];
412
+ * +const { chain } = getChainConfig(ChainId.Ethereum);
413
+ * ```
414
+ */
415
+ export declare const ChainIdToChain: { readonly [K in ChainId]: Extract<ChainConfig, {
416
+ chainId: K;
417
+ }>["chain"]; };
418
+ /**
419
+ * @deprecated use getChainConfig instead
420
+ * @example
421
+ * ```diff
422
+ * -const baseDecimal = BaseDecimal[Chain.Ethereum];
423
+ * +const { baseDecimal } = getChainConfig(Chain.Ethereum);
424
+ * ```
425
+ */
426
+ export declare const BaseDecimal: { readonly [K in Chain]: Extract<ChainConfig, {
427
+ chain: K;
428
+ }>["baseDecimal"]; };
429
+ /**
430
+ * @deprecated use getChainConfig instead
431
+ * @example
432
+ * ```diff
433
+ * -const blockTime = BlockTimes[Chain.Ethereum];
434
+ * +const { blockTime } = getChainConfig(Chain.Ethereum);
435
+ * ```
436
+ */
437
+ export declare const BlockTimes: { readonly [K in Chain]: Extract<ChainConfig, {
438
+ chain: K;
439
+ }>["blockTime"]; };
411
440
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chains/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AAEvB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,CAAC;AAC9C,eAAO,MAAM,cAAc,wDAAyD,CAAC;AAErF,KAAK,cAAc,GAAG;KACnB,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE;QAAE,KAAK,EAAE,CAAC,CAAA;KAAE,CAAC;CAChE,GAAG;KACD,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE;QAAE,OAAO,EAAE,CAAC,CAAA;KAAE,CAAC;CACpE,CAAC;AAWF,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,cAAc,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAInG;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,gBAAU,CAAC;AAEtC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAEtB,EACH,QAAQ,EAAE,CAAC,IAAI,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,OAAO,CAAC,GACvE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAEnB,EACH,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,aAAa,CAAC,GACzE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAElB,EACH,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,WAAW,CAAC,GACvE,CAAC"}
@@ -1,8 +1,10 @@
1
+ import { Chain, ChainId } from "./_enums";
1
2
  export declare const OtherChainConfigs: readonly [{
2
3
  readonly baseDecimal: 24;
3
4
  readonly blockExplorerUrl: "https://nearblocks.io";
4
- readonly chain: "NEAR";
5
- readonly chainId: "near";
5
+ readonly blockTime: 1;
6
+ readonly chain: Chain.Near;
7
+ readonly chainId: ChainId.NEAR;
6
8
  readonly explorerUrl: "https://nearblocks.io";
7
9
  readonly name: "Near";
8
10
  readonly nativeCurrency: "NEAR";
@@ -13,8 +15,9 @@ export declare const OtherChainConfigs: readonly [{
13
15
  }, {
14
16
  readonly baseDecimal: 18;
15
17
  readonly blockExplorerUrl: "https://dashboard.radixdlt.com";
16
- readonly chain: "XRD";
17
- readonly chainId: "radix-mainnet";
18
+ readonly blockTime: 5;
19
+ readonly chain: Chain.Radix;
20
+ readonly chainId: ChainId.XRD;
18
21
  readonly explorerUrl: "https://dashboard.radixdlt.com";
19
22
  readonly name: "Radix";
20
23
  readonly nativeCurrency: "XRD";
@@ -25,8 +28,9 @@ export declare const OtherChainConfigs: readonly [{
25
28
  }, {
26
29
  readonly baseDecimal: 6;
27
30
  readonly blockExplorerUrl: "https://livenet.xrpl.org/";
28
- readonly chain: "XRP";
29
- readonly chainId: "ripple";
31
+ readonly blockTime: 5;
32
+ readonly chain: Chain.Ripple;
33
+ readonly chainId: ChainId.XRP;
30
34
  readonly explorerUrl: "https://livenet.xrpl.org/";
31
35
  readonly name: "Ripple";
32
36
  readonly nativeCurrency: "XRP";
@@ -37,8 +41,9 @@ export declare const OtherChainConfigs: readonly [{
37
41
  }, {
38
42
  readonly baseDecimal: 9;
39
43
  readonly blockExplorerUrl: "https://solscan.io";
40
- readonly chain: "SOL";
41
- readonly chainId: "solana";
44
+ readonly blockTime: 0.4;
45
+ readonly chain: Chain.Solana;
46
+ readonly chainId: ChainId.SOL;
42
47
  readonly explorerUrl: "https://solscan.io";
43
48
  readonly name: "Solana";
44
49
  readonly nativeCurrency: "SOL";
@@ -49,8 +54,9 @@ export declare const OtherChainConfigs: readonly [{
49
54
  }, {
50
55
  readonly baseDecimal: 6;
51
56
  readonly blockExplorerUrl: "https://tronscan.org";
52
- readonly chain: "TRON";
53
- readonly chainId: "728126428";
57
+ readonly blockTime: 3;
58
+ readonly chain: Chain.Tron;
59
+ readonly chainId: ChainId.TRON;
54
60
  readonly chainIdHex: "0x2b6653dc";
55
61
  readonly explorerUrl: "https://tronscan.org";
56
62
  readonly name: "Tron";
@@ -59,19 +65,7 @@ export declare const OtherChainConfigs: readonly [{
59
65
  readonly type: "others";
60
66
  } & {
61
67
  chainIdHex: "0x2b6653dc";
62
- }, {
63
- readonly baseDecimal: 2;
64
- readonly blockExplorerUrl: "";
65
- readonly chain: "FIAT";
66
- readonly chainId: "fiat";
67
- readonly explorerUrl: "";
68
- readonly name: "Fiat";
69
- readonly nativeCurrency: "USD";
70
- readonly rpcUrl: "";
71
- readonly type: "others";
72
- } & {
73
- chainIdHex: undefined;
74
68
  }];
75
- export declare const OtherChains: ["NEAR", "XRD", "XRP", "SOL", "TRON", "FIAT"];
69
+ export declare const OtherChains: (Chain.Near | Chain.Radix | Chain.Ripple | Chain.Solana | Chain.Tron)[];
76
70
  export type OtherChain = (typeof OtherChains)[number];
77
71
  //# sourceMappingURL=others.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"others.d.ts","sourceRoot":"","sources":["../../../src/chains/others.ts"],"names":[],"mappings":"AA6EA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6C,CAAC;AAC5E,eAAO,MAAM,WAAW,+CAA+B,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"others.d.ts","sourceRoot":"","sources":["../../../src/chains/others.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAsE1C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAC;AACtE,eAAO,MAAM,WAAW,yEAAkD,CAAC;AAC3E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,8 +1,10 @@
1
+ import { Chain, ChainId } from "./_enums";
1
2
  export declare const SubstrateChainConfigs: readonly [{
2
3
  readonly baseDecimal: 10;
3
4
  readonly blockExplorerUrl: "https://polkadot.subscan.io";
4
- readonly chain: "DOT";
5
- readonly chainId: "polkadot";
5
+ readonly blockTime: 6;
6
+ readonly chain: Chain.Polkadot;
7
+ readonly chainId: ChainId.DOT;
6
8
  readonly explorerUrl: "https://polkadot.subscan.io";
7
9
  readonly name: "Polkadot";
8
10
  readonly nativeCurrency: "DOT";
@@ -13,8 +15,9 @@ export declare const SubstrateChainConfigs: readonly [{
13
15
  }, {
14
16
  readonly baseDecimal: 18;
15
17
  readonly blockExplorerUrl: "https://explorer.polkascan.io/polkadot";
16
- readonly chain: "FLIP";
17
- readonly chainId: "chainflip";
18
+ readonly blockTime: 5;
19
+ readonly chain: Chain.Chainflip;
20
+ readonly chainId: ChainId.FLIP;
18
21
  readonly explorerUrl: "https://explorer.polkascan.io/polkadot";
19
22
  readonly name: "Chainflip";
20
23
  readonly nativeCurrency: "FLIP";
@@ -23,6 +26,6 @@ export declare const SubstrateChainConfigs: readonly [{
23
26
  } & {
24
27
  chainIdHex: undefined;
25
28
  }];
26
- export declare const SubstrateChains: ["DOT", "FLIP"];
29
+ export declare const SubstrateChains: (Chain.Polkadot | Chain.Chainflip)[];
27
30
  export type SubstrateChain = (typeof SubstrateChains)[number];
28
31
  //# sourceMappingURL=substrate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"substrate.d.ts","sourceRoot":"","sources":["../../../src/chains/substrate.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAAuB,CAAC;AAC1D,eAAO,MAAM,eAAe,iBAAmC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"substrate.d.ts","sourceRoot":"","sources":["../../../src/chains/substrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA8B1C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuB,CAAC;AAC1D,eAAO,MAAM,eAAe,sCAAsD,CAAC;AACnF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,8 +1,10 @@
1
+ import { Chain, ChainId } from "./_enums";
1
2
  export declare const UTXOChainConfigs: readonly [{
2
3
  readonly baseDecimal: 8;
3
4
  readonly blockExplorerUrl: "https://blockchair.com/bitcoin";
4
- readonly chain: "BTC";
5
- readonly chainId: "bitcoin";
5
+ readonly blockTime: 600;
6
+ readonly chain: Chain.Bitcoin;
7
+ readonly chainId: ChainId.BTC;
6
8
  readonly explorerUrl: "https://blockchair.com/bitcoin";
7
9
  readonly name: "Bitcoin";
8
10
  readonly nativeCurrency: "BTC";
@@ -13,8 +15,9 @@ export declare const UTXOChainConfigs: readonly [{
13
15
  }, {
14
16
  readonly baseDecimal: 8;
15
17
  readonly blockExplorerUrl: "https://www.blockchair.com/bitcoin-cash";
16
- readonly chain: "BCH";
17
- readonly chainId: "bitcoincash";
18
+ readonly blockTime: 600;
19
+ readonly chain: Chain.BitcoinCash;
20
+ readonly chainId: ChainId.BCH;
18
21
  readonly explorerUrl: "https://www.blockchair.com/bitcoin-cash";
19
22
  readonly name: "BitcoinCash";
20
23
  readonly nativeCurrency: "BCH";
@@ -25,8 +28,9 @@ export declare const UTXOChainConfigs: readonly [{
25
28
  }, {
26
29
  readonly baseDecimal: 8;
27
30
  readonly blockExplorerUrl: "https://blockchair.com/litecoin";
28
- readonly chain: "LTC";
29
- readonly chainId: "litecoin";
31
+ readonly blockTime: 150;
32
+ readonly chain: Chain.Litecoin;
33
+ readonly chainId: ChainId.LTC;
30
34
  readonly explorerUrl: "https://blockchair.com/litecoin";
31
35
  readonly name: "Litecoin";
32
36
  readonly nativeCurrency: "LTC";
@@ -37,8 +41,9 @@ export declare const UTXOChainConfigs: readonly [{
37
41
  }, {
38
42
  readonly baseDecimal: 8;
39
43
  readonly blockExplorerUrl: "https://blockchair.com/dogecoin";
40
- readonly chain: "DOGE";
41
- readonly chainId: "dogecoin";
44
+ readonly blockTime: 600;
45
+ readonly chain: Chain.Dogecoin;
46
+ readonly chainId: ChainId.DOGE;
42
47
  readonly explorerUrl: "https://blockchair.com/dogecoin";
43
48
  readonly name: "Dogecoin";
44
49
  readonly nativeCurrency: "DOGE";
@@ -49,8 +54,9 @@ export declare const UTXOChainConfigs: readonly [{
49
54
  }, {
50
55
  readonly baseDecimal: 8;
51
56
  readonly blockExplorerUrl: "https://blockchair.com/dash";
52
- readonly chain: "DASH";
53
- readonly chainId: "dash";
57
+ readonly blockTime: 150;
58
+ readonly chain: Chain.Dash;
59
+ readonly chainId: ChainId.DASH;
54
60
  readonly explorerUrl: "https://blockchair.com/dash";
55
61
  readonly name: "Dash";
56
62
  readonly nativeCurrency: "DASH";
@@ -61,8 +67,9 @@ export declare const UTXOChainConfigs: readonly [{
61
67
  }, {
62
68
  readonly baseDecimal: 8;
63
69
  readonly blockExplorerUrl: "https://blockchair.com/zcash";
64
- readonly chain: "ZEC";
65
- readonly chainId: "zcash";
70
+ readonly blockTime: 150;
71
+ readonly chain: Chain.Zcash;
72
+ readonly chainId: ChainId.ZEC;
66
73
  readonly explorerUrl: "https://blockchair.com/zcash";
67
74
  readonly name: "Zcash";
68
75
  readonly nativeCurrency: "ZEC";
@@ -71,6 +78,6 @@ export declare const UTXOChainConfigs: readonly [{
71
78
  } & {
72
79
  chainIdHex: undefined;
73
80
  }];
74
- export declare const UTXOChains: ["BTC", "BCH", "LTC", "DOGE", "DASH", "ZEC"];
81
+ export declare const UTXOChains: readonly [Chain.Bitcoin, Chain.BitcoinCash, Chain.Dash, Chain.Dogecoin, Chain.Litecoin, Chain.Zcash];
75
82
  export type UTXOChain = (typeof UTXOChains)[number];
76
83
  //# sourceMappingURL=utxo.d.ts.map