@chainrails/sdk 0.3.1 → 0.3.3
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 +211 -280
- package/dist/chainrails-sdk.es.mjs +211 -280
- package/dist/chainrails-sdk.umd.js +2 -2
- package/dist/src/Auth/types.d.ts +2 -2
- package/dist/src/Auth/types.d.ts.map +1 -1
- package/dist/src/Router/index.d.ts +1 -1
- package/dist/src/Router/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +5 -5
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -38,20 +38,20 @@ const c = {
|
|
|
38
38
|
STARKNET: "STARKNET",
|
|
39
39
|
STARKNET_TESTNET: "STARKNET_TESTNET"
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function w(s, { strict: e = !0 } = {}) {
|
|
42
42
|
return !s || typeof s != "string" ? !1 : e ? /^0x[0-9a-fA-F]*$/.test(s) : s.startsWith("0x");
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
44
|
+
function x(s) {
|
|
45
|
+
return w(s, { strict: !1 }) ? Math.ceil((s.length - 2) / 2) : s.length;
|
|
46
46
|
}
|
|
47
47
|
const _ = "2.43.4";
|
|
48
48
|
let I = {
|
|
49
49
|
getDocsUrl: ({ docsBaseUrl: s, docsPath: e = "", docsSlug: n }) => e ? `${s ?? "https://viem.sh"}${e}${n ? `#${n}` : ""}` : void 0,
|
|
50
50
|
version: `viem@${_}`
|
|
51
51
|
};
|
|
52
|
-
class
|
|
52
|
+
class E extends Error {
|
|
53
53
|
constructor(e, n = {}) {
|
|
54
|
-
const a = n.cause instanceof
|
|
54
|
+
const a = n.cause instanceof E ? n.cause.details : n.cause?.message ? n.cause.message : n.details, o = n.cause instanceof E && n.cause.docsPath || n.docsPath, r = I.getDocsUrl?.({ ...n, docsPath: o }), i = [
|
|
55
55
|
e || "An error occurred.",
|
|
56
56
|
"",
|
|
57
57
|
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
@@ -99,7 +99,7 @@ class T extends Error {
|
|
|
99
99
|
function j(s, e) {
|
|
100
100
|
return e?.(s) ? s : s && typeof s == "object" && "cause" in s && s.cause !== void 0 ? j(s.cause, e) : e ? null : s;
|
|
101
101
|
}
|
|
102
|
-
class K extends
|
|
102
|
+
class K extends E {
|
|
103
103
|
constructor({ size: e, targetSize: n, type: a }) {
|
|
104
104
|
super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${e}) exceeds padding size (${n}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
105
105
|
}
|
|
@@ -135,20 +135,20 @@ function ie(s, { dir: e, size: n = 32 } = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
return a;
|
|
137
137
|
}
|
|
138
|
-
class re extends
|
|
138
|
+
class re extends E {
|
|
139
139
|
constructor({ max: e, min: n, signed: a, size: o, value: r }) {
|
|
140
140
|
super(`Number "${r}" is not in safe ${o ? `${o * 8}-bit ${a ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${n} to ${e})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
class ce extends
|
|
143
|
+
class ce extends E {
|
|
144
144
|
constructor({ givenSize: e, maxSize: n }) {
|
|
145
145
|
super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
148
|
+
function B(s, { size: e }) {
|
|
149
|
+
if (x(s) > e)
|
|
150
150
|
throw new ce({
|
|
151
|
-
givenSize:
|
|
151
|
+
givenSize: x(s),
|
|
152
152
|
maxSize: e
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -158,13 +158,13 @@ function de(s, e = {}) {
|
|
|
158
158
|
a ? n ? r = (1n << BigInt(a) * 8n - 1n) - 1n : r = 2n ** (BigInt(a) * 8n) - 1n : typeof s == "number" && (r = BigInt(Number.MAX_SAFE_INTEGER));
|
|
159
159
|
const i = typeof r == "bigint" && n ? -r - 1n : 0;
|
|
160
160
|
if (r && o > r || o < i) {
|
|
161
|
-
const
|
|
161
|
+
const m = typeof s == "bigint" ? "n" : "";
|
|
162
162
|
throw new re({
|
|
163
|
-
max: r ? `${r}${
|
|
164
|
-
min: `${i}${
|
|
163
|
+
max: r ? `${r}${m}` : void 0,
|
|
164
|
+
min: `${i}${m}`,
|
|
165
165
|
signed: n,
|
|
166
166
|
size: a,
|
|
167
|
-
value: `${s}${
|
|
167
|
+
value: `${s}${m}`
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
const d = `0x${(n && o < 0 ? (1n << BigInt(a * 8)) + BigInt(o) : o).toString(16)}`;
|
|
@@ -172,13 +172,13 @@ function de(s, e = {}) {
|
|
|
172
172
|
}
|
|
173
173
|
const le = /* @__PURE__ */ new TextEncoder();
|
|
174
174
|
function ue(s, e = {}) {
|
|
175
|
-
return typeof s == "number" || typeof s == "bigint" ?
|
|
175
|
+
return typeof s == "number" || typeof s == "bigint" ? fe(s, e) : typeof s == "boolean" ? ge(s, e) : w(s) ? W(s, e) : V(s, e);
|
|
176
176
|
}
|
|
177
177
|
function ge(s, e = {}) {
|
|
178
178
|
const n = new Uint8Array(1);
|
|
179
|
-
return n[0] = Number(s), typeof e.size == "number" ? (
|
|
179
|
+
return n[0] = Number(s), typeof e.size == "number" ? (B(n, { size: e.size }), U(n, { size: e.size })) : n;
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const T = {
|
|
182
182
|
zero: 48,
|
|
183
183
|
nine: 57,
|
|
184
184
|
A: 65,
|
|
@@ -187,49 +187,49 @@ const f = {
|
|
|
187
187
|
f: 102
|
|
188
188
|
};
|
|
189
189
|
function M(s) {
|
|
190
|
-
if (s >=
|
|
191
|
-
return s -
|
|
192
|
-
if (s >=
|
|
193
|
-
return s - (
|
|
194
|
-
if (s >=
|
|
195
|
-
return s - (
|
|
190
|
+
if (s >= T.zero && s <= T.nine)
|
|
191
|
+
return s - T.zero;
|
|
192
|
+
if (s >= T.A && s <= T.F)
|
|
193
|
+
return s - (T.A - 10);
|
|
194
|
+
if (s >= T.a && s <= T.f)
|
|
195
|
+
return s - (T.a - 10);
|
|
196
196
|
}
|
|
197
197
|
function W(s, e = {}) {
|
|
198
198
|
let n = s;
|
|
199
|
-
e.size && (
|
|
199
|
+
e.size && (B(n, { size: e.size }), n = U(n, { dir: "right", size: e.size }));
|
|
200
200
|
let a = n.slice(2);
|
|
201
201
|
a.length % 2 && (a = `0${a}`);
|
|
202
202
|
const o = a.length / 2, r = new Uint8Array(o);
|
|
203
203
|
for (let i = 0, d = 0; i < o; i++) {
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
206
|
-
throw new
|
|
207
|
-
r[i] =
|
|
204
|
+
const m = M(a.charCodeAt(d++)), S = M(a.charCodeAt(d++));
|
|
205
|
+
if (m === void 0 || S === void 0)
|
|
206
|
+
throw new E(`Invalid byte sequence ("${a[d - 2]}${a[d - 1]}" in "${a}").`);
|
|
207
|
+
r[i] = m * 16 + S;
|
|
208
208
|
}
|
|
209
209
|
return r;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function fe(s, e) {
|
|
212
212
|
const n = de(s, e);
|
|
213
213
|
return W(n);
|
|
214
214
|
}
|
|
215
215
|
function V(s, e = {}) {
|
|
216
216
|
const n = le.encode(s);
|
|
217
|
-
return typeof e.size == "number" ? (
|
|
217
|
+
return typeof e.size == "number" ? (B(n, { size: e.size }), U(n, { dir: "right", size: e.size })) : n;
|
|
218
218
|
}
|
|
219
219
|
const A = /* @__PURE__ */ BigInt(2 ** 32 - 1), O = /* @__PURE__ */ BigInt(32);
|
|
220
|
-
function
|
|
220
|
+
function he(s, e = !1) {
|
|
221
221
|
return e ? { h: Number(s & A), l: Number(s >> O & A) } : { h: Number(s >> O & A) | 0, l: Number(s & A) | 0 };
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function me(s, e = !1) {
|
|
224
224
|
const n = s.length;
|
|
225
225
|
let a = new Uint32Array(n), o = new Uint32Array(n);
|
|
226
226
|
for (let r = 0; r < n; r++) {
|
|
227
|
-
const { h: i, l: d } =
|
|
227
|
+
const { h: i, l: d } = he(s[r], e);
|
|
228
228
|
[a[r], o[r]] = [i, d];
|
|
229
229
|
}
|
|
230
230
|
return [a, o];
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const Te = (s, e, n) => s << n | e >>> 32 - n, Ee = (s, e, n) => e << n | s >>> 32 - n, Se = (s, e, n) => e << n - 32 | s >>> 64 - n, pe = (s, e, n) => s << n - 32 | e >>> 64 - n;
|
|
233
233
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
234
234
|
function Ce(s) {
|
|
235
235
|
return s instanceof Uint8Array || ArrayBuffer.isView(s) && s.constructor.name === "Uint8Array";
|
|
@@ -281,35 +281,35 @@ function ye(s) {
|
|
|
281
281
|
function G(s) {
|
|
282
282
|
return typeof s == "string" && (s = ye(s)), D(s), s;
|
|
283
283
|
}
|
|
284
|
-
class
|
|
284
|
+
class ke {
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Re(s) {
|
|
287
287
|
const e = (a) => s().update(G(a)).digest(), n = s();
|
|
288
288
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => s(), e;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const ve = BigInt(0), C = BigInt(1), we = BigInt(2), Be = BigInt(7), Ne = BigInt(256), xe = BigInt(113), q = [], X = [], Q = [];
|
|
291
291
|
for (let s = 0, e = C, n = 1, a = 0; s < 24; s++) {
|
|
292
292
|
[n, a] = [a, (2 * n + 3 * a) % 5], q.push(2 * (5 * a + n)), X.push((s + 1) * (s + 2) / 2 % 64);
|
|
293
|
-
let o =
|
|
293
|
+
let o = ve;
|
|
294
294
|
for (let r = 0; r < 7; r++)
|
|
295
|
-
e = (e << C ^ (e >>
|
|
295
|
+
e = (e << C ^ (e >> Be) * xe) % Ne, e & we && (o ^= C << (C << /* @__PURE__ */ BigInt(r)) - C);
|
|
296
296
|
Q.push(o);
|
|
297
297
|
}
|
|
298
|
-
const J =
|
|
298
|
+
const J = me(Q, !0), Me = J[0], Oe = J[1], P = (s, e, n) => n > 32 ? Se(s, e, n) : Te(s, e, n), z = (s, e, n) => n > 32 ? pe(s, e, n) : Ee(s, e, n);
|
|
299
299
|
function Fe(s, e = 24) {
|
|
300
300
|
const n = new Uint32Array(10);
|
|
301
301
|
for (let a = 24 - e; a < 24; a++) {
|
|
302
302
|
for (let i = 0; i < 10; i++)
|
|
303
303
|
n[i] = s[i] ^ s[i + 10] ^ s[i + 20] ^ s[i + 30] ^ s[i + 40];
|
|
304
304
|
for (let i = 0; i < 10; i += 2) {
|
|
305
|
-
const d = (i + 8) % 10,
|
|
305
|
+
const d = (i + 8) % 10, m = (i + 2) % 10, S = n[m], p = n[m + 1], ne = P(S, p, 1) ^ n[d], te = z(S, p, 1) ^ n[d + 1];
|
|
306
306
|
for (let b = 0; b < 50; b += 10)
|
|
307
307
|
s[i + b] ^= ne, s[i + b + 1] ^= te;
|
|
308
308
|
}
|
|
309
309
|
let o = s[2], r = s[3];
|
|
310
310
|
for (let i = 0; i < 24; i++) {
|
|
311
|
-
const d = X[i],
|
|
312
|
-
o = s[p], r = s[p + 1], s[p] =
|
|
311
|
+
const d = X[i], m = P(o, r, d), S = z(o, r, d), p = q[i];
|
|
312
|
+
o = s[p], r = s[p + 1], s[p] = m, s[p + 1] = S;
|
|
313
313
|
}
|
|
314
314
|
for (let i = 0; i < 50; i += 10) {
|
|
315
315
|
for (let d = 0; d < 10; d++)
|
|
@@ -321,7 +321,7 @@ function Fe(s, e = 24) {
|
|
|
321
321
|
}
|
|
322
322
|
Y(n);
|
|
323
323
|
}
|
|
324
|
-
class
|
|
324
|
+
class N extends ke {
|
|
325
325
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
326
326
|
constructor(e, n, a, o = !1, r = 24) {
|
|
327
327
|
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix = n, this.outputLen = a, this.enableXOF = o, this.rounds = r, F(a), !(0 < e && e < 200))
|
|
@@ -383,14 +383,14 @@ class x extends Re {
|
|
|
383
383
|
}
|
|
384
384
|
_cloneInto(e) {
|
|
385
385
|
const { blockLen: n, suffix: a, outputLen: o, rounds: r, enableXOF: i } = this;
|
|
386
|
-
return e || (e = new
|
|
386
|
+
return e || (e = new N(n, a, o, i, r)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = r, e.suffix = a, e.outputLen = o, e.enableXOF = i, e.destroyed = this.destroyed, e;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
const He = (s, e, n) =>
|
|
389
|
+
const He = (s, e, n) => Re(() => new N(e, s, n)), $e = He(1, 136, 256 / 8);
|
|
390
390
|
function Pe(s, e) {
|
|
391
|
-
return $e(
|
|
391
|
+
return $e(w(s, { strict: !1 }) ? ue(s) : s);
|
|
392
392
|
}
|
|
393
|
-
class ze extends
|
|
393
|
+
class ze extends E {
|
|
394
394
|
constructor({ address: e }) {
|
|
395
395
|
super(`Address "${e}" is invalid.`, {
|
|
396
396
|
metaMessages: [
|
|
@@ -432,18 +432,18 @@ function ee(s, e) {
|
|
|
432
432
|
const r = `0x${o.join("")}`;
|
|
433
433
|
return y.set(`${s}.${e}`, r), r;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function g(s, e) {
|
|
436
436
|
if (!_e(s, { strict: !1 }))
|
|
437
437
|
throw new ze({ address: s });
|
|
438
438
|
return ee(s, e);
|
|
439
439
|
}
|
|
440
|
-
const Le = /^0x[a-fA-F0-9]{40}$/,
|
|
440
|
+
const Le = /^0x[a-fA-F0-9]{40}$/, k = /* @__PURE__ */ new Z(8192);
|
|
441
441
|
function _e(s, e) {
|
|
442
442
|
const { strict: n = !0 } = e ?? {}, a = `${s}.${n}`;
|
|
443
|
-
if (
|
|
444
|
-
return
|
|
443
|
+
if (k.has(a))
|
|
444
|
+
return k.get(a);
|
|
445
445
|
const o = Le.test(s) ? s.toLowerCase() === s ? !0 : n ? ee(s) === s : !0 : !1;
|
|
446
|
-
return
|
|
446
|
+
return k.set(a, o), o;
|
|
447
447
|
}
|
|
448
448
|
const t = {
|
|
449
449
|
USDC: "USDC",
|
|
@@ -458,66 +458,60 @@ const t = {
|
|
|
458
458
|
LORDS: "LORDS"
|
|
459
459
|
};
|
|
460
460
|
t.USDC;
|
|
461
|
-
const
|
|
461
|
+
const h = {
|
|
462
462
|
[c.ARBITRUM]: {
|
|
463
463
|
[t.DAI]: {
|
|
464
|
-
address:
|
|
464
|
+
address: g("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),
|
|
465
465
|
symbol: t.DAI,
|
|
466
466
|
name: "Dai Stablecoin",
|
|
467
467
|
decimals: 18,
|
|
468
|
-
logoURI: "/images/tokens/dai.png"
|
|
469
|
-
|
|
468
|
+
logoURI: "/images/tokens/dai.png",
|
|
469
|
+
nativeToken: !1
|
|
470
470
|
},
|
|
471
471
|
[t.ETH]: {
|
|
472
472
|
address: "0x0000000000000000000000000000000000000000",
|
|
473
473
|
symbol: t.ETH,
|
|
474
474
|
name: "Ethereum",
|
|
475
475
|
decimals: 18,
|
|
476
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
477
|
-
|
|
476
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
477
|
+
nativeToken: !0
|
|
478
478
|
},
|
|
479
479
|
[t.USDC]: {
|
|
480
|
-
address:
|
|
480
|
+
address: g("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),
|
|
481
481
|
symbol: t.USDC,
|
|
482
482
|
name: "USD Coin",
|
|
483
483
|
decimals: 6,
|
|
484
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
485
|
-
|
|
484
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
485
|
+
nativeToken: !1
|
|
486
486
|
},
|
|
487
487
|
[t.USDT]: {
|
|
488
|
-
address:
|
|
488
|
+
address: g("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),
|
|
489
489
|
symbol: t.USDT,
|
|
490
490
|
name: "Tether USD",
|
|
491
491
|
decimals: 6,
|
|
492
|
-
logoURI: "/images/tokens/usdt.png"
|
|
493
|
-
|
|
492
|
+
logoURI: "/images/tokens/usdt.png",
|
|
493
|
+
nativeToken: !1
|
|
494
494
|
},
|
|
495
495
|
[t.WETH]: {
|
|
496
|
-
address:
|
|
496
|
+
address: g("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
|
|
497
497
|
symbol: t.WETH,
|
|
498
498
|
name: "Wrapped Ether",
|
|
499
499
|
decimals: 18,
|
|
500
|
-
logoURI: "/images/tokens/weth.png"
|
|
501
|
-
|
|
500
|
+
logoURI: "/images/tokens/weth.png",
|
|
501
|
+
nativeToken: !1
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
504
|
[c.ARBITRUM_TESTNET]: {
|
|
505
505
|
[t.USDC]: {
|
|
506
|
-
address:
|
|
506
|
+
address: g("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),
|
|
507
507
|
symbol: t.USDC,
|
|
508
508
|
name: "USD Coin",
|
|
509
509
|
fiatISO: "USD",
|
|
510
510
|
decimals: 6,
|
|
511
511
|
logoURI: "/images/tokens/usdc.svg",
|
|
512
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
512
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
513
|
+
nativeToken: !1
|
|
513
514
|
}
|
|
514
|
-
// [AmountSymbols.WETH]: {
|
|
515
|
-
// address: getAddress("0x980B62Da83eFf3D4576C647993b0c1D7faf17c73"),
|
|
516
|
-
// symbol: AmountSymbols.WETH,
|
|
517
|
-
// name: "Wrapped Ether",
|
|
518
|
-
// decimals: 18,
|
|
519
|
-
// logoURI: TokenLogo.WETH,
|
|
520
|
-
// },
|
|
521
515
|
},
|
|
522
516
|
[c.AVALANCHE]: {
|
|
523
517
|
[t.DAI]: {
|
|
@@ -525,52 +519,47 @@ const m = {
|
|
|
525
519
|
symbol: t.DAI,
|
|
526
520
|
name: "Dai Stablecoin",
|
|
527
521
|
decimals: 18,
|
|
528
|
-
logoURI: "/images/tokens/dai.png"
|
|
529
|
-
|
|
522
|
+
logoURI: "/images/tokens/dai.png",
|
|
523
|
+
nativeToken: !1
|
|
530
524
|
},
|
|
531
525
|
[t.USDC]: {
|
|
532
|
-
address:
|
|
526
|
+
address: g("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),
|
|
533
527
|
symbol: t.USDC,
|
|
534
528
|
name: "USD Coin",
|
|
535
529
|
fiatISO: "USD",
|
|
536
530
|
decimals: 6,
|
|
537
531
|
logoURI: "/images/tokens/usdc.svg",
|
|
538
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
532
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
533
|
+
nativeToken: !1
|
|
539
534
|
},
|
|
540
535
|
[t.USDT]: {
|
|
541
536
|
address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
|
|
542
537
|
symbol: t.USDT,
|
|
543
538
|
name: "Tether USD",
|
|
544
539
|
decimals: 6,
|
|
545
|
-
logoURI: "/images/tokens/usdt.png"
|
|
546
|
-
|
|
540
|
+
logoURI: "/images/tokens/usdt.png",
|
|
541
|
+
nativeToken: !1
|
|
547
542
|
},
|
|
548
543
|
[t.WETH]: {
|
|
549
544
|
address: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",
|
|
550
545
|
symbol: t.WETH,
|
|
551
546
|
name: "Wrapped Ether",
|
|
552
547
|
decimals: 18,
|
|
553
|
-
logoURI: "/images/tokens/weth.png"
|
|
554
|
-
|
|
548
|
+
logoURI: "/images/tokens/weth.png",
|
|
549
|
+
nativeToken: !1
|
|
555
550
|
}
|
|
556
551
|
},
|
|
557
552
|
[c.AVALANCHE_TESTNET]: {
|
|
558
553
|
[t.USDC]: {
|
|
559
|
-
address:
|
|
554
|
+
address: g("0x5425890298aed601595a70AB815c96711a31Bc65"),
|
|
560
555
|
symbol: t.USDC,
|
|
561
556
|
name: "USD Coin",
|
|
562
557
|
fiatISO: "USD",
|
|
563
558
|
decimals: 6,
|
|
564
559
|
logoURI: "/images/tokens/usdc.svg",
|
|
565
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
560
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
561
|
+
nativeToken: !1
|
|
566
562
|
}
|
|
567
|
-
// [AmountSymbols.WETH]: {
|
|
568
|
-
// address: getAddress("0xd00ae08403B9bbb9124bB305C09058E32C39A48c"),
|
|
569
|
-
// symbol: AmountSymbols.WETH,
|
|
570
|
-
// name: "Wrapped Ether",
|
|
571
|
-
// decimals: 18,
|
|
572
|
-
// logoURI: TokenLogo.WETH,
|
|
573
|
-
// },
|
|
574
563
|
},
|
|
575
564
|
[c.BASE]: {
|
|
576
565
|
[t.DAI]: {
|
|
@@ -578,60 +567,55 @@ const m = {
|
|
|
578
567
|
symbol: t.DAI,
|
|
579
568
|
name: "Dai Stablecoin",
|
|
580
569
|
decimals: 18,
|
|
581
|
-
logoURI: "/images/tokens/dai.png"
|
|
582
|
-
|
|
570
|
+
logoURI: "/images/tokens/dai.png",
|
|
571
|
+
nativeToken: !1
|
|
583
572
|
},
|
|
584
573
|
[t.ETH]: {
|
|
585
574
|
address: "0x0000000000000000000000000000000000000000",
|
|
586
575
|
symbol: t.ETH,
|
|
587
576
|
name: "Ethereum",
|
|
588
577
|
decimals: 18,
|
|
589
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
590
|
-
|
|
578
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
579
|
+
nativeToken: !0
|
|
591
580
|
},
|
|
592
581
|
[t.EURC]: {
|
|
593
582
|
address: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
|
|
594
583
|
symbol: t.EURC,
|
|
595
584
|
name: "Euro Coin",
|
|
596
585
|
decimals: 6,
|
|
597
|
-
logoURI: "/images/tokens/eurc.png"
|
|
598
|
-
|
|
586
|
+
logoURI: "/images/tokens/eurc.png",
|
|
587
|
+
nativeToken: !1
|
|
599
588
|
},
|
|
600
589
|
[t.USDC]: {
|
|
601
|
-
address:
|
|
590
|
+
address: g("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),
|
|
602
591
|
symbol: t.USDC,
|
|
603
592
|
name: "USD Coin",
|
|
604
593
|
fiatISO: "USD",
|
|
605
594
|
decimals: 6,
|
|
606
595
|
logoURI: "/images/tokens/usdc.svg",
|
|
607
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
596
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
597
|
+
nativeToken: !1
|
|
608
598
|
},
|
|
609
599
|
[t.WETH]: {
|
|
610
|
-
address:
|
|
600
|
+
address: g("0x4200000000000000000000000000000000000006"),
|
|
611
601
|
symbol: t.WETH,
|
|
612
602
|
name: "Wrapped Ether",
|
|
613
603
|
decimals: 18,
|
|
614
|
-
logoURI: "/images/tokens/weth.png"
|
|
615
|
-
|
|
604
|
+
logoURI: "/images/tokens/weth.png",
|
|
605
|
+
nativeToken: !1
|
|
616
606
|
}
|
|
617
607
|
},
|
|
618
608
|
[c.BASE_TESTNET]: {
|
|
619
609
|
[t.USDC]: {
|
|
620
|
-
address:
|
|
610
|
+
address: g("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),
|
|
621
611
|
symbol: t.USDC,
|
|
622
612
|
name: "USD Coin",
|
|
623
613
|
fiatISO: "USD",
|
|
624
614
|
decimals: 6,
|
|
625
615
|
logoURI: "/images/tokens/usdc.svg",
|
|
626
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
616
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
617
|
+
nativeToken: !1
|
|
627
618
|
}
|
|
628
|
-
// [AmountSymbols.WETH]: {
|
|
629
|
-
// address: getAddress("0x4200000000000000000000000000000000000006"),
|
|
630
|
-
// symbol: AmountSymbols.WETH,
|
|
631
|
-
// name: "Wrapped Ether",
|
|
632
|
-
// decimals: 18,
|
|
633
|
-
// logoURI: TokenLogo.WETH,
|
|
634
|
-
// },
|
|
635
619
|
},
|
|
636
620
|
[c.BSC]: {
|
|
637
621
|
[t.BNB]: {
|
|
@@ -639,56 +623,49 @@ const m = {
|
|
|
639
623
|
symbol: t.BNB,
|
|
640
624
|
name: "BNB",
|
|
641
625
|
decimals: 18,
|
|
642
|
-
logoURI: "/images/chains/bsc.webp"
|
|
643
|
-
|
|
626
|
+
logoURI: "/images/chains/bsc.webp",
|
|
627
|
+
nativeToken: !0
|
|
644
628
|
},
|
|
645
629
|
[t.BUSD]: {
|
|
646
630
|
address: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
|
|
647
631
|
symbol: t.BUSD,
|
|
648
632
|
name: "Binance USD",
|
|
649
633
|
decimals: 18,
|
|
650
|
-
logoURI: "/images/tokens/busd.png"
|
|
651
|
-
|
|
634
|
+
logoURI: "/images/tokens/busd.png",
|
|
635
|
+
nativeToken: !1
|
|
652
636
|
},
|
|
653
637
|
[t.DAI]: {
|
|
654
638
|
address: "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",
|
|
655
639
|
symbol: t.DAI,
|
|
656
640
|
name: "Dai Stablecoin",
|
|
657
641
|
decimals: 18,
|
|
658
|
-
logoURI: "/images/tokens/dai.png"
|
|
659
|
-
|
|
642
|
+
logoURI: "/images/tokens/dai.png",
|
|
643
|
+
nativeToken: !1
|
|
660
644
|
},
|
|
661
645
|
[t.ETH]: {
|
|
662
646
|
address: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
|
|
663
647
|
symbol: t.ETH,
|
|
664
648
|
name: "Ethereum",
|
|
665
649
|
decimals: 18,
|
|
666
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
667
|
-
|
|
650
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
651
|
+
nativeToken: !1
|
|
668
652
|
},
|
|
669
653
|
[t.USDC]: {
|
|
670
|
-
address:
|
|
654
|
+
address: g("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),
|
|
671
655
|
symbol: t.USDC,
|
|
672
656
|
decimals: 18,
|
|
673
657
|
name: "USD Coin",
|
|
674
658
|
logoURI: "/images/tokens/usdc.svg",
|
|
675
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
659
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
660
|
+
nativeToken: !1
|
|
676
661
|
},
|
|
677
662
|
[t.USDT]: {
|
|
678
663
|
address: "0x55d398326f99059fF775485246999027B3197955",
|
|
679
664
|
symbol: t.USDT,
|
|
680
665
|
name: "Tether USD",
|
|
681
666
|
decimals: 18,
|
|
682
|
-
logoURI: "/images/tokens/usdt.png"
|
|
683
|
-
|
|
684
|
-
},
|
|
685
|
-
[t.WETH]: {
|
|
686
|
-
address: "0x4db5a66e937a9f4473fa95b1caf1d1e1d62e29ea",
|
|
687
|
-
symbol: t.WETH,
|
|
688
|
-
name: "Wrapped Ether",
|
|
689
|
-
decimals: 18,
|
|
690
|
-
logoURI: "/images/tokens/weth.png"
|
|
691
|
-
/* WETH */
|
|
667
|
+
logoURI: "/images/tokens/usdt.png",
|
|
668
|
+
nativeToken: !1
|
|
692
669
|
}
|
|
693
670
|
},
|
|
694
671
|
[c.ETHEREUM]: {
|
|
@@ -697,82 +674,77 @@ const m = {
|
|
|
697
674
|
symbol: t.BUSD,
|
|
698
675
|
name: "Binance USD",
|
|
699
676
|
decimals: 18,
|
|
700
|
-
logoURI: "/images/tokens/busd.png"
|
|
701
|
-
|
|
677
|
+
logoURI: "/images/tokens/busd.png",
|
|
678
|
+
nativeToken: !1
|
|
702
679
|
},
|
|
703
680
|
[t.DAI]: {
|
|
704
|
-
address:
|
|
681
|
+
address: g("0x6B175474E89094C44Da98b954EedeAC495271d0F"),
|
|
705
682
|
symbol: t.DAI,
|
|
706
683
|
name: "Dai Stablecoin",
|
|
707
684
|
decimals: 18,
|
|
708
|
-
logoURI: "/images/tokens/dai.png"
|
|
709
|
-
|
|
685
|
+
logoURI: "/images/tokens/dai.png",
|
|
686
|
+
nativeToken: !1
|
|
710
687
|
},
|
|
711
688
|
[t.ETH]: {
|
|
712
689
|
address: "0x0000000000000000000000000000000000000000",
|
|
713
690
|
symbol: t.ETH,
|
|
714
691
|
name: "Ethereum",
|
|
715
692
|
decimals: 18,
|
|
716
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
717
|
-
|
|
693
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
694
|
+
nativeToken: !0
|
|
718
695
|
},
|
|
719
696
|
[t.EURC]: {
|
|
720
697
|
address: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
|
|
721
698
|
symbol: t.EURC,
|
|
722
699
|
name: "Euro Coin",
|
|
723
700
|
decimals: 6,
|
|
724
|
-
logoURI: "/images/tokens/eurc.png"
|
|
725
|
-
|
|
701
|
+
logoURI: "/images/tokens/eurc.png",
|
|
702
|
+
nativeToken: !1
|
|
726
703
|
},
|
|
727
704
|
[t.STRK]: {
|
|
728
705
|
address: "0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",
|
|
729
706
|
symbol: t.STRK,
|
|
730
707
|
name: "Starknet Token",
|
|
731
708
|
decimals: 18,
|
|
732
|
-
logoURI: "/images/chains/starknet.svg"
|
|
733
|
-
|
|
709
|
+
logoURI: "/images/chains/starknet.svg",
|
|
710
|
+
nativeToken: !1
|
|
734
711
|
},
|
|
735
712
|
[t.USDC]: {
|
|
736
|
-
address:
|
|
713
|
+
address: g("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),
|
|
737
714
|
symbol: t.USDC,
|
|
738
715
|
name: "USD Coin",
|
|
739
716
|
decimals: 6,
|
|
740
717
|
logoURI: "/images/tokens/usdc.svg",
|
|
741
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
718
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
719
|
+
nativeToken: !1
|
|
742
720
|
},
|
|
743
721
|
[t.USDT]: {
|
|
744
|
-
address:
|
|
722
|
+
address: g("0xdAC17F958D2ee523a2206206994597C13D831ec7"),
|
|
745
723
|
symbol: t.USDT,
|
|
746
724
|
name: "Tether USD",
|
|
747
725
|
decimals: 6,
|
|
748
|
-
logoURI: "/images/tokens/usdt.png"
|
|
749
|
-
|
|
726
|
+
logoURI: "/images/tokens/usdt.png",
|
|
727
|
+
nativeToken: !1
|
|
750
728
|
},
|
|
751
729
|
[t.WETH]: {
|
|
752
|
-
address:
|
|
730
|
+
address: g("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
|
|
753
731
|
symbol: t.WETH,
|
|
754
732
|
name: "Wrapped Ether",
|
|
755
733
|
decimals: 18,
|
|
756
|
-
logoURI: "/images/tokens/weth.png"
|
|
757
|
-
|
|
734
|
+
logoURI: "/images/tokens/weth.png",
|
|
735
|
+
nativeToken: !1
|
|
758
736
|
}
|
|
759
737
|
},
|
|
760
738
|
[c.ETHEREUM_TESTNET]: {
|
|
761
739
|
[t.USDC]: {
|
|
762
|
-
address:
|
|
740
|
+
address: g("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),
|
|
763
741
|
symbol: t.USDC,
|
|
764
742
|
decimals: 6,
|
|
765
743
|
name: "USD Coin",
|
|
766
744
|
logoURI: "/images/tokens/usdc.svg",
|
|
767
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
745
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
746
|
+
nativeToken: !1
|
|
768
747
|
}
|
|
769
|
-
// [AmountSymbols.WETH]: {
|
|
770
|
-
// address: getAddress("0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"),
|
|
771
|
-
// symbol: AmountSymbols.WETH,
|
|
772
|
-
// name: 'Wrapped Ether',
|
|
773
|
-
// decimals: 18,
|
|
774
|
-
// logoURI: TokenLogo.WETH,
|
|
775
|
-
// },
|
|
776
748
|
},
|
|
777
749
|
[c.HYPEREVM]: {
|
|
778
750
|
[t.USDC]: {
|
|
@@ -780,16 +752,9 @@ const m = {
|
|
|
780
752
|
symbol: t.USDC,
|
|
781
753
|
name: "USD Coin",
|
|
782
754
|
decimals: 6,
|
|
783
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
784
|
-
|
|
755
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
756
|
+
nativeToken: !1
|
|
785
757
|
}
|
|
786
|
-
// [AmountSymbols.WETH]: {
|
|
787
|
-
// address: '0x4200000000000000000000000000000000000006',
|
|
788
|
-
// symbol: AmountSymbols.WETH,
|
|
789
|
-
// name: 'Wrapped Ether',
|
|
790
|
-
// decimals: 18,
|
|
791
|
-
// logoURI: TokenLogo.WETH,
|
|
792
|
-
// },
|
|
793
758
|
},
|
|
794
759
|
[c.LISK]: {
|
|
795
760
|
[t.USDC]: {
|
|
@@ -797,16 +762,9 @@ const m = {
|
|
|
797
762
|
symbol: t.USDC,
|
|
798
763
|
name: "USD Coin",
|
|
799
764
|
decimals: 6,
|
|
800
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
801
|
-
|
|
765
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
766
|
+
nativeToken: !1
|
|
802
767
|
}
|
|
803
|
-
// [AmountSymbols.WETH]: {
|
|
804
|
-
// address: '0x4200000000000000000000000000000000000006',
|
|
805
|
-
// symbol: AmountSymbols.WETH,
|
|
806
|
-
// name: 'Wrapped Ether',
|
|
807
|
-
// decimals: 18,
|
|
808
|
-
// logoURI: TokenLogo.WETH,
|
|
809
|
-
// },
|
|
810
768
|
},
|
|
811
769
|
[c.MONAD]: {
|
|
812
770
|
[t.USDC]: {
|
|
@@ -814,16 +772,9 @@ const m = {
|
|
|
814
772
|
symbol: t.USDC,
|
|
815
773
|
name: "USD Coin",
|
|
816
774
|
decimals: 6,
|
|
817
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
818
|
-
|
|
775
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
776
|
+
nativeToken: !1
|
|
819
777
|
}
|
|
820
|
-
// [AmountSymbols.WETH]: {
|
|
821
|
-
// address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
822
|
-
// symbol: AmountSymbols.WETH,
|
|
823
|
-
// name: 'Wrapped Ether',
|
|
824
|
-
// decimals: 18,
|
|
825
|
-
// logoURI: TokenLogo.WETH,
|
|
826
|
-
// },
|
|
827
778
|
},
|
|
828
779
|
[c.MONAD_TESTNET]: {
|
|
829
780
|
[t.USDC]: {
|
|
@@ -831,16 +782,9 @@ const m = {
|
|
|
831
782
|
symbol: t.USDC,
|
|
832
783
|
name: "USD Coin",
|
|
833
784
|
decimals: 6,
|
|
834
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
835
|
-
|
|
785
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
786
|
+
nativeToken: !1
|
|
836
787
|
}
|
|
837
|
-
// [AmountSymbols.WETH]: {
|
|
838
|
-
// address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
839
|
-
// symbol: AmountSymbols.WETH,
|
|
840
|
-
// name: 'Wrapped Ether',
|
|
841
|
-
// decimals: 18,
|
|
842
|
-
// logoURI: TokenLogo.WETH,
|
|
843
|
-
// },
|
|
844
788
|
},
|
|
845
789
|
[c.OPTIMISM]: {
|
|
846
790
|
[t.DAI]: {
|
|
@@ -848,40 +792,40 @@ const m = {
|
|
|
848
792
|
symbol: t.DAI,
|
|
849
793
|
name: "Dai Stablecoin",
|
|
850
794
|
decimals: 18,
|
|
851
|
-
logoURI: "/images/tokens/dai.png"
|
|
852
|
-
|
|
795
|
+
logoURI: "/images/tokens/dai.png",
|
|
796
|
+
nativeToken: !1
|
|
853
797
|
},
|
|
854
798
|
[t.ETH]: {
|
|
855
799
|
address: "0x0000000000000000000000000000000000000000",
|
|
856
800
|
symbol: t.ETH,
|
|
857
801
|
name: "Ethereum",
|
|
858
802
|
decimals: 18,
|
|
859
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
860
|
-
|
|
803
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
804
|
+
nativeToken: !0
|
|
861
805
|
},
|
|
862
806
|
[t.USDC]: {
|
|
863
807
|
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
864
808
|
symbol: t.USDC,
|
|
865
809
|
name: "USD Coin",
|
|
866
810
|
decimals: 6,
|
|
867
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
868
|
-
|
|
811
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
812
|
+
nativeToken: !1
|
|
869
813
|
},
|
|
870
814
|
[t.USDT]: {
|
|
871
815
|
address: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
|
|
872
816
|
symbol: t.USDT,
|
|
873
817
|
name: "Tether USD",
|
|
874
818
|
decimals: 6,
|
|
875
|
-
logoURI: "/images/tokens/usdt.png"
|
|
876
|
-
|
|
819
|
+
logoURI: "/images/tokens/usdt.png",
|
|
820
|
+
nativeToken: !1
|
|
877
821
|
},
|
|
878
822
|
[t.WETH]: {
|
|
879
823
|
address: "0x4200000000000000000000000000000000000006",
|
|
880
824
|
symbol: t.WETH,
|
|
881
825
|
name: "Wrapped Ether",
|
|
882
826
|
decimals: 18,
|
|
883
|
-
logoURI: "/images/tokens/weth.png"
|
|
884
|
-
|
|
827
|
+
logoURI: "/images/tokens/weth.png",
|
|
828
|
+
nativeToken: !1
|
|
885
829
|
}
|
|
886
830
|
},
|
|
887
831
|
[c.OPTIMISM_TESTNET]: {
|
|
@@ -890,16 +834,9 @@ const m = {
|
|
|
890
834
|
symbol: t.USDC,
|
|
891
835
|
name: "USD Coin",
|
|
892
836
|
decimals: 6,
|
|
893
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
894
|
-
|
|
837
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
838
|
+
nativeToken: !1
|
|
895
839
|
}
|
|
896
|
-
// [AmountSymbols.WETH]: {
|
|
897
|
-
// address: '0x4200000000000000000000000000000000000006',
|
|
898
|
-
// symbol: AmountSymbols.WETH,
|
|
899
|
-
// name: 'Wrapped Ether',
|
|
900
|
-
// decimals: 18,
|
|
901
|
-
// logoURI: TokenLogo.WETH,
|
|
902
|
-
// },
|
|
903
840
|
},
|
|
904
841
|
[c.POLYGON]: {
|
|
905
842
|
[t.DAI]: {
|
|
@@ -907,32 +844,32 @@ const m = {
|
|
|
907
844
|
symbol: t.DAI,
|
|
908
845
|
name: "Dai Stablecoin",
|
|
909
846
|
decimals: 18,
|
|
910
|
-
logoURI: "/images/tokens/dai.png"
|
|
911
|
-
|
|
847
|
+
logoURI: "/images/tokens/dai.png",
|
|
848
|
+
nativeToken: !1
|
|
912
849
|
},
|
|
913
850
|
[t.USDC]: {
|
|
914
851
|
address: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
915
852
|
symbol: t.USDC,
|
|
916
853
|
name: "USD Coin",
|
|
917
854
|
decimals: 6,
|
|
918
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
919
|
-
|
|
855
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
856
|
+
nativeToken: !1
|
|
920
857
|
},
|
|
921
858
|
[t.USDT]: {
|
|
922
859
|
address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
|
|
923
860
|
symbol: t.USDT,
|
|
924
861
|
name: "Tether USD",
|
|
925
862
|
decimals: 6,
|
|
926
|
-
logoURI: "/images/tokens/usdt.png"
|
|
927
|
-
|
|
863
|
+
logoURI: "/images/tokens/usdt.png",
|
|
864
|
+
nativeToken: !1
|
|
928
865
|
},
|
|
929
866
|
[t.WETH]: {
|
|
930
867
|
address: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
|
|
931
868
|
symbol: t.WETH,
|
|
932
869
|
name: "Wrapped Ether",
|
|
933
870
|
decimals: 18,
|
|
934
|
-
logoURI: "/images/tokens/weth.png"
|
|
935
|
-
|
|
871
|
+
logoURI: "/images/tokens/weth.png",
|
|
872
|
+
nativeToken: !1
|
|
936
873
|
}
|
|
937
874
|
},
|
|
938
875
|
[c.STARKNET]: {
|
|
@@ -941,32 +878,32 @@ const m = {
|
|
|
941
878
|
symbol: t.DAI,
|
|
942
879
|
name: "Dai Stablecoin",
|
|
943
880
|
decimals: 18,
|
|
944
|
-
logoURI: "/images/tokens/dai.png"
|
|
945
|
-
|
|
881
|
+
logoURI: "/images/tokens/dai.png",
|
|
882
|
+
nativeToken: !1
|
|
946
883
|
},
|
|
947
884
|
[t.ETH]: {
|
|
948
885
|
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
949
886
|
symbol: t.ETH,
|
|
950
887
|
name: "Ethereum",
|
|
951
888
|
decimals: 18,
|
|
952
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
953
|
-
|
|
889
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
890
|
+
nativeToken: !1
|
|
954
891
|
},
|
|
955
892
|
[t.LORDS]: {
|
|
956
893
|
address: "0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",
|
|
957
894
|
symbol: t.LORDS,
|
|
958
895
|
name: "LORDS Token",
|
|
959
896
|
decimals: 18,
|
|
960
|
-
logoURI: "/images/tokens/lords.png"
|
|
961
|
-
|
|
897
|
+
logoURI: "/images/tokens/lords.png",
|
|
898
|
+
nativeToken: !1
|
|
962
899
|
},
|
|
963
900
|
[t.STRK]: {
|
|
964
901
|
address: "0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",
|
|
965
902
|
symbol: t.STRK,
|
|
966
903
|
name: "Starknet Token",
|
|
967
904
|
decimals: 18,
|
|
968
|
-
logoURI: "/images/chains/starknet.svg"
|
|
969
|
-
|
|
905
|
+
logoURI: "/images/chains/starknet.svg",
|
|
906
|
+
nativeToken: !1
|
|
970
907
|
},
|
|
971
908
|
[t.USDC]: {
|
|
972
909
|
address: "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
|
|
@@ -974,18 +911,17 @@ const m = {
|
|
|
974
911
|
name: "USD Coin",
|
|
975
912
|
decimals: 6,
|
|
976
913
|
logoURI: "/images/tokens/usdc.svg",
|
|
977
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
914
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
915
|
+
nativeToken: !1
|
|
978
916
|
},
|
|
979
917
|
[t.USDT]: {
|
|
980
918
|
address: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
|
|
981
919
|
symbol: t.USDT,
|
|
982
920
|
name: "Tether USD",
|
|
983
921
|
decimals: 6,
|
|
984
|
-
logoURI: "/images/tokens/usdt.png"
|
|
985
|
-
|
|
922
|
+
logoURI: "/images/tokens/usdt.png",
|
|
923
|
+
nativeToken: !1
|
|
986
924
|
}
|
|
987
|
-
// [AmountSymbols.WETH]: {
|
|
988
|
-
// },
|
|
989
925
|
},
|
|
990
926
|
[c.STARKNET_TESTNET]: {
|
|
991
927
|
[t.USDC]: {
|
|
@@ -993,23 +929,23 @@ const m = {
|
|
|
993
929
|
symbol: t.USDC,
|
|
994
930
|
name: "USD Coin",
|
|
995
931
|
decimals: 6,
|
|
996
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
997
|
-
|
|
932
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
933
|
+
nativeToken: !1
|
|
998
934
|
}
|
|
999
935
|
}
|
|
1000
936
|
}, ns = {
|
|
1001
|
-
ARBITRUM:
|
|
1002
|
-
ARBITRUM_TESTNET:
|
|
1003
|
-
AVALANCHE:
|
|
1004
|
-
AVALANCHE_TESTNET:
|
|
1005
|
-
BASE:
|
|
1006
|
-
BASE_TESTNET:
|
|
1007
|
-
BSC:
|
|
1008
|
-
ETHEREUM:
|
|
1009
|
-
ETHEREUM_TESTNET:
|
|
1010
|
-
STARKNET:
|
|
937
|
+
ARBITRUM: h[c.ARBITRUM],
|
|
938
|
+
ARBITRUM_TESTNET: h[c.ARBITRUM_TESTNET],
|
|
939
|
+
AVALANCHE: h[c.AVALANCHE],
|
|
940
|
+
AVALANCHE_TESTNET: h[c.AVALANCHE_TESTNET],
|
|
941
|
+
BASE: h[c.BASE],
|
|
942
|
+
BASE_TESTNET: h[c.BASE_TESTNET],
|
|
943
|
+
BSC: h[c.BSC],
|
|
944
|
+
ETHEREUM: h[c.ETHEREUM],
|
|
945
|
+
ETHEREUM_TESTNET: h[c.ETHEREUM_TESTNET],
|
|
946
|
+
STARKNET: h[c.STARKNET]
|
|
1011
947
|
}, je = new Set(Object.values(c));
|
|
1012
|
-
function
|
|
948
|
+
function f(s) {
|
|
1013
949
|
if (Ke(s))
|
|
1014
950
|
return s;
|
|
1015
951
|
const e = c[s];
|
|
@@ -1021,7 +957,7 @@ function Ke(s) {
|
|
|
1021
957
|
return je.has(s);
|
|
1022
958
|
}
|
|
1023
959
|
function We(s, e) {
|
|
1024
|
-
const n = e.toLowerCase().trim(), a =
|
|
960
|
+
const n = e.toLowerCase().trim(), a = h[s];
|
|
1025
961
|
if (!a)
|
|
1026
962
|
throw new Error(
|
|
1027
963
|
`Chain not found: ${s}. The chain key must be a valid chain identifier.`
|
|
@@ -1040,7 +976,7 @@ function We(s, e) {
|
|
|
1040
976
|
);
|
|
1041
977
|
return o;
|
|
1042
978
|
}
|
|
1043
|
-
function
|
|
979
|
+
function R(s, e, n) {
|
|
1044
980
|
const a = We(s, e);
|
|
1045
981
|
if (a.symbol !== n)
|
|
1046
982
|
throw new Error(
|
|
@@ -1049,7 +985,7 @@ function w(s, e, n) {
|
|
|
1049
985
|
return a;
|
|
1050
986
|
}
|
|
1051
987
|
function Ve(s, e) {
|
|
1052
|
-
return
|
|
988
|
+
return h[s]?.[e];
|
|
1053
989
|
}
|
|
1054
990
|
function L(s, e) {
|
|
1055
991
|
return Ve(s, e)?.address;
|
|
@@ -1108,9 +1044,9 @@ class l {
|
|
|
1108
1044
|
return n + o + r;
|
|
1109
1045
|
}
|
|
1110
1046
|
}
|
|
1111
|
-
let
|
|
1047
|
+
let v = null;
|
|
1112
1048
|
function Ye() {
|
|
1113
|
-
|
|
1049
|
+
v = ae.create({
|
|
1114
1050
|
prefixUrl: l.getBaseUrl(),
|
|
1115
1051
|
headers: {
|
|
1116
1052
|
"Content-Type": "application/json"
|
|
@@ -1130,7 +1066,7 @@ function Ye() {
|
|
|
1130
1066
|
});
|
|
1131
1067
|
}
|
|
1132
1068
|
function u() {
|
|
1133
|
-
return
|
|
1069
|
+
return v || Ye(), v;
|
|
1134
1070
|
}
|
|
1135
1071
|
class Ge {
|
|
1136
1072
|
async getById(e) {
|
|
@@ -1149,7 +1085,7 @@ class Ge {
|
|
|
1149
1085
|
return await u().get("intents", { searchParams: e }).json();
|
|
1150
1086
|
}
|
|
1151
1087
|
async create(e) {
|
|
1152
|
-
const n =
|
|
1088
|
+
const n = f(e.source_chain), a = f(e.destination_chain);
|
|
1153
1089
|
return await u().post("intents", {
|
|
1154
1090
|
json: {
|
|
1155
1091
|
...e,
|
|
@@ -1159,7 +1095,7 @@ class Ge {
|
|
|
1159
1095
|
}).json();
|
|
1160
1096
|
}
|
|
1161
1097
|
async createForSession(e) {
|
|
1162
|
-
const n =
|
|
1098
|
+
const n = f(e.sourceChain);
|
|
1163
1099
|
return await u().post("modal/sessions/intents", {
|
|
1164
1100
|
json: { ...e, sourceChain: n }
|
|
1165
1101
|
}).json();
|
|
@@ -1176,9 +1112,9 @@ class Ge {
|
|
|
1176
1112
|
}
|
|
1177
1113
|
class qe {
|
|
1178
1114
|
async getFromSpecificBridge(e) {
|
|
1179
|
-
const n =
|
|
1180
|
-
|
|
1181
|
-
const a =
|
|
1115
|
+
const n = f(e.sourceChain);
|
|
1116
|
+
R(n, e.tokenIn, e.amountSymbol);
|
|
1117
|
+
const a = f(e.destinationChain);
|
|
1182
1118
|
return await u().get("quotes/single", {
|
|
1183
1119
|
searchParams: {
|
|
1184
1120
|
...e,
|
|
@@ -1188,9 +1124,9 @@ class qe {
|
|
|
1188
1124
|
}).json();
|
|
1189
1125
|
}
|
|
1190
1126
|
async getFromAllBridges(e) {
|
|
1191
|
-
const n =
|
|
1192
|
-
|
|
1193
|
-
const a =
|
|
1127
|
+
const n = f(e.sourceChain);
|
|
1128
|
+
R(n, e.tokenIn, e.amountSymbol);
|
|
1129
|
+
const a = f(e.destinationChain);
|
|
1194
1130
|
return await u().get("quotes/multiple", {
|
|
1195
1131
|
searchParams: {
|
|
1196
1132
|
...e,
|
|
@@ -1200,9 +1136,9 @@ class qe {
|
|
|
1200
1136
|
}).json();
|
|
1201
1137
|
}
|
|
1202
1138
|
async getBestAcrossBridges(e) {
|
|
1203
|
-
const n =
|
|
1204
|
-
|
|
1205
|
-
const a =
|
|
1139
|
+
const n = f(e.sourceChain);
|
|
1140
|
+
R(n, e.tokenIn, e.amountSymbol);
|
|
1141
|
+
const a = f(e.destinationChain);
|
|
1206
1142
|
return await u().get("quotes/best", { searchParams: {
|
|
1207
1143
|
...e,
|
|
1208
1144
|
sourceChain: n,
|
|
@@ -1210,7 +1146,7 @@ class qe {
|
|
|
1210
1146
|
} }).json();
|
|
1211
1147
|
}
|
|
1212
1148
|
async getAll(e) {
|
|
1213
|
-
const n =
|
|
1149
|
+
const n = f(e.destinationChain);
|
|
1214
1150
|
return await u().get("quotes/multi-source", { searchParams: {
|
|
1215
1151
|
...e,
|
|
1216
1152
|
destinationChain: n
|
|
@@ -1222,7 +1158,7 @@ class qe {
|
|
|
1222
1158
|
}
|
|
1223
1159
|
class Xe {
|
|
1224
1160
|
async getOptimalRoutes(e) {
|
|
1225
|
-
const n =
|
|
1161
|
+
const n = f(e.sourceChain), a = f(e.destinationChain);
|
|
1226
1162
|
return await u().get("router/optimal-route", {
|
|
1227
1163
|
searchParams: {
|
|
1228
1164
|
...e,
|
|
@@ -1235,20 +1171,15 @@ class Xe {
|
|
|
1235
1171
|
return await u().get("router/supported-bridges/all").json();
|
|
1236
1172
|
}
|
|
1237
1173
|
async getSupportedBridges(e) {
|
|
1238
|
-
const n =
|
|
1174
|
+
const n = f(e.sourceChain), a = f(e.destinationChain);
|
|
1239
1175
|
return await u().get("router/supported-bridges/route", { searchParams: {
|
|
1240
1176
|
...e,
|
|
1241
1177
|
sourceChain: n,
|
|
1242
1178
|
destinationChain: a
|
|
1243
1179
|
} }).json();
|
|
1244
1180
|
}
|
|
1245
|
-
async getSupportedRoutes(e
|
|
1246
|
-
|
|
1247
|
-
return await u().get("router/supported-routes/bridge/" + e, { searchParams: {
|
|
1248
|
-
...n,
|
|
1249
|
-
sourceChain: a,
|
|
1250
|
-
destinationChain: o
|
|
1251
|
-
} }).json();
|
|
1181
|
+
async getSupportedRoutes(e) {
|
|
1182
|
+
return await u().get("router/supported-routes/bridge/" + e).json();
|
|
1252
1183
|
}
|
|
1253
1184
|
}
|
|
1254
1185
|
class Qe {
|
|
@@ -1269,7 +1200,7 @@ class Je {
|
|
|
1269
1200
|
}
|
|
1270
1201
|
class Ze {
|
|
1271
1202
|
async getSessionToken(e) {
|
|
1272
|
-
const n =
|
|
1203
|
+
const n = f(e.destinationChain);
|
|
1273
1204
|
let a = L(n, e.token);
|
|
1274
1205
|
a || (console.error(`${e.token} on ${e.destinationChain} is currently unsupported, defaulting to usdc`), a = L(n, "USDC"));
|
|
1275
1206
|
const o = {
|