@chainrails/sdk 0.3.9 → 0.4.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.
- package/dist/chainrails-sdk.es.js +1404 -440
- package/dist/chainrails-sdk.es.mjs +1404 -440
- package/dist/chainrails-sdk.umd.js +2 -2
- package/dist/index.d.ts +15 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/src/Intents/types.d.ts +13 -13
- package/dist/src/Intents/types.d.ts.map +1 -1
- package/dist/src/Quotes/types.d.ts +27 -27
- package/dist/src/Quotes/types.d.ts.map +1 -1
- package/dist/src/Router/types.d.ts +9 -9
- package/dist/src/Router/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +16 -16
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import fe from "ky";
|
|
2
|
+
const T = {
|
|
3
|
+
EVM: "EVM",
|
|
4
|
+
STARKNET: "STARKNET",
|
|
5
|
+
SOLANA: "SOLANA"
|
|
6
|
+
}, d = {
|
|
3
7
|
ARBITRUM: "ARBITRUM_MAINNET",
|
|
4
8
|
ARBITRUM_TESTNET: "ARBITRUM_TESTNET",
|
|
5
9
|
AVALANCHE: "AVALANCHE_MAINNET",
|
|
@@ -16,9 +20,11 @@ const d = {
|
|
|
16
20
|
OPTIMISM: "OPTIMISM_MAINNET",
|
|
17
21
|
OPTIMISM_TESTNET: "OPTIMISM_TESTNET",
|
|
18
22
|
POLYGON: "POLYGON_MAINNET",
|
|
23
|
+
SOLANA: "SOLANA_MAINNET",
|
|
24
|
+
SOLANA_TESTNET: "SOLANA_TESTNET",
|
|
19
25
|
STARKNET: "STARKNET_MAINNET",
|
|
20
26
|
STARKNET_TESTNET: "STARKNET_TESTNET"
|
|
21
|
-
},
|
|
27
|
+
}, he = {
|
|
22
28
|
ARBITRUM: "ARBITRUM",
|
|
23
29
|
ARBITRUM_TESTNET: "ARBITRUM_TESTNET",
|
|
24
30
|
AVALANCHE: "AVALANCHE",
|
|
@@ -35,32 +41,176 @@ const d = {
|
|
|
35
41
|
OPTIMISM: "OPTIMISM",
|
|
36
42
|
OPTIMISM_TESTNET: "OPTIMISM_TESTNET",
|
|
37
43
|
POLYGON: "POLYGON",
|
|
44
|
+
SOLANA: "SOLANA",
|
|
45
|
+
SOLANA_TESTNET: "SOLANA_TESTNET",
|
|
38
46
|
STARKNET: "STARKNET",
|
|
39
47
|
STARKNET_TESTNET: "STARKNET_TESTNET"
|
|
48
|
+
}, Se = {
|
|
49
|
+
type: T.EVM,
|
|
50
|
+
chainId: 42161,
|
|
51
|
+
name: "Arbitrum",
|
|
52
|
+
cctpDomain: 3,
|
|
53
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087941/arbitrum_tp1kad.svg",
|
|
54
|
+
explorer: "https://arbiscan.io"
|
|
55
|
+
}, Ae = {
|
|
56
|
+
type: T.EVM,
|
|
57
|
+
chainId: 421614,
|
|
58
|
+
name: "Arbitrum Sepolia",
|
|
59
|
+
cctpDomain: 3,
|
|
60
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087941/arbitrum_tp1kad.svg",
|
|
61
|
+
explorer: "https://sepolia.arbiscan.io"
|
|
62
|
+
}, Ue = {
|
|
63
|
+
type: T.EVM,
|
|
64
|
+
chainId: 43114,
|
|
65
|
+
name: "Avalanche",
|
|
66
|
+
cctpDomain: 1,
|
|
67
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087941/avalanche_tnvomy.svg",
|
|
68
|
+
explorer: "https://snowtrace.io"
|
|
69
|
+
}, Ce = {
|
|
70
|
+
type: T.EVM,
|
|
71
|
+
chainId: 43113,
|
|
72
|
+
name: "Avalanche Fuji",
|
|
73
|
+
cctpDomain: 1,
|
|
74
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087941/avalanche_tnvomy.svg",
|
|
75
|
+
explorer: "https://testnet.snowtrace.io"
|
|
76
|
+
}, be = {
|
|
77
|
+
type: T.EVM,
|
|
78
|
+
chainId: 8453,
|
|
79
|
+
name: "Base",
|
|
80
|
+
cctpDomain: 6,
|
|
81
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/base_yognh9.webp",
|
|
82
|
+
explorer: "https://basescan.org"
|
|
83
|
+
}, De = {
|
|
84
|
+
type: T.EVM,
|
|
85
|
+
chainId: 84532,
|
|
86
|
+
name: "Base Sepolia",
|
|
87
|
+
cctpDomain: 6,
|
|
88
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/base_yognh9.webp",
|
|
89
|
+
explorer: "https://sepolia.basescan.org"
|
|
90
|
+
}, ye = {
|
|
91
|
+
type: T.EVM,
|
|
92
|
+
chainId: 56,
|
|
93
|
+
name: "BNB Chain",
|
|
94
|
+
cctpDomain: null,
|
|
95
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/bsc_k1jm6z.webp",
|
|
96
|
+
explorer: "https://bscscan.com"
|
|
97
|
+
}, Ie = {
|
|
98
|
+
type: T.EVM,
|
|
99
|
+
chainId: 1,
|
|
100
|
+
name: "Ethereum",
|
|
101
|
+
cctpDomain: 0,
|
|
102
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/ethereum_iyciq3.svg",
|
|
103
|
+
explorer: "https://etherscan.io"
|
|
104
|
+
}, Ne = {
|
|
105
|
+
type: T.EVM,
|
|
106
|
+
chainId: 11155111,
|
|
107
|
+
name: "Ethereum Sepolia",
|
|
108
|
+
cctpDomain: 0,
|
|
109
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/ethereum_iyciq3.svg",
|
|
110
|
+
explorer: "https://sepolia.etherscan.io"
|
|
111
|
+
}, Be = {
|
|
112
|
+
type: T.EVM,
|
|
113
|
+
chainId: 999,
|
|
114
|
+
name: "HyperEVM",
|
|
115
|
+
cctpDomain: 19,
|
|
116
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/hyperevm_l2b8ck.webp",
|
|
117
|
+
explorer: "https://liquidscan.io"
|
|
118
|
+
}, ve = {
|
|
119
|
+
type: T.EVM,
|
|
120
|
+
chainId: 1135,
|
|
121
|
+
name: "Lisk",
|
|
122
|
+
cctpDomain: null,
|
|
123
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/lisk_dhgqka.png",
|
|
124
|
+
explorer: "https://blockscout.lisk.com"
|
|
125
|
+
}, Re = {
|
|
126
|
+
type: T.EVM,
|
|
127
|
+
chainId: 143,
|
|
128
|
+
name: "Monad",
|
|
129
|
+
cctpDomain: 7,
|
|
130
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/monad_iz8pgu.png",
|
|
131
|
+
explorer: "https://monadvision.com"
|
|
132
|
+
}, ke = {
|
|
133
|
+
type: T.EVM,
|
|
134
|
+
chainId: 10143,
|
|
135
|
+
name: "Monad Testnet",
|
|
136
|
+
cctpDomain: null,
|
|
137
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087942/monad_iz8pgu.png",
|
|
138
|
+
explorer: "https://testnet.monadvision.com"
|
|
139
|
+
}, Oe = {
|
|
140
|
+
type: T.EVM,
|
|
141
|
+
chainId: 10,
|
|
142
|
+
name: "Optimism",
|
|
143
|
+
cctpDomain: 2,
|
|
144
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087943/optimism_ypaqi0.svg",
|
|
145
|
+
explorer: "https://optimistic.etherscan.io"
|
|
146
|
+
}, we = {
|
|
147
|
+
type: T.EVM,
|
|
148
|
+
chainId: 11155420,
|
|
149
|
+
name: "Optimism Testnet",
|
|
150
|
+
cctpDomain: 2,
|
|
151
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087943/optimism_ypaqi0.svg",
|
|
152
|
+
explorer: "https://testnet-explorer.optimism.io"
|
|
153
|
+
}, xe = {
|
|
154
|
+
type: T.EVM,
|
|
155
|
+
chainId: 137,
|
|
156
|
+
name: "Polygon",
|
|
157
|
+
cctpDomain: 7,
|
|
158
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087943/polygon_qxw9a4.svg",
|
|
159
|
+
explorer: "https://polygonscan.com"
|
|
160
|
+
}, _e = {
|
|
161
|
+
type: T.SOLANA,
|
|
162
|
+
chainId: "solana-mainnet",
|
|
163
|
+
name: "Solana",
|
|
164
|
+
cctpDomain: null,
|
|
165
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772183427/solana_xv5sbs.svg",
|
|
166
|
+
explorer: "https://solscan.io"
|
|
167
|
+
}, Me = {
|
|
168
|
+
type: T.SOLANA,
|
|
169
|
+
chainId: "solana-devnet",
|
|
170
|
+
name: "Solana Devnet",
|
|
171
|
+
cctpDomain: null,
|
|
172
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772183427/solana_xv5sbs.svg",
|
|
173
|
+
explorer: "https://solscan.io"
|
|
174
|
+
}, Le = {
|
|
175
|
+
type: T.STARKNET,
|
|
176
|
+
chainId: "0x534e5f4d41494e",
|
|
177
|
+
// SN_MAIN
|
|
178
|
+
name: "Starknet",
|
|
179
|
+
cctpDomain: 25,
|
|
180
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087943/starknet_ltvror.svg",
|
|
181
|
+
explorer: ""
|
|
182
|
+
}, Fe = {
|
|
183
|
+
type: T.STARKNET,
|
|
184
|
+
chainId: "0x534e5f5345504f4c4941",
|
|
185
|
+
// SN_SEPOLIA
|
|
186
|
+
name: "Starknet Testnet",
|
|
187
|
+
cctpDomain: null,
|
|
188
|
+
logoURI: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087943/starknet_ltvror.svg",
|
|
189
|
+
explorer: ""
|
|
40
190
|
};
|
|
41
|
-
function
|
|
42
|
-
return !
|
|
191
|
+
function V(a, { strict: e = !0 } = {}) {
|
|
192
|
+
return !a || typeof a != "string" ? !1 : e ? /^0x[0-9a-fA-F]*$/.test(a) : a.startsWith("0x");
|
|
43
193
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
194
|
+
function $(a) {
|
|
195
|
+
return V(a, { strict: !1 }) ? Math.ceil((a.length - 2) / 2) : a.length;
|
|
46
196
|
}
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
getDocsUrl: ({ docsBaseUrl:
|
|
50
|
-
version: `viem@${
|
|
197
|
+
const ae = "2.43.4";
|
|
198
|
+
let M = {
|
|
199
|
+
getDocsUrl: ({ docsBaseUrl: a, docsPath: e = "", docsSlug: s }) => e ? `${a ?? "https://viem.sh"}${e}${s ? `#${s}` : ""}` : void 0,
|
|
200
|
+
version: `viem@${ae}`
|
|
51
201
|
};
|
|
52
|
-
class
|
|
53
|
-
constructor(e,
|
|
54
|
-
const
|
|
202
|
+
class A extends Error {
|
|
203
|
+
constructor(e, s = {}) {
|
|
204
|
+
const o = s.cause instanceof A ? s.cause.details : s.cause?.message ? s.cause.message : s.details, r = s.cause instanceof A && s.cause.docsPath || s.docsPath, l = M.getDocsUrl?.({ ...s, docsPath: r }), i = [
|
|
55
205
|
e || "An error occurred.",
|
|
56
206
|
"",
|
|
57
|
-
...
|
|
58
|
-
...
|
|
59
|
-
...
|
|
60
|
-
...
|
|
207
|
+
...s.metaMessages ? [...s.metaMessages, ""] : [],
|
|
208
|
+
...l ? [`Docs: ${l}`] : [],
|
|
209
|
+
...o ? [`Details: ${o}`] : [],
|
|
210
|
+
...M.version ? [`Version: ${M.version}`] : []
|
|
61
211
|
].join(`
|
|
62
212
|
`);
|
|
63
|
-
super(i,
|
|
213
|
+
super(i, s.cause ? { cause: s.cause } : void 0), Object.defineProperty(this, "details", {
|
|
64
214
|
enumerable: !0,
|
|
65
215
|
configurable: !0,
|
|
66
216
|
writable: !0,
|
|
@@ -90,95 +240,95 @@ class E extends Error {
|
|
|
90
240
|
configurable: !0,
|
|
91
241
|
writable: !0,
|
|
92
242
|
value: "BaseError"
|
|
93
|
-
}), this.details =
|
|
243
|
+
}), this.details = o, this.docsPath = r, this.metaMessages = s.metaMessages, this.name = s.name ?? this.name, this.shortMessage = e, this.version = ae;
|
|
94
244
|
}
|
|
95
245
|
walk(e) {
|
|
96
|
-
return
|
|
246
|
+
return se(this, e);
|
|
97
247
|
}
|
|
98
248
|
}
|
|
99
|
-
function
|
|
100
|
-
return e?.(
|
|
249
|
+
function se(a, e) {
|
|
250
|
+
return e?.(a) ? a : a && typeof a == "object" && "cause" in a && a.cause !== void 0 ? se(a.cause, e) : e ? null : a;
|
|
101
251
|
}
|
|
102
|
-
class
|
|
103
|
-
constructor({ size: e, targetSize:
|
|
104
|
-
super(`${
|
|
252
|
+
class te extends A {
|
|
253
|
+
constructor({ size: e, targetSize: s, type: o }) {
|
|
254
|
+
super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${e}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
105
255
|
}
|
|
106
256
|
}
|
|
107
|
-
function
|
|
108
|
-
return typeof
|
|
257
|
+
function x(a, { dir: e, size: s = 32 } = {}) {
|
|
258
|
+
return typeof a == "string" ? ze(a, { dir: e, size: s }) : We(a, { dir: e, size: s });
|
|
109
259
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
throw new
|
|
116
|
-
size: Math.ceil(
|
|
117
|
-
targetSize:
|
|
260
|
+
function ze(a, { dir: e, size: s = 32 } = {}) {
|
|
261
|
+
if (s === null)
|
|
262
|
+
return a;
|
|
263
|
+
const o = a.replace("0x", "");
|
|
264
|
+
if (o.length > s * 2)
|
|
265
|
+
throw new te({
|
|
266
|
+
size: Math.ceil(o.length / 2),
|
|
267
|
+
targetSize: s,
|
|
118
268
|
type: "hex"
|
|
119
269
|
});
|
|
120
|
-
return `0x${
|
|
121
|
-
}
|
|
122
|
-
function
|
|
123
|
-
if (
|
|
124
|
-
return
|
|
125
|
-
if (
|
|
126
|
-
throw new
|
|
127
|
-
size:
|
|
128
|
-
targetSize:
|
|
270
|
+
return `0x${o[e === "right" ? "padEnd" : "padStart"](s * 2, "0")}`;
|
|
271
|
+
}
|
|
272
|
+
function We(a, { dir: e, size: s = 32 } = {}) {
|
|
273
|
+
if (s === null)
|
|
274
|
+
return a;
|
|
275
|
+
if (a.length > s)
|
|
276
|
+
throw new te({
|
|
277
|
+
size: a.length,
|
|
278
|
+
targetSize: s,
|
|
129
279
|
type: "bytes"
|
|
130
280
|
});
|
|
131
|
-
const
|
|
132
|
-
for (let
|
|
133
|
-
const
|
|
134
|
-
|
|
281
|
+
const o = new Uint8Array(s);
|
|
282
|
+
for (let r = 0; r < s; r++) {
|
|
283
|
+
const l = e === "right";
|
|
284
|
+
o[l ? r : s - r - 1] = a[l ? r : a.length - r - 1];
|
|
135
285
|
}
|
|
136
|
-
return
|
|
286
|
+
return o;
|
|
137
287
|
}
|
|
138
|
-
class
|
|
139
|
-
constructor({ max: e, min:
|
|
140
|
-
super(`Number "${
|
|
288
|
+
class He extends A {
|
|
289
|
+
constructor({ max: e, min: s, signed: o, size: r, value: l }) {
|
|
290
|
+
super(`Number "${l}" is not in safe ${r ? `${r * 8}-bit ${o ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${s} to ${e})` : `(above ${s})`}`, { name: "IntegerOutOfRangeError" });
|
|
141
291
|
}
|
|
142
292
|
}
|
|
143
|
-
class
|
|
144
|
-
constructor({ givenSize: e, maxSize:
|
|
145
|
-
super(`Size cannot exceed ${
|
|
293
|
+
class Pe extends A {
|
|
294
|
+
constructor({ givenSize: e, maxSize: s }) {
|
|
295
|
+
super(`Size cannot exceed ${s} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
|
|
146
296
|
}
|
|
147
297
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
150
|
-
throw new
|
|
151
|
-
givenSize:
|
|
298
|
+
function K(a, { size: e }) {
|
|
299
|
+
if ($(a) > e)
|
|
300
|
+
throw new Pe({
|
|
301
|
+
givenSize: $(a),
|
|
152
302
|
maxSize: e
|
|
153
303
|
});
|
|
154
304
|
}
|
|
155
|
-
function
|
|
156
|
-
const { signed:
|
|
157
|
-
let
|
|
158
|
-
|
|
159
|
-
const i = typeof
|
|
160
|
-
if (
|
|
161
|
-
const f = typeof
|
|
162
|
-
throw new
|
|
163
|
-
max:
|
|
305
|
+
function Ve(a, e = {}) {
|
|
306
|
+
const { signed: s, size: o } = e, r = BigInt(a);
|
|
307
|
+
let l;
|
|
308
|
+
o ? s ? l = (1n << BigInt(o) * 8n - 1n) - 1n : l = 2n ** (BigInt(o) * 8n) - 1n : typeof a == "number" && (l = BigInt(Number.MAX_SAFE_INTEGER));
|
|
309
|
+
const i = typeof l == "bigint" && s ? -l - 1n : 0;
|
|
310
|
+
if (l && r > l || r < i) {
|
|
311
|
+
const f = typeof a == "bigint" ? "n" : "";
|
|
312
|
+
throw new He({
|
|
313
|
+
max: l ? `${l}${f}` : void 0,
|
|
164
314
|
min: `${i}${f}`,
|
|
165
|
-
signed:
|
|
166
|
-
size:
|
|
167
|
-
value: `${
|
|
315
|
+
signed: s,
|
|
316
|
+
size: o,
|
|
317
|
+
value: `${a}${f}`
|
|
168
318
|
});
|
|
169
319
|
}
|
|
170
|
-
const
|
|
171
|
-
return
|
|
320
|
+
const m = `0x${(s && r < 0 ? (1n << BigInt(o * 8)) + BigInt(r) : r).toString(16)}`;
|
|
321
|
+
return o ? x(m, { size: o }) : m;
|
|
172
322
|
}
|
|
173
|
-
const
|
|
174
|
-
function
|
|
175
|
-
return typeof
|
|
323
|
+
const Ke = /* @__PURE__ */ new TextEncoder();
|
|
324
|
+
function je(a, e = {}) {
|
|
325
|
+
return typeof a == "number" || typeof a == "bigint" ? qe(a, e) : typeof a == "boolean" ? $e(a, e) : V(a) ? ne(a, e) : oe(a, e);
|
|
176
326
|
}
|
|
177
|
-
function
|
|
178
|
-
const
|
|
179
|
-
return
|
|
327
|
+
function $e(a, e = {}) {
|
|
328
|
+
const s = new Uint8Array(1);
|
|
329
|
+
return s[0] = Number(a), typeof e.size == "number" ? (K(s, { size: e.size }), x(s, { size: e.size })) : s;
|
|
180
330
|
}
|
|
181
|
-
const
|
|
331
|
+
const S = {
|
|
182
332
|
zero: 48,
|
|
183
333
|
nine: 57,
|
|
184
334
|
A: 65,
|
|
@@ -186,162 +336,162 @@ const T = {
|
|
|
186
336
|
a: 97,
|
|
187
337
|
f: 102
|
|
188
338
|
};
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
191
|
-
return
|
|
192
|
-
if (
|
|
193
|
-
return
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
196
|
-
}
|
|
197
|
-
function W(s, e = {}) {
|
|
198
|
-
let n = s;
|
|
199
|
-
e.size && (w(n, { size: e.size }), n = U(n, { dir: "right", size: e.size }));
|
|
200
|
-
let a = n.slice(2);
|
|
201
|
-
a.length % 2 && (a = `0${a}`);
|
|
202
|
-
const o = a.length / 2, r = new Uint8Array(o);
|
|
203
|
-
for (let i = 0, l = 0; i < o; i++) {
|
|
204
|
-
const f = O(a.charCodeAt(l++)), S = O(a.charCodeAt(l++));
|
|
205
|
-
if (f === void 0 || S === void 0)
|
|
206
|
-
throw new E(`Invalid byte sequence ("${a[l - 2]}${a[l - 1]}" in "${a}").`);
|
|
207
|
-
r[i] = f * 16 + S;
|
|
208
|
-
}
|
|
209
|
-
return r;
|
|
339
|
+
function q(a) {
|
|
340
|
+
if (a >= S.zero && a <= S.nine)
|
|
341
|
+
return a - S.zero;
|
|
342
|
+
if (a >= S.A && a <= S.F)
|
|
343
|
+
return a - (S.A - 10);
|
|
344
|
+
if (a >= S.a && a <= S.f)
|
|
345
|
+
return a - (S.a - 10);
|
|
210
346
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
213
|
-
|
|
347
|
+
function ne(a, e = {}) {
|
|
348
|
+
let s = a;
|
|
349
|
+
e.size && (K(s, { size: e.size }), s = x(s, { dir: "right", size: e.size }));
|
|
350
|
+
let o = s.slice(2);
|
|
351
|
+
o.length % 2 && (o = `0${o}`);
|
|
352
|
+
const r = o.length / 2, l = new Uint8Array(r);
|
|
353
|
+
for (let i = 0, m = 0; i < r; i++) {
|
|
354
|
+
const f = q(o.charCodeAt(m++)), h = q(o.charCodeAt(m++));
|
|
355
|
+
if (f === void 0 || h === void 0)
|
|
356
|
+
throw new A(`Invalid byte sequence ("${o[m - 2]}${o[m - 1]}" in "${o}").`);
|
|
357
|
+
l[i] = f * 16 + h;
|
|
358
|
+
}
|
|
359
|
+
return l;
|
|
214
360
|
}
|
|
215
|
-
function
|
|
216
|
-
const
|
|
217
|
-
return
|
|
361
|
+
function qe(a, e) {
|
|
362
|
+
const s = Ve(a, e);
|
|
363
|
+
return ne(s);
|
|
218
364
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return e ? {
|
|
365
|
+
function oe(a, e = {}) {
|
|
366
|
+
const s = Ke.encode(a);
|
|
367
|
+
return typeof e.size == "number" ? (K(s, { size: e.size }), x(s, { dir: "right", size: e.size })) : s;
|
|
222
368
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
for (let r = 0; r < n; r++) {
|
|
227
|
-
const { h: i, l } = he(s[r], e);
|
|
228
|
-
[a[r], o[r]] = [i, l];
|
|
229
|
-
}
|
|
230
|
-
return [a, o];
|
|
369
|
+
const B = /* @__PURE__ */ BigInt(2 ** 32 - 1), G = /* @__PURE__ */ BigInt(32);
|
|
370
|
+
function Ge(a, e = !1) {
|
|
371
|
+
return e ? { h: Number(a & B), l: Number(a >> G & B) } : { h: Number(a >> G & B) | 0, l: Number(a & B) | 0 };
|
|
231
372
|
}
|
|
232
|
-
|
|
373
|
+
function Xe(a, e = !1) {
|
|
374
|
+
const s = a.length;
|
|
375
|
+
let o = new Uint32Array(s), r = new Uint32Array(s);
|
|
376
|
+
for (let l = 0; l < s; l++) {
|
|
377
|
+
const { h: i, l: m } = Ge(a[l], e);
|
|
378
|
+
[o[l], r[l]] = [i, m];
|
|
379
|
+
}
|
|
380
|
+
return [o, r];
|
|
381
|
+
}
|
|
382
|
+
const Ye = (a, e, s) => a << s | e >>> 32 - s, Qe = (a, e, s) => e << s | a >>> 32 - s, Je = (a, e, s) => e << s - 32 | a >>> 64 - s, Ze = (a, e, s) => a << s - 32 | e >>> 64 - s;
|
|
233
383
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
234
|
-
function
|
|
235
|
-
return
|
|
384
|
+
function ea(a) {
|
|
385
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
236
386
|
}
|
|
237
|
-
function
|
|
238
|
-
if (!Number.isSafeInteger(
|
|
239
|
-
throw new Error("positive integer expected, got " +
|
|
387
|
+
function X(a) {
|
|
388
|
+
if (!Number.isSafeInteger(a) || a < 0)
|
|
389
|
+
throw new Error("positive integer expected, got " + a);
|
|
240
390
|
}
|
|
241
|
-
function
|
|
242
|
-
if (!
|
|
391
|
+
function k(a, ...e) {
|
|
392
|
+
if (!ea(a))
|
|
243
393
|
throw new Error("Uint8Array expected");
|
|
244
|
-
if (e.length > 0 && !e.includes(
|
|
245
|
-
throw new Error("Uint8Array expected of length " + e + ", got length=" +
|
|
394
|
+
if (e.length > 0 && !e.includes(a.length))
|
|
395
|
+
throw new Error("Uint8Array expected of length " + e + ", got length=" + a.length);
|
|
246
396
|
}
|
|
247
|
-
function
|
|
248
|
-
if (
|
|
397
|
+
function Y(a, e = !0) {
|
|
398
|
+
if (a.destroyed)
|
|
249
399
|
throw new Error("Hash instance has been destroyed");
|
|
250
|
-
if (e &&
|
|
400
|
+
if (e && a.finished)
|
|
251
401
|
throw new Error("Hash#digest() has already been called");
|
|
252
402
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
throw new Error("digestInto() expects output buffer of length at least " +
|
|
403
|
+
function aa(a, e) {
|
|
404
|
+
k(a);
|
|
405
|
+
const s = e.outputLen;
|
|
406
|
+
if (a.length < s)
|
|
407
|
+
throw new Error("digestInto() expects output buffer of length at least " + s);
|
|
258
408
|
}
|
|
259
|
-
function
|
|
260
|
-
return new Uint32Array(
|
|
409
|
+
function sa(a) {
|
|
410
|
+
return new Uint32Array(a.buffer, a.byteOffset, Math.floor(a.byteLength / 4));
|
|
261
411
|
}
|
|
262
|
-
function
|
|
263
|
-
for (let e = 0; e <
|
|
264
|
-
|
|
412
|
+
function re(...a) {
|
|
413
|
+
for (let e = 0; e < a.length; e++)
|
|
414
|
+
a[e].fill(0);
|
|
265
415
|
}
|
|
266
|
-
const
|
|
267
|
-
function
|
|
268
|
-
return
|
|
416
|
+
const ta = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
417
|
+
function na(a) {
|
|
418
|
+
return a << 24 & 4278190080 | a << 8 & 16711680 | a >>> 8 & 65280 | a >>> 24 & 255;
|
|
269
419
|
}
|
|
270
|
-
function
|
|
271
|
-
for (let e = 0; e <
|
|
272
|
-
|
|
273
|
-
return
|
|
420
|
+
function oa(a) {
|
|
421
|
+
for (let e = 0; e < a.length; e++)
|
|
422
|
+
a[e] = na(a[e]);
|
|
423
|
+
return a;
|
|
274
424
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
277
|
-
if (typeof
|
|
425
|
+
const Q = ta ? (a) => a : oa;
|
|
426
|
+
function ra(a) {
|
|
427
|
+
if (typeof a != "string")
|
|
278
428
|
throw new Error("string expected");
|
|
279
|
-
return new Uint8Array(new TextEncoder().encode(
|
|
429
|
+
return new Uint8Array(new TextEncoder().encode(a));
|
|
280
430
|
}
|
|
281
|
-
function
|
|
282
|
-
return typeof
|
|
431
|
+
function ie(a) {
|
|
432
|
+
return typeof a == "string" && (a = ra(a)), k(a), a;
|
|
283
433
|
}
|
|
284
|
-
class
|
|
434
|
+
class ia {
|
|
285
435
|
}
|
|
286
|
-
function
|
|
287
|
-
const e = (
|
|
288
|
-
return e.outputLen =
|
|
436
|
+
function la(a) {
|
|
437
|
+
const e = (o) => a().update(ie(o)).digest(), s = a();
|
|
438
|
+
return e.outputLen = s.outputLen, e.blockLen = s.blockLen, e.create = () => a(), e;
|
|
289
439
|
}
|
|
290
|
-
const
|
|
291
|
-
for (let
|
|
292
|
-
[
|
|
293
|
-
let
|
|
294
|
-
for (let
|
|
295
|
-
e = (e <<
|
|
296
|
-
|
|
440
|
+
const ca = BigInt(0), D = BigInt(1), da = BigInt(2), ma = BigInt(7), ua = BigInt(256), ga = BigInt(113), le = [], ce = [], de = [];
|
|
441
|
+
for (let a = 0, e = D, s = 1, o = 0; a < 24; a++) {
|
|
442
|
+
[s, o] = [o, (2 * s + 3 * o) % 5], le.push(2 * (5 * o + s)), ce.push((a + 1) * (a + 2) / 2 % 64);
|
|
443
|
+
let r = ca;
|
|
444
|
+
for (let l = 0; l < 7; l++)
|
|
445
|
+
e = (e << D ^ (e >> ma) * ga) % ua, e & da && (r ^= D << (D << /* @__PURE__ */ BigInt(l)) - D);
|
|
446
|
+
de.push(r);
|
|
297
447
|
}
|
|
298
|
-
const
|
|
299
|
-
function
|
|
300
|
-
const
|
|
301
|
-
for (let
|
|
448
|
+
const me = Xe(de, !0), Ta = me[0], pa = me[1], J = (a, e, s) => s > 32 ? Je(a, e, s) : Ye(a, e, s), Z = (a, e, s) => s > 32 ? Ze(a, e, s) : Qe(a, e, s);
|
|
449
|
+
function Ea(a, e = 24) {
|
|
450
|
+
const s = new Uint32Array(10);
|
|
451
|
+
for (let o = 24 - e; o < 24; o++) {
|
|
302
452
|
for (let i = 0; i < 10; i++)
|
|
303
|
-
|
|
453
|
+
s[i] = a[i] ^ a[i + 10] ^ a[i + 20] ^ a[i + 30] ^ a[i + 40];
|
|
304
454
|
for (let i = 0; i < 10; i += 2) {
|
|
305
|
-
const
|
|
306
|
-
for (let
|
|
307
|
-
|
|
455
|
+
const m = (i + 8) % 10, f = (i + 2) % 10, h = s[f], C = s[f + 1], pe = J(h, C, 1) ^ s[m], Ee = Z(h, C, 1) ^ s[m + 1];
|
|
456
|
+
for (let N = 0; N < 50; N += 10)
|
|
457
|
+
a[i + N] ^= pe, a[i + N + 1] ^= Ee;
|
|
308
458
|
}
|
|
309
|
-
let
|
|
459
|
+
let r = a[2], l = a[3];
|
|
310
460
|
for (let i = 0; i < 24; i++) {
|
|
311
|
-
const
|
|
312
|
-
|
|
461
|
+
const m = ce[i], f = J(r, l, m), h = Z(r, l, m), C = le[i];
|
|
462
|
+
r = a[C], l = a[C + 1], a[C] = f, a[C + 1] = h;
|
|
313
463
|
}
|
|
314
464
|
for (let i = 0; i < 50; i += 10) {
|
|
315
|
-
for (let
|
|
316
|
-
|
|
317
|
-
for (let
|
|
318
|
-
|
|
465
|
+
for (let m = 0; m < 10; m++)
|
|
466
|
+
s[m] = a[i + m];
|
|
467
|
+
for (let m = 0; m < 10; m++)
|
|
468
|
+
a[i + m] ^= ~s[(m + 2) % 10] & s[(m + 4) % 10];
|
|
319
469
|
}
|
|
320
|
-
|
|
470
|
+
a[0] ^= Ta[o], a[1] ^= pa[o];
|
|
321
471
|
}
|
|
322
|
-
|
|
472
|
+
re(s);
|
|
323
473
|
}
|
|
324
|
-
class
|
|
474
|
+
class j extends ia {
|
|
325
475
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
326
|
-
constructor(e,
|
|
327
|
-
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix =
|
|
476
|
+
constructor(e, s, o, r = !1, l = 24) {
|
|
477
|
+
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix = s, this.outputLen = o, this.enableXOF = r, this.rounds = l, X(o), !(0 < e && e < 200))
|
|
328
478
|
throw new Error("only keccak-f1600 function is supported");
|
|
329
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
479
|
+
this.state = new Uint8Array(200), this.state32 = sa(this.state);
|
|
330
480
|
}
|
|
331
481
|
clone() {
|
|
332
482
|
return this._cloneInto();
|
|
333
483
|
}
|
|
334
484
|
keccak() {
|
|
335
|
-
|
|
485
|
+
Q(this.state32), Ea(this.state32, this.rounds), Q(this.state32), this.posOut = 0, this.pos = 0;
|
|
336
486
|
}
|
|
337
487
|
update(e) {
|
|
338
|
-
|
|
339
|
-
const { blockLen:
|
|
340
|
-
for (let
|
|
341
|
-
const i = Math.min(
|
|
342
|
-
for (let
|
|
343
|
-
|
|
344
|
-
this.pos ===
|
|
488
|
+
Y(this), e = ie(e), k(e);
|
|
489
|
+
const { blockLen: s, state: o } = this, r = e.length;
|
|
490
|
+
for (let l = 0; l < r; ) {
|
|
491
|
+
const i = Math.min(s - this.pos, r - l);
|
|
492
|
+
for (let m = 0; m < i; m++)
|
|
493
|
+
o[this.pos++] ^= e[l++];
|
|
494
|
+
this.pos === s && this.keccak();
|
|
345
495
|
}
|
|
346
496
|
return this;
|
|
347
497
|
}
|
|
@@ -349,16 +499,16 @@ class B extends Re {
|
|
|
349
499
|
if (this.finished)
|
|
350
500
|
return;
|
|
351
501
|
this.finished = !0;
|
|
352
|
-
const { state: e, suffix:
|
|
353
|
-
e[
|
|
502
|
+
const { state: e, suffix: s, pos: o, blockLen: r } = this;
|
|
503
|
+
e[o] ^= s, (s & 128) !== 0 && o === r - 1 && this.keccak(), e[r - 1] ^= 128, this.keccak();
|
|
354
504
|
}
|
|
355
505
|
writeInto(e) {
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
for (let
|
|
359
|
-
this.posOut >=
|
|
360
|
-
const i = Math.min(
|
|
361
|
-
e.set(
|
|
506
|
+
Y(this, !1), k(e), this.finish();
|
|
507
|
+
const s = this.state, { blockLen: o } = this;
|
|
508
|
+
for (let r = 0, l = e.length; r < l; ) {
|
|
509
|
+
this.posOut >= o && this.keccak();
|
|
510
|
+
const i = Math.min(o - this.posOut, l - r);
|
|
511
|
+
e.set(s.subarray(this.posOut, this.posOut + i), r), this.posOut += i, r += i;
|
|
362
512
|
}
|
|
363
513
|
return e;
|
|
364
514
|
}
|
|
@@ -368,10 +518,10 @@ class B extends Re {
|
|
|
368
518
|
return this.writeInto(e);
|
|
369
519
|
}
|
|
370
520
|
xof(e) {
|
|
371
|
-
return
|
|
521
|
+
return X(e), this.xofInto(new Uint8Array(e));
|
|
372
522
|
}
|
|
373
523
|
digestInto(e) {
|
|
374
|
-
if (
|
|
524
|
+
if (aa(e, this), this.finished)
|
|
375
525
|
throw new Error("digest() was already called");
|
|
376
526
|
return this.writeInto(e), this.destroy(), e;
|
|
377
527
|
}
|
|
@@ -379,18 +529,18 @@ class B extends Re {
|
|
|
379
529
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
380
530
|
}
|
|
381
531
|
destroy() {
|
|
382
|
-
this.destroyed = !0,
|
|
532
|
+
this.destroyed = !0, re(this.state);
|
|
383
533
|
}
|
|
384
534
|
_cloneInto(e) {
|
|
385
|
-
const { blockLen:
|
|
386
|
-
return e || (e = new
|
|
535
|
+
const { blockLen: s, suffix: o, outputLen: r, rounds: l, enableXOF: i } = this;
|
|
536
|
+
return e || (e = new j(s, o, r, i, l)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = l, e.suffix = o, e.outputLen = r, e.enableXOF = i, e.destroyed = this.destroyed, e;
|
|
387
537
|
}
|
|
388
538
|
}
|
|
389
|
-
const
|
|
390
|
-
function
|
|
391
|
-
return
|
|
539
|
+
const fa = (a, e, s) => la(() => new j(e, a, s)), ha = fa(1, 136, 256 / 8);
|
|
540
|
+
function Sa(a, e) {
|
|
541
|
+
return ha(V(a, { strict: !1 }) ? je(a) : a);
|
|
392
542
|
}
|
|
393
|
-
class
|
|
543
|
+
class Aa extends A {
|
|
394
544
|
constructor({ address: e }) {
|
|
395
545
|
super(`Address "${e}" is invalid.`, {
|
|
396
546
|
metaMessages: [
|
|
@@ -401,7 +551,7 @@ class je extends E {
|
|
|
401
551
|
});
|
|
402
552
|
}
|
|
403
553
|
}
|
|
404
|
-
class
|
|
554
|
+
class ue extends Map {
|
|
405
555
|
constructor(e) {
|
|
406
556
|
super(), Object.defineProperty(this, "maxSize", {
|
|
407
557
|
enumerable: !0,
|
|
@@ -411,39 +561,39 @@ class Z extends Map {
|
|
|
411
561
|
}), this.maxSize = e;
|
|
412
562
|
}
|
|
413
563
|
get(e) {
|
|
414
|
-
const
|
|
415
|
-
return super.has(e) &&
|
|
564
|
+
const s = super.get(e);
|
|
565
|
+
return super.has(e) && s !== void 0 && (this.delete(e), super.set(e, s)), s;
|
|
416
566
|
}
|
|
417
|
-
set(e,
|
|
418
|
-
if (super.set(e,
|
|
419
|
-
const
|
|
420
|
-
|
|
567
|
+
set(e, s) {
|
|
568
|
+
if (super.set(e, s), this.maxSize && this.size > this.maxSize) {
|
|
569
|
+
const o = this.keys().next().value;
|
|
570
|
+
o && this.delete(o);
|
|
421
571
|
}
|
|
422
572
|
return this;
|
|
423
573
|
}
|
|
424
574
|
}
|
|
425
|
-
const
|
|
426
|
-
function
|
|
427
|
-
if (
|
|
428
|
-
return
|
|
429
|
-
const
|
|
575
|
+
const L = /* @__PURE__ */ new ue(8192);
|
|
576
|
+
function ge(a, e) {
|
|
577
|
+
if (L.has(`${a}.${e}`))
|
|
578
|
+
return L.get(`${a}.${e}`);
|
|
579
|
+
const s = a.substring(2).toLowerCase(), o = Sa(oe(s)), r = s.split("");
|
|
430
580
|
for (let i = 0; i < 40; i += 2)
|
|
431
|
-
|
|
432
|
-
const
|
|
433
|
-
return
|
|
434
|
-
}
|
|
435
|
-
function
|
|
436
|
-
if (!
|
|
437
|
-
throw new
|
|
438
|
-
return
|
|
439
|
-
}
|
|
440
|
-
const
|
|
441
|
-
function
|
|
442
|
-
const { strict:
|
|
443
|
-
if (
|
|
444
|
-
return
|
|
445
|
-
const
|
|
446
|
-
return
|
|
581
|
+
o[i >> 1] >> 4 >= 8 && r[i] && (r[i] = r[i].toUpperCase()), (o[i >> 1] & 15) >= 8 && r[i + 1] && (r[i + 1] = r[i + 1].toUpperCase());
|
|
582
|
+
const l = `0x${r.join("")}`;
|
|
583
|
+
return L.set(`${a}.${e}`, l), l;
|
|
584
|
+
}
|
|
585
|
+
function p(a, e) {
|
|
586
|
+
if (!Ca(a, { strict: !1 }))
|
|
587
|
+
throw new Aa({ address: a });
|
|
588
|
+
return ge(a, e);
|
|
589
|
+
}
|
|
590
|
+
const Ua = /^0x[a-fA-F0-9]{40}$/, F = /* @__PURE__ */ new ue(8192);
|
|
591
|
+
function Ca(a, e) {
|
|
592
|
+
const { strict: s = !0 } = e ?? {}, o = `${a}.${s}`;
|
|
593
|
+
if (F.has(o))
|
|
594
|
+
return F.get(o);
|
|
595
|
+
const r = Ua.test(a) ? a.toLowerCase() === a ? !0 : s ? ge(a) === a : !0 : !1;
|
|
596
|
+
return F.set(o, r), r;
|
|
447
597
|
}
|
|
448
598
|
const t = {
|
|
449
599
|
USDC: "USDC",
|
|
@@ -455,17 +605,100 @@ const t = {
|
|
|
455
605
|
WETH: "WETH",
|
|
456
606
|
STRK: "STRK",
|
|
457
607
|
BNB: "BNB",
|
|
458
|
-
LORDS: "LORDS"
|
|
608
|
+
LORDS: "LORDS",
|
|
609
|
+
USDS: "USDS",
|
|
610
|
+
USDG: "USDG",
|
|
611
|
+
USDT0: "USDT0",
|
|
612
|
+
WBTC: "WBTC",
|
|
613
|
+
LINK: "LINK",
|
|
614
|
+
SOL: "SOL",
|
|
615
|
+
EKUBO: "EKUBO",
|
|
616
|
+
AAVE: "AAVE",
|
|
617
|
+
UNI: "UNI",
|
|
618
|
+
CURVE: "CURVE",
|
|
619
|
+
cbBTC: "cbBTC",
|
|
620
|
+
VIRTUAL: "VIRTUAL",
|
|
621
|
+
stETH: "stETH",
|
|
622
|
+
wstETH: "wstETH",
|
|
623
|
+
SKY: "SKY",
|
|
624
|
+
AUSD: "AUSD",
|
|
625
|
+
WMON: "WMON",
|
|
626
|
+
LVMON: "LVMON",
|
|
627
|
+
OP: "OP",
|
|
628
|
+
WLD: "WLD",
|
|
629
|
+
ARB: "ARB",
|
|
630
|
+
sAVAX: "sAVAX",
|
|
631
|
+
WAVAX: "WAVAX",
|
|
632
|
+
anyBTC: "anyBTC",
|
|
633
|
+
WBNB: "WBNB",
|
|
634
|
+
TRON: "TRON",
|
|
635
|
+
AVAX: "AVAX",
|
|
636
|
+
POL: "POL",
|
|
637
|
+
MON: "MON"
|
|
459
638
|
};
|
|
460
639
|
t.USDC;
|
|
461
|
-
const
|
|
640
|
+
const n = {
|
|
641
|
+
ARB: "https://res.cloudinary.com/dc3gdzgel/image/upload/q_auto/f_auto/v1772087941/arbitrum_tp1kad.svg",
|
|
642
|
+
ETH: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087942/ethereum_iyciq3.svg",
|
|
643
|
+
USDC: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/usdc_rexec2.svg",
|
|
644
|
+
USDT: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/usdt_gtwbg4.png",
|
|
645
|
+
DAI: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/dai_bsokf4.png",
|
|
646
|
+
SOL: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772183427/solana_xv5sbs.svg",
|
|
647
|
+
LORDS: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/lords_tynrsj.png",
|
|
648
|
+
STRK: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087943/starknet_ltvror.svg",
|
|
649
|
+
WETH: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087897/weth_ndqdae.png",
|
|
650
|
+
BUSD: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/busd_lvorsz.png",
|
|
651
|
+
EURC: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087896/eurc_strgsy.png",
|
|
652
|
+
BNB: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087942/bsc_k1jm6z.webp",
|
|
653
|
+
WMON: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/WMON_i6jbe5.svg",
|
|
654
|
+
USDG: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/USDG_x9hed4.svg",
|
|
655
|
+
USDS: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/usds_yivegi.webp",
|
|
656
|
+
UNI: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/Uniswap_w7ysxc.png",
|
|
657
|
+
CURVE: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/curve_ggxfbc.png",
|
|
658
|
+
VIRTUAL: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953561/VIRTUAL_cfrzq2.jpg",
|
|
659
|
+
WLD: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/Worldcoin_inqsuk.svg",
|
|
660
|
+
WBTC: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/WBTC_dslejh.png",
|
|
661
|
+
USDT0: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953561/USDT0_sjeubh.png",
|
|
662
|
+
stETH: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/sETH_ioshxv.svg",
|
|
663
|
+
OP: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087943/optimism_ypaqi0.svg",
|
|
664
|
+
POL: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087943/polygon_qxw9a4.svg",
|
|
665
|
+
LVMON: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953558/LVMON_rcstab.svg",
|
|
666
|
+
AUSD: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953558/AUSD_kesum1.svg",
|
|
667
|
+
SKY: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/SKY_qh22s1.webp",
|
|
668
|
+
AAVE: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953558/aave_qeyzuy.png",
|
|
669
|
+
AVAX: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087941/avalanche_tnvomy.svg",
|
|
670
|
+
sAVAX: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087941/avalanche_tnvomy.svg",
|
|
671
|
+
WAVAX: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1772087941/avalanche_tnvomy.svg",
|
|
672
|
+
anyBTC: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/WBTC_dslejh.png",
|
|
673
|
+
wstETH: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/wsteth_nzva2v.webp",
|
|
674
|
+
cbBTC: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953562/WBTC_dslejh.png",
|
|
675
|
+
WBNB: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953558/BNB_Chain_Symbol_Yellow_jujtui.svg",
|
|
676
|
+
LINK: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1777197960/Chainlink-Symbol-Blue_rouj0h.svg",
|
|
677
|
+
EKUBO: "https://res.cloudinary.com/dc3gdzgel/image/upload/v1776953560/Ekubo_zpfo74.avif"
|
|
678
|
+
}, g = {
|
|
462
679
|
[d.ARBITRUM]: {
|
|
680
|
+
[t.ARB]: {
|
|
681
|
+
address: "0x912CE59144191C1204E64559FE8253a0e49E6548",
|
|
682
|
+
symbol: "ARB",
|
|
683
|
+
decimals: 18,
|
|
684
|
+
name: "ARBITRUM",
|
|
685
|
+
logoURI: n.ARB,
|
|
686
|
+
nativeToken: !1
|
|
687
|
+
},
|
|
688
|
+
[t.CURVE]: {
|
|
689
|
+
address: "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
|
|
690
|
+
symbol: "CURVE",
|
|
691
|
+
decimals: 18,
|
|
692
|
+
name: "CURVE DAO",
|
|
693
|
+
logoURI: n.CURVE,
|
|
694
|
+
nativeToken: !1
|
|
695
|
+
},
|
|
463
696
|
[t.DAI]: {
|
|
464
|
-
address:
|
|
697
|
+
address: p("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),
|
|
465
698
|
symbol: t.DAI,
|
|
466
699
|
name: "Dai Stablecoin",
|
|
467
700
|
decimals: 18,
|
|
468
|
-
logoURI:
|
|
701
|
+
logoURI: n.DAI,
|
|
469
702
|
nativeToken: !1
|
|
470
703
|
},
|
|
471
704
|
[t.ETH]: {
|
|
@@ -473,63 +706,119 @@ const h = {
|
|
|
473
706
|
symbol: t.ETH,
|
|
474
707
|
name: "Ethereum",
|
|
475
708
|
decimals: 18,
|
|
476
|
-
logoURI:
|
|
709
|
+
logoURI: n.ETH,
|
|
477
710
|
nativeToken: !0
|
|
478
711
|
},
|
|
712
|
+
[t.LINK]: {
|
|
713
|
+
address: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4",
|
|
714
|
+
symbol: "LINK",
|
|
715
|
+
decimals: 18,
|
|
716
|
+
name: "ChainLink",
|
|
717
|
+
logoURI: n.LINK,
|
|
718
|
+
nativeToken: !1
|
|
719
|
+
},
|
|
720
|
+
[t.UNI]: {
|
|
721
|
+
address: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0",
|
|
722
|
+
symbol: "UNI",
|
|
723
|
+
decimals: 18,
|
|
724
|
+
name: "UNISWAP TOKEN",
|
|
725
|
+
logoURI: n.UNI,
|
|
726
|
+
nativeToken: !1
|
|
727
|
+
},
|
|
479
728
|
[t.USDC]: {
|
|
480
|
-
address:
|
|
729
|
+
address: p("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),
|
|
481
730
|
symbol: t.USDC,
|
|
482
731
|
name: "USD Coin",
|
|
483
732
|
decimals: 6,
|
|
484
|
-
logoURI:
|
|
733
|
+
logoURI: n.USDC,
|
|
734
|
+
nativeToken: !1
|
|
735
|
+
},
|
|
736
|
+
[t.USDS]: {
|
|
737
|
+
address: "0x6491c05A82219b8D1479057361ff1654749b876b",
|
|
738
|
+
symbol: "USDS",
|
|
739
|
+
decimals: 18,
|
|
740
|
+
name: "USDS Stablecoin",
|
|
741
|
+
logoURI: n.USDS,
|
|
485
742
|
nativeToken: !1
|
|
486
743
|
},
|
|
487
744
|
[t.USDT]: {
|
|
488
|
-
address:
|
|
745
|
+
address: p("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),
|
|
489
746
|
symbol: t.USDT,
|
|
490
747
|
name: "Tether USD",
|
|
491
748
|
decimals: 6,
|
|
492
|
-
logoURI:
|
|
749
|
+
logoURI: n.USDT,
|
|
750
|
+
nativeToken: !1
|
|
751
|
+
},
|
|
752
|
+
[t.WBTC]: {
|
|
753
|
+
address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
|
|
754
|
+
symbol: "WBTC",
|
|
755
|
+
decimals: 8,
|
|
756
|
+
name: "Wrapped BTC",
|
|
757
|
+
logoURI: n.WBTC,
|
|
493
758
|
nativeToken: !1
|
|
494
759
|
},
|
|
495
760
|
[t.WETH]: {
|
|
496
|
-
address:
|
|
761
|
+
address: p("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
|
|
497
762
|
symbol: t.WETH,
|
|
498
763
|
name: "Wrapped Ether",
|
|
499
764
|
decimals: 18,
|
|
500
|
-
logoURI:
|
|
765
|
+
logoURI: n.WETH,
|
|
766
|
+
nativeToken: !1
|
|
767
|
+
},
|
|
768
|
+
[t.wstETH]: {
|
|
769
|
+
address: "0x0fBcbaEA96Ce0cF7Ee00A8c19c3ab6f5Dc8E1921",
|
|
770
|
+
symbol: "wstETH",
|
|
771
|
+
decimals: 18,
|
|
772
|
+
name: "Wrapped liquid staked Ether 2.0",
|
|
773
|
+
logoURI: n.wstETH,
|
|
501
774
|
nativeToken: !1
|
|
502
775
|
}
|
|
503
776
|
},
|
|
504
777
|
[d.ARBITRUM_TESTNET]: {
|
|
505
778
|
[t.USDC]: {
|
|
506
|
-
address:
|
|
779
|
+
address: p("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),
|
|
507
780
|
symbol: t.USDC,
|
|
508
781
|
name: "USD Coin",
|
|
509
782
|
fiatISO: "USD",
|
|
510
783
|
decimals: 6,
|
|
511
|
-
logoURI:
|
|
512
|
-
logoSourceURI:
|
|
784
|
+
logoURI: n.USDC,
|
|
785
|
+
logoSourceURI: n.USDC,
|
|
513
786
|
nativeToken: !1
|
|
514
787
|
}
|
|
515
788
|
},
|
|
516
789
|
[d.AVALANCHE]: {
|
|
790
|
+
[t.AVAX]: {
|
|
791
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
792
|
+
symbol: "AVAX",
|
|
793
|
+
decimals: 18,
|
|
794
|
+
name: "AVAX",
|
|
795
|
+
logoURI: n.AVAX,
|
|
796
|
+
nativeToken: !0
|
|
797
|
+
},
|
|
517
798
|
[t.DAI]: {
|
|
518
799
|
address: "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",
|
|
519
800
|
symbol: t.DAI,
|
|
520
801
|
name: "Dai Stablecoin",
|
|
521
802
|
decimals: 18,
|
|
522
|
-
logoURI:
|
|
803
|
+
logoURI: n.DAI,
|
|
804
|
+
nativeToken: !1
|
|
805
|
+
},
|
|
806
|
+
[t.sAVAX]: {
|
|
807
|
+
address: "0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE",
|
|
808
|
+
symbol: "sAVAX",
|
|
809
|
+
decimals: 18,
|
|
810
|
+
name: "Staked AVAX",
|
|
811
|
+
logoURI: n.sAVAX,
|
|
523
812
|
nativeToken: !1
|
|
524
813
|
},
|
|
525
814
|
[t.USDC]: {
|
|
526
|
-
address:
|
|
815
|
+
address: p("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),
|
|
527
816
|
symbol: t.USDC,
|
|
528
817
|
name: "USD Coin",
|
|
529
818
|
fiatISO: "USD",
|
|
530
819
|
decimals: 6,
|
|
531
|
-
logoURI:
|
|
532
|
-
logoSourceURI:
|
|
820
|
+
logoURI: n.USDC,
|
|
821
|
+
logoSourceURI: n.USDC,
|
|
533
822
|
nativeToken: !1
|
|
534
823
|
},
|
|
535
824
|
[t.USDT]: {
|
|
@@ -537,7 +826,15 @@ const h = {
|
|
|
537
826
|
symbol: t.USDT,
|
|
538
827
|
name: "Tether USD",
|
|
539
828
|
decimals: 6,
|
|
540
|
-
logoURI:
|
|
829
|
+
logoURI: n.USDT,
|
|
830
|
+
nativeToken: !1
|
|
831
|
+
},
|
|
832
|
+
[t.WAVAX]: {
|
|
833
|
+
address: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
|
|
834
|
+
symbol: "WAVAX",
|
|
835
|
+
decimals: 18,
|
|
836
|
+
name: "Wrapped AVAX",
|
|
837
|
+
logoURI: n.WAVAX,
|
|
541
838
|
nativeToken: !1
|
|
542
839
|
},
|
|
543
840
|
[t.WETH]: {
|
|
@@ -545,29 +842,53 @@ const h = {
|
|
|
545
842
|
symbol: t.WETH,
|
|
546
843
|
name: "Wrapped Ether",
|
|
547
844
|
decimals: 18,
|
|
548
|
-
logoURI:
|
|
845
|
+
logoURI: n.WETH,
|
|
549
846
|
nativeToken: !1
|
|
550
847
|
}
|
|
551
848
|
},
|
|
552
849
|
[d.AVALANCHE_TESTNET]: {
|
|
553
850
|
[t.USDC]: {
|
|
554
|
-
address:
|
|
851
|
+
address: p("0x5425890298aed601595a70AB815c96711a31Bc65"),
|
|
555
852
|
symbol: t.USDC,
|
|
556
853
|
name: "USD Coin",
|
|
557
854
|
fiatISO: "USD",
|
|
558
855
|
decimals: 6,
|
|
559
|
-
logoURI:
|
|
560
|
-
logoSourceURI:
|
|
856
|
+
logoURI: n.USDC,
|
|
857
|
+
logoSourceURI: n.USDC,
|
|
561
858
|
nativeToken: !1
|
|
562
859
|
}
|
|
563
860
|
},
|
|
564
861
|
[d.BASE]: {
|
|
862
|
+
[t.AAVE]: {
|
|
863
|
+
address: "0x63706e401c06ac8513145b7687A14804d17f814b",
|
|
864
|
+
symbol: "AAVE",
|
|
865
|
+
decimals: 18,
|
|
866
|
+
name: "AAVE TOKEN",
|
|
867
|
+
logoURI: n.AAVE,
|
|
868
|
+
nativeToken: !1
|
|
869
|
+
},
|
|
870
|
+
[t.cbBTC]: {
|
|
871
|
+
address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
|
|
872
|
+
symbol: "cbBTC",
|
|
873
|
+
decimals: 8,
|
|
874
|
+
name: "Coinbase Wrapped BTC",
|
|
875
|
+
logoURI: n.cbBTC,
|
|
876
|
+
nativeToken: !1
|
|
877
|
+
},
|
|
878
|
+
[t.CURVE]: {
|
|
879
|
+
address: "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415",
|
|
880
|
+
symbol: "CURVE",
|
|
881
|
+
decimals: 18,
|
|
882
|
+
name: "CURVE DAO",
|
|
883
|
+
logoURI: n.CURVE,
|
|
884
|
+
nativeToken: !1
|
|
885
|
+
},
|
|
565
886
|
[t.DAI]: {
|
|
566
887
|
address: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
|
|
567
888
|
symbol: t.DAI,
|
|
568
889
|
name: "Dai Stablecoin",
|
|
569
890
|
decimals: 18,
|
|
570
|
-
logoURI:
|
|
891
|
+
logoURI: n.DAI,
|
|
571
892
|
nativeToken: !1
|
|
572
893
|
},
|
|
573
894
|
[t.ETH]: {
|
|
@@ -575,7 +896,7 @@ const h = {
|
|
|
575
896
|
symbol: t.ETH,
|
|
576
897
|
name: "Ethereum",
|
|
577
898
|
decimals: 18,
|
|
578
|
-
logoURI:
|
|
899
|
+
logoURI: n.ETH,
|
|
579
900
|
nativeToken: !0
|
|
580
901
|
},
|
|
581
902
|
[t.EURC]: {
|
|
@@ -583,47 +904,95 @@ const h = {
|
|
|
583
904
|
symbol: t.EURC,
|
|
584
905
|
name: "Euro Coin",
|
|
585
906
|
decimals: 6,
|
|
586
|
-
logoURI:
|
|
907
|
+
logoURI: n.EURC,
|
|
908
|
+
nativeToken: !1
|
|
909
|
+
},
|
|
910
|
+
[t.LINK]: {
|
|
911
|
+
address: "0x88Fb150BDc53A65fe94Dea0c9BA0a6dAf8C6e196",
|
|
912
|
+
symbol: "LINK",
|
|
913
|
+
decimals: 18,
|
|
914
|
+
name: "ChainLink",
|
|
915
|
+
logoURI: n.LINK,
|
|
916
|
+
nativeToken: !1
|
|
917
|
+
},
|
|
918
|
+
[t.SOL]: {
|
|
919
|
+
address: "0x311935Cd80B76769bF2ecC9D8Ab7635b2139cf82",
|
|
920
|
+
symbol: "SOL",
|
|
921
|
+
decimals: 9,
|
|
922
|
+
name: "SOLANA TOKEN",
|
|
923
|
+
logoURI: n.SOL,
|
|
587
924
|
nativeToken: !1
|
|
588
925
|
},
|
|
589
926
|
[t.USDC]: {
|
|
590
|
-
address:
|
|
927
|
+
address: p("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),
|
|
591
928
|
symbol: t.USDC,
|
|
592
929
|
name: "USD Coin",
|
|
593
930
|
fiatISO: "USD",
|
|
594
931
|
decimals: 6,
|
|
595
|
-
logoURI:
|
|
596
|
-
logoSourceURI:
|
|
932
|
+
logoURI: n.USDC,
|
|
933
|
+
logoSourceURI: n.USDC,
|
|
934
|
+
nativeToken: !1
|
|
935
|
+
},
|
|
936
|
+
[t.USDS]: {
|
|
937
|
+
address: "0x820C137fa70C8691f0e44Dc420a5e53c168921Dc",
|
|
938
|
+
symbol: "USDS",
|
|
939
|
+
decimals: 18,
|
|
940
|
+
name: "USDS Stablecoin",
|
|
941
|
+
logoURI: n.USDS,
|
|
942
|
+
nativeToken: !1
|
|
943
|
+
},
|
|
944
|
+
[t.VIRTUAL]: {
|
|
945
|
+
address: "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b",
|
|
946
|
+
symbol: "VIRTUAL",
|
|
947
|
+
decimals: 18,
|
|
948
|
+
name: "Virtual Protocol",
|
|
949
|
+
logoURI: n.VIRTUAL,
|
|
950
|
+
nativeToken: !1
|
|
951
|
+
},
|
|
952
|
+
[t.WBTC]: {
|
|
953
|
+
address: "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",
|
|
954
|
+
symbol: "WBTC",
|
|
955
|
+
decimals: 8,
|
|
956
|
+
name: "Wrapped BTC",
|
|
957
|
+
logoURI: n.WBTC,
|
|
597
958
|
nativeToken: !1
|
|
598
959
|
},
|
|
599
960
|
[t.WETH]: {
|
|
600
|
-
address:
|
|
961
|
+
address: p("0x4200000000000000000000000000000000000006"),
|
|
601
962
|
symbol: t.WETH,
|
|
602
963
|
name: "Wrapped Ether",
|
|
603
964
|
decimals: 18,
|
|
604
|
-
logoURI:
|
|
965
|
+
logoURI: n.WETH,
|
|
605
966
|
nativeToken: !1
|
|
606
967
|
}
|
|
607
968
|
},
|
|
608
969
|
[d.BASE_TESTNET]: {
|
|
609
970
|
[t.USDC]: {
|
|
610
|
-
address:
|
|
971
|
+
address: p("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),
|
|
611
972
|
symbol: t.USDC,
|
|
612
973
|
name: "USD Coin",
|
|
613
974
|
fiatISO: "USD",
|
|
614
975
|
decimals: 6,
|
|
615
|
-
logoURI:
|
|
616
|
-
logoSourceURI:
|
|
976
|
+
logoURI: n.USDC,
|
|
977
|
+
logoSourceURI: n.USDC,
|
|
617
978
|
nativeToken: !1
|
|
618
979
|
}
|
|
619
980
|
},
|
|
620
981
|
[d.BSC]: {
|
|
982
|
+
[t.anyBTC]: {
|
|
983
|
+
address: "0x54261774905f3e6E9718f2ABb10ed6555cae308a",
|
|
984
|
+
symbol: "anyBTC",
|
|
985
|
+
decimals: 8,
|
|
986
|
+
name: "Bridged Bitcoin",
|
|
987
|
+
logoURI: n.anyBTC,
|
|
988
|
+
nativeToken: !1
|
|
989
|
+
},
|
|
621
990
|
[t.BNB]: {
|
|
622
991
|
address: "0x0000000000000000000000000000000000000000",
|
|
623
992
|
symbol: t.BNB,
|
|
624
993
|
name: "BNB",
|
|
625
994
|
decimals: 18,
|
|
626
|
-
logoURI:
|
|
995
|
+
logoURI: n.BNB,
|
|
627
996
|
nativeToken: !0
|
|
628
997
|
},
|
|
629
998
|
[t.BUSD]: {
|
|
@@ -631,7 +1000,7 @@ const h = {
|
|
|
631
1000
|
symbol: t.BUSD,
|
|
632
1001
|
name: "Binance USD",
|
|
633
1002
|
decimals: 18,
|
|
634
|
-
logoURI:
|
|
1003
|
+
logoURI: n.BUSD,
|
|
635
1004
|
nativeToken: !1
|
|
636
1005
|
},
|
|
637
1006
|
[t.DAI]: {
|
|
@@ -639,7 +1008,7 @@ const h = {
|
|
|
639
1008
|
symbol: t.DAI,
|
|
640
1009
|
name: "Dai Stablecoin",
|
|
641
1010
|
decimals: 18,
|
|
642
|
-
logoURI:
|
|
1011
|
+
logoURI: n.DAI,
|
|
643
1012
|
nativeToken: !1
|
|
644
1013
|
},
|
|
645
1014
|
[t.ETH]: {
|
|
@@ -647,16 +1016,32 @@ const h = {
|
|
|
647
1016
|
symbol: t.ETH,
|
|
648
1017
|
name: "Ethereum",
|
|
649
1018
|
decimals: 18,
|
|
650
|
-
logoURI:
|
|
1019
|
+
logoURI: n.ETH,
|
|
1020
|
+
nativeToken: !1
|
|
1021
|
+
},
|
|
1022
|
+
[t.LINK]: {
|
|
1023
|
+
address: "0x3af577F9D8c86ae8DBCBF51FE9836c9DF825759d",
|
|
1024
|
+
symbol: "LINK",
|
|
1025
|
+
decimals: 18,
|
|
1026
|
+
name: "ChainLink",
|
|
1027
|
+
logoURI: n.LINK,
|
|
1028
|
+
nativeToken: !1
|
|
1029
|
+
},
|
|
1030
|
+
[t.SOL]: {
|
|
1031
|
+
address: "0x570A5D26f7765Ecb712C0924E4De545B89fD43dF",
|
|
1032
|
+
symbol: "SOL",
|
|
1033
|
+
decimals: 18,
|
|
1034
|
+
name: "SOLANA TOKEN",
|
|
1035
|
+
logoURI: n.SOL,
|
|
651
1036
|
nativeToken: !1
|
|
652
1037
|
},
|
|
653
1038
|
[t.USDC]: {
|
|
654
|
-
address:
|
|
1039
|
+
address: p("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),
|
|
655
1040
|
symbol: t.USDC,
|
|
656
1041
|
decimals: 18,
|
|
657
1042
|
name: "USD Coin",
|
|
658
|
-
logoURI:
|
|
659
|
-
logoSourceURI:
|
|
1043
|
+
logoURI: n.USDC,
|
|
1044
|
+
logoSourceURI: n.USDC,
|
|
660
1045
|
nativeToken: !1
|
|
661
1046
|
},
|
|
662
1047
|
[t.USDT]: {
|
|
@@ -664,25 +1049,57 @@ const h = {
|
|
|
664
1049
|
symbol: t.USDT,
|
|
665
1050
|
name: "Tether USD",
|
|
666
1051
|
decimals: 18,
|
|
667
|
-
logoURI:
|
|
1052
|
+
logoURI: n.USDT,
|
|
1053
|
+
nativeToken: !1
|
|
1054
|
+
},
|
|
1055
|
+
[t.WBTC]: {
|
|
1056
|
+
address: "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",
|
|
1057
|
+
symbol: "WBTC",
|
|
1058
|
+
decimals: 8,
|
|
1059
|
+
name: "Wrapped BTC",
|
|
1060
|
+
logoURI: n.WBTC,
|
|
1061
|
+
nativeToken: !1
|
|
1062
|
+
},
|
|
1063
|
+
[t.WBNB]: {
|
|
1064
|
+
address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
1065
|
+
symbol: "WBNB",
|
|
1066
|
+
decimals: 18,
|
|
1067
|
+
name: "Wrapped BNB",
|
|
1068
|
+
logoURI: n.WBNB,
|
|
668
1069
|
nativeToken: !1
|
|
669
1070
|
}
|
|
670
1071
|
},
|
|
671
1072
|
[d.ETHEREUM]: {
|
|
1073
|
+
[t.AAVE]: {
|
|
1074
|
+
address: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
|
|
1075
|
+
symbol: "AAVE",
|
|
1076
|
+
decimals: 18,
|
|
1077
|
+
name: "AAVE TOKEN",
|
|
1078
|
+
logoURI: n.AAVE,
|
|
1079
|
+
nativeToken: !1
|
|
1080
|
+
},
|
|
1081
|
+
[t.BNB]: {
|
|
1082
|
+
address: p("0xB8c77482e45F1F44dE1745F52C74426C631bDD52"),
|
|
1083
|
+
symbol: t.BNB,
|
|
1084
|
+
name: "BNB",
|
|
1085
|
+
decimals: 18,
|
|
1086
|
+
logoURI: n.BNB,
|
|
1087
|
+
nativeToken: !1
|
|
1088
|
+
},
|
|
672
1089
|
[t.BUSD]: {
|
|
673
1090
|
address: "0x4Fabb145d64652a948d72533023f6E7A623C7C53",
|
|
674
1091
|
symbol: t.BUSD,
|
|
675
1092
|
name: "Binance USD",
|
|
676
1093
|
decimals: 18,
|
|
677
|
-
logoURI:
|
|
1094
|
+
logoURI: n.BUSD,
|
|
678
1095
|
nativeToken: !1
|
|
679
1096
|
},
|
|
680
1097
|
[t.DAI]: {
|
|
681
|
-
address:
|
|
1098
|
+
address: p("0x6B175474E89094C44Da98b954EedeAC495271d0F"),
|
|
682
1099
|
symbol: t.DAI,
|
|
683
1100
|
name: "Dai Stablecoin",
|
|
684
1101
|
decimals: 18,
|
|
685
|
-
logoURI:
|
|
1102
|
+
logoURI: n.DAI,
|
|
686
1103
|
nativeToken: !1
|
|
687
1104
|
},
|
|
688
1105
|
[t.ETH]: {
|
|
@@ -690,7 +1107,7 @@ const h = {
|
|
|
690
1107
|
symbol: t.ETH,
|
|
691
1108
|
name: "Ethereum",
|
|
692
1109
|
decimals: 18,
|
|
693
|
-
logoURI:
|
|
1110
|
+
logoURI: n.ETH,
|
|
694
1111
|
nativeToken: !0
|
|
695
1112
|
},
|
|
696
1113
|
[t.EURC]: {
|
|
@@ -698,7 +1115,23 @@ const h = {
|
|
|
698
1115
|
symbol: t.EURC,
|
|
699
1116
|
name: "Euro Coin",
|
|
700
1117
|
decimals: 6,
|
|
701
|
-
logoURI:
|
|
1118
|
+
logoURI: n.EURC,
|
|
1119
|
+
nativeToken: !1
|
|
1120
|
+
},
|
|
1121
|
+
[t.LINK]: {
|
|
1122
|
+
address: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
|
1123
|
+
symbol: "LINK",
|
|
1124
|
+
decimals: 18,
|
|
1125
|
+
name: "ChainLink",
|
|
1126
|
+
logoURI: n.LINK,
|
|
1127
|
+
nativeToken: !1
|
|
1128
|
+
},
|
|
1129
|
+
[t.SKY]: {
|
|
1130
|
+
address: "0x56072C95FAA701256059aa122697B133aDEd9279",
|
|
1131
|
+
symbol: "SKY",
|
|
1132
|
+
decimals: 18,
|
|
1133
|
+
name: "SKY Governance Token",
|
|
1134
|
+
logoURI: n.SKY,
|
|
702
1135
|
nativeToken: !1
|
|
703
1136
|
},
|
|
704
1137
|
[t.STRK]: {
|
|
@@ -706,43 +1139,91 @@ const h = {
|
|
|
706
1139
|
symbol: t.STRK,
|
|
707
1140
|
name: "Starknet Token",
|
|
708
1141
|
decimals: 18,
|
|
709
|
-
logoURI:
|
|
1142
|
+
logoURI: n.STRK,
|
|
1143
|
+
nativeToken: !1
|
|
1144
|
+
},
|
|
1145
|
+
[t.stETH]: {
|
|
1146
|
+
address: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
|
|
1147
|
+
symbol: "stETH",
|
|
1148
|
+
decimals: 18,
|
|
1149
|
+
name: "Lido's liquid staking ETH ",
|
|
1150
|
+
logoURI: n.stETH,
|
|
1151
|
+
nativeToken: !1
|
|
1152
|
+
},
|
|
1153
|
+
[t.UNI]: {
|
|
1154
|
+
address: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
|
|
1155
|
+
symbol: "UNI",
|
|
1156
|
+
decimals: 18,
|
|
1157
|
+
name: "UNISWAP TOKEN",
|
|
1158
|
+
logoURI: n.UNI,
|
|
710
1159
|
nativeToken: !1
|
|
711
1160
|
},
|
|
712
1161
|
[t.USDC]: {
|
|
713
|
-
address:
|
|
1162
|
+
address: p("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),
|
|
714
1163
|
symbol: t.USDC,
|
|
715
1164
|
name: "USD Coin",
|
|
716
1165
|
decimals: 6,
|
|
717
|
-
logoURI:
|
|
718
|
-
logoSourceURI:
|
|
1166
|
+
logoURI: n.USDC,
|
|
1167
|
+
logoSourceURI: n.USDC,
|
|
1168
|
+
nativeToken: !1
|
|
1169
|
+
},
|
|
1170
|
+
[t.USDS]: {
|
|
1171
|
+
address: "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
|
|
1172
|
+
symbol: "USDS",
|
|
1173
|
+
decimals: 18,
|
|
1174
|
+
name: "USDS Stablecoin",
|
|
1175
|
+
logoURI: n.USDS,
|
|
1176
|
+
nativeToken: !1
|
|
1177
|
+
},
|
|
1178
|
+
[t.USDG]: {
|
|
1179
|
+
address: "0xe343167631d89B6Ffc58B88d6b7fB0228795491D",
|
|
1180
|
+
symbol: "USDG",
|
|
1181
|
+
decimals: 6,
|
|
1182
|
+
name: "USDG Stablecoin",
|
|
1183
|
+
logoURI: n.USDG,
|
|
719
1184
|
nativeToken: !1
|
|
720
1185
|
},
|
|
721
1186
|
[t.USDT]: {
|
|
722
|
-
address:
|
|
1187
|
+
address: p("0xdAC17F958D2ee523a2206206994597C13D831ec7"),
|
|
723
1188
|
symbol: t.USDT,
|
|
724
1189
|
name: "Tether USD",
|
|
725
1190
|
decimals: 6,
|
|
726
|
-
logoURI:
|
|
1191
|
+
logoURI: n.USDT,
|
|
1192
|
+
nativeToken: !1
|
|
1193
|
+
},
|
|
1194
|
+
[t.WBTC]: {
|
|
1195
|
+
address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
|
1196
|
+
symbol: "WBTC",
|
|
1197
|
+
decimals: 8,
|
|
1198
|
+
name: "Wrapped BTC",
|
|
1199
|
+
logoURI: n.WBTC,
|
|
727
1200
|
nativeToken: !1
|
|
728
1201
|
},
|
|
729
1202
|
[t.WETH]: {
|
|
730
|
-
address:
|
|
1203
|
+
address: p("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
|
|
731
1204
|
symbol: t.WETH,
|
|
732
1205
|
name: "Wrapped Ether",
|
|
733
1206
|
decimals: 18,
|
|
734
|
-
logoURI:
|
|
1207
|
+
logoURI: n.WETH,
|
|
1208
|
+
nativeToken: !1
|
|
1209
|
+
},
|
|
1210
|
+
[t.wstETH]: {
|
|
1211
|
+
address: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
|
1212
|
+
symbol: "wstETH",
|
|
1213
|
+
decimals: 18,
|
|
1214
|
+
name: "Wrapped liquid staked Ether 2.0",
|
|
1215
|
+
logoURI: n.wstETH,
|
|
735
1216
|
nativeToken: !1
|
|
736
1217
|
}
|
|
737
1218
|
},
|
|
738
1219
|
[d.ETHEREUM_TESTNET]: {
|
|
739
1220
|
[t.USDC]: {
|
|
740
|
-
address:
|
|
1221
|
+
address: p("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),
|
|
741
1222
|
symbol: t.USDC,
|
|
742
1223
|
decimals: 6,
|
|
743
1224
|
name: "USD Coin",
|
|
744
|
-
logoURI:
|
|
745
|
-
logoSourceURI:
|
|
1225
|
+
logoURI: n.USDC,
|
|
1226
|
+
logoSourceURI: n.USDC,
|
|
746
1227
|
nativeToken: !1
|
|
747
1228
|
}
|
|
748
1229
|
},
|
|
@@ -752,7 +1233,7 @@ const h = {
|
|
|
752
1233
|
symbol: t.USDC,
|
|
753
1234
|
name: "USD Coin",
|
|
754
1235
|
decimals: 6,
|
|
755
|
-
logoURI:
|
|
1236
|
+
logoURI: n.USDC,
|
|
756
1237
|
nativeToken: !1
|
|
757
1238
|
}
|
|
758
1239
|
},
|
|
@@ -762,17 +1243,65 @@ const h = {
|
|
|
762
1243
|
symbol: t.USDC,
|
|
763
1244
|
name: "USD Coin",
|
|
764
1245
|
decimals: 6,
|
|
765
|
-
logoURI:
|
|
1246
|
+
logoURI: n.USDC,
|
|
766
1247
|
nativeToken: !1
|
|
767
1248
|
}
|
|
768
1249
|
},
|
|
769
1250
|
[d.MONAD]: {
|
|
1251
|
+
[t.AUSD]: {
|
|
1252
|
+
address: "0x00000000efe302beaa2b3e6e1b18d08d69a9012a",
|
|
1253
|
+
symbol: "AUSD",
|
|
1254
|
+
decimals: 6,
|
|
1255
|
+
name: "AUSD",
|
|
1256
|
+
logoURI: n.AUSD,
|
|
1257
|
+
nativeToken: !1
|
|
1258
|
+
},
|
|
1259
|
+
[t.LVMON]: {
|
|
1260
|
+
address: "0x91b81bfbe3a747230f0529aa28d8b2bc898e6d56",
|
|
1261
|
+
symbol: "LVMON",
|
|
1262
|
+
decimals: 18,
|
|
1263
|
+
name: "LeverUp MON",
|
|
1264
|
+
logoURI: n.LVMON,
|
|
1265
|
+
nativeToken: !1
|
|
1266
|
+
},
|
|
770
1267
|
[t.USDC]: {
|
|
771
1268
|
address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
|
|
772
1269
|
symbol: t.USDC,
|
|
773
1270
|
name: "USD Coin",
|
|
774
1271
|
decimals: 6,
|
|
775
|
-
logoURI:
|
|
1272
|
+
logoURI: n.USDC,
|
|
1273
|
+
nativeToken: !1
|
|
1274
|
+
},
|
|
1275
|
+
[t.USDT0]: {
|
|
1276
|
+
address: "0xe7cd86e13ac4309349f30b3435a9d337750fc82d",
|
|
1277
|
+
symbol: "USDT0",
|
|
1278
|
+
decimals: 6,
|
|
1279
|
+
name: "USDT0 Coin",
|
|
1280
|
+
logoURI: n.USDT0,
|
|
1281
|
+
nativeToken: !1
|
|
1282
|
+
},
|
|
1283
|
+
[t.WBTC]: {
|
|
1284
|
+
address: "0x0555e30da8f98308edb960aa94c0db47230d2b9c",
|
|
1285
|
+
symbol: "WBTC",
|
|
1286
|
+
decimals: 8,
|
|
1287
|
+
name: "Wrapped BTC",
|
|
1288
|
+
logoURI: n.WBTC,
|
|
1289
|
+
nativeToken: !1
|
|
1290
|
+
},
|
|
1291
|
+
[t.WETH]: {
|
|
1292
|
+
address: "0xee8c0e9f1bffb4eb878d8f15f368a02a35481242",
|
|
1293
|
+
symbol: "WETH",
|
|
1294
|
+
decimals: 18,
|
|
1295
|
+
name: "Wrapped Ether",
|
|
1296
|
+
logoURI: n.WETH,
|
|
1297
|
+
nativeToken: !1
|
|
1298
|
+
},
|
|
1299
|
+
[t.WMON]: {
|
|
1300
|
+
address: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
|
|
1301
|
+
symbol: "WMON",
|
|
1302
|
+
decimals: 18,
|
|
1303
|
+
name: "Wrapped MON",
|
|
1304
|
+
logoURI: n.WMON,
|
|
776
1305
|
nativeToken: !1
|
|
777
1306
|
}
|
|
778
1307
|
},
|
|
@@ -782,7 +1311,7 @@ const h = {
|
|
|
782
1311
|
symbol: t.USDC,
|
|
783
1312
|
name: "USD Coin",
|
|
784
1313
|
decimals: 6,
|
|
785
|
-
logoURI:
|
|
1314
|
+
logoURI: n.USDC,
|
|
786
1315
|
nativeToken: !1
|
|
787
1316
|
}
|
|
788
1317
|
},
|
|
@@ -792,7 +1321,7 @@ const h = {
|
|
|
792
1321
|
symbol: t.DAI,
|
|
793
1322
|
name: "Dai Stablecoin",
|
|
794
1323
|
decimals: 18,
|
|
795
|
-
logoURI:
|
|
1324
|
+
logoURI: n.DAI,
|
|
796
1325
|
nativeToken: !1
|
|
797
1326
|
},
|
|
798
1327
|
[t.ETH]: {
|
|
@@ -800,15 +1329,39 @@ const h = {
|
|
|
800
1329
|
symbol: t.ETH,
|
|
801
1330
|
name: "Ethereum",
|
|
802
1331
|
decimals: 18,
|
|
803
|
-
logoURI:
|
|
1332
|
+
logoURI: n.ETH,
|
|
804
1333
|
nativeToken: !0
|
|
805
1334
|
},
|
|
1335
|
+
[t.LINK]: {
|
|
1336
|
+
address: "0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6",
|
|
1337
|
+
symbol: "LINK",
|
|
1338
|
+
decimals: 18,
|
|
1339
|
+
name: "ChainLink",
|
|
1340
|
+
logoURI: n.LINK,
|
|
1341
|
+
nativeToken: !1
|
|
1342
|
+
},
|
|
1343
|
+
[t.OP]: {
|
|
1344
|
+
address: "0x4200000000000000000000000000000000000042",
|
|
1345
|
+
symbol: "OP",
|
|
1346
|
+
decimals: 18,
|
|
1347
|
+
name: "Optimism",
|
|
1348
|
+
logoURI: n.OP,
|
|
1349
|
+
nativeToken: !1
|
|
1350
|
+
},
|
|
1351
|
+
[t.UNI]: {
|
|
1352
|
+
address: "0x6fd9d7AD17242c41f7131d257212c54A0e816691",
|
|
1353
|
+
symbol: "UNI",
|
|
1354
|
+
decimals: 18,
|
|
1355
|
+
name: "UNISWAP TOKEN",
|
|
1356
|
+
logoURI: n.UNI,
|
|
1357
|
+
nativeToken: !1
|
|
1358
|
+
},
|
|
806
1359
|
[t.USDC]: {
|
|
807
1360
|
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
808
1361
|
symbol: t.USDC,
|
|
809
1362
|
name: "USD Coin",
|
|
810
1363
|
decimals: 6,
|
|
811
|
-
logoURI:
|
|
1364
|
+
logoURI: n.USDC,
|
|
812
1365
|
nativeToken: !1
|
|
813
1366
|
},
|
|
814
1367
|
[t.USDT]: {
|
|
@@ -816,7 +1369,15 @@ const h = {
|
|
|
816
1369
|
symbol: t.USDT,
|
|
817
1370
|
name: "Tether USD",
|
|
818
1371
|
decimals: 6,
|
|
819
|
-
logoURI:
|
|
1372
|
+
logoURI: n.USDT,
|
|
1373
|
+
nativeToken: !1
|
|
1374
|
+
},
|
|
1375
|
+
[t.WBTC]: {
|
|
1376
|
+
address: "0x68f180fcCe6836688e9084f035309E29Bf0A2095",
|
|
1377
|
+
symbol: "WBTC",
|
|
1378
|
+
decimals: 8,
|
|
1379
|
+
name: "Wrapped BTC",
|
|
1380
|
+
logoURI: n.WBTC,
|
|
820
1381
|
nativeToken: !1
|
|
821
1382
|
},
|
|
822
1383
|
[t.WETH]: {
|
|
@@ -824,7 +1385,23 @@ const h = {
|
|
|
824
1385
|
symbol: t.WETH,
|
|
825
1386
|
name: "Wrapped Ether",
|
|
826
1387
|
decimals: 18,
|
|
827
|
-
logoURI:
|
|
1388
|
+
logoURI: n.WETH,
|
|
1389
|
+
nativeToken: !1
|
|
1390
|
+
},
|
|
1391
|
+
[t.WLD]: {
|
|
1392
|
+
address: "0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1",
|
|
1393
|
+
symbol: "WLD",
|
|
1394
|
+
decimals: 18,
|
|
1395
|
+
name: "WORLD COIN",
|
|
1396
|
+
logoURI: n.WLD,
|
|
1397
|
+
nativeToken: !1
|
|
1398
|
+
},
|
|
1399
|
+
[t.wstETH]: {
|
|
1400
|
+
address: "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb",
|
|
1401
|
+
symbol: "wstETH",
|
|
1402
|
+
decimals: 18,
|
|
1403
|
+
name: "Wrapped liquid staked Ether 2.0",
|
|
1404
|
+
logoURI: n.wstETH,
|
|
828
1405
|
nativeToken: !1
|
|
829
1406
|
}
|
|
830
1407
|
},
|
|
@@ -834,7 +1411,7 @@ const h = {
|
|
|
834
1411
|
symbol: t.USDC,
|
|
835
1412
|
name: "USD Coin",
|
|
836
1413
|
decimals: 6,
|
|
837
|
-
logoURI:
|
|
1414
|
+
logoURI: n.USDC,
|
|
838
1415
|
nativeToken: !1
|
|
839
1416
|
}
|
|
840
1417
|
},
|
|
@@ -844,7 +1421,39 @@ const h = {
|
|
|
844
1421
|
symbol: t.DAI,
|
|
845
1422
|
name: "Dai Stablecoin",
|
|
846
1423
|
decimals: 18,
|
|
847
|
-
logoURI:
|
|
1424
|
+
logoURI: n.DAI,
|
|
1425
|
+
nativeToken: !1
|
|
1426
|
+
},
|
|
1427
|
+
[t.LINK]: {
|
|
1428
|
+
address: "0xb0897686c545045aFc77CF20eC7A532E3120E0F1",
|
|
1429
|
+
symbol: "LINK",
|
|
1430
|
+
decimals: 18,
|
|
1431
|
+
name: "ChainLink",
|
|
1432
|
+
logoURI: n.LINK,
|
|
1433
|
+
nativeToken: !1
|
|
1434
|
+
},
|
|
1435
|
+
[t.POL]: {
|
|
1436
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
1437
|
+
symbol: "POL",
|
|
1438
|
+
decimals: 18,
|
|
1439
|
+
name: "POLYGON",
|
|
1440
|
+
logoURI: n.POL,
|
|
1441
|
+
nativeToken: !0
|
|
1442
|
+
},
|
|
1443
|
+
[t.SOL]: {
|
|
1444
|
+
address: "0xd93f7E271cB87c23AaA73edC008A79646d1F9912",
|
|
1445
|
+
symbol: "SOL",
|
|
1446
|
+
decimals: 9,
|
|
1447
|
+
name: "SOLANA TOKEN",
|
|
1448
|
+
logoURI: n.SOL,
|
|
1449
|
+
nativeToken: !1
|
|
1450
|
+
},
|
|
1451
|
+
[t.UNI]: {
|
|
1452
|
+
address: "0xb33EaAd8d922B1083446DC23f610c2567fB5180f",
|
|
1453
|
+
symbol: "UNI",
|
|
1454
|
+
decimals: 18,
|
|
1455
|
+
name: "UNISWAP TOKEN",
|
|
1456
|
+
logoURI: n.UNI,
|
|
848
1457
|
nativeToken: !1
|
|
849
1458
|
},
|
|
850
1459
|
[t.USDC]: {
|
|
@@ -852,7 +1461,7 @@ const h = {
|
|
|
852
1461
|
symbol: t.USDC,
|
|
853
1462
|
name: "USD Coin",
|
|
854
1463
|
decimals: 6,
|
|
855
|
-
logoURI:
|
|
1464
|
+
logoURI: n.USDC,
|
|
856
1465
|
nativeToken: !1
|
|
857
1466
|
},
|
|
858
1467
|
[t.USDT]: {
|
|
@@ -860,7 +1469,15 @@ const h = {
|
|
|
860
1469
|
symbol: t.USDT,
|
|
861
1470
|
name: "Tether USD",
|
|
862
1471
|
decimals: 6,
|
|
863
|
-
logoURI:
|
|
1472
|
+
logoURI: n.USDT,
|
|
1473
|
+
nativeToken: !1
|
|
1474
|
+
},
|
|
1475
|
+
[t.WBTC]: {
|
|
1476
|
+
address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
|
|
1477
|
+
symbol: "WBTC",
|
|
1478
|
+
decimals: 8,
|
|
1479
|
+
name: "Wrapped BTC",
|
|
1480
|
+
logoURI: n.WBTC,
|
|
864
1481
|
nativeToken: !1
|
|
865
1482
|
},
|
|
866
1483
|
[t.WETH]: {
|
|
@@ -868,7 +1485,29 @@ const h = {
|
|
|
868
1485
|
symbol: t.WETH,
|
|
869
1486
|
name: "Wrapped Ether",
|
|
870
1487
|
decimals: 18,
|
|
871
|
-
logoURI:
|
|
1488
|
+
logoURI: n.WETH,
|
|
1489
|
+
nativeToken: !1
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
[d.SOLANA]: {
|
|
1493
|
+
[t.USDC]: {
|
|
1494
|
+
address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
1495
|
+
symbol: t.USDC,
|
|
1496
|
+
name: "USD Coin",
|
|
1497
|
+
decimals: 6,
|
|
1498
|
+
logoURI: n.USDC,
|
|
1499
|
+
logoSourceURI: n.USDC,
|
|
1500
|
+
nativeToken: !1
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
[d.SOLANA_TESTNET]: {
|
|
1504
|
+
[t.USDC]: {
|
|
1505
|
+
address: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
|
|
1506
|
+
symbol: t.USDC,
|
|
1507
|
+
name: "USD Coin",
|
|
1508
|
+
decimals: 6,
|
|
1509
|
+
logoURI: n.USDC,
|
|
1510
|
+
logoSourceURI: n.USDC,
|
|
872
1511
|
nativeToken: !1
|
|
873
1512
|
}
|
|
874
1513
|
},
|
|
@@ -878,7 +1517,15 @@ const h = {
|
|
|
878
1517
|
symbol: t.DAI,
|
|
879
1518
|
name: "Dai Stablecoin",
|
|
880
1519
|
decimals: 18,
|
|
881
|
-
logoURI:
|
|
1520
|
+
logoURI: n.DAI,
|
|
1521
|
+
nativeToken: !1
|
|
1522
|
+
},
|
|
1523
|
+
[t.EKUBO]: {
|
|
1524
|
+
address: "0x075afe6402aD5A5c20Dd25E10eC3b3986aCAA647b77e4Ae24B0CBc9a54A27a87",
|
|
1525
|
+
symbol: "EKUBO",
|
|
1526
|
+
decimals: 18,
|
|
1527
|
+
name: "EKUBO",
|
|
1528
|
+
logoURI: n.EKUBO,
|
|
882
1529
|
nativeToken: !1
|
|
883
1530
|
},
|
|
884
1531
|
[t.ETH]: {
|
|
@@ -886,7 +1533,7 @@ const h = {
|
|
|
886
1533
|
symbol: t.ETH,
|
|
887
1534
|
name: "Ethereum",
|
|
888
1535
|
decimals: 18,
|
|
889
|
-
logoURI:
|
|
1536
|
+
logoURI: n.ETH,
|
|
890
1537
|
nativeToken: !1
|
|
891
1538
|
},
|
|
892
1539
|
[t.LORDS]: {
|
|
@@ -894,7 +1541,7 @@ const h = {
|
|
|
894
1541
|
symbol: t.LORDS,
|
|
895
1542
|
name: "LORDS Token",
|
|
896
1543
|
decimals: 18,
|
|
897
|
-
logoURI:
|
|
1544
|
+
logoURI: n.LORDS,
|
|
898
1545
|
nativeToken: !1
|
|
899
1546
|
},
|
|
900
1547
|
[t.STRK]: {
|
|
@@ -902,7 +1549,7 @@ const h = {
|
|
|
902
1549
|
symbol: t.STRK,
|
|
903
1550
|
name: "Starknet Token",
|
|
904
1551
|
decimals: 18,
|
|
905
|
-
logoURI:
|
|
1552
|
+
logoURI: n.STRK,
|
|
906
1553
|
nativeToken: !1
|
|
907
1554
|
},
|
|
908
1555
|
[t.USDC]: {
|
|
@@ -910,8 +1557,8 @@ const h = {
|
|
|
910
1557
|
symbol: t.USDC,
|
|
911
1558
|
name: "USD Coin",
|
|
912
1559
|
decimals: 6,
|
|
913
|
-
logoURI:
|
|
914
|
-
logoSourceURI:
|
|
1560
|
+
logoURI: n.USDC,
|
|
1561
|
+
logoSourceURI: n.USDC,
|
|
915
1562
|
nativeToken: !1
|
|
916
1563
|
},
|
|
917
1564
|
[t.USDT]: {
|
|
@@ -919,7 +1566,15 @@ const h = {
|
|
|
919
1566
|
symbol: t.USDT,
|
|
920
1567
|
name: "Tether USD",
|
|
921
1568
|
decimals: 6,
|
|
922
|
-
logoURI:
|
|
1569
|
+
logoURI: n.USDT,
|
|
1570
|
+
nativeToken: !1
|
|
1571
|
+
},
|
|
1572
|
+
[t.WBTC]: {
|
|
1573
|
+
address: "0x03Fe2b97C1Fd336E750087D68B9b867997Fd64a2661fF3ca5A7C771641e8e7AC",
|
|
1574
|
+
symbol: "WBTC",
|
|
1575
|
+
decimals: 8,
|
|
1576
|
+
name: "Wrapped BTC",
|
|
1577
|
+
logoURI: n.WBTC,
|
|
923
1578
|
nativeToken: !1
|
|
924
1579
|
}
|
|
925
1580
|
},
|
|
@@ -929,71 +1584,376 @@ const h = {
|
|
|
929
1584
|
symbol: t.USDC,
|
|
930
1585
|
name: "USD Coin",
|
|
931
1586
|
decimals: 6,
|
|
932
|
-
logoURI:
|
|
1587
|
+
logoURI: n.USDC,
|
|
933
1588
|
nativeToken: !1
|
|
934
1589
|
}
|
|
935
1590
|
}
|
|
936
|
-
},
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1591
|
+
}, ba = {
|
|
1592
|
+
ARBITRUM_MAINNET: {
|
|
1593
|
+
...Se,
|
|
1594
|
+
tokens: g[d.ARBITRUM]
|
|
1595
|
+
},
|
|
1596
|
+
ARBITRUM_TESTNET: {
|
|
1597
|
+
...Ae,
|
|
1598
|
+
tokens: g[d.ARBITRUM_TESTNET]
|
|
1599
|
+
},
|
|
1600
|
+
AVALANCHE_MAINNET: {
|
|
1601
|
+
...Ue,
|
|
1602
|
+
tokens: g[d.AVALANCHE]
|
|
1603
|
+
},
|
|
1604
|
+
AVALANCHE_TESTNET: {
|
|
1605
|
+
...Ce,
|
|
1606
|
+
tokens: g[d.AVALANCHE_TESTNET]
|
|
1607
|
+
},
|
|
1608
|
+
BASE_MAINNET: {
|
|
1609
|
+
...be,
|
|
1610
|
+
tokens: g[d.BASE]
|
|
1611
|
+
},
|
|
1612
|
+
BASE_TESTNET: {
|
|
1613
|
+
...De,
|
|
1614
|
+
tokens: g[d.BASE_TESTNET]
|
|
1615
|
+
},
|
|
1616
|
+
BSC_MAINNET: {
|
|
1617
|
+
...ye,
|
|
1618
|
+
tokens: g[d.BSC]
|
|
1619
|
+
},
|
|
1620
|
+
ETHEREUM_MAINNET: {
|
|
1621
|
+
...Ie,
|
|
1622
|
+
tokens: g[d.ETHEREUM]
|
|
1623
|
+
},
|
|
1624
|
+
ETHEREUM_TESTNET: {
|
|
1625
|
+
...Ne,
|
|
1626
|
+
tokens: g[d.ETHEREUM_TESTNET]
|
|
1627
|
+
},
|
|
1628
|
+
HYPEREVM_MAINNET: {
|
|
1629
|
+
...Be,
|
|
1630
|
+
tokens: g[d.HYPEREVM]
|
|
1631
|
+
},
|
|
1632
|
+
LISK_MAINNET: {
|
|
1633
|
+
...ve,
|
|
1634
|
+
tokens: g[d.LISK]
|
|
1635
|
+
},
|
|
1636
|
+
MONAD_MAINNET: {
|
|
1637
|
+
...Re,
|
|
1638
|
+
tokens: g[d.MONAD]
|
|
1639
|
+
},
|
|
1640
|
+
MONAD_TESTNET: {
|
|
1641
|
+
...ke,
|
|
1642
|
+
tokens: g[d.MONAD_TESTNET]
|
|
1643
|
+
},
|
|
1644
|
+
OPTIMISM_MAINNET: {
|
|
1645
|
+
...Oe,
|
|
1646
|
+
tokens: g[d.OPTIMISM]
|
|
1647
|
+
},
|
|
1648
|
+
OPTIMISM_TESTNET: {
|
|
1649
|
+
...we,
|
|
1650
|
+
tokens: g[d.OPTIMISM_TESTNET]
|
|
1651
|
+
},
|
|
1652
|
+
POLYGON_MAINNET: {
|
|
1653
|
+
...xe,
|
|
1654
|
+
tokens: g[d.POLYGON]
|
|
1655
|
+
},
|
|
1656
|
+
SOLANA_MAINNET: {
|
|
1657
|
+
..._e,
|
|
1658
|
+
tokens: g[d.SOLANA]
|
|
1659
|
+
},
|
|
1660
|
+
SOLANA_TESTNET: {
|
|
1661
|
+
...Me,
|
|
1662
|
+
tokens: g[d.SOLANA_TESTNET]
|
|
1663
|
+
},
|
|
1664
|
+
STARKNET_MAINNET: {
|
|
1665
|
+
...Le,
|
|
1666
|
+
tokens: g[d.STARKNET]
|
|
1667
|
+
},
|
|
1668
|
+
STARKNET_TESTNET: {
|
|
1669
|
+
...Fe,
|
|
1670
|
+
tokens: g[d.STARKNET_TESTNET]
|
|
1671
|
+
}
|
|
1672
|
+
}, Da = "https://api.chainrails.io/api/v1";
|
|
1673
|
+
let v = Da;
|
|
1674
|
+
const z = /* @__PURE__ */ new Set();
|
|
1675
|
+
function ya(a) {
|
|
1676
|
+
return a.replace(/\/+$/, "");
|
|
1677
|
+
}
|
|
1678
|
+
const U = {
|
|
1679
|
+
getBaseUrl() {
|
|
1680
|
+
return v;
|
|
1681
|
+
},
|
|
1682
|
+
setBaseUrl(a) {
|
|
1683
|
+
const e = ya(a);
|
|
1684
|
+
e !== v && (v = e, z.forEach((s) => s()));
|
|
1685
|
+
},
|
|
1686
|
+
buildUrl(a) {
|
|
1687
|
+
const e = a.startsWith("/") ? a : `/${a}`;
|
|
1688
|
+
return `${v}/registry${e}`;
|
|
1689
|
+
},
|
|
1690
|
+
onBaseUrlChange(a) {
|
|
1691
|
+
return z.add(a), () => z.delete(a);
|
|
1692
|
+
}
|
|
1693
|
+
};
|
|
1694
|
+
function _(a) {
|
|
1695
|
+
let e = null, s = null;
|
|
1696
|
+
const o = {
|
|
1697
|
+
load(r) {
|
|
1698
|
+
if (e)
|
|
1699
|
+
return Promise.resolve(e);
|
|
1700
|
+
if (s)
|
|
1701
|
+
return s;
|
|
1702
|
+
const l = (async () => {
|
|
1703
|
+
const i = a.fallback();
|
|
1704
|
+
try {
|
|
1705
|
+
const m = await fetch(U.buildUrl(a.path), {
|
|
1706
|
+
method: "GET",
|
|
1707
|
+
headers: { Accept: "application/json" },
|
|
1708
|
+
signal: r?.signal
|
|
1709
|
+
});
|
|
1710
|
+
if (!m.ok)
|
|
1711
|
+
return a.cacheFallbackWhenHttpNotOk && (e = i), i;
|
|
1712
|
+
const f = await m.json(), h = a.parse(f);
|
|
1713
|
+
return e = h, h;
|
|
1714
|
+
} catch {
|
|
1715
|
+
return e = i, i;
|
|
1716
|
+
}
|
|
1717
|
+
})();
|
|
1718
|
+
return s = l, l.then(
|
|
1719
|
+
() => {
|
|
1720
|
+
s = null;
|
|
1721
|
+
},
|
|
1722
|
+
() => {
|
|
1723
|
+
s = null;
|
|
1724
|
+
}
|
|
1725
|
+
), l;
|
|
1726
|
+
},
|
|
1727
|
+
getSnapshot() {
|
|
1728
|
+
return e ?? a.fallback();
|
|
1729
|
+
},
|
|
1730
|
+
clearCache() {
|
|
1731
|
+
e = null, s = null;
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
return U.onBaseUrlChange(() => o.clearCache()), o;
|
|
1735
|
+
}
|
|
1736
|
+
function Ia(a) {
|
|
1737
|
+
if (a && typeof a == "object" && !Array.isArray(a) && "data" in a) {
|
|
1738
|
+
const e = a.data;
|
|
1739
|
+
if (e && typeof e == "object" && !Array.isArray(e))
|
|
1740
|
+
return e;
|
|
1741
|
+
}
|
|
1742
|
+
if (a && typeof a == "object" && !Array.isArray(a))
|
|
1743
|
+
return a;
|
|
1744
|
+
throw new Error("Chain registry: response is not a chain map or { data: map }");
|
|
1745
|
+
}
|
|
1746
|
+
function Na() {
|
|
1747
|
+
return {
|
|
1748
|
+
chains: he,
|
|
1749
|
+
internalChains: d
|
|
1750
|
+
};
|
|
1751
|
+
}
|
|
1752
|
+
function Ba(a) {
|
|
1753
|
+
if (a && typeof a == "object" && !Array.isArray(a) && "data" in a)
|
|
1754
|
+
return a.data;
|
|
1755
|
+
if (a && typeof a == "object" && !Array.isArray(a))
|
|
1756
|
+
return a;
|
|
1757
|
+
throw new Error("Chain registry aliases: response is not { data: { chains, internalChains } }");
|
|
1758
|
+
}
|
|
1759
|
+
const y = _({
|
|
1760
|
+
path: "/chains",
|
|
1761
|
+
parse: Ia,
|
|
1762
|
+
fallback: () => ba,
|
|
1763
|
+
cacheFallbackWhenHttpNotOk: !1
|
|
1764
|
+
}), b = _({
|
|
1765
|
+
path: "/chains/aliases",
|
|
1766
|
+
parse: Ba,
|
|
1767
|
+
fallback: () => Na(),
|
|
1768
|
+
cacheFallbackWhenHttpNotOk: !1
|
|
1769
|
+
});
|
|
1770
|
+
class O {
|
|
1771
|
+
static setBaseUrl(e) {
|
|
1772
|
+
U.setBaseUrl(e);
|
|
1773
|
+
}
|
|
1774
|
+
static getBaseUrl() {
|
|
1775
|
+
return U.getBaseUrl();
|
|
1776
|
+
}
|
|
1777
|
+
static clearCache() {
|
|
1778
|
+
y.clearCache(), b.clearCache();
|
|
1779
|
+
}
|
|
1780
|
+
static loadAllChains(e) {
|
|
1781
|
+
return y.load(e);
|
|
1782
|
+
}
|
|
1783
|
+
static loadChainAliases(e) {
|
|
1784
|
+
return b.load(e);
|
|
1785
|
+
}
|
|
1786
|
+
static get all() {
|
|
1787
|
+
return y.getSnapshot();
|
|
1788
|
+
}
|
|
1789
|
+
static getAllChainsSnapshot() {
|
|
1790
|
+
return y.getSnapshot();
|
|
1791
|
+
}
|
|
1792
|
+
static getChainAliasesSnapshot() {
|
|
1793
|
+
return b.getSnapshot();
|
|
1794
|
+
}
|
|
1795
|
+
static getChainAliases() {
|
|
1796
|
+
return b.getSnapshot().chains;
|
|
1797
|
+
}
|
|
1798
|
+
static getInternalChains() {
|
|
1799
|
+
return b.getSnapshot().internalChains;
|
|
1800
|
+
}
|
|
1801
|
+
static async init(e) {
|
|
1802
|
+
await Promise.all([
|
|
1803
|
+
y.load(e).catch((s) => {
|
|
1804
|
+
console.error(s);
|
|
1805
|
+
}),
|
|
1806
|
+
b.load(e).catch((s) => {
|
|
1807
|
+
console.error(s);
|
|
1808
|
+
})
|
|
1809
|
+
]);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
function E(a) {
|
|
1813
|
+
if (va(a))
|
|
1814
|
+
return a;
|
|
1815
|
+
const e = O.getInternalChains()[a];
|
|
952
1816
|
if (!e)
|
|
953
|
-
throw new Error(`Invalid chain: ${
|
|
1817
|
+
throw new Error(`Invalid chain: ${a}.`);
|
|
954
1818
|
return e;
|
|
955
1819
|
}
|
|
956
|
-
function
|
|
957
|
-
return
|
|
1820
|
+
function va(a) {
|
|
1821
|
+
return Object.values(O.getInternalChains()).includes(
|
|
1822
|
+
a
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
function Ra(a) {
|
|
1826
|
+
if (a && typeof a == "object" && !Array.isArray(a) && "data" in a) {
|
|
1827
|
+
const e = a.data;
|
|
1828
|
+
if (e && typeof e == "object" && !Array.isArray(e))
|
|
1829
|
+
return e;
|
|
1830
|
+
}
|
|
1831
|
+
if (a && typeof a == "object" && !Array.isArray(a))
|
|
1832
|
+
return a;
|
|
1833
|
+
throw new Error("Token registry: response is not a token map or { data: map }");
|
|
1834
|
+
}
|
|
1835
|
+
function ka(a) {
|
|
1836
|
+
if (a && typeof a == "object" && !Array.isArray(a) && "data" in a) {
|
|
1837
|
+
const e = a.data;
|
|
1838
|
+
if (e && typeof e == "object" && !Array.isArray(e))
|
|
1839
|
+
return e;
|
|
1840
|
+
}
|
|
1841
|
+
if (a && typeof a == "object" && !Array.isArray(a))
|
|
1842
|
+
return a;
|
|
1843
|
+
throw new Error("Amount symbol registry: response is not a string map or { data: map }");
|
|
1844
|
+
}
|
|
1845
|
+
const I = _({
|
|
1846
|
+
path: "/tokens",
|
|
1847
|
+
parse: Ra,
|
|
1848
|
+
fallback: () => g,
|
|
1849
|
+
cacheFallbackWhenHttpNotOk: !0
|
|
1850
|
+
}), R = _({
|
|
1851
|
+
path: "/tokens/symbol",
|
|
1852
|
+
parse: ka,
|
|
1853
|
+
fallback: () => t,
|
|
1854
|
+
cacheFallbackWhenHttpNotOk: !0
|
|
1855
|
+
});
|
|
1856
|
+
class w {
|
|
1857
|
+
static setBaseUrl(e) {
|
|
1858
|
+
U.setBaseUrl(e);
|
|
1859
|
+
}
|
|
1860
|
+
static getBaseUrl() {
|
|
1861
|
+
return U.getBaseUrl();
|
|
1862
|
+
}
|
|
1863
|
+
static clearCache() {
|
|
1864
|
+
I.clearCache(), R.clearCache();
|
|
1865
|
+
}
|
|
1866
|
+
static loadTokenRegistry(e) {
|
|
1867
|
+
return I.load(e);
|
|
1868
|
+
}
|
|
1869
|
+
static get all() {
|
|
1870
|
+
return I.getSnapshot();
|
|
1871
|
+
}
|
|
1872
|
+
static getTokenRegistrySnapshot() {
|
|
1873
|
+
return I.getSnapshot();
|
|
1874
|
+
}
|
|
1875
|
+
static loadAmountSymbolMap(e) {
|
|
1876
|
+
return R.load(e);
|
|
1877
|
+
}
|
|
1878
|
+
static getAmountSymbolsSnapshot() {
|
|
1879
|
+
return R.getSnapshot();
|
|
1880
|
+
}
|
|
1881
|
+
static async init(e) {
|
|
1882
|
+
await Promise.all([
|
|
1883
|
+
I.load(e).catch((s) => {
|
|
1884
|
+
console.error(s);
|
|
1885
|
+
}),
|
|
1886
|
+
R.load(e).catch((s) => {
|
|
1887
|
+
console.error(s);
|
|
1888
|
+
})
|
|
1889
|
+
]);
|
|
1890
|
+
}
|
|
958
1891
|
}
|
|
959
|
-
function
|
|
960
|
-
const
|
|
961
|
-
if (!
|
|
1892
|
+
function Oa(a, e) {
|
|
1893
|
+
const s = e.toLowerCase().trim(), o = w.getTokenRegistrySnapshot()[a];
|
|
1894
|
+
if (!o)
|
|
962
1895
|
throw new Error(
|
|
963
|
-
`Chain not found: ${
|
|
1896
|
+
`Chain not found: ${a}. The chain key must be a valid chain identifier.`
|
|
964
1897
|
);
|
|
965
|
-
let
|
|
966
|
-
for (const
|
|
967
|
-
const i =
|
|
968
|
-
if (i && i.address.toLowerCase() ===
|
|
969
|
-
|
|
1898
|
+
let r;
|
|
1899
|
+
for (const l in o) {
|
|
1900
|
+
const i = o[l];
|
|
1901
|
+
if (i && i.address.toLowerCase() === s.toLowerCase()) {
|
|
1902
|
+
r = i;
|
|
970
1903
|
break;
|
|
971
1904
|
}
|
|
972
1905
|
}
|
|
973
|
-
if (!
|
|
1906
|
+
if (!r)
|
|
974
1907
|
throw new Error(
|
|
975
|
-
`Token address mismatch: address ${e} does not exist on chain ${
|
|
1908
|
+
`Token address mismatch: address ${e} does not exist on chain ${a}. The token address must be a valid token address on the specified chain.`
|
|
976
1909
|
);
|
|
977
|
-
return
|
|
1910
|
+
return r;
|
|
978
1911
|
}
|
|
979
|
-
function
|
|
980
|
-
const
|
|
981
|
-
if (
|
|
1912
|
+
function W(a, e, s) {
|
|
1913
|
+
const o = Oa(a, e);
|
|
1914
|
+
if (o.symbol !== s)
|
|
982
1915
|
throw new Error(
|
|
983
|
-
`Token address and symbol mismatch: address ${e} on chain ${
|
|
1916
|
+
`Token address and symbol mismatch: address ${e} on chain ${a} corresponds to token "${o.symbol}", but expected "${s}". The token address must correspond to a token with the expected symbol on the specified chain.`
|
|
984
1917
|
);
|
|
985
|
-
return
|
|
1918
|
+
return o;
|
|
1919
|
+
}
|
|
1920
|
+
function wa(a, e) {
|
|
1921
|
+
return w.getTokenRegistrySnapshot()?.[a]?.[e];
|
|
986
1922
|
}
|
|
987
|
-
function
|
|
988
|
-
return
|
|
1923
|
+
function ee(a, e) {
|
|
1924
|
+
return wa(a, e)?.address;
|
|
989
1925
|
}
|
|
990
|
-
|
|
991
|
-
|
|
1926
|
+
var Te = /* @__PURE__ */ ((a) => (a.PRODUCTION = "production", a.STAGING = "staging", a))(Te || {});
|
|
1927
|
+
class H {
|
|
1928
|
+
static setBaseUrl(e) {
|
|
1929
|
+
U.setBaseUrl(e);
|
|
1930
|
+
}
|
|
1931
|
+
static getBaseUrl() {
|
|
1932
|
+
return U.getBaseUrl();
|
|
1933
|
+
}
|
|
1934
|
+
static clearCache() {
|
|
1935
|
+
O.clearCache(), w.clearCache();
|
|
1936
|
+
}
|
|
1937
|
+
static async init(e) {
|
|
1938
|
+
await Promise.all([
|
|
1939
|
+
O.init(e).then(
|
|
1940
|
+
() => {
|
|
1941
|
+
},
|
|
1942
|
+
() => {
|
|
1943
|
+
}
|
|
1944
|
+
),
|
|
1945
|
+
w.init(e).then(
|
|
1946
|
+
() => {
|
|
1947
|
+
},
|
|
1948
|
+
() => {
|
|
1949
|
+
}
|
|
1950
|
+
)
|
|
1951
|
+
]);
|
|
1952
|
+
}
|
|
992
1953
|
}
|
|
993
|
-
var se = /* @__PURE__ */ ((s) => (s.PRODUCTION = "production", s.STAGING = "staging", s))(se || {});
|
|
994
1954
|
class u {
|
|
995
|
-
constructor({ api_key: e, env:
|
|
996
|
-
this.api_key = e || "", this.sessionToken =
|
|
1955
|
+
constructor({ api_key: e, env: s, seesion_token: o, props: r }) {
|
|
1956
|
+
this.api_key = e || "", this.sessionToken = o || "", this.env = s ?? Te.PRODUCTION, this.props = r;
|
|
997
1957
|
}
|
|
998
1958
|
static async config(e) {
|
|
999
1959
|
if (!u.app) {
|
|
@@ -1001,7 +1961,7 @@ class u {
|
|
|
1001
1961
|
throw new Error("Please provide an api_key");
|
|
1002
1962
|
u.app = new u(e);
|
|
1003
1963
|
}
|
|
1004
|
-
return e && (e.api_key !== void 0 && (u.app.api_key = e.api_key), e.seesion_token !== void 0 && (u.app.sessionToken = e.seesion_token), e.env !== void 0 && (u.app.env = e.env), e.props !== void 0 && (u.app.props = e.props)), u.app;
|
|
1964
|
+
return e && (e.api_key !== void 0 && (u.app.api_key = e.api_key), e.seesion_token !== void 0 && (u.app.sessionToken = e.seesion_token), e.env !== void 0 && e.env !== u.app.env && H.clearCache(), e.env !== void 0 && (u.app.env = e.env), e.props !== void 0 && (u.app.props = e.props)), H.setBaseUrl(u.getBaseUrl()), await H.init(), u.app;
|
|
1005
1965
|
}
|
|
1006
1966
|
static getApiKey() {
|
|
1007
1967
|
if (!u.app)
|
|
@@ -1040,25 +2000,25 @@ class u {
|
|
|
1040
2000
|
static getPayModalUrl(e) {
|
|
1041
2001
|
if (!u.app)
|
|
1042
2002
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1043
|
-
const
|
|
1044
|
-
return
|
|
2003
|
+
const s = u.app.env === "internal" ? "https://staging.chainrails-frontend.pages.dev" : "https://app.chainrails.io", o = Number(e), r = e && !isNaN(Number(e)) && o > 0 ? "/pay/" : "/deposit/", l = `${e && !isNaN(Number(e)) && o > 0 ? o * 100 : ""}`;
|
|
2004
|
+
return s + r + l;
|
|
1045
2005
|
}
|
|
1046
2006
|
}
|
|
1047
|
-
let
|
|
1048
|
-
function
|
|
1049
|
-
|
|
2007
|
+
let P = null;
|
|
2008
|
+
function xa() {
|
|
2009
|
+
P = fe.create({
|
|
1050
2010
|
prefixUrl: u.getBaseUrl(),
|
|
1051
2011
|
headers: {
|
|
1052
2012
|
"Content-Type": "application/json"
|
|
1053
2013
|
},
|
|
1054
2014
|
hooks: {
|
|
1055
2015
|
beforeRequest: [
|
|
1056
|
-
(
|
|
2016
|
+
(a) => {
|
|
1057
2017
|
const e = u.getSessionToken() || u.getApiKey();
|
|
1058
|
-
|
|
2018
|
+
a.headers.set("Authorization", `Bearer ${e}`);
|
|
1059
2019
|
}
|
|
1060
2020
|
],
|
|
1061
|
-
afterResponse: [(
|
|
2021
|
+
afterResponse: [(a, e, s) => s]
|
|
1062
2022
|
},
|
|
1063
2023
|
retry: {
|
|
1064
2024
|
limit: 2
|
|
@@ -1066,9 +2026,9 @@ function Ge() {
|
|
|
1066
2026
|
});
|
|
1067
2027
|
}
|
|
1068
2028
|
function c() {
|
|
1069
|
-
return
|
|
2029
|
+
return P || xa(), P;
|
|
1070
2030
|
}
|
|
1071
|
-
class
|
|
2031
|
+
class _a {
|
|
1072
2032
|
async getById(e) {
|
|
1073
2033
|
return await c().get("intents/" + e).json();
|
|
1074
2034
|
}
|
|
@@ -1085,23 +2045,23 @@ class Ye {
|
|
|
1085
2045
|
return await c().get("intents", { searchParams: e }).json();
|
|
1086
2046
|
}
|
|
1087
2047
|
async create(e) {
|
|
1088
|
-
const
|
|
2048
|
+
const s = E(e.source_chain), o = E(e.destination_chain);
|
|
1089
2049
|
return await c().post("intents", {
|
|
1090
2050
|
json: {
|
|
1091
2051
|
...e,
|
|
1092
|
-
source_chain:
|
|
1093
|
-
destination_chain:
|
|
2052
|
+
source_chain: s,
|
|
2053
|
+
destination_chain: o
|
|
1094
2054
|
}
|
|
1095
2055
|
}).json();
|
|
1096
2056
|
}
|
|
1097
2057
|
async createForSession(e) {
|
|
1098
|
-
const
|
|
2058
|
+
const s = E(e.sourceChain);
|
|
1099
2059
|
return await c().post("modal/sessions/intents", {
|
|
1100
|
-
json: { ...e, sourceChain:
|
|
2060
|
+
json: { ...e, sourceChain: s }
|
|
1101
2061
|
}).json();
|
|
1102
2062
|
}
|
|
1103
|
-
async update(e,
|
|
1104
|
-
return await c().post("intents", { json:
|
|
2063
|
+
async update(e, s) {
|
|
2064
|
+
return await c().post("intents", { json: s }).json();
|
|
1105
2065
|
}
|
|
1106
2066
|
async triggerProcessing(e) {
|
|
1107
2067
|
return await c().post(`intents/${e}/trigger-processing`).json();
|
|
@@ -1110,60 +2070,60 @@ class Ye {
|
|
|
1110
2070
|
return await c().post(`modal/sessions/intents/${e}/process`).json();
|
|
1111
2071
|
}
|
|
1112
2072
|
}
|
|
1113
|
-
class
|
|
2073
|
+
class Ma {
|
|
1114
2074
|
async getFromSpecificBridge(e) {
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
const
|
|
2075
|
+
const s = E(e.sourceChain);
|
|
2076
|
+
W(s, e.tokenIn, e.amountSymbol);
|
|
2077
|
+
const o = E(e.destinationChain);
|
|
1118
2078
|
return await c().get("quotes/single", {
|
|
1119
2079
|
searchParams: {
|
|
1120
2080
|
...e,
|
|
1121
|
-
sourceChain:
|
|
1122
|
-
destinationChain:
|
|
2081
|
+
sourceChain: s,
|
|
2082
|
+
destinationChain: o
|
|
1123
2083
|
}
|
|
1124
2084
|
}).json();
|
|
1125
2085
|
}
|
|
1126
2086
|
async getFromAllBridges(e) {
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
const
|
|
2087
|
+
const s = E(e.sourceChain);
|
|
2088
|
+
W(s, e.tokenIn, e.amountSymbol);
|
|
2089
|
+
const o = E(e.destinationChain);
|
|
1130
2090
|
return await c().get("quotes/multiple", {
|
|
1131
2091
|
searchParams: {
|
|
1132
2092
|
...e,
|
|
1133
|
-
sourceChain:
|
|
1134
|
-
destinationChain:
|
|
2093
|
+
sourceChain: s,
|
|
2094
|
+
destinationChain: o
|
|
1135
2095
|
}
|
|
1136
2096
|
}).json();
|
|
1137
2097
|
}
|
|
1138
2098
|
async getBestAcrossBridges(e) {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
const
|
|
2099
|
+
const s = E(e.sourceChain);
|
|
2100
|
+
W(s, e.tokenIn, e.amountSymbol);
|
|
2101
|
+
const o = E(e.destinationChain);
|
|
1142
2102
|
return await c().get("quotes/best", { searchParams: {
|
|
1143
2103
|
...e,
|
|
1144
|
-
sourceChain:
|
|
1145
|
-
destinationChain:
|
|
2104
|
+
sourceChain: s,
|
|
2105
|
+
destinationChain: o
|
|
1146
2106
|
} }).json();
|
|
1147
2107
|
}
|
|
1148
2108
|
async getAll(e) {
|
|
1149
|
-
const
|
|
2109
|
+
const s = E(e.destinationChain);
|
|
1150
2110
|
return await c().get("quotes/multi-source", { searchParams: {
|
|
1151
2111
|
...e,
|
|
1152
|
-
destinationChain:
|
|
2112
|
+
destinationChain: s
|
|
1153
2113
|
} }).json();
|
|
1154
2114
|
}
|
|
1155
2115
|
async getAllForSession(e) {
|
|
1156
2116
|
return await c().get("modal/sessions/quotes", { searchParams: e }).json();
|
|
1157
2117
|
}
|
|
1158
2118
|
}
|
|
1159
|
-
class
|
|
2119
|
+
class La {
|
|
1160
2120
|
async getOptimalRoutes(e) {
|
|
1161
|
-
const
|
|
2121
|
+
const s = E(e.sourceChain), o = E(e.destinationChain);
|
|
1162
2122
|
return await c().get("router/optimal-route", {
|
|
1163
2123
|
searchParams: {
|
|
1164
2124
|
...e,
|
|
1165
|
-
sourceChain:
|
|
1166
|
-
destinationChain:
|
|
2125
|
+
sourceChain: s,
|
|
2126
|
+
destinationChain: o
|
|
1167
2127
|
}
|
|
1168
2128
|
}).json();
|
|
1169
2129
|
}
|
|
@@ -1171,18 +2131,18 @@ class Xe {
|
|
|
1171
2131
|
return await c().get("router/supported-bridges/all").json();
|
|
1172
2132
|
}
|
|
1173
2133
|
async getSupportedBridges(e) {
|
|
1174
|
-
const
|
|
2134
|
+
const s = E(e.sourceChain), o = E(e.destinationChain);
|
|
1175
2135
|
return await c().get("router/supported-bridges/route", { searchParams: {
|
|
1176
2136
|
...e,
|
|
1177
|
-
sourceChain:
|
|
1178
|
-
destinationChain:
|
|
2137
|
+
sourceChain: s,
|
|
2138
|
+
destinationChain: o
|
|
1179
2139
|
} }).json();
|
|
1180
2140
|
}
|
|
1181
2141
|
async getSupportedRoutes(e) {
|
|
1182
2142
|
return await c().get("router/supported-routes/bridge/" + e).json();
|
|
1183
2143
|
}
|
|
1184
2144
|
}
|
|
1185
|
-
class
|
|
2145
|
+
class Fa {
|
|
1186
2146
|
async getSupported(e) {
|
|
1187
2147
|
return await c().get("chains", { searchParams: e }).json();
|
|
1188
2148
|
}
|
|
@@ -1190,7 +2150,7 @@ class Qe {
|
|
|
1190
2150
|
return await c().get(`chains/balances/${e.address}`, { searchParams: e }).json();
|
|
1191
2151
|
}
|
|
1192
2152
|
}
|
|
1193
|
-
class
|
|
2153
|
+
class za {
|
|
1194
2154
|
async getClientInfo() {
|
|
1195
2155
|
return await c().get("client/auth/client-info").json();
|
|
1196
2156
|
}
|
|
@@ -1198,20 +2158,20 @@ class Je {
|
|
|
1198
2158
|
return await c().get("modal/sessions/client").json();
|
|
1199
2159
|
}
|
|
1200
2160
|
}
|
|
1201
|
-
class
|
|
2161
|
+
class Wa {
|
|
1202
2162
|
async getSessionToken(e) {
|
|
1203
|
-
const
|
|
1204
|
-
let
|
|
1205
|
-
|
|
2163
|
+
const s = E(e.destinationChain);
|
|
2164
|
+
let o = ee(s, e.token);
|
|
2165
|
+
o || (console.error(
|
|
1206
2166
|
`${e.token} on ${e.destinationChain} is currently unsupported, defaulting to usdc`
|
|
1207
|
-
),
|
|
1208
|
-
const
|
|
2167
|
+
), o = ee(s, "USDC"));
|
|
2168
|
+
const r = {
|
|
1209
2169
|
recipient: e.recipient,
|
|
1210
|
-
tokenOut:
|
|
1211
|
-
destinationChain:
|
|
2170
|
+
tokenOut: o,
|
|
2171
|
+
destinationChain: s,
|
|
1212
2172
|
amount: e.amount
|
|
1213
2173
|
};
|
|
1214
|
-
return c().post("modal/sessions", { json:
|
|
2174
|
+
return c().post("modal/sessions", { json: r }).json().then((l) => ({ ...l, amount: r.amount }));
|
|
1215
2175
|
}
|
|
1216
2176
|
async getHandOffToken() {
|
|
1217
2177
|
return c().post("modal/sessions/handoff-token").json();
|
|
@@ -1220,16 +2180,16 @@ class Ze {
|
|
|
1220
2180
|
return c().post(`modal/sessions/${e.sessionId}/resume`, { json: e }).json();
|
|
1221
2181
|
}
|
|
1222
2182
|
}
|
|
1223
|
-
const
|
|
1224
|
-
class
|
|
2183
|
+
const Ha = "modal/sessions/history";
|
|
2184
|
+
class Pa {
|
|
1225
2185
|
async getHistoryForSession(e) {
|
|
1226
|
-
return c().post(
|
|
2186
|
+
return c().post(Ha, { json: e }).json();
|
|
1227
2187
|
}
|
|
1228
2188
|
}
|
|
1229
|
-
const
|
|
2189
|
+
const ja = {
|
|
1230
2190
|
FONBNK: "FONBNK",
|
|
1231
2191
|
ONRAMP_MONEY: "ONRAMP_MONEY"
|
|
1232
|
-
},
|
|
2192
|
+
}, $a = {
|
|
1233
2193
|
PENDING: "PENDING",
|
|
1234
2194
|
INITIATED: "INITIATED",
|
|
1235
2195
|
PROCESSING: "PROCESSING",
|
|
@@ -1239,7 +2199,7 @@ const is = {
|
|
|
1239
2199
|
EXPIRED: "EXPIRED",
|
|
1240
2200
|
REFUNDED: "REFUNDED"
|
|
1241
2201
|
};
|
|
1242
|
-
class
|
|
2202
|
+
class Va {
|
|
1243
2203
|
/**
|
|
1244
2204
|
* Get aggregated fiat-to-crypto quotes from all eligible providers.
|
|
1245
2205
|
* Fans out to multiple providers and picks the cheapest path.
|
|
@@ -1317,29 +2277,33 @@ class ns {
|
|
|
1317
2277
|
return await c().post(`ramp/orders/${e}/cancel`).json();
|
|
1318
2278
|
}
|
|
1319
2279
|
}
|
|
1320
|
-
const
|
|
2280
|
+
const qa = {
|
|
1321
2281
|
ACROSS: "ACROSS",
|
|
1322
2282
|
CCTP: "CCTP",
|
|
1323
2283
|
GATEWAY: "GATEWAY",
|
|
1324
2284
|
RHINOFI: "RHINOFI"
|
|
1325
|
-
},
|
|
1326
|
-
router: new
|
|
1327
|
-
quotes: new
|
|
1328
|
-
intents: new
|
|
1329
|
-
chains: new
|
|
1330
|
-
client: new
|
|
1331
|
-
auth: new
|
|
1332
|
-
history: new
|
|
1333
|
-
ramp: new
|
|
2285
|
+
}, Ga = {
|
|
2286
|
+
router: new La(),
|
|
2287
|
+
quotes: new Ma(),
|
|
2288
|
+
intents: new _a(),
|
|
2289
|
+
chains: new Fa(),
|
|
2290
|
+
client: new za(),
|
|
2291
|
+
auth: new Wa(),
|
|
2292
|
+
history: new Pa(),
|
|
2293
|
+
ramp: new Va()
|
|
1334
2294
|
};
|
|
1335
2295
|
export {
|
|
1336
2296
|
t as AmountSymbols,
|
|
1337
|
-
|
|
2297
|
+
qa as Bridges,
|
|
2298
|
+
ba as CHAIN_REGISTRY,
|
|
2299
|
+
O as ChainRegistry,
|
|
1338
2300
|
u as Chainrails,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
2301
|
+
he as Chains,
|
|
2302
|
+
$a as RampOrderStatuses,
|
|
2303
|
+
ja as RampProviders,
|
|
2304
|
+
g as TOKEN_REGISTRY,
|
|
2305
|
+
w as TokenRegistry,
|
|
2306
|
+
Ga as crapi,
|
|
2307
|
+
Te as environment,
|
|
2308
|
+
E as resolveChain
|
|
1345
2309
|
};
|