@sodax/types 2.0.0-rc.16 → 2.0.0-rc.18
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.
- package/dist/chains/chains.d.ts +48 -0
- package/dist/chains/chains.js +27 -0
- package/dist/hooks/hooks.d.ts +42 -0
- package/dist/hooks/hooks.js +44 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/shared/analytics.d.ts +119 -0
- package/dist/shared/analytics.js +1 -0
- package/dist/shared/features.d.ts +9 -0
- package/dist/shared/features.js +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.js +2 -0
- package/dist/sodax-config/sodax-config.d.ts +47 -1
- package/dist/swap/swap.d.ts +51 -27
- package/dist/swap/swap.js +6 -8
- package/package.json +1 -1
package/dist/chains/chains.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export declare const RelayChainIdMap: {
|
|
|
31
31
|
export type IntentChainId = (typeof RelayChainIdMap)[keyof typeof RelayChainIdMap];
|
|
32
32
|
export declare const INTENT_CHAIN_IDS: (6n | 23n | 30n | 4n | 19n | 146n | 24n | 5n | 1n | 21n | 27n | 1768124270n | 26745n | 27756n | 15n | 2n | 627463n | 726564n | 27489n | 60n)[];
|
|
33
33
|
export declare const IntentRelayChainIdToChainKey: Map<IntentRelayChainId, ChainKey>;
|
|
34
|
+
/**
|
|
35
|
+
* Base URL for default chain logos hosted in the `@sodax/assets` package.
|
|
36
|
+
* Each logo is served from `main` via raw.githubusercontent and named by its
|
|
37
|
+
* `ChainKeys` value, so the full URL is `${CHAIN_LOGO_BASE_URL}/<chainKey>.png`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/chain";
|
|
34
40
|
export declare const baseChainInfo: {
|
|
35
41
|
readonly sonic: {
|
|
36
42
|
readonly name: "Sonic";
|
|
@@ -38,6 +44,7 @@ export declare const baseChainInfo: {
|
|
|
38
44
|
readonly type: "EVM";
|
|
39
45
|
readonly chainId: 146;
|
|
40
46
|
readonly mainnet: true;
|
|
47
|
+
readonly logo: string;
|
|
41
48
|
readonly explorer: {
|
|
42
49
|
readonly baseUrl: "https://sonicscan.org/";
|
|
43
50
|
readonly txUrl: "https://sonicscan.org/tx/";
|
|
@@ -51,6 +58,7 @@ export declare const baseChainInfo: {
|
|
|
51
58
|
readonly type: "SOLANA";
|
|
52
59
|
readonly chainId: "solana";
|
|
53
60
|
readonly mainnet: true;
|
|
61
|
+
readonly logo: string;
|
|
54
62
|
readonly explorer: {
|
|
55
63
|
readonly baseUrl: "https://solscan.io/";
|
|
56
64
|
readonly txUrl: "https://solscan.io/tx/";
|
|
@@ -64,6 +72,7 @@ export declare const baseChainInfo: {
|
|
|
64
72
|
readonly type: "EVM";
|
|
65
73
|
readonly chainId: 43114;
|
|
66
74
|
readonly mainnet: true;
|
|
75
|
+
readonly logo: string;
|
|
67
76
|
readonly explorer: {
|
|
68
77
|
readonly baseUrl: "https://snowtrace.io/";
|
|
69
78
|
readonly txUrl: "https://snowtrace.io/tx/";
|
|
@@ -77,6 +86,7 @@ export declare const baseChainInfo: {
|
|
|
77
86
|
readonly type: "EVM";
|
|
78
87
|
readonly chainId: 42161;
|
|
79
88
|
readonly mainnet: true;
|
|
89
|
+
readonly logo: string;
|
|
80
90
|
readonly explorer: {
|
|
81
91
|
readonly baseUrl: "https://arbiscan.io/";
|
|
82
92
|
readonly txUrl: "https://arbiscan.io/tx/";
|
|
@@ -90,6 +100,7 @@ export declare const baseChainInfo: {
|
|
|
90
100
|
readonly type: "EVM";
|
|
91
101
|
readonly chainId: 8453;
|
|
92
102
|
readonly mainnet: true;
|
|
103
|
+
readonly logo: string;
|
|
93
104
|
readonly explorer: {
|
|
94
105
|
readonly baseUrl: "https://basescan.org/";
|
|
95
106
|
readonly txUrl: "https://basescan.org/tx/";
|
|
@@ -103,6 +114,7 @@ export declare const baseChainInfo: {
|
|
|
103
114
|
readonly type: "EVM";
|
|
104
115
|
readonly chainId: 10;
|
|
105
116
|
readonly mainnet: true;
|
|
117
|
+
readonly logo: string;
|
|
106
118
|
readonly explorer: {
|
|
107
119
|
readonly baseUrl: "https://optimistic.etherscan.io/";
|
|
108
120
|
readonly txUrl: "https://optimistic.etherscan.io/tx/";
|
|
@@ -116,6 +128,7 @@ export declare const baseChainInfo: {
|
|
|
116
128
|
readonly type: "EVM";
|
|
117
129
|
readonly chainId: 56;
|
|
118
130
|
readonly mainnet: true;
|
|
131
|
+
readonly logo: string;
|
|
119
132
|
readonly explorer: {
|
|
120
133
|
readonly baseUrl: "https://bscscan.com/";
|
|
121
134
|
readonly txUrl: "https://bscscan.com/tx/";
|
|
@@ -129,6 +142,7 @@ export declare const baseChainInfo: {
|
|
|
129
142
|
readonly type: "EVM";
|
|
130
143
|
readonly chainId: 137;
|
|
131
144
|
readonly mainnet: true;
|
|
145
|
+
readonly logo: string;
|
|
132
146
|
readonly explorer: {
|
|
133
147
|
readonly baseUrl: "https://polygonscan.com/";
|
|
134
148
|
readonly txUrl: "https://polygonscan.com/tx/";
|
|
@@ -142,6 +156,7 @@ export declare const baseChainInfo: {
|
|
|
142
156
|
readonly type: "EVM";
|
|
143
157
|
readonly chainId: 999;
|
|
144
158
|
readonly mainnet: true;
|
|
159
|
+
readonly logo: string;
|
|
145
160
|
readonly explorer: {
|
|
146
161
|
readonly baseUrl: "https://hyperevmscan.io/";
|
|
147
162
|
readonly txUrl: "https://hyperevmscan.io/tx/";
|
|
@@ -155,6 +170,7 @@ export declare const baseChainInfo: {
|
|
|
155
170
|
readonly type: "EVM";
|
|
156
171
|
readonly chainId: 1890;
|
|
157
172
|
readonly mainnet: true;
|
|
173
|
+
readonly logo: string;
|
|
158
174
|
readonly explorer: {
|
|
159
175
|
readonly baseUrl: "https://phoenix.lightlink.io/";
|
|
160
176
|
readonly txUrl: "https://phoenix.lightlink.io/tx/";
|
|
@@ -168,6 +184,7 @@ export declare const baseChainInfo: {
|
|
|
168
184
|
readonly type: "INJECTIVE";
|
|
169
185
|
readonly chainId: "injective-1";
|
|
170
186
|
readonly mainnet: true;
|
|
187
|
+
readonly logo: string;
|
|
171
188
|
readonly explorer: {
|
|
172
189
|
readonly baseUrl: "https://www.mintscan.io/injective/";
|
|
173
190
|
readonly txUrl: "https://www.mintscan.io/injective/tx/";
|
|
@@ -181,6 +198,7 @@ export declare const baseChainInfo: {
|
|
|
181
198
|
readonly type: "STELLAR";
|
|
182
199
|
readonly chainId: "stellar";
|
|
183
200
|
readonly mainnet: true;
|
|
201
|
+
readonly logo: string;
|
|
184
202
|
readonly explorer: {
|
|
185
203
|
readonly baseUrl: "https://stellar.expert/explorer/public/";
|
|
186
204
|
readonly txUrl: "https://stellar.expert/explorer/public/tx/";
|
|
@@ -194,6 +212,7 @@ export declare const baseChainInfo: {
|
|
|
194
212
|
readonly type: "SUI";
|
|
195
213
|
readonly chainId: "sui";
|
|
196
214
|
readonly mainnet: true;
|
|
215
|
+
readonly logo: string;
|
|
197
216
|
readonly explorer: {
|
|
198
217
|
readonly baseUrl: "https://suivision.xyz/";
|
|
199
218
|
readonly txUrl: "https://suivision.xyz/txblock/";
|
|
@@ -207,6 +226,7 @@ export declare const baseChainInfo: {
|
|
|
207
226
|
readonly type: "ICON";
|
|
208
227
|
readonly chainId: "0x1.icon";
|
|
209
228
|
readonly mainnet: true;
|
|
229
|
+
readonly logo: string;
|
|
210
230
|
readonly explorer: {
|
|
211
231
|
readonly baseUrl: "https://tracker.icon.community/";
|
|
212
232
|
readonly txUrl: "https://tracker.icon.community/transaction/";
|
|
@@ -220,6 +240,7 @@ export declare const baseChainInfo: {
|
|
|
220
240
|
readonly type: "NEAR";
|
|
221
241
|
readonly chainId: "near";
|
|
222
242
|
readonly mainnet: true;
|
|
243
|
+
readonly logo: string;
|
|
223
244
|
readonly explorer: {
|
|
224
245
|
readonly baseUrl: "https://nearblocks.io/";
|
|
225
246
|
readonly txUrl: "https://nearblocks.io/txns/";
|
|
@@ -233,6 +254,7 @@ export declare const baseChainInfo: {
|
|
|
233
254
|
readonly type: "EVM";
|
|
234
255
|
readonly chainId: 1;
|
|
235
256
|
readonly mainnet: true;
|
|
257
|
+
readonly logo: string;
|
|
236
258
|
readonly explorer: {
|
|
237
259
|
readonly baseUrl: "https://etherscan.io/";
|
|
238
260
|
readonly txUrl: "https://etherscan.io/tx/";
|
|
@@ -246,6 +268,7 @@ export declare const baseChainInfo: {
|
|
|
246
268
|
readonly type: "BITCOIN";
|
|
247
269
|
readonly chainId: "bitcoin";
|
|
248
270
|
readonly mainnet: true;
|
|
271
|
+
readonly logo: string;
|
|
249
272
|
readonly explorer: {
|
|
250
273
|
readonly baseUrl: "https://mempool.space/";
|
|
251
274
|
readonly txUrl: "https://mempool.space/tx/";
|
|
@@ -259,6 +282,7 @@ export declare const baseChainInfo: {
|
|
|
259
282
|
readonly type: "EVM";
|
|
260
283
|
readonly chainId: 151;
|
|
261
284
|
readonly mainnet: true;
|
|
285
|
+
readonly logo: string;
|
|
262
286
|
readonly explorer: {
|
|
263
287
|
readonly baseUrl: "https://redbelly.routescan.io/";
|
|
264
288
|
readonly txUrl: "https://redbelly.routescan.io/tx/";
|
|
@@ -272,6 +296,7 @@ export declare const baseChainInfo: {
|
|
|
272
296
|
readonly type: "EVM";
|
|
273
297
|
readonly chainId: 8217;
|
|
274
298
|
readonly mainnet: true;
|
|
299
|
+
readonly logo: string;
|
|
275
300
|
readonly explorer: {
|
|
276
301
|
readonly baseUrl: "https://klaytnfinder.io/";
|
|
277
302
|
readonly txUrl: "https://klaytnfinder.io/tx/";
|
|
@@ -285,6 +310,7 @@ export declare const baseChainInfo: {
|
|
|
285
310
|
readonly type: "STACKS";
|
|
286
311
|
readonly chainId: "stacks";
|
|
287
312
|
readonly mainnet: true;
|
|
313
|
+
readonly logo: string;
|
|
288
314
|
readonly explorer: {
|
|
289
315
|
readonly baseUrl: "https://explorer.hiro.so/";
|
|
290
316
|
readonly txUrl: "https://explorer.hiro.so/txid/";
|
|
@@ -354,6 +380,8 @@ export type BaseChainInfo<T extends ChainType> = {
|
|
|
354
380
|
chainId: string | number;
|
|
355
381
|
type: T;
|
|
356
382
|
mainnet: boolean;
|
|
383
|
+
/** Default chain logo URL (hosted in @sodax/assets, see CHAIN_LOGO_BASE_URL). */
|
|
384
|
+
logo: string;
|
|
357
385
|
explorer: {
|
|
358
386
|
baseUrl: string;
|
|
359
387
|
txUrl: string;
|
|
@@ -511,6 +539,7 @@ export declare const spokeChainConfig: {
|
|
|
511
539
|
readonly type: "EVM";
|
|
512
540
|
readonly chainId: 146;
|
|
513
541
|
readonly mainnet: true;
|
|
542
|
+
readonly logo: string;
|
|
514
543
|
readonly explorer: {
|
|
515
544
|
readonly baseUrl: "https://sonicscan.org/";
|
|
516
545
|
readonly txUrl: "https://sonicscan.org/tx/";
|
|
@@ -863,6 +892,7 @@ export declare const spokeChainConfig: {
|
|
|
863
892
|
readonly type: "EVM";
|
|
864
893
|
readonly chainId: 151;
|
|
865
894
|
readonly mainnet: true;
|
|
895
|
+
readonly logo: string;
|
|
866
896
|
readonly explorer: {
|
|
867
897
|
readonly baseUrl: "https://redbelly.routescan.io/";
|
|
868
898
|
readonly txUrl: "https://redbelly.routescan.io/tx/";
|
|
@@ -1032,6 +1062,7 @@ export declare const spokeChainConfig: {
|
|
|
1032
1062
|
readonly type: "SOLANA";
|
|
1033
1063
|
readonly chainId: "solana";
|
|
1034
1064
|
readonly mainnet: true;
|
|
1065
|
+
readonly logo: string;
|
|
1035
1066
|
readonly explorer: {
|
|
1036
1067
|
readonly baseUrl: "https://solscan.io/";
|
|
1037
1068
|
readonly txUrl: "https://solscan.io/tx/";
|
|
@@ -1247,6 +1278,7 @@ export declare const spokeChainConfig: {
|
|
|
1247
1278
|
readonly type: "EVM";
|
|
1248
1279
|
readonly chainId: 43114;
|
|
1249
1280
|
readonly mainnet: true;
|
|
1281
|
+
readonly logo: string;
|
|
1250
1282
|
readonly explorer: {
|
|
1251
1283
|
readonly baseUrl: "https://snowtrace.io/";
|
|
1252
1284
|
readonly txUrl: "https://snowtrace.io/tx/";
|
|
@@ -1329,6 +1361,7 @@ export declare const spokeChainConfig: {
|
|
|
1329
1361
|
readonly type: "EVM";
|
|
1330
1362
|
readonly chainId: 42161;
|
|
1331
1363
|
readonly mainnet: true;
|
|
1364
|
+
readonly logo: string;
|
|
1332
1365
|
readonly explorer: {
|
|
1333
1366
|
readonly baseUrl: "https://arbiscan.io/";
|
|
1334
1367
|
readonly txUrl: "https://arbiscan.io/tx/";
|
|
@@ -1521,6 +1554,7 @@ export declare const spokeChainConfig: {
|
|
|
1521
1554
|
readonly type: "EVM";
|
|
1522
1555
|
readonly chainId: 8453;
|
|
1523
1556
|
readonly mainnet: true;
|
|
1557
|
+
readonly logo: string;
|
|
1524
1558
|
readonly explorer: {
|
|
1525
1559
|
readonly baseUrl: "https://basescan.org/";
|
|
1526
1560
|
readonly txUrl: "https://basescan.org/tx/";
|
|
@@ -1649,6 +1683,7 @@ export declare const spokeChainConfig: {
|
|
|
1649
1683
|
readonly type: "EVM";
|
|
1650
1684
|
readonly chainId: 10;
|
|
1651
1685
|
readonly mainnet: true;
|
|
1686
|
+
readonly logo: string;
|
|
1652
1687
|
readonly explorer: {
|
|
1653
1688
|
readonly baseUrl: "https://optimistic.etherscan.io/";
|
|
1654
1689
|
readonly txUrl: "https://optimistic.etherscan.io/tx/";
|
|
@@ -1758,6 +1793,7 @@ export declare const spokeChainConfig: {
|
|
|
1758
1793
|
readonly type: "EVM";
|
|
1759
1794
|
readonly chainId: 56;
|
|
1760
1795
|
readonly mainnet: true;
|
|
1796
|
+
readonly logo: string;
|
|
1761
1797
|
readonly explorer: {
|
|
1762
1798
|
readonly baseUrl: "https://bscscan.com/";
|
|
1763
1799
|
readonly txUrl: "https://bscscan.com/tx/";
|
|
@@ -1948,6 +1984,7 @@ export declare const spokeChainConfig: {
|
|
|
1948
1984
|
readonly type: "EVM";
|
|
1949
1985
|
readonly chainId: 137;
|
|
1950
1986
|
readonly mainnet: true;
|
|
1987
|
+
readonly logo: string;
|
|
1951
1988
|
readonly explorer: {
|
|
1952
1989
|
readonly baseUrl: "https://polygonscan.com/";
|
|
1953
1990
|
readonly txUrl: "https://polygonscan.com/tx/";
|
|
@@ -2066,6 +2103,7 @@ export declare const spokeChainConfig: {
|
|
|
2066
2103
|
readonly type: "EVM";
|
|
2067
2104
|
readonly chainId: 999;
|
|
2068
2105
|
readonly mainnet: true;
|
|
2106
|
+
readonly logo: string;
|
|
2069
2107
|
readonly explorer: {
|
|
2070
2108
|
readonly baseUrl: "https://hyperevmscan.io/";
|
|
2071
2109
|
readonly txUrl: "https://hyperevmscan.io/tx/";
|
|
@@ -2175,6 +2213,7 @@ export declare const spokeChainConfig: {
|
|
|
2175
2213
|
readonly type: "EVM";
|
|
2176
2214
|
readonly chainId: 1890;
|
|
2177
2215
|
readonly mainnet: true;
|
|
2216
|
+
readonly logo: string;
|
|
2178
2217
|
readonly explorer: {
|
|
2179
2218
|
readonly baseUrl: "https://phoenix.lightlink.io/";
|
|
2180
2219
|
readonly txUrl: "https://phoenix.lightlink.io/tx/";
|
|
@@ -2353,6 +2392,7 @@ export declare const spokeChainConfig: {
|
|
|
2353
2392
|
readonly type: "INJECTIVE";
|
|
2354
2393
|
readonly chainId: "injective-1";
|
|
2355
2394
|
readonly mainnet: true;
|
|
2395
|
+
readonly logo: string;
|
|
2356
2396
|
readonly explorer: {
|
|
2357
2397
|
readonly baseUrl: "https://www.mintscan.io/injective/";
|
|
2358
2398
|
readonly txUrl: "https://www.mintscan.io/injective/tx/";
|
|
@@ -2431,6 +2471,7 @@ export declare const spokeChainConfig: {
|
|
|
2431
2471
|
readonly type: "BITCOIN";
|
|
2432
2472
|
readonly chainId: "bitcoin";
|
|
2433
2473
|
readonly mainnet: true;
|
|
2474
|
+
readonly logo: string;
|
|
2434
2475
|
readonly explorer: {
|
|
2435
2476
|
readonly baseUrl: "https://mempool.space/";
|
|
2436
2477
|
readonly txUrl: "https://mempool.space/tx/";
|
|
@@ -2591,6 +2632,7 @@ export declare const spokeChainConfig: {
|
|
|
2591
2632
|
readonly type: "STELLAR";
|
|
2592
2633
|
readonly chainId: "stellar";
|
|
2593
2634
|
readonly mainnet: true;
|
|
2635
|
+
readonly logo: string;
|
|
2594
2636
|
readonly explorer: {
|
|
2595
2637
|
readonly baseUrl: "https://stellar.expert/explorer/public/";
|
|
2596
2638
|
readonly txUrl: "https://stellar.expert/explorer/public/tx/";
|
|
@@ -2759,6 +2801,7 @@ export declare const spokeChainConfig: {
|
|
|
2759
2801
|
readonly type: "SUI";
|
|
2760
2802
|
readonly chainId: "sui";
|
|
2761
2803
|
readonly mainnet: true;
|
|
2804
|
+
readonly logo: string;
|
|
2762
2805
|
readonly explorer: {
|
|
2763
2806
|
readonly baseUrl: "https://suivision.xyz/";
|
|
2764
2807
|
readonly txUrl: "https://suivision.xyz/txblock/";
|
|
@@ -2786,6 +2829,7 @@ export declare const spokeChainConfig: {
|
|
|
2786
2829
|
readonly type: "ICON";
|
|
2787
2830
|
readonly chainId: "0x1.icon";
|
|
2788
2831
|
readonly mainnet: true;
|
|
2832
|
+
readonly logo: string;
|
|
2789
2833
|
readonly explorer: {
|
|
2790
2834
|
readonly baseUrl: "https://tracker.icon.community/";
|
|
2791
2835
|
readonly txUrl: "https://tracker.icon.community/transaction/";
|
|
@@ -2927,6 +2971,7 @@ export declare const spokeChainConfig: {
|
|
|
2927
2971
|
readonly type: "EVM";
|
|
2928
2972
|
readonly chainId: 1;
|
|
2929
2973
|
readonly mainnet: true;
|
|
2974
|
+
readonly logo: string;
|
|
2930
2975
|
readonly explorer: {
|
|
2931
2976
|
readonly baseUrl: "https://etherscan.io/";
|
|
2932
2977
|
readonly txUrl: "https://etherscan.io/tx/";
|
|
@@ -3190,6 +3235,7 @@ export declare const spokeChainConfig: {
|
|
|
3190
3235
|
readonly type: "EVM";
|
|
3191
3236
|
readonly chainId: 8217;
|
|
3192
3237
|
readonly mainnet: true;
|
|
3238
|
+
readonly logo: string;
|
|
3193
3239
|
readonly explorer: {
|
|
3194
3240
|
readonly baseUrl: "https://klaytnfinder.io/";
|
|
3195
3241
|
readonly txUrl: "https://klaytnfinder.io/tx/";
|
|
@@ -3260,6 +3306,7 @@ export declare const spokeChainConfig: {
|
|
|
3260
3306
|
readonly type: "STACKS";
|
|
3261
3307
|
readonly chainId: "stacks";
|
|
3262
3308
|
readonly mainnet: true;
|
|
3309
|
+
readonly logo: string;
|
|
3263
3310
|
readonly explorer: {
|
|
3264
3311
|
readonly baseUrl: "https://explorer.hiro.so/";
|
|
3265
3312
|
readonly txUrl: "https://explorer.hiro.so/txid/";
|
|
@@ -3363,6 +3410,7 @@ export declare const hubConfig: {
|
|
|
3363
3410
|
readonly type: "EVM";
|
|
3364
3411
|
readonly chainId: 146;
|
|
3365
3412
|
readonly mainnet: true;
|
|
3413
|
+
readonly logo: string;
|
|
3366
3414
|
readonly explorer: {
|
|
3367
3415
|
readonly baseUrl: "https://sonicscan.org/";
|
|
3368
3416
|
readonly txUrl: "https://sonicscan.org/tx/";
|
package/dist/chains/chains.js
CHANGED
|
@@ -30,6 +30,13 @@ export const RelayChainIdMap = {
|
|
|
30
30
|
};
|
|
31
31
|
export const INTENT_CHAIN_IDS = Object.values(RelayChainIdMap);
|
|
32
32
|
export const IntentRelayChainIdToChainKey = Object.fromEntries(Object.entries(RelayChainIdMap).map(([chainKey, chainId]) => [chainId, chainKey]));
|
|
33
|
+
/**
|
|
34
|
+
* Base URL for default chain logos hosted in the `@sodax/assets` package.
|
|
35
|
+
* Each logo is served from `main` via raw.githubusercontent and named by its
|
|
36
|
+
* `ChainKeys` value, so the full URL is `${CHAIN_LOGO_BASE_URL}/<chainKey>.png`.
|
|
37
|
+
*/
|
|
38
|
+
export const CHAIN_LOGO_BASE_URL = 'https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/chain';
|
|
39
|
+
const chainLogo = (key) => `${CHAIN_LOGO_BASE_URL}/${key}.png`;
|
|
33
40
|
export const baseChainInfo = {
|
|
34
41
|
[ChainKeys.SONIC_MAINNET]: {
|
|
35
42
|
name: 'Sonic',
|
|
@@ -37,6 +44,7 @@ export const baseChainInfo = {
|
|
|
37
44
|
type: 'EVM',
|
|
38
45
|
chainId: 146,
|
|
39
46
|
mainnet: true,
|
|
47
|
+
logo: chainLogo(ChainKeys.SONIC_MAINNET),
|
|
40
48
|
explorer: {
|
|
41
49
|
baseUrl: 'https://sonicscan.org/',
|
|
42
50
|
txUrl: 'https://sonicscan.org/tx/',
|
|
@@ -50,6 +58,7 @@ export const baseChainInfo = {
|
|
|
50
58
|
type: 'SOLANA',
|
|
51
59
|
chainId: 'solana',
|
|
52
60
|
mainnet: true,
|
|
61
|
+
logo: chainLogo(ChainKeys.SOLANA_MAINNET),
|
|
53
62
|
explorer: {
|
|
54
63
|
baseUrl: 'https://solscan.io/',
|
|
55
64
|
txUrl: 'https://solscan.io/tx/',
|
|
@@ -63,6 +72,7 @@ export const baseChainInfo = {
|
|
|
63
72
|
type: 'EVM',
|
|
64
73
|
chainId: 43_114,
|
|
65
74
|
mainnet: true,
|
|
75
|
+
logo: chainLogo(ChainKeys.AVALANCHE_MAINNET),
|
|
66
76
|
explorer: {
|
|
67
77
|
baseUrl: 'https://snowtrace.io/',
|
|
68
78
|
txUrl: 'https://snowtrace.io/tx/',
|
|
@@ -76,6 +86,7 @@ export const baseChainInfo = {
|
|
|
76
86
|
type: 'EVM',
|
|
77
87
|
chainId: 42_161,
|
|
78
88
|
mainnet: true,
|
|
89
|
+
logo: chainLogo(ChainKeys.ARBITRUM_MAINNET),
|
|
79
90
|
explorer: {
|
|
80
91
|
baseUrl: 'https://arbiscan.io/',
|
|
81
92
|
txUrl: 'https://arbiscan.io/tx/',
|
|
@@ -89,6 +100,7 @@ export const baseChainInfo = {
|
|
|
89
100
|
type: 'EVM',
|
|
90
101
|
chainId: 8453,
|
|
91
102
|
mainnet: true,
|
|
103
|
+
logo: chainLogo(ChainKeys.BASE_MAINNET),
|
|
92
104
|
explorer: {
|
|
93
105
|
baseUrl: 'https://basescan.org/',
|
|
94
106
|
txUrl: 'https://basescan.org/tx/',
|
|
@@ -102,6 +114,7 @@ export const baseChainInfo = {
|
|
|
102
114
|
type: 'EVM',
|
|
103
115
|
chainId: 10,
|
|
104
116
|
mainnet: true,
|
|
117
|
+
logo: chainLogo(ChainKeys.OPTIMISM_MAINNET),
|
|
105
118
|
explorer: {
|
|
106
119
|
baseUrl: 'https://optimistic.etherscan.io/',
|
|
107
120
|
txUrl: 'https://optimistic.etherscan.io/tx/',
|
|
@@ -115,6 +128,7 @@ export const baseChainInfo = {
|
|
|
115
128
|
type: 'EVM',
|
|
116
129
|
chainId: 56,
|
|
117
130
|
mainnet: true,
|
|
131
|
+
logo: chainLogo(ChainKeys.BSC_MAINNET),
|
|
118
132
|
explorer: {
|
|
119
133
|
baseUrl: 'https://bscscan.com/',
|
|
120
134
|
txUrl: 'https://bscscan.com/tx/',
|
|
@@ -128,6 +142,7 @@ export const baseChainInfo = {
|
|
|
128
142
|
type: 'EVM',
|
|
129
143
|
chainId: 137,
|
|
130
144
|
mainnet: true,
|
|
145
|
+
logo: chainLogo(ChainKeys.POLYGON_MAINNET),
|
|
131
146
|
explorer: {
|
|
132
147
|
baseUrl: 'https://polygonscan.com/',
|
|
133
148
|
txUrl: 'https://polygonscan.com/tx/',
|
|
@@ -141,6 +156,7 @@ export const baseChainInfo = {
|
|
|
141
156
|
type: 'EVM',
|
|
142
157
|
chainId: 999,
|
|
143
158
|
mainnet: true,
|
|
159
|
+
logo: chainLogo(ChainKeys.HYPEREVM_MAINNET),
|
|
144
160
|
explorer: {
|
|
145
161
|
baseUrl: 'https://hyperevmscan.io/',
|
|
146
162
|
txUrl: 'https://hyperevmscan.io/tx/',
|
|
@@ -154,6 +170,7 @@ export const baseChainInfo = {
|
|
|
154
170
|
type: 'EVM',
|
|
155
171
|
chainId: 1890,
|
|
156
172
|
mainnet: true,
|
|
173
|
+
logo: chainLogo(ChainKeys.LIGHTLINK_MAINNET),
|
|
157
174
|
explorer: {
|
|
158
175
|
baseUrl: 'https://phoenix.lightlink.io/',
|
|
159
176
|
txUrl: 'https://phoenix.lightlink.io/tx/',
|
|
@@ -167,6 +184,7 @@ export const baseChainInfo = {
|
|
|
167
184
|
type: 'INJECTIVE',
|
|
168
185
|
chainId: 'injective-1',
|
|
169
186
|
mainnet: true,
|
|
187
|
+
logo: chainLogo(ChainKeys.INJECTIVE_MAINNET),
|
|
170
188
|
explorer: {
|
|
171
189
|
baseUrl: 'https://www.mintscan.io/injective/',
|
|
172
190
|
txUrl: 'https://www.mintscan.io/injective/tx/',
|
|
@@ -180,6 +198,7 @@ export const baseChainInfo = {
|
|
|
180
198
|
type: 'STELLAR',
|
|
181
199
|
chainId: 'stellar',
|
|
182
200
|
mainnet: true,
|
|
201
|
+
logo: chainLogo(ChainKeys.STELLAR_MAINNET),
|
|
183
202
|
explorer: {
|
|
184
203
|
baseUrl: 'https://stellar.expert/explorer/public/',
|
|
185
204
|
txUrl: 'https://stellar.expert/explorer/public/tx/',
|
|
@@ -193,6 +212,7 @@ export const baseChainInfo = {
|
|
|
193
212
|
type: 'SUI',
|
|
194
213
|
chainId: 'sui',
|
|
195
214
|
mainnet: true,
|
|
215
|
+
logo: chainLogo(ChainKeys.SUI_MAINNET),
|
|
196
216
|
explorer: {
|
|
197
217
|
baseUrl: 'https://suivision.xyz/',
|
|
198
218
|
txUrl: 'https://suivision.xyz/txblock/',
|
|
@@ -206,6 +226,7 @@ export const baseChainInfo = {
|
|
|
206
226
|
type: 'ICON',
|
|
207
227
|
chainId: '0x1.icon',
|
|
208
228
|
mainnet: true,
|
|
229
|
+
logo: chainLogo(ChainKeys.ICON_MAINNET),
|
|
209
230
|
explorer: {
|
|
210
231
|
baseUrl: 'https://tracker.icon.community/',
|
|
211
232
|
txUrl: 'https://tracker.icon.community/transaction/',
|
|
@@ -219,6 +240,7 @@ export const baseChainInfo = {
|
|
|
219
240
|
type: 'NEAR',
|
|
220
241
|
chainId: 'near',
|
|
221
242
|
mainnet: true,
|
|
243
|
+
logo: chainLogo(ChainKeys.NEAR_MAINNET),
|
|
222
244
|
explorer: {
|
|
223
245
|
baseUrl: 'https://nearblocks.io/',
|
|
224
246
|
txUrl: 'https://nearblocks.io/txns/',
|
|
@@ -232,6 +254,7 @@ export const baseChainInfo = {
|
|
|
232
254
|
type: 'EVM',
|
|
233
255
|
chainId: 1,
|
|
234
256
|
mainnet: true,
|
|
257
|
+
logo: chainLogo(ChainKeys.ETHEREUM_MAINNET),
|
|
235
258
|
explorer: {
|
|
236
259
|
baseUrl: 'https://etherscan.io/',
|
|
237
260
|
txUrl: 'https://etherscan.io/tx/',
|
|
@@ -245,6 +268,7 @@ export const baseChainInfo = {
|
|
|
245
268
|
type: 'BITCOIN',
|
|
246
269
|
chainId: 'bitcoin',
|
|
247
270
|
mainnet: true,
|
|
271
|
+
logo: chainLogo(ChainKeys.BITCOIN_MAINNET),
|
|
248
272
|
explorer: {
|
|
249
273
|
baseUrl: 'https://mempool.space/',
|
|
250
274
|
txUrl: 'https://mempool.space/tx/',
|
|
@@ -258,6 +282,7 @@ export const baseChainInfo = {
|
|
|
258
282
|
type: 'EVM',
|
|
259
283
|
chainId: 151,
|
|
260
284
|
mainnet: true,
|
|
285
|
+
logo: chainLogo(ChainKeys.REDBELLY_MAINNET),
|
|
261
286
|
explorer: {
|
|
262
287
|
baseUrl: 'https://redbelly.routescan.io/',
|
|
263
288
|
txUrl: 'https://redbelly.routescan.io/tx/',
|
|
@@ -271,6 +296,7 @@ export const baseChainInfo = {
|
|
|
271
296
|
type: 'EVM',
|
|
272
297
|
chainId: 8217,
|
|
273
298
|
mainnet: true,
|
|
299
|
+
logo: chainLogo(ChainKeys.KAIA_MAINNET),
|
|
274
300
|
explorer: {
|
|
275
301
|
baseUrl: 'https://klaytnfinder.io/',
|
|
276
302
|
txUrl: 'https://klaytnfinder.io/tx/',
|
|
@@ -284,6 +310,7 @@ export const baseChainInfo = {
|
|
|
284
310
|
type: 'STACKS',
|
|
285
311
|
chainId: 'stacks',
|
|
286
312
|
mainnet: true,
|
|
313
|
+
logo: chainLogo(ChainKeys.STACKS_MAINNET),
|
|
287
314
|
explorer: {
|
|
288
315
|
baseUrl: 'https://explorer.hiro.so/',
|
|
289
316
|
txUrl: 'https://explorer.hiro.so/txid/',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Address } from '../shared/shared.js';
|
|
2
|
+
import type { SpokeChainKey } from '../chains/chains.js';
|
|
3
|
+
/**
|
|
4
|
+
* Stable identifier for a deployed delivery-hook contract. The string value is the discriminant
|
|
5
|
+
* used by the SDK's hook resolver (`EvmSolverService.resolveDeliveryHook`) to pick the codec.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HookKind: {
|
|
8
|
+
/** Deposits delivered USDC into the recipient's HyperCore perps account (HyperEVM). */
|
|
9
|
+
readonly HYPERCORE_DEPOSIT: "hyperCoreDeposit";
|
|
10
|
+
};
|
|
11
|
+
export type HookKind = (typeof HookKind)[keyof typeof HookKind];
|
|
12
|
+
export type SpokeHookConfig = {
|
|
13
|
+
kind: HookKind;
|
|
14
|
+
/** Deployed hook contract address on the chain it is registered under. */
|
|
15
|
+
address: Address;
|
|
16
|
+
/**
|
|
17
|
+
* Spoke-token addresses (on the hook's own chain) this hook accepts as the delivered output.
|
|
18
|
+
* `undefined` means no token restriction. HyperCore, for example, only credits USDC. Reference
|
|
19
|
+
* the canonical token addresses from `spokeChainConfig` rather than hardcoding literals.
|
|
20
|
+
*/
|
|
21
|
+
supportedTokens?: readonly string[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Deployed delivery hooks, keyed by the chain they live on. Many hooks per chain and many chains
|
|
25
|
+
* are supported — add an entry to grow coverage. `Partial` because most chains have no hooks.
|
|
26
|
+
*/
|
|
27
|
+
export declare const spokeHooks: {
|
|
28
|
+
readonly hyper: readonly [{
|
|
29
|
+
readonly kind: "hyperCoreDeposit";
|
|
30
|
+
readonly address: "0xc79224a4DEE653C9a26572B941149d95a88432c4";
|
|
31
|
+
readonly supportedTokens: readonly ["0xb88339CB7199b77E23DB6E890353E22632Ba630f"];
|
|
32
|
+
}];
|
|
33
|
+
};
|
|
34
|
+
/** Returns the deployed hook of the given kind on `chainKey`, or `undefined` if none is registered. */
|
|
35
|
+
export declare const getSpokeHook: (chainKey: SpokeChainKey, kind: HookKind) => SpokeHookConfig | undefined;
|
|
36
|
+
/** Returns every hook deployed on `chainKey` (empty when none). */
|
|
37
|
+
export declare const getSpokeHooks: (chainKey: SpokeChainKey) => readonly SpokeHookConfig[];
|
|
38
|
+
/**
|
|
39
|
+
* Whether a hook of `kind` on `chainKey` accepts `token` (case-insensitive) as the delivered output.
|
|
40
|
+
* `false` when the hook is not deployed there; `true` when the hook has no token restriction.
|
|
41
|
+
*/
|
|
42
|
+
export declare const isHookSupportedToken: (chainKey: SpokeChainKey, kind: HookKind, token: string) => boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Delivery-hook registry for solver intents.
|
|
2
|
+
//
|
|
3
|
+
// When an intent's output is delivered on a spoke chain, the `SpokeAssetManager` can call
|
|
4
|
+
// `ISpokeReceiver(dstAddress).hook(token, amount, deliveryData)` instead of transferring the
|
|
5
|
+
// tokens straight to the recipient. Each deployed hook contract is identified here by a stable
|
|
6
|
+
// `HookKind` plus its per-chain address, so consumers never hardcode addresses and the address
|
|
7
|
+
// can never drift from the payload codec that targets it (the codec lives in `@sodax/sdk`).
|
|
8
|
+
import { ChainKeys, spokeChainConfig } from '../chains/chains.js';
|
|
9
|
+
/**
|
|
10
|
+
* Stable identifier for a deployed delivery-hook contract. The string value is the discriminant
|
|
11
|
+
* used by the SDK's hook resolver (`EvmSolverService.resolveDeliveryHook`) to pick the codec.
|
|
12
|
+
*/
|
|
13
|
+
export const HookKind = {
|
|
14
|
+
/** Deposits delivered USDC into the recipient's HyperCore perps account (HyperEVM). */
|
|
15
|
+
HYPERCORE_DEPOSIT: 'hyperCoreDeposit',
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Deployed delivery hooks, keyed by the chain they live on. Many hooks per chain and many chains
|
|
19
|
+
* are supported — add an entry to grow coverage. `Partial` because most chains have no hooks.
|
|
20
|
+
*/
|
|
21
|
+
export const spokeHooks = {
|
|
22
|
+
[ChainKeys.HYPEREVM_MAINNET]: [
|
|
23
|
+
{
|
|
24
|
+
kind: HookKind.HYPERCORE_DEPOSIT,
|
|
25
|
+
address: '0xc79224a4DEE653C9a26572B941149d95a88432c4',
|
|
26
|
+
supportedTokens: [spokeChainConfig[ChainKeys.HYPEREVM_MAINNET].supportedTokens.USDC.address], // USDC on HyperEVM
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
/** Returns the deployed hook of the given kind on `chainKey`, or `undefined` if none is registered. */
|
|
31
|
+
export const getSpokeHook = (chainKey, kind) => spokeHooks[chainKey]?.find(h => h.kind === kind);
|
|
32
|
+
/** Returns every hook deployed on `chainKey` (empty when none). */
|
|
33
|
+
export const getSpokeHooks = (chainKey) => spokeHooks[chainKey] ?? [];
|
|
34
|
+
/**
|
|
35
|
+
* Whether a hook of `kind` on `chainKey` accepts `token` (case-insensitive) as the delivered output.
|
|
36
|
+
* `false` when the hook is not deployed there; `true` when the hook has no token restriction.
|
|
37
|
+
*/
|
|
38
|
+
export const isHookSupportedToken = (chainKey, kind, token) => {
|
|
39
|
+
const hook = getSpokeHook(chainKey, kind);
|
|
40
|
+
if (!hook) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return !hook.supportedTokens || hook.supportedTokens.some(t => t.toLowerCase() === token.toLowerCase());
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './backend/index.js';
|
|
|
6
6
|
export * from './bitcoin/index.js';
|
|
7
7
|
export * from './dex/index.js';
|
|
8
8
|
export * from './evm/index.js';
|
|
9
|
+
export * from './hooks/index.js';
|
|
9
10
|
export * from './icon/index.js';
|
|
10
11
|
export * from './injective/index.js';
|
|
11
12
|
export * from './moneyMarket/index.js';
|
|
@@ -18,4 +19,4 @@ export * from './sui/index.js';
|
|
|
18
19
|
export * from './swap/index.js';
|
|
19
20
|
export * from './utils/index.js';
|
|
20
21
|
export * from './wallet/index.js';
|
|
21
|
-
export declare const CONFIG_VERSION =
|
|
22
|
+
export declare const CONFIG_VERSION = 216;
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from './backend/index.js';
|
|
|
6
6
|
export * from './bitcoin/index.js';
|
|
7
7
|
export * from './dex/index.js';
|
|
8
8
|
export * from './evm/index.js';
|
|
9
|
+
export * from './hooks/index.js';
|
|
9
10
|
export * from './icon/index.js';
|
|
10
11
|
export * from './injective/index.js';
|
|
11
12
|
export * from './moneyMarket/index.js';
|
|
@@ -18,4 +19,4 @@ export * from './sui/index.js';
|
|
|
18
19
|
export * from './swap/index.js';
|
|
19
20
|
export * from './utils/index.js';
|
|
20
21
|
export * from './wallet/index.js';
|
|
21
|
-
export const CONFIG_VERSION =
|
|
22
|
+
export const CONFIG_VERSION = 216; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { SodaxFeature } from './features.js';
|
|
2
|
+
/**
|
|
3
|
+
* Analytics for the SDK — structured, opt-in tracking of user-action flows.
|
|
4
|
+
*
|
|
5
|
+
* This is deliberately separate from {@link SodaxLogger}. The logger is a developer-facing
|
|
6
|
+
* diagnostics sink that is **on by default** (`console`) and takes free-form messages. Analytics
|
|
7
|
+
* is a product-facing event stream that is **off by default**: the SDK emits nothing — and never
|
|
8
|
+
* even builds an event payload — unless a consumer explicitly enables it via
|
|
9
|
+
* `new Sodax({ analytics })`. This keeps feature code paths free of analytics overhead when it is
|
|
10
|
+
* not in use.
|
|
11
|
+
*
|
|
12
|
+
* Enable and shape it through {@link AnalyticsOption} on the `Sodax` constructor:
|
|
13
|
+
* - omitted / `false` — disabled (default).
|
|
14
|
+
* - an {@link AnalyticsConfig} — forward events to your own product-analytics backend, optionally
|
|
15
|
+
* scoped by feature and detail level.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Lifecycle phase of a tracked feature action flow. Every event marks where in a feature's action
|
|
19
|
+
* flow it was emitted, so a sink can pair a `start` with its terminal `success` / `failure`
|
|
20
|
+
* (e.g. to measure duration or drop-off).
|
|
21
|
+
*/
|
|
22
|
+
export type AnalyticsEventPhase = 'start' | 'success' | 'failure';
|
|
23
|
+
/**
|
|
24
|
+
* Detail level an event belongs to. Consumers choose how much the SDK tracks:
|
|
25
|
+
* - `basic` — coarse action flow (feature, action, phase) only.
|
|
26
|
+
* - `detailed` — adds richer `data` payloads (amounts, tokens, chain keys, …).
|
|
27
|
+
*
|
|
28
|
+
* The SDK only builds and emits a `detailed` event when the configured level is `detailed`, so
|
|
29
|
+
* heavier payloads are never constructed when a consumer stays on `basic`.
|
|
30
|
+
*/
|
|
31
|
+
export type AnalyticsDetailLevel = 'basic' | 'detailed';
|
|
32
|
+
/**
|
|
33
|
+
* A single user-action analytics event emitted by the SDK at a feature action-flow boundary.
|
|
34
|
+
*
|
|
35
|
+
* `feature` + `action` + `phase` form the stable identity of an event — the same `(feature,
|
|
36
|
+
* action)` tagging the error layer already standardizes — so events line up with errors in a
|
|
37
|
+
* downstream sink. `data` is an optional structured payload whose richness depends on the
|
|
38
|
+
* configured {@link AnalyticsDetailLevel}.
|
|
39
|
+
*/
|
|
40
|
+
export interface AnalyticsEvent {
|
|
41
|
+
/** The high-level feature the action belongs to. */
|
|
42
|
+
feature: SodaxFeature;
|
|
43
|
+
/** The feature-level operation in flight, e.g. `'supply'`, `'createIntent'`, `'stake'`. */
|
|
44
|
+
action: string;
|
|
45
|
+
/** Where in the action flow this event was emitted. */
|
|
46
|
+
phase: AnalyticsEventPhase;
|
|
47
|
+
/** The detail level this event belongs to; gated against the configured level. */
|
|
48
|
+
level: AnalyticsDetailLevel;
|
|
49
|
+
/** Optional structured payload. Present mainly on `detailed` events. */
|
|
50
|
+
data?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Consumer-supplied tracker: the SDK calls it once per emitted event, and the consumer forwards the
|
|
54
|
+
* event to their product-analytics backend (Segment, Amplitude, PostHog, a custom collector, …),
|
|
55
|
+
* e.g. `tracker: (event) => amplitude.track(event.action, event.data)`.
|
|
56
|
+
*
|
|
57
|
+
* It must be cheap and non-throwing — the SDK treats it as fire-and-forget, does not await it, and
|
|
58
|
+
* swallows any error it throws so analytics can never break a feature flow.
|
|
59
|
+
*/
|
|
60
|
+
export type AnalyticsTracker = (event: AnalyticsEvent) => void;
|
|
61
|
+
/**
|
|
62
|
+
* How much of one feature to track, in the {@link AnalyticsConfig.features} allowlist:
|
|
63
|
+
* - `true` — every action of the feature.
|
|
64
|
+
* - `{ actions }` — only the named actions (e.g. `{ actions: ['supply', 'borrow'] }`).
|
|
65
|
+
*/
|
|
66
|
+
export type AnalyticsFeatureScope = true | {
|
|
67
|
+
actions: readonly string[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* The set of features (and actions) to track — an **allowlist**. Two equivalent forms:
|
|
71
|
+
* - Object: per-feature {@link AnalyticsFeatureScope}. A feature **omitted from the object is OFF**.
|
|
72
|
+
* `{ swap: true, moneyMarket: { actions: ['supply'] } }`.
|
|
73
|
+
* - Array shorthand: a list of features, each fully tracked. `['swap', 'moneyMarket']`.
|
|
74
|
+
*
|
|
75
|
+
* Omitting {@link AnalyticsConfig.features} entirely tracks **everything** (all features, all
|
|
76
|
+
* actions) — scoping is opt-in.
|
|
77
|
+
*/
|
|
78
|
+
export type AnalyticsFeatures = Partial<Record<SodaxFeature, AnalyticsFeatureScope>> | readonly SodaxFeature[];
|
|
79
|
+
/**
|
|
80
|
+
* Analytics configuration passed to `new Sodax({ analytics })`.
|
|
81
|
+
*
|
|
82
|
+
* Providing this object is what turns analytics on; the {@link AnalyticsTracker} `tracker` is the
|
|
83
|
+
* only required field. `level` and `features` narrow what gets emitted so consumers track only what
|
|
84
|
+
* they care about — by detail level and by feature/action.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* new Sodax({
|
|
88
|
+
* analytics: {
|
|
89
|
+
* tracker: (event) => amplitude.track(event.action, event.data),
|
|
90
|
+
* features: {
|
|
91
|
+
* swap: true, // all swap actions
|
|
92
|
+
* moneyMarket: { actions: ['supply', 'borrow'] }, // only these
|
|
93
|
+
* // staking omitted → OFF
|
|
94
|
+
* }, // or simple form: features: ['swap', 'moneyMarket']
|
|
95
|
+
* },
|
|
96
|
+
* });
|
|
97
|
+
*/
|
|
98
|
+
export interface AnalyticsConfig {
|
|
99
|
+
/** Where events are delivered. Required — enabling analytics means supplying a tracker. */
|
|
100
|
+
tracker: AnalyticsTracker;
|
|
101
|
+
/**
|
|
102
|
+
* Highest detail level to emit. Defaults to `'basic'`. Events tagged `'detailed'` are only built
|
|
103
|
+
* and delivered when this is `'detailed'`.
|
|
104
|
+
*/
|
|
105
|
+
level?: AnalyticsDetailLevel;
|
|
106
|
+
/**
|
|
107
|
+
* Allowlist of features/actions to track. Omit to track everything; otherwise only the listed
|
|
108
|
+
* features (and, with `{ actions }`, only the listed actions) emit. See {@link AnalyticsFeatures}.
|
|
109
|
+
*/
|
|
110
|
+
features?: AnalyticsFeatures;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The `analytics` option accepted by `new Sodax(...)`. Either a full {@link AnalyticsConfig} or
|
|
114
|
+
* `false` (the default — analytics disabled).
|
|
115
|
+
*
|
|
116
|
+
* Like `logger`, this is a client-side runtime option resolved once by the SDK; it is never
|
|
117
|
+
* fetched from or overwritten by the backend config.
|
|
118
|
+
*/
|
|
119
|
+
export type AnalyticsOption = AnalyticsConfig | false;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The set of high-level SODAX SDK features.
|
|
3
|
+
*
|
|
4
|
+
* Used as a first-class tag across cross-cutting concerns — error reporting
|
|
5
|
+
* (`SodaxError.feature` in `@sodax/sdk`) and analytics ({@link AnalyticsEvent.feature} and
|
|
6
|
+
* per-feature analytics toggles). It lives in `@sodax/types`, the lowest layer, so every package
|
|
7
|
+
* shares one source of truth instead of redefining the list; `@sodax/sdk` re-exports it.
|
|
8
|
+
*/
|
|
9
|
+
export type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery' | 'leverageYield';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/shared/index.d.ts
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TxPollingConfig } from '../shared/shared.js';
|
|
2
2
|
import type { SodaxLoggerOption } from '../shared/logger.js';
|
|
3
|
+
import type { AnalyticsOption } from '../shared/analytics.js';
|
|
3
4
|
import type { DeepPartial } from '../utils/deep-partial.js';
|
|
4
5
|
import { type ApiConfig, type SolverConfig, type RelayConfig } from '../common/constants.js';
|
|
5
6
|
import type { MoneyMarketDefaultConfig, MoneyMarketOptions, PartnerFee, Prettify } from '../common/common.js';
|
|
@@ -35,6 +36,7 @@ export type BridgeDefaultConfig = {};
|
|
|
35
36
|
export declare const bridgeConfig: {};
|
|
36
37
|
export type SodaxOptionalConfig = {
|
|
37
38
|
logger?: SodaxLoggerOption;
|
|
39
|
+
analytics?: AnalyticsOption;
|
|
38
40
|
fee?: PartnerFee;
|
|
39
41
|
swaps?: SwapsOptions;
|
|
40
42
|
moneyMarket?: MoneyMarketOptions;
|
|
@@ -79,6 +81,7 @@ export declare const sodaxConfig: {
|
|
|
79
81
|
readonly type: "EVM";
|
|
80
82
|
readonly chainId: 146;
|
|
81
83
|
readonly mainnet: true;
|
|
84
|
+
readonly logo: string;
|
|
82
85
|
readonly explorer: {
|
|
83
86
|
readonly baseUrl: "https://sonicscan.org/";
|
|
84
87
|
readonly txUrl: "https://sonicscan.org/tx/";
|
|
@@ -431,6 +434,7 @@ export declare const sodaxConfig: {
|
|
|
431
434
|
readonly type: "EVM";
|
|
432
435
|
readonly chainId: 151;
|
|
433
436
|
readonly mainnet: true;
|
|
437
|
+
readonly logo: string;
|
|
434
438
|
readonly explorer: {
|
|
435
439
|
readonly baseUrl: "https://redbelly.routescan.io/";
|
|
436
440
|
readonly txUrl: "https://redbelly.routescan.io/tx/";
|
|
@@ -600,6 +604,7 @@ export declare const sodaxConfig: {
|
|
|
600
604
|
readonly type: "SOLANA";
|
|
601
605
|
readonly chainId: "solana";
|
|
602
606
|
readonly mainnet: true;
|
|
607
|
+
readonly logo: string;
|
|
603
608
|
readonly explorer: {
|
|
604
609
|
readonly baseUrl: "https://solscan.io/";
|
|
605
610
|
readonly txUrl: "https://solscan.io/tx/";
|
|
@@ -815,6 +820,7 @@ export declare const sodaxConfig: {
|
|
|
815
820
|
readonly type: "EVM";
|
|
816
821
|
readonly chainId: 43114;
|
|
817
822
|
readonly mainnet: true;
|
|
823
|
+
readonly logo: string;
|
|
818
824
|
readonly explorer: {
|
|
819
825
|
readonly baseUrl: "https://snowtrace.io/";
|
|
820
826
|
readonly txUrl: "https://snowtrace.io/tx/";
|
|
@@ -897,6 +903,7 @@ export declare const sodaxConfig: {
|
|
|
897
903
|
readonly type: "EVM";
|
|
898
904
|
readonly chainId: 42161;
|
|
899
905
|
readonly mainnet: true;
|
|
906
|
+
readonly logo: string;
|
|
900
907
|
readonly explorer: {
|
|
901
908
|
readonly baseUrl: "https://arbiscan.io/";
|
|
902
909
|
readonly txUrl: "https://arbiscan.io/tx/";
|
|
@@ -1089,6 +1096,7 @@ export declare const sodaxConfig: {
|
|
|
1089
1096
|
readonly type: "EVM";
|
|
1090
1097
|
readonly chainId: 8453;
|
|
1091
1098
|
readonly mainnet: true;
|
|
1099
|
+
readonly logo: string;
|
|
1092
1100
|
readonly explorer: {
|
|
1093
1101
|
readonly baseUrl: "https://basescan.org/";
|
|
1094
1102
|
readonly txUrl: "https://basescan.org/tx/";
|
|
@@ -1217,6 +1225,7 @@ export declare const sodaxConfig: {
|
|
|
1217
1225
|
readonly type: "EVM";
|
|
1218
1226
|
readonly chainId: 10;
|
|
1219
1227
|
readonly mainnet: true;
|
|
1228
|
+
readonly logo: string;
|
|
1220
1229
|
readonly explorer: {
|
|
1221
1230
|
readonly baseUrl: "https://optimistic.etherscan.io/";
|
|
1222
1231
|
readonly txUrl: "https://optimistic.etherscan.io/tx/";
|
|
@@ -1326,6 +1335,7 @@ export declare const sodaxConfig: {
|
|
|
1326
1335
|
readonly type: "EVM";
|
|
1327
1336
|
readonly chainId: 56;
|
|
1328
1337
|
readonly mainnet: true;
|
|
1338
|
+
readonly logo: string;
|
|
1329
1339
|
readonly explorer: {
|
|
1330
1340
|
readonly baseUrl: "https://bscscan.com/";
|
|
1331
1341
|
readonly txUrl: "https://bscscan.com/tx/";
|
|
@@ -1516,6 +1526,7 @@ export declare const sodaxConfig: {
|
|
|
1516
1526
|
readonly type: "EVM";
|
|
1517
1527
|
readonly chainId: 137;
|
|
1518
1528
|
readonly mainnet: true;
|
|
1529
|
+
readonly logo: string;
|
|
1519
1530
|
readonly explorer: {
|
|
1520
1531
|
readonly baseUrl: "https://polygonscan.com/";
|
|
1521
1532
|
readonly txUrl: "https://polygonscan.com/tx/";
|
|
@@ -1634,6 +1645,7 @@ export declare const sodaxConfig: {
|
|
|
1634
1645
|
readonly type: "EVM";
|
|
1635
1646
|
readonly chainId: 999;
|
|
1636
1647
|
readonly mainnet: true;
|
|
1648
|
+
readonly logo: string;
|
|
1637
1649
|
readonly explorer: {
|
|
1638
1650
|
readonly baseUrl: "https://hyperevmscan.io/";
|
|
1639
1651
|
readonly txUrl: "https://hyperevmscan.io/tx/";
|
|
@@ -1743,6 +1755,7 @@ export declare const sodaxConfig: {
|
|
|
1743
1755
|
readonly type: "EVM";
|
|
1744
1756
|
readonly chainId: 1890;
|
|
1745
1757
|
readonly mainnet: true;
|
|
1758
|
+
readonly logo: string;
|
|
1746
1759
|
readonly explorer: {
|
|
1747
1760
|
readonly baseUrl: "https://phoenix.lightlink.io/";
|
|
1748
1761
|
readonly txUrl: "https://phoenix.lightlink.io/tx/";
|
|
@@ -1921,6 +1934,7 @@ export declare const sodaxConfig: {
|
|
|
1921
1934
|
readonly type: "INJECTIVE";
|
|
1922
1935
|
readonly chainId: "injective-1";
|
|
1923
1936
|
readonly mainnet: true;
|
|
1937
|
+
readonly logo: string;
|
|
1924
1938
|
readonly explorer: {
|
|
1925
1939
|
readonly baseUrl: "https://www.mintscan.io/injective/";
|
|
1926
1940
|
readonly txUrl: "https://www.mintscan.io/injective/tx/";
|
|
@@ -1999,6 +2013,7 @@ export declare const sodaxConfig: {
|
|
|
1999
2013
|
readonly type: "BITCOIN";
|
|
2000
2014
|
readonly chainId: "bitcoin";
|
|
2001
2015
|
readonly mainnet: true;
|
|
2016
|
+
readonly logo: string;
|
|
2002
2017
|
readonly explorer: {
|
|
2003
2018
|
readonly baseUrl: "https://mempool.space/";
|
|
2004
2019
|
readonly txUrl: "https://mempool.space/tx/";
|
|
@@ -2159,6 +2174,7 @@ export declare const sodaxConfig: {
|
|
|
2159
2174
|
readonly type: "STELLAR";
|
|
2160
2175
|
readonly chainId: "stellar";
|
|
2161
2176
|
readonly mainnet: true;
|
|
2177
|
+
readonly logo: string;
|
|
2162
2178
|
readonly explorer: {
|
|
2163
2179
|
readonly baseUrl: "https://stellar.expert/explorer/public/";
|
|
2164
2180
|
readonly txUrl: "https://stellar.expert/explorer/public/tx/";
|
|
@@ -2327,6 +2343,7 @@ export declare const sodaxConfig: {
|
|
|
2327
2343
|
readonly type: "SUI";
|
|
2328
2344
|
readonly chainId: "sui";
|
|
2329
2345
|
readonly mainnet: true;
|
|
2346
|
+
readonly logo: string;
|
|
2330
2347
|
readonly explorer: {
|
|
2331
2348
|
readonly baseUrl: "https://suivision.xyz/";
|
|
2332
2349
|
readonly txUrl: "https://suivision.xyz/txblock/";
|
|
@@ -2354,6 +2371,7 @@ export declare const sodaxConfig: {
|
|
|
2354
2371
|
readonly type: "ICON";
|
|
2355
2372
|
readonly chainId: "0x1.icon";
|
|
2356
2373
|
readonly mainnet: true;
|
|
2374
|
+
readonly logo: string;
|
|
2357
2375
|
readonly explorer: {
|
|
2358
2376
|
readonly baseUrl: "https://tracker.icon.community/";
|
|
2359
2377
|
readonly txUrl: "https://tracker.icon.community/transaction/";
|
|
@@ -2495,6 +2513,7 @@ export declare const sodaxConfig: {
|
|
|
2495
2513
|
readonly type: "EVM";
|
|
2496
2514
|
readonly chainId: 1;
|
|
2497
2515
|
readonly mainnet: true;
|
|
2516
|
+
readonly logo: string;
|
|
2498
2517
|
readonly explorer: {
|
|
2499
2518
|
readonly baseUrl: "https://etherscan.io/";
|
|
2500
2519
|
readonly txUrl: "https://etherscan.io/tx/";
|
|
@@ -2758,6 +2777,7 @@ export declare const sodaxConfig: {
|
|
|
2758
2777
|
readonly type: "EVM";
|
|
2759
2778
|
readonly chainId: 8217;
|
|
2760
2779
|
readonly mainnet: true;
|
|
2780
|
+
readonly logo: string;
|
|
2761
2781
|
readonly explorer: {
|
|
2762
2782
|
readonly baseUrl: "https://klaytnfinder.io/";
|
|
2763
2783
|
readonly txUrl: "https://klaytnfinder.io/tx/";
|
|
@@ -2828,6 +2848,7 @@ export declare const sodaxConfig: {
|
|
|
2828
2848
|
readonly type: "STACKS";
|
|
2829
2849
|
readonly chainId: "stacks";
|
|
2830
2850
|
readonly mainnet: true;
|
|
2851
|
+
readonly logo: string;
|
|
2831
2852
|
readonly explorer: {
|
|
2832
2853
|
readonly baseUrl: "https://explorer.hiro.so/";
|
|
2833
2854
|
readonly txUrl: "https://explorer.hiro.so/txid/";
|
|
@@ -4228,7 +4249,31 @@ export declare const sodaxConfig: {
|
|
|
4228
4249
|
readonly hubAsset: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
4229
4250
|
readonly vault: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
4230
4251
|
}];
|
|
4231
|
-
readonly "injective-1": [
|
|
4252
|
+
readonly "injective-1": [{
|
|
4253
|
+
readonly symbol: "INJ";
|
|
4254
|
+
readonly name: "Injective";
|
|
4255
|
+
readonly decimals: 18;
|
|
4256
|
+
readonly address: "inj";
|
|
4257
|
+
readonly chainKey: "injective-1";
|
|
4258
|
+
readonly hubAsset: "0xd375590b4955f6ea5623f799153f9b787a3bd319";
|
|
4259
|
+
readonly vault: "0x1f22279C89B213944b7Ea41daCB0a868DdCDFd13";
|
|
4260
|
+
}, {
|
|
4261
|
+
readonly symbol: "bnUSD";
|
|
4262
|
+
readonly name: "bnUSD";
|
|
4263
|
+
readonly decimals: 18;
|
|
4264
|
+
readonly address: "factory/inj1d036ftaatxpkqsu9hja8r24rv3v33chz3appxp/bnUSD";
|
|
4265
|
+
readonly chainKey: "injective-1";
|
|
4266
|
+
readonly hubAsset: "0x69425FFb14704124A58d6F69d510f74A59D9a5bC";
|
|
4267
|
+
readonly vault: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
4268
|
+
}, {
|
|
4269
|
+
readonly symbol: "USDC";
|
|
4270
|
+
readonly name: "USD Coin";
|
|
4271
|
+
readonly decimals: 6;
|
|
4272
|
+
readonly address: "ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E";
|
|
4273
|
+
readonly chainKey: "injective-1";
|
|
4274
|
+
readonly hubAsset: "0x4bc1211faa06fb50ff61a70331f56167ae511057";
|
|
4275
|
+
readonly vault: "0xAbbb91c0617090F0028BDC27597Cd0D038F3A833";
|
|
4276
|
+
}];
|
|
4232
4277
|
readonly near: [{
|
|
4233
4278
|
readonly symbol: "NEAR";
|
|
4234
4279
|
readonly name: "NEAR";
|
|
@@ -6144,6 +6189,7 @@ export declare const sodaxConfig: {
|
|
|
6144
6189
|
readonly type: "EVM";
|
|
6145
6190
|
readonly chainId: 146;
|
|
6146
6191
|
readonly mainnet: true;
|
|
6192
|
+
readonly logo: string;
|
|
6147
6193
|
readonly explorer: {
|
|
6148
6194
|
readonly baseUrl: "https://sonicscan.org/";
|
|
6149
6195
|
readonly txUrl: "https://sonicscan.org/tx/";
|
package/dist/swap/swap.d.ts
CHANGED
|
@@ -1337,7 +1337,31 @@ export declare const swapSupportedTokens: {
|
|
|
1337
1337
|
readonly hubAsset: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
1338
1338
|
readonly vault: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
1339
1339
|
}];
|
|
1340
|
-
readonly "injective-1": [
|
|
1340
|
+
readonly "injective-1": [{
|
|
1341
|
+
readonly symbol: "INJ";
|
|
1342
|
+
readonly name: "Injective";
|
|
1343
|
+
readonly decimals: 18;
|
|
1344
|
+
readonly address: "inj";
|
|
1345
|
+
readonly chainKey: "injective-1";
|
|
1346
|
+
readonly hubAsset: "0xd375590b4955f6ea5623f799153f9b787a3bd319";
|
|
1347
|
+
readonly vault: "0x1f22279C89B213944b7Ea41daCB0a868DdCDFd13";
|
|
1348
|
+
}, {
|
|
1349
|
+
readonly symbol: "bnUSD";
|
|
1350
|
+
readonly name: "bnUSD";
|
|
1351
|
+
readonly decimals: 18;
|
|
1352
|
+
readonly address: "factory/inj1d036ftaatxpkqsu9hja8r24rv3v33chz3appxp/bnUSD";
|
|
1353
|
+
readonly chainKey: "injective-1";
|
|
1354
|
+
readonly hubAsset: "0x69425FFb14704124A58d6F69d510f74A59D9a5bC";
|
|
1355
|
+
readonly vault: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
1356
|
+
}, {
|
|
1357
|
+
readonly symbol: "USDC";
|
|
1358
|
+
readonly name: "USD Coin";
|
|
1359
|
+
readonly decimals: 6;
|
|
1360
|
+
readonly address: "ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E";
|
|
1361
|
+
readonly chainKey: "injective-1";
|
|
1362
|
+
readonly hubAsset: "0x4bc1211faa06fb50ff61a70331f56167ae511057";
|
|
1363
|
+
readonly vault: "0xAbbb91c0617090F0028BDC27597Cd0D038F3A833";
|
|
1364
|
+
}];
|
|
1341
1365
|
readonly near: [{
|
|
1342
1366
|
readonly symbol: "NEAR";
|
|
1343
1367
|
readonly name: "NEAR";
|
|
@@ -1831,31 +1855,7 @@ export declare const stagingSwapSupportedTokens: {
|
|
|
1831
1855
|
readonly hubAsset: "0xad8901fe2c8defe467fa1df7af78d755e53485ab";
|
|
1832
1856
|
readonly vault: "0xbDf1F453FCB61424011BBDDCB96cFDB30f3Fe876";
|
|
1833
1857
|
}];
|
|
1834
|
-
readonly "injective-1": [
|
|
1835
|
-
readonly symbol: "INJ";
|
|
1836
|
-
readonly name: "Injective";
|
|
1837
|
-
readonly decimals: 18;
|
|
1838
|
-
readonly address: "inj";
|
|
1839
|
-
readonly chainKey: "injective-1";
|
|
1840
|
-
readonly hubAsset: "0xd375590b4955f6ea5623f799153f9b787a3bd319";
|
|
1841
|
-
readonly vault: "0x1f22279C89B213944b7Ea41daCB0a868DdCDFd13";
|
|
1842
|
-
}, {
|
|
1843
|
-
readonly symbol: "bnUSD";
|
|
1844
|
-
readonly name: "bnUSD";
|
|
1845
|
-
readonly decimals: 18;
|
|
1846
|
-
readonly address: "factory/inj1d036ftaatxpkqsu9hja8r24rv3v33chz3appxp/bnUSD";
|
|
1847
|
-
readonly chainKey: "injective-1";
|
|
1848
|
-
readonly hubAsset: "0x69425FFb14704124A58d6F69d510f74A59D9a5bC";
|
|
1849
|
-
readonly vault: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
1850
|
-
}, {
|
|
1851
|
-
readonly symbol: "USDC";
|
|
1852
|
-
readonly name: "USD Coin";
|
|
1853
|
-
readonly decimals: 6;
|
|
1854
|
-
readonly address: "ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E";
|
|
1855
|
-
readonly chainKey: "injective-1";
|
|
1856
|
-
readonly hubAsset: "0x4bc1211faa06fb50ff61a70331f56167ae511057";
|
|
1857
|
-
readonly vault: "0xAbbb91c0617090F0028BDC27597Cd0D038F3A833";
|
|
1858
|
-
}];
|
|
1858
|
+
readonly "injective-1": [];
|
|
1859
1859
|
readonly near: readonly [];
|
|
1860
1860
|
readonly bitcoin: readonly [];
|
|
1861
1861
|
readonly ethereum: [{
|
|
@@ -3223,7 +3223,31 @@ export declare const swapsConfig: {
|
|
|
3223
3223
|
readonly hubAsset: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
3224
3224
|
readonly vault: "0xb78c7c96ae996b4d479bb81b7569a5c6a79c88cb";
|
|
3225
3225
|
}];
|
|
3226
|
-
readonly "injective-1": [
|
|
3226
|
+
readonly "injective-1": [{
|
|
3227
|
+
readonly symbol: "INJ";
|
|
3228
|
+
readonly name: "Injective";
|
|
3229
|
+
readonly decimals: 18;
|
|
3230
|
+
readonly address: "inj";
|
|
3231
|
+
readonly chainKey: "injective-1";
|
|
3232
|
+
readonly hubAsset: "0xd375590b4955f6ea5623f799153f9b787a3bd319";
|
|
3233
|
+
readonly vault: "0x1f22279C89B213944b7Ea41daCB0a868DdCDFd13";
|
|
3234
|
+
}, {
|
|
3235
|
+
readonly symbol: "bnUSD";
|
|
3236
|
+
readonly name: "bnUSD";
|
|
3237
|
+
readonly decimals: 18;
|
|
3238
|
+
readonly address: "factory/inj1d036ftaatxpkqsu9hja8r24rv3v33chz3appxp/bnUSD";
|
|
3239
|
+
readonly chainKey: "injective-1";
|
|
3240
|
+
readonly hubAsset: "0x69425FFb14704124A58d6F69d510f74A59D9a5bC";
|
|
3241
|
+
readonly vault: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
3242
|
+
}, {
|
|
3243
|
+
readonly symbol: "USDC";
|
|
3244
|
+
readonly name: "USD Coin";
|
|
3245
|
+
readonly decimals: 6;
|
|
3246
|
+
readonly address: "ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E";
|
|
3247
|
+
readonly chainKey: "injective-1";
|
|
3248
|
+
readonly hubAsset: "0x4bc1211faa06fb50ff61a70331f56167ae511057";
|
|
3249
|
+
readonly vault: "0xAbbb91c0617090F0028BDC27597Cd0D038F3A833";
|
|
3250
|
+
}];
|
|
3227
3251
|
readonly near: [{
|
|
3228
3252
|
readonly symbol: "NEAR";
|
|
3229
3253
|
readonly name: "NEAR";
|
package/dist/swap/swap.js
CHANGED
|
@@ -169,8 +169,11 @@ export const swapSupportedTokens = {
|
|
|
169
169
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WAL,
|
|
170
170
|
spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.NAVX,
|
|
171
171
|
],
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
[ChainKeys.INJECTIVE_MAINNET]: [
|
|
173
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
|
|
174
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
|
|
175
|
+
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC,
|
|
176
|
+
],
|
|
174
177
|
[ChainKeys.NEAR_MAINNET]: [
|
|
175
178
|
spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.NEAR,
|
|
176
179
|
spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.bnUSD,
|
|
@@ -265,12 +268,7 @@ export const stagingSwapSupportedTokens = {
|
|
|
265
268
|
[ChainKeys.ICON_MAINNET]: [],
|
|
266
269
|
[ChainKeys.STELLAR_MAINNET]: [],
|
|
267
270
|
[ChainKeys.SUI_MAINNET]: [spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDT],
|
|
268
|
-
[ChainKeys.INJECTIVE_MAINNET]: [
|
|
269
|
-
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
|
|
270
|
-
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
|
|
271
|
-
spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC,
|
|
272
|
-
// spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.SODA, // NOTE: not in solver wiki
|
|
273
|
-
],
|
|
271
|
+
[ChainKeys.INJECTIVE_MAINNET]: [],
|
|
274
272
|
[ChainKeys.NEAR_MAINNET]: [],
|
|
275
273
|
[ChainKeys.BITCOIN_MAINNET]: [],
|
|
276
274
|
[ChainKeys.ETHEREUM_MAINNET]: [
|
package/package.json
CHANGED