@chainrails/common 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m = {
|
|
2
2
|
EVM: "EVM",
|
|
3
3
|
STARKNET: "STARKNET"
|
|
4
4
|
}, c = {
|
|
@@ -39,134 +39,134 @@ const E = {
|
|
|
39
39
|
POLYGON: "POLYGON",
|
|
40
40
|
STARKNET: "STARKNET",
|
|
41
41
|
STARKNET_TESTNET: "STARKNET_TESTNET"
|
|
42
|
-
},
|
|
43
|
-
type:
|
|
42
|
+
}, ne = {
|
|
43
|
+
type: m.EVM,
|
|
44
44
|
chainId: 42161,
|
|
45
45
|
name: "Arbitrum",
|
|
46
46
|
cctpDomain: 3,
|
|
47
47
|
logoURI: "/images/chains/arbitrum.svg",
|
|
48
48
|
explorer: "https://arbiscan.io"
|
|
49
|
-
},
|
|
50
|
-
type:
|
|
49
|
+
}, se = {
|
|
50
|
+
type: m.EVM,
|
|
51
51
|
chainId: 421614,
|
|
52
52
|
name: "Arbitrum Sepolia",
|
|
53
53
|
cctpDomain: 3,
|
|
54
54
|
logoURI: "/images/chains/arbitrum.svg",
|
|
55
55
|
explorer: "https://sepolia.arbiscan.io"
|
|
56
56
|
}, oe = {
|
|
57
|
-
type:
|
|
57
|
+
type: m.EVM,
|
|
58
58
|
chainId: 43114,
|
|
59
59
|
name: "Avalanche",
|
|
60
60
|
cctpDomain: 1,
|
|
61
61
|
logoURI: "/images/chains/avalanche.svg",
|
|
62
62
|
explorer: "https://snowtrace.io"
|
|
63
63
|
}, ie = {
|
|
64
|
-
type:
|
|
64
|
+
type: m.EVM,
|
|
65
65
|
chainId: 43113,
|
|
66
66
|
name: "Avalanche Fuji",
|
|
67
67
|
cctpDomain: 1,
|
|
68
68
|
logoURI: "/images/chains/avalanche.svg",
|
|
69
69
|
explorer: "https://testnet.snowtrace.io"
|
|
70
70
|
}, ae = {
|
|
71
|
-
type:
|
|
71
|
+
type: m.EVM,
|
|
72
72
|
chainId: 8453,
|
|
73
73
|
name: "Base",
|
|
74
74
|
cctpDomain: 6,
|
|
75
75
|
logoURI: "/images/chains/base.webp",
|
|
76
76
|
explorer: "https://basescan.org"
|
|
77
77
|
}, re = {
|
|
78
|
-
type:
|
|
78
|
+
type: m.EVM,
|
|
79
79
|
chainId: 84532,
|
|
80
80
|
name: "Base Sepolia",
|
|
81
81
|
cctpDomain: 6,
|
|
82
82
|
logoURI: "/images/chains/base.webp",
|
|
83
83
|
explorer: "https://sepolia.basescan.org"
|
|
84
84
|
}, ce = {
|
|
85
|
-
type:
|
|
85
|
+
type: m.EVM,
|
|
86
86
|
chainId: 56,
|
|
87
87
|
name: "BNB Chain",
|
|
88
88
|
cctpDomain: null,
|
|
89
89
|
logoURI: "/images/chains/bsc.webp",
|
|
90
90
|
explorer: "https://bscscan.com"
|
|
91
91
|
}, rt = {
|
|
92
|
-
type:
|
|
92
|
+
type: m.EVM,
|
|
93
93
|
chainId: 42220,
|
|
94
94
|
name: "Celo",
|
|
95
95
|
cctpDomain: null,
|
|
96
96
|
logoURI: "/images/chains/celo.svg",
|
|
97
97
|
explorer: "https://celoscan.io"
|
|
98
|
-
},
|
|
99
|
-
type:
|
|
98
|
+
}, le = {
|
|
99
|
+
type: m.EVM,
|
|
100
100
|
chainId: 1,
|
|
101
101
|
name: "Ethereum",
|
|
102
102
|
cctpDomain: 0,
|
|
103
103
|
logoURI: "/images/chains/ethereum.svg",
|
|
104
104
|
explorer: "https://etherscan.io"
|
|
105
|
-
},
|
|
106
|
-
type:
|
|
105
|
+
}, de = {
|
|
106
|
+
type: m.EVM,
|
|
107
107
|
chainId: 11155111,
|
|
108
108
|
name: "Ethereum Sepolia",
|
|
109
109
|
cctpDomain: 0,
|
|
110
110
|
logoURI: "/images/chains/ethereum.svg",
|
|
111
111
|
explorer: "https://sepolia.etherscan.io"
|
|
112
|
-
},
|
|
113
|
-
type:
|
|
112
|
+
}, Te = {
|
|
113
|
+
type: m.EVM,
|
|
114
114
|
chainId: 999,
|
|
115
115
|
name: "HyperEVM",
|
|
116
116
|
cctpDomain: 19,
|
|
117
117
|
logoURI: "/images/chains/hyperevm.webp",
|
|
118
118
|
explorer: "https://liquidscan.io"
|
|
119
119
|
}, ct = {
|
|
120
|
-
type:
|
|
120
|
+
type: m.EVM,
|
|
121
121
|
chainId: 59144,
|
|
122
122
|
name: "Linea",
|
|
123
123
|
cctpDomain: 11,
|
|
124
124
|
logoURI: "/images/chains/linea.svg",
|
|
125
125
|
explorer: "https://lineascan.build"
|
|
126
|
-
},
|
|
127
|
-
type:
|
|
126
|
+
}, me = {
|
|
127
|
+
type: m.EVM,
|
|
128
128
|
chainId: 1135,
|
|
129
129
|
name: "Lisk",
|
|
130
130
|
cctpDomain: null,
|
|
131
131
|
logoURI: "/images/chains/lisk.png",
|
|
132
132
|
explorer: "https://blockscout.lisk.com"
|
|
133
|
-
},
|
|
134
|
-
type:
|
|
133
|
+
}, Ee = {
|
|
134
|
+
type: m.EVM,
|
|
135
135
|
chainId: 15,
|
|
136
136
|
name: "Monad",
|
|
137
137
|
cctpDomain: 7,
|
|
138
138
|
logoURI: "/images/chains/monad.png",
|
|
139
139
|
explorer: "https://monadvision.com"
|
|
140
|
-
},
|
|
141
|
-
type:
|
|
140
|
+
}, fe = {
|
|
141
|
+
type: m.EVM,
|
|
142
142
|
chainId: 10143,
|
|
143
143
|
name: "Monad Testnet",
|
|
144
144
|
cctpDomain: null,
|
|
145
145
|
logoURI: "/images/chains/monad.png",
|
|
146
146
|
explorer: "https://testnet.monadvision.com"
|
|
147
|
-
},
|
|
148
|
-
type:
|
|
147
|
+
}, ue = {
|
|
148
|
+
type: m.EVM,
|
|
149
149
|
chainId: 10,
|
|
150
150
|
name: "Optimism",
|
|
151
151
|
cctpDomain: 2,
|
|
152
152
|
logoURI: "/images/chains/optimism.svg",
|
|
153
153
|
explorer: "https://optimistic.etherscan.io"
|
|
154
|
-
},
|
|
155
|
-
type:
|
|
154
|
+
}, he = {
|
|
155
|
+
type: m.EVM,
|
|
156
156
|
chainId: 11155420,
|
|
157
157
|
name: "Optimism Testnet",
|
|
158
158
|
cctpDomain: 2,
|
|
159
159
|
logoURI: "/images/chains/optimism.svg",
|
|
160
160
|
explorer: "https://testnet-explorer.optimism.io"
|
|
161
|
-
},
|
|
162
|
-
type:
|
|
161
|
+
}, ge = {
|
|
162
|
+
type: m.EVM,
|
|
163
163
|
chainId: 137,
|
|
164
164
|
name: "Polygon",
|
|
165
165
|
cctpDomain: 7,
|
|
166
166
|
logoURI: "/images/chains/polygon.svg",
|
|
167
167
|
explorer: "https://polygonscan.com"
|
|
168
168
|
}, pe = {
|
|
169
|
-
type:
|
|
169
|
+
type: m.STARKNET,
|
|
170
170
|
chainId: "0x534e5f4d41494e",
|
|
171
171
|
// SN_MAIN
|
|
172
172
|
name: "Starknet",
|
|
@@ -174,51 +174,51 @@ const E = {
|
|
|
174
174
|
logoURI: "/images/chains/starknet.svg",
|
|
175
175
|
explorer: ""
|
|
176
176
|
}, Se = {
|
|
177
|
-
type:
|
|
177
|
+
type: m.STARKNET,
|
|
178
178
|
chainId: "0x534e5f5345504f4c4941",
|
|
179
179
|
// SN_SEPOLIA
|
|
180
180
|
name: "Starknet Testnet",
|
|
181
181
|
cctpDomain: null,
|
|
182
182
|
logoURI: "/images/chains/starknet.svg",
|
|
183
183
|
explorer: ""
|
|
184
|
-
},
|
|
185
|
-
type:
|
|
184
|
+
}, lt = {
|
|
185
|
+
type: m.EVM,
|
|
186
186
|
chainId: 130,
|
|
187
187
|
name: "Unichain",
|
|
188
188
|
cctpDomain: 10,
|
|
189
189
|
logoURI: "/images/chains/unichain.webp",
|
|
190
190
|
explorer: ""
|
|
191
|
-
},
|
|
192
|
-
type:
|
|
191
|
+
}, dt = {
|
|
192
|
+
type: m.EVM,
|
|
193
193
|
chainId: 480,
|
|
194
194
|
name: "Worldchain",
|
|
195
195
|
cctpDomain: 14,
|
|
196
196
|
logoURI: "/images/chains/worldchain.svg",
|
|
197
197
|
explorer: ""
|
|
198
198
|
};
|
|
199
|
-
function
|
|
199
|
+
function N(e, { strict: t = !0 } = {}) {
|
|
200
200
|
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
202
|
+
function v(e) {
|
|
203
|
+
return N(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
204
204
|
}
|
|
205
205
|
const L = "2.43.4";
|
|
206
206
|
let D = {
|
|
207
|
-
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug:
|
|
207
|
+
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
|
|
208
208
|
version: `viem@${L}`
|
|
209
209
|
};
|
|
210
|
-
class
|
|
211
|
-
constructor(t,
|
|
212
|
-
const o =
|
|
210
|
+
class h extends Error {
|
|
211
|
+
constructor(t, n = {}) {
|
|
212
|
+
const o = n.cause instanceof h ? n.cause.details : n.cause?.message ? n.cause.message : n.details, i = n.cause instanceof h && n.cause.docsPath || n.docsPath, r = D.getDocsUrl?.({ ...n, docsPath: i }), a = [
|
|
213
213
|
t || "An error occurred.",
|
|
214
214
|
"",
|
|
215
|
-
...
|
|
215
|
+
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
216
216
|
...r ? [`Docs: ${r}`] : [],
|
|
217
217
|
...o ? [`Details: ${o}`] : [],
|
|
218
218
|
...D.version ? [`Version: ${D.version}`] : []
|
|
219
219
|
].join(`
|
|
220
220
|
`);
|
|
221
|
-
super(a,
|
|
221
|
+
super(a, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
|
|
222
222
|
enumerable: !0,
|
|
223
223
|
configurable: !0,
|
|
224
224
|
writable: !0,
|
|
@@ -248,7 +248,7 @@ class g extends Error {
|
|
|
248
248
|
configurable: !0,
|
|
249
249
|
writable: !0,
|
|
250
250
|
value: "BaseError"
|
|
251
|
-
}), this.details = o, this.docsPath = i, this.metaMessages =
|
|
251
|
+
}), this.details = o, this.docsPath = i, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = L;
|
|
252
252
|
}
|
|
253
253
|
walk(t) {
|
|
254
254
|
return F(this, t);
|
|
@@ -257,86 +257,86 @@ class g extends Error {
|
|
|
257
257
|
function F(e, t) {
|
|
258
258
|
return t?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? F(e.cause, t) : t ? null : e;
|
|
259
259
|
}
|
|
260
|
-
class $ extends
|
|
261
|
-
constructor({ size: t, targetSize:
|
|
262
|
-
super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${
|
|
260
|
+
class $ extends h {
|
|
261
|
+
constructor({ size: t, targetSize: n, type: o }) {
|
|
262
|
+
super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
function U(e, { dir: t, size:
|
|
266
|
-
return typeof e == "string" ? Ae(e, { dir: t, size:
|
|
265
|
+
function U(e, { dir: t, size: n = 32 } = {}) {
|
|
266
|
+
return typeof e == "string" ? Ae(e, { dir: t, size: n }) : be(e, { dir: t, size: n });
|
|
267
267
|
}
|
|
268
|
-
function Ae(e, { dir: t, size:
|
|
269
|
-
if (
|
|
268
|
+
function Ae(e, { dir: t, size: n = 32 } = {}) {
|
|
269
|
+
if (n === null)
|
|
270
270
|
return e;
|
|
271
271
|
const o = e.replace("0x", "");
|
|
272
|
-
if (o.length >
|
|
272
|
+
if (o.length > n * 2)
|
|
273
273
|
throw new $({
|
|
274
274
|
size: Math.ceil(o.length / 2),
|
|
275
|
-
targetSize:
|
|
275
|
+
targetSize: n,
|
|
276
276
|
type: "hex"
|
|
277
277
|
});
|
|
278
|
-
return `0x${o[t === "right" ? "padEnd" : "padStart"](
|
|
278
|
+
return `0x${o[t === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
|
|
279
279
|
}
|
|
280
|
-
function be(e, { dir: t, size:
|
|
281
|
-
if (
|
|
280
|
+
function be(e, { dir: t, size: n = 32 } = {}) {
|
|
281
|
+
if (n === null)
|
|
282
282
|
return e;
|
|
283
|
-
if (e.length >
|
|
283
|
+
if (e.length > n)
|
|
284
284
|
throw new $({
|
|
285
285
|
size: e.length,
|
|
286
|
-
targetSize:
|
|
286
|
+
targetSize: n,
|
|
287
287
|
type: "bytes"
|
|
288
288
|
});
|
|
289
|
-
const o = new Uint8Array(
|
|
290
|
-
for (let i = 0; i <
|
|
289
|
+
const o = new Uint8Array(n);
|
|
290
|
+
for (let i = 0; i < n; i++) {
|
|
291
291
|
const r = t === "right";
|
|
292
|
-
o[r ? i :
|
|
292
|
+
o[r ? i : n - i - 1] = e[r ? i : e.length - i - 1];
|
|
293
293
|
}
|
|
294
294
|
return o;
|
|
295
295
|
}
|
|
296
|
-
class Ie extends
|
|
297
|
-
constructor({ max: t, min:
|
|
298
|
-
super(`Number "${r}" is not in safe ${i ? `${i * 8}-bit ${o ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${
|
|
296
|
+
class Ie extends h {
|
|
297
|
+
constructor({ max: t, min: n, signed: o, size: i, value: r }) {
|
|
298
|
+
super(`Number "${r}" is not in safe ${i ? `${i * 8}-bit ${o ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${n} to ${t})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
class Ue extends
|
|
302
|
-
constructor({ givenSize: t, maxSize:
|
|
303
|
-
super(`Size cannot exceed ${
|
|
301
|
+
class Ue extends h {
|
|
302
|
+
constructor({ givenSize: t, maxSize: n }) {
|
|
303
|
+
super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
if (
|
|
306
|
+
function y(e, { size: t }) {
|
|
307
|
+
if (v(e) > t)
|
|
308
308
|
throw new Ue({
|
|
309
|
-
givenSize:
|
|
309
|
+
givenSize: v(e),
|
|
310
310
|
maxSize: t
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
function De(e, t = {}) {
|
|
314
|
-
const { signed:
|
|
314
|
+
const { signed: n, size: o } = t, i = BigInt(e);
|
|
315
315
|
let r;
|
|
316
|
-
o ?
|
|
317
|
-
const a = typeof r == "bigint" &&
|
|
316
|
+
o ? n ? r = (1n << BigInt(o) * 8n - 1n) - 1n : r = 2n ** (BigInt(o) * 8n) - 1n : typeof e == "number" && (r = BigInt(Number.MAX_SAFE_INTEGER));
|
|
317
|
+
const a = typeof r == "bigint" && n ? -r - 1n : 0;
|
|
318
318
|
if (r && i > r || i < a) {
|
|
319
|
-
const
|
|
319
|
+
const f = typeof e == "bigint" ? "n" : "";
|
|
320
320
|
throw new Ie({
|
|
321
|
-
max: r ? `${r}${
|
|
322
|
-
min: `${a}${
|
|
323
|
-
signed:
|
|
321
|
+
max: r ? `${r}${f}` : void 0,
|
|
322
|
+
min: `${a}${f}`,
|
|
323
|
+
signed: n,
|
|
324
324
|
size: o,
|
|
325
|
-
value: `${e}${
|
|
325
|
+
value: `${e}${f}`
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
|
-
const
|
|
329
|
-
return o ? U(
|
|
328
|
+
const d = `0x${(n && i < 0 ? (1n << BigInt(o * 8)) + BigInt(i) : i).toString(16)}`;
|
|
329
|
+
return o ? U(d, { size: o }) : d;
|
|
330
330
|
}
|
|
331
|
-
const
|
|
332
|
-
function
|
|
333
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
331
|
+
const ke = /* @__PURE__ */ new TextEncoder();
|
|
332
|
+
function Re(e, t = {}) {
|
|
333
|
+
return typeof e == "number" || typeof e == "bigint" ? ye(e, t) : typeof e == "boolean" ? Ne(e, t) : N(e) ? P(e, t) : V(e, t);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
const
|
|
337
|
-
return
|
|
335
|
+
function Ne(e, t = {}) {
|
|
336
|
+
const n = new Uint8Array(1);
|
|
337
|
+
return n[0] = Number(e), typeof t.size == "number" ? (y(n, { size: t.size }), U(n, { size: t.size })) : n;
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const u = {
|
|
340
340
|
zero: 48,
|
|
341
341
|
nine: 57,
|
|
342
342
|
A: 65,
|
|
@@ -344,55 +344,55 @@ const h = {
|
|
|
344
344
|
a: 97,
|
|
345
345
|
f: 102
|
|
346
346
|
};
|
|
347
|
-
function
|
|
348
|
-
if (e >=
|
|
349
|
-
return e -
|
|
350
|
-
if (e >=
|
|
351
|
-
return e - (
|
|
352
|
-
if (e >=
|
|
353
|
-
return e - (
|
|
347
|
+
function M(e) {
|
|
348
|
+
if (e >= u.zero && e <= u.nine)
|
|
349
|
+
return e - u.zero;
|
|
350
|
+
if (e >= u.A && e <= u.F)
|
|
351
|
+
return e - (u.A - 10);
|
|
352
|
+
if (e >= u.a && e <= u.f)
|
|
353
|
+
return e - (u.a - 10);
|
|
354
354
|
}
|
|
355
355
|
function P(e, t = {}) {
|
|
356
|
-
let
|
|
357
|
-
t.size && (
|
|
358
|
-
let o =
|
|
356
|
+
let n = e;
|
|
357
|
+
t.size && (y(n, { size: t.size }), n = U(n, { dir: "right", size: t.size }));
|
|
358
|
+
let o = n.slice(2);
|
|
359
359
|
o.length % 2 && (o = `0${o}`);
|
|
360
360
|
const i = o.length / 2, r = new Uint8Array(i);
|
|
361
|
-
for (let a = 0,
|
|
362
|
-
const
|
|
363
|
-
if (
|
|
364
|
-
throw new
|
|
365
|
-
r[a] =
|
|
361
|
+
for (let a = 0, d = 0; a < i; a++) {
|
|
362
|
+
const f = M(o.charCodeAt(d++)), g = M(o.charCodeAt(d++));
|
|
363
|
+
if (f === void 0 || g === void 0)
|
|
364
|
+
throw new h(`Invalid byte sequence ("${o[d - 2]}${o[d - 1]}" in "${o}").`);
|
|
365
|
+
r[a] = f * 16 + g;
|
|
366
366
|
}
|
|
367
367
|
return r;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const
|
|
371
|
-
return P(
|
|
369
|
+
function ye(e, t) {
|
|
370
|
+
const n = De(e, t);
|
|
371
|
+
return P(n);
|
|
372
372
|
}
|
|
373
373
|
function V(e, t = {}) {
|
|
374
|
-
const
|
|
375
|
-
return typeof t.size == "number" ? (
|
|
374
|
+
const n = ke.encode(e);
|
|
375
|
+
return typeof t.size == "number" ? (y(n, { size: t.size }), U(n, { dir: "right", size: t.size })) : n;
|
|
376
376
|
}
|
|
377
|
-
const b = /* @__PURE__ */ BigInt(2 ** 32 - 1),
|
|
378
|
-
function
|
|
379
|
-
return t ? { h: Number(e & b), l: Number(e >>
|
|
377
|
+
const b = /* @__PURE__ */ BigInt(2 ** 32 - 1), x = /* @__PURE__ */ BigInt(32);
|
|
378
|
+
function Ce(e, t = !1) {
|
|
379
|
+
return t ? { h: Number(e & b), l: Number(e >> x & b) } : { h: Number(e >> x & b) | 0, l: Number(e & b) | 0 };
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
const
|
|
383
|
-
let o = new Uint32Array(
|
|
384
|
-
for (let r = 0; r <
|
|
385
|
-
const { h: a, l } =
|
|
386
|
-
[o[r], i[r]] = [a,
|
|
381
|
+
function ve(e, t = !1) {
|
|
382
|
+
const n = e.length;
|
|
383
|
+
let o = new Uint32Array(n), i = new Uint32Array(n);
|
|
384
|
+
for (let r = 0; r < n; r++) {
|
|
385
|
+
const { h: a, l: d } = Ce(e[r], t);
|
|
386
|
+
[o[r], i[r]] = [a, d];
|
|
387
387
|
}
|
|
388
388
|
return [o, i];
|
|
389
389
|
}
|
|
390
|
-
const
|
|
390
|
+
const Me = (e, t, n) => e << n | t >>> 32 - n, xe = (e, t, n) => t << n | e >>> 32 - n, Be = (e, t, n) => t << n - 32 | e >>> 64 - n, we = (e, t, n) => e << n - 32 | t >>> 64 - n;
|
|
391
391
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
392
392
|
function Oe(e) {
|
|
393
393
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function B(e) {
|
|
396
396
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
397
397
|
throw new Error("positive integer expected, got " + e);
|
|
398
398
|
}
|
|
@@ -402,7 +402,7 @@ function I(e, ...t) {
|
|
|
402
402
|
if (t.length > 0 && !t.includes(e.length))
|
|
403
403
|
throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function w(e, t = !0) {
|
|
406
406
|
if (e.destroyed)
|
|
407
407
|
throw new Error("Hash instance has been destroyed");
|
|
408
408
|
if (t && e.finished)
|
|
@@ -410,9 +410,9 @@ function v(e, t = !0) {
|
|
|
410
410
|
}
|
|
411
411
|
function He(e, t) {
|
|
412
412
|
I(e);
|
|
413
|
-
const
|
|
414
|
-
if (e.length <
|
|
415
|
-
throw new Error("digestInto() expects output buffer of length at least " +
|
|
413
|
+
const n = t.outputLen;
|
|
414
|
+
if (e.length < n)
|
|
415
|
+
throw new Error("digestInto() expects output buffer of length at least " + n);
|
|
416
416
|
}
|
|
417
417
|
function _e(e) {
|
|
418
418
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
@@ -442,47 +442,47 @@ function z(e) {
|
|
|
442
442
|
class Ve {
|
|
443
443
|
}
|
|
444
444
|
function Ke(e) {
|
|
445
|
-
const t = (o) => e().update(z(o)).digest(),
|
|
446
|
-
return t.outputLen =
|
|
445
|
+
const t = (o) => e().update(z(o)).digest(), n = e();
|
|
446
|
+
return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = () => e(), t;
|
|
447
447
|
}
|
|
448
448
|
const ze = BigInt(0), S = BigInt(1), We = BigInt(2), Ye = BigInt(7), je = BigInt(256), Ge = BigInt(113), W = [], Y = [], j = [];
|
|
449
|
-
for (let e = 0, t = S,
|
|
450
|
-
[
|
|
449
|
+
for (let e = 0, t = S, n = 1, o = 0; e < 24; e++) {
|
|
450
|
+
[n, o] = [o, (2 * n + 3 * o) % 5], W.push(2 * (5 * o + n)), Y.push((e + 1) * (e + 2) / 2 % 64);
|
|
451
451
|
let i = ze;
|
|
452
452
|
for (let r = 0; r < 7; r++)
|
|
453
453
|
t = (t << S ^ (t >> Ye) * Ge) % je, t & We && (i ^= S << (S << /* @__PURE__ */ BigInt(r)) - S);
|
|
454
454
|
j.push(i);
|
|
455
455
|
}
|
|
456
|
-
const G =
|
|
456
|
+
const G = ve(j, !0), Xe = G[0], qe = G[1], H = (e, t, n) => n > 32 ? Be(e, t, n) : Me(e, t, n), _ = (e, t, n) => n > 32 ? we(e, t, n) : xe(e, t, n);
|
|
457
457
|
function Je(e, t = 24) {
|
|
458
|
-
const
|
|
458
|
+
const n = new Uint32Array(10);
|
|
459
459
|
for (let o = 24 - t; o < 24; o++) {
|
|
460
460
|
for (let a = 0; a < 10; a++)
|
|
461
|
-
|
|
461
|
+
n[a] = e[a] ^ e[a + 10] ^ e[a + 20] ^ e[a + 30] ^ e[a + 40];
|
|
462
462
|
for (let a = 0; a < 10; a += 2) {
|
|
463
|
-
const
|
|
463
|
+
const d = (a + 8) % 10, f = (a + 2) % 10, g = n[f], p = n[f + 1], Z = H(g, p, 1) ^ n[d], ee = _(g, p, 1) ^ n[d + 1];
|
|
464
464
|
for (let A = 0; A < 50; A += 10)
|
|
465
465
|
e[a + A] ^= Z, e[a + A + 1] ^= ee;
|
|
466
466
|
}
|
|
467
467
|
let i = e[2], r = e[3];
|
|
468
468
|
for (let a = 0; a < 24; a++) {
|
|
469
|
-
const
|
|
470
|
-
i = e[p], r = e[p + 1], e[p] =
|
|
469
|
+
const d = Y[a], f = H(i, r, d), g = _(i, r, d), p = W[a];
|
|
470
|
+
i = e[p], r = e[p + 1], e[p] = f, e[p + 1] = g;
|
|
471
471
|
}
|
|
472
472
|
for (let a = 0; a < 50; a += 10) {
|
|
473
|
-
for (let
|
|
474
|
-
|
|
475
|
-
for (let
|
|
476
|
-
e[a +
|
|
473
|
+
for (let d = 0; d < 10; d++)
|
|
474
|
+
n[d] = e[a + d];
|
|
475
|
+
for (let d = 0; d < 10; d++)
|
|
476
|
+
e[a + d] ^= ~n[(d + 2) % 10] & n[(d + 4) % 10];
|
|
477
477
|
}
|
|
478
478
|
e[0] ^= Xe[o], e[1] ^= qe[o];
|
|
479
479
|
}
|
|
480
|
-
K(
|
|
480
|
+
K(n);
|
|
481
481
|
}
|
|
482
|
-
class
|
|
482
|
+
class C extends Ve {
|
|
483
483
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
484
|
-
constructor(t,
|
|
485
|
-
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix =
|
|
484
|
+
constructor(t, n, o, i = !1, r = 24) {
|
|
485
|
+
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = n, this.outputLen = o, this.enableXOF = i, this.rounds = r, B(o), !(0 < t && t < 200))
|
|
486
486
|
throw new Error("only keccak-f1600 function is supported");
|
|
487
487
|
this.state = new Uint8Array(200), this.state32 = _e(this.state);
|
|
488
488
|
}
|
|
@@ -493,13 +493,13 @@ class M extends Ve {
|
|
|
493
493
|
O(this.state32), Je(this.state32, this.rounds), O(this.state32), this.posOut = 0, this.pos = 0;
|
|
494
494
|
}
|
|
495
495
|
update(t) {
|
|
496
|
-
|
|
497
|
-
const { blockLen:
|
|
496
|
+
w(this), t = z(t), I(t);
|
|
497
|
+
const { blockLen: n, state: o } = this, i = t.length;
|
|
498
498
|
for (let r = 0; r < i; ) {
|
|
499
|
-
const a = Math.min(
|
|
500
|
-
for (let
|
|
499
|
+
const a = Math.min(n - this.pos, i - r);
|
|
500
|
+
for (let d = 0; d < a; d++)
|
|
501
501
|
o[this.pos++] ^= t[r++];
|
|
502
|
-
this.pos ===
|
|
502
|
+
this.pos === n && this.keccak();
|
|
503
503
|
}
|
|
504
504
|
return this;
|
|
505
505
|
}
|
|
@@ -507,16 +507,16 @@ class M extends Ve {
|
|
|
507
507
|
if (this.finished)
|
|
508
508
|
return;
|
|
509
509
|
this.finished = !0;
|
|
510
|
-
const { state: t, suffix:
|
|
511
|
-
t[o] ^=
|
|
510
|
+
const { state: t, suffix: n, pos: o, blockLen: i } = this;
|
|
511
|
+
t[o] ^= n, (n & 128) !== 0 && o === i - 1 && this.keccak(), t[i - 1] ^= 128, this.keccak();
|
|
512
512
|
}
|
|
513
513
|
writeInto(t) {
|
|
514
|
-
|
|
515
|
-
const
|
|
514
|
+
w(this, !1), I(t), this.finish();
|
|
515
|
+
const n = this.state, { blockLen: o } = this;
|
|
516
516
|
for (let i = 0, r = t.length; i < r; ) {
|
|
517
517
|
this.posOut >= o && this.keccak();
|
|
518
518
|
const a = Math.min(o - this.posOut, r - i);
|
|
519
|
-
t.set(
|
|
519
|
+
t.set(n.subarray(this.posOut, this.posOut + a), i), this.posOut += a, i += a;
|
|
520
520
|
}
|
|
521
521
|
return t;
|
|
522
522
|
}
|
|
@@ -526,7 +526,7 @@ class M extends Ve {
|
|
|
526
526
|
return this.writeInto(t);
|
|
527
527
|
}
|
|
528
528
|
xof(t) {
|
|
529
|
-
return
|
|
529
|
+
return B(t), this.xofInto(new Uint8Array(t));
|
|
530
530
|
}
|
|
531
531
|
digestInto(t) {
|
|
532
532
|
if (He(t, this), this.finished)
|
|
@@ -540,15 +540,15 @@ class M extends Ve {
|
|
|
540
540
|
this.destroyed = !0, K(this.state);
|
|
541
541
|
}
|
|
542
542
|
_cloneInto(t) {
|
|
543
|
-
const { blockLen:
|
|
544
|
-
return t || (t = new
|
|
543
|
+
const { blockLen: n, suffix: o, outputLen: i, rounds: r, enableXOF: a } = this;
|
|
544
|
+
return t || (t = new C(n, o, i, a, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = o, t.outputLen = i, t.enableXOF = a, t.destroyed = this.destroyed, t;
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
const Qe = (e, t,
|
|
547
|
+
const Qe = (e, t, n) => Ke(() => new C(t, e, n)), Ze = Qe(1, 136, 256 / 8);
|
|
548
548
|
function et(e, t) {
|
|
549
|
-
return Ze(
|
|
549
|
+
return Ze(N(e, { strict: !1 }) ? Re(e) : e);
|
|
550
550
|
}
|
|
551
|
-
class tt extends
|
|
551
|
+
class tt extends h {
|
|
552
552
|
constructor({ address: t }) {
|
|
553
553
|
super(`Address "${t}" is invalid.`, {
|
|
554
554
|
metaMessages: [
|
|
@@ -569,41 +569,41 @@ class X extends Map {
|
|
|
569
569
|
}), this.maxSize = t;
|
|
570
570
|
}
|
|
571
571
|
get(t) {
|
|
572
|
-
const
|
|
573
|
-
return super.has(t) &&
|
|
572
|
+
const n = super.get(t);
|
|
573
|
+
return super.has(t) && n !== void 0 && (this.delete(t), super.set(t, n)), n;
|
|
574
574
|
}
|
|
575
|
-
set(t,
|
|
576
|
-
if (super.set(t,
|
|
575
|
+
set(t, n) {
|
|
576
|
+
if (super.set(t, n), this.maxSize && this.size > this.maxSize) {
|
|
577
577
|
const o = this.keys().next().value;
|
|
578
578
|
o && this.delete(o);
|
|
579
579
|
}
|
|
580
580
|
return this;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
const
|
|
583
|
+
const k = /* @__PURE__ */ new X(8192);
|
|
584
584
|
function q(e, t) {
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
const
|
|
585
|
+
if (k.has(`${e}.${t}`))
|
|
586
|
+
return k.get(`${e}.${t}`);
|
|
587
|
+
const n = e.substring(2).toLowerCase(), o = et(V(n)), i = n.split("");
|
|
588
588
|
for (let a = 0; a < 40; a += 2)
|
|
589
589
|
o[a >> 1] >> 4 >= 8 && i[a] && (i[a] = i[a].toUpperCase()), (o[a >> 1] & 15) >= 8 && i[a + 1] && (i[a + 1] = i[a + 1].toUpperCase());
|
|
590
590
|
const r = `0x${i.join("")}`;
|
|
591
|
-
return
|
|
591
|
+
return k.set(`${e}.${t}`, r), r;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
if (!
|
|
593
|
+
function E(e, t) {
|
|
594
|
+
if (!st(e, { strict: !1 }))
|
|
595
595
|
throw new tt({ address: e });
|
|
596
596
|
return q(e, t);
|
|
597
597
|
}
|
|
598
|
-
const
|
|
599
|
-
function
|
|
600
|
-
const { strict:
|
|
601
|
-
if (
|
|
602
|
-
return
|
|
603
|
-
const i =
|
|
604
|
-
return
|
|
598
|
+
const nt = /^0x[a-fA-F0-9]{40}$/, R = /* @__PURE__ */ new X(8192);
|
|
599
|
+
function st(e, t) {
|
|
600
|
+
const { strict: n = !0 } = t ?? {}, o = `${e}.${n}`;
|
|
601
|
+
if (R.has(o))
|
|
602
|
+
return R.get(o);
|
|
603
|
+
const i = nt.test(e) ? e.toLowerCase() === e ? !0 : n ? q(e) === e : !0 : !1;
|
|
604
|
+
return R.set(o, i), i;
|
|
605
605
|
}
|
|
606
|
-
const
|
|
606
|
+
const s = {
|
|
607
607
|
USDC: "USDC",
|
|
608
608
|
USDT: "USDT",
|
|
609
609
|
DAI: "DAI",
|
|
@@ -614,558 +614,567 @@ const n = {
|
|
|
614
614
|
STRK: "STRK",
|
|
615
615
|
BNB: "BNB",
|
|
616
616
|
LORDS: "LORDS"
|
|
617
|
-
},
|
|
617
|
+
}, Tt = s.USDC, l = {
|
|
618
618
|
[c.ARBITRUM]: {
|
|
619
|
-
[
|
|
620
|
-
address:
|
|
621
|
-
symbol:
|
|
619
|
+
[s.DAI]: {
|
|
620
|
+
address: E("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),
|
|
621
|
+
symbol: s.DAI,
|
|
622
622
|
name: "Dai Stablecoin",
|
|
623
623
|
decimals: 18,
|
|
624
|
-
logoURI: "/images/tokens/dai.png"
|
|
625
|
-
|
|
624
|
+
logoURI: "/images/tokens/dai.png",
|
|
625
|
+
nativeToken: !1
|
|
626
626
|
},
|
|
627
|
-
[
|
|
627
|
+
[s.ETH]: {
|
|
628
628
|
address: "0x0000000000000000000000000000000000000000",
|
|
629
|
-
symbol:
|
|
629
|
+
symbol: s.ETH,
|
|
630
630
|
name: "Ethereum",
|
|
631
631
|
decimals: 18,
|
|
632
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
633
|
-
|
|
632
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
633
|
+
nativeToken: !0
|
|
634
634
|
},
|
|
635
|
-
[
|
|
636
|
-
address:
|
|
637
|
-
symbol:
|
|
635
|
+
[s.USDC]: {
|
|
636
|
+
address: E("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),
|
|
637
|
+
symbol: s.USDC,
|
|
638
638
|
name: "USD Coin",
|
|
639
639
|
decimals: 6,
|
|
640
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
641
|
-
|
|
640
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
641
|
+
nativeToken: !1
|
|
642
642
|
},
|
|
643
|
-
[
|
|
644
|
-
address:
|
|
645
|
-
symbol:
|
|
643
|
+
[s.USDT]: {
|
|
644
|
+
address: E("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),
|
|
645
|
+
symbol: s.USDT,
|
|
646
646
|
name: "Tether USD",
|
|
647
647
|
decimals: 6,
|
|
648
|
-
logoURI: "/images/tokens/usdt.png"
|
|
649
|
-
|
|
648
|
+
logoURI: "/images/tokens/usdt.png",
|
|
649
|
+
nativeToken: !1
|
|
650
650
|
},
|
|
651
|
-
[
|
|
652
|
-
address:
|
|
653
|
-
symbol:
|
|
651
|
+
[s.WETH]: {
|
|
652
|
+
address: E("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
|
|
653
|
+
symbol: s.WETH,
|
|
654
654
|
name: "Wrapped Ether",
|
|
655
655
|
decimals: 18,
|
|
656
|
-
logoURI: "/images/tokens/weth.png"
|
|
657
|
-
|
|
656
|
+
logoURI: "/images/tokens/weth.png",
|
|
657
|
+
nativeToken: !1
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
660
|
[c.ARBITRUM_TESTNET]: {
|
|
661
|
-
[
|
|
662
|
-
address:
|
|
663
|
-
symbol:
|
|
661
|
+
[s.USDC]: {
|
|
662
|
+
address: E("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),
|
|
663
|
+
symbol: s.USDC,
|
|
664
664
|
name: "USD Coin",
|
|
665
665
|
fiatISO: "USD",
|
|
666
666
|
decimals: 6,
|
|
667
667
|
logoURI: "/images/tokens/usdc.svg",
|
|
668
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
668
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
669
|
+
nativeToken: !1
|
|
669
670
|
}
|
|
670
671
|
},
|
|
671
672
|
[c.AVALANCHE]: {
|
|
672
|
-
[
|
|
673
|
+
[s.DAI]: {
|
|
673
674
|
address: "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",
|
|
674
|
-
symbol:
|
|
675
|
+
symbol: s.DAI,
|
|
675
676
|
name: "Dai Stablecoin",
|
|
676
677
|
decimals: 18,
|
|
677
|
-
logoURI: "/images/tokens/dai.png"
|
|
678
|
-
|
|
678
|
+
logoURI: "/images/tokens/dai.png",
|
|
679
|
+
nativeToken: !1
|
|
679
680
|
},
|
|
680
|
-
[
|
|
681
|
-
address:
|
|
682
|
-
symbol:
|
|
681
|
+
[s.USDC]: {
|
|
682
|
+
address: E("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),
|
|
683
|
+
symbol: s.USDC,
|
|
683
684
|
name: "USD Coin",
|
|
684
685
|
fiatISO: "USD",
|
|
685
686
|
decimals: 6,
|
|
686
687
|
logoURI: "/images/tokens/usdc.svg",
|
|
687
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
688
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
689
|
+
nativeToken: !1
|
|
688
690
|
},
|
|
689
|
-
[
|
|
691
|
+
[s.USDT]: {
|
|
690
692
|
address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
|
|
691
|
-
symbol:
|
|
693
|
+
symbol: s.USDT,
|
|
692
694
|
name: "Tether USD",
|
|
693
695
|
decimals: 6,
|
|
694
|
-
logoURI: "/images/tokens/usdt.png"
|
|
695
|
-
|
|
696
|
+
logoURI: "/images/tokens/usdt.png",
|
|
697
|
+
nativeToken: !1
|
|
696
698
|
},
|
|
697
|
-
[
|
|
699
|
+
[s.WETH]: {
|
|
698
700
|
address: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",
|
|
699
|
-
symbol:
|
|
701
|
+
symbol: s.WETH,
|
|
700
702
|
name: "Wrapped Ether",
|
|
701
703
|
decimals: 18,
|
|
702
|
-
logoURI: "/images/tokens/weth.png"
|
|
703
|
-
|
|
704
|
+
logoURI: "/images/tokens/weth.png",
|
|
705
|
+
nativeToken: !1
|
|
704
706
|
}
|
|
705
707
|
},
|
|
706
708
|
[c.AVALANCHE_TESTNET]: {
|
|
707
|
-
[
|
|
708
|
-
address:
|
|
709
|
-
symbol:
|
|
709
|
+
[s.USDC]: {
|
|
710
|
+
address: E("0x5425890298aed601595a70AB815c96711a31Bc65"),
|
|
711
|
+
symbol: s.USDC,
|
|
710
712
|
name: "USD Coin",
|
|
711
713
|
fiatISO: "USD",
|
|
712
714
|
decimals: 6,
|
|
713
715
|
logoURI: "/images/tokens/usdc.svg",
|
|
714
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
716
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
717
|
+
nativeToken: !1
|
|
715
718
|
}
|
|
716
719
|
},
|
|
717
720
|
[c.BASE]: {
|
|
718
|
-
[
|
|
721
|
+
[s.DAI]: {
|
|
719
722
|
address: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
|
|
720
|
-
symbol:
|
|
723
|
+
symbol: s.DAI,
|
|
721
724
|
name: "Dai Stablecoin",
|
|
722
725
|
decimals: 18,
|
|
723
|
-
logoURI: "/images/tokens/dai.png"
|
|
724
|
-
|
|
726
|
+
logoURI: "/images/tokens/dai.png",
|
|
727
|
+
nativeToken: !1
|
|
725
728
|
},
|
|
726
|
-
[
|
|
729
|
+
[s.ETH]: {
|
|
727
730
|
address: "0x0000000000000000000000000000000000000000",
|
|
728
|
-
symbol:
|
|
731
|
+
symbol: s.ETH,
|
|
729
732
|
name: "Ethereum",
|
|
730
733
|
decimals: 18,
|
|
731
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
732
|
-
|
|
734
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
735
|
+
nativeToken: !0
|
|
733
736
|
},
|
|
734
|
-
[
|
|
737
|
+
[s.EURC]: {
|
|
735
738
|
address: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
|
|
736
|
-
symbol:
|
|
739
|
+
symbol: s.EURC,
|
|
737
740
|
name: "Euro Coin",
|
|
738
741
|
decimals: 6,
|
|
739
|
-
logoURI: "/images/tokens/eurc.png"
|
|
740
|
-
|
|
742
|
+
logoURI: "/images/tokens/eurc.png",
|
|
743
|
+
nativeToken: !1
|
|
741
744
|
},
|
|
742
|
-
[
|
|
743
|
-
address:
|
|
744
|
-
symbol:
|
|
745
|
+
[s.USDC]: {
|
|
746
|
+
address: E("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),
|
|
747
|
+
symbol: s.USDC,
|
|
745
748
|
name: "USD Coin",
|
|
746
749
|
fiatISO: "USD",
|
|
747
750
|
decimals: 6,
|
|
748
751
|
logoURI: "/images/tokens/usdc.svg",
|
|
749
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
752
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
753
|
+
nativeToken: !1
|
|
750
754
|
},
|
|
751
|
-
[
|
|
752
|
-
address:
|
|
753
|
-
symbol:
|
|
755
|
+
[s.WETH]: {
|
|
756
|
+
address: E("0x4200000000000000000000000000000000000006"),
|
|
757
|
+
symbol: s.WETH,
|
|
754
758
|
name: "Wrapped Ether",
|
|
755
759
|
decimals: 18,
|
|
756
|
-
logoURI: "/images/tokens/weth.png"
|
|
757
|
-
|
|
760
|
+
logoURI: "/images/tokens/weth.png",
|
|
761
|
+
nativeToken: !1
|
|
758
762
|
}
|
|
759
763
|
},
|
|
760
764
|
[c.BASE_TESTNET]: {
|
|
761
|
-
[
|
|
762
|
-
address:
|
|
763
|
-
symbol:
|
|
765
|
+
[s.USDC]: {
|
|
766
|
+
address: E("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),
|
|
767
|
+
symbol: s.USDC,
|
|
764
768
|
name: "USD Coin",
|
|
765
769
|
fiatISO: "USD",
|
|
766
770
|
decimals: 6,
|
|
767
771
|
logoURI: "/images/tokens/usdc.svg",
|
|
768
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
772
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
773
|
+
nativeToken: !1
|
|
769
774
|
}
|
|
770
775
|
},
|
|
771
776
|
[c.BSC]: {
|
|
772
|
-
[
|
|
777
|
+
[s.BNB]: {
|
|
773
778
|
address: "0x0000000000000000000000000000000000000000",
|
|
774
|
-
symbol:
|
|
779
|
+
symbol: s.BNB,
|
|
775
780
|
name: "BNB",
|
|
776
781
|
decimals: 18,
|
|
777
|
-
logoURI: "/images/chains/bsc.webp"
|
|
778
|
-
|
|
782
|
+
logoURI: "/images/chains/bsc.webp",
|
|
783
|
+
nativeToken: !0
|
|
779
784
|
},
|
|
780
|
-
[
|
|
785
|
+
[s.BUSD]: {
|
|
781
786
|
address: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
|
|
782
|
-
symbol:
|
|
787
|
+
symbol: s.BUSD,
|
|
783
788
|
name: "Binance USD",
|
|
784
789
|
decimals: 18,
|
|
785
|
-
logoURI: "/images/tokens/busd.png"
|
|
786
|
-
|
|
790
|
+
logoURI: "/images/tokens/busd.png",
|
|
791
|
+
nativeToken: !1
|
|
787
792
|
},
|
|
788
|
-
[
|
|
793
|
+
[s.DAI]: {
|
|
789
794
|
address: "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",
|
|
790
|
-
symbol:
|
|
795
|
+
symbol: s.DAI,
|
|
791
796
|
name: "Dai Stablecoin",
|
|
792
797
|
decimals: 18,
|
|
793
|
-
logoURI: "/images/tokens/dai.png"
|
|
794
|
-
|
|
798
|
+
logoURI: "/images/tokens/dai.png",
|
|
799
|
+
nativeToken: !1
|
|
795
800
|
},
|
|
796
|
-
[
|
|
801
|
+
[s.ETH]: {
|
|
797
802
|
address: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
|
|
798
|
-
symbol:
|
|
803
|
+
symbol: s.ETH,
|
|
799
804
|
name: "Ethereum",
|
|
800
805
|
decimals: 18,
|
|
801
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
802
|
-
|
|
806
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
807
|
+
nativeToken: !1
|
|
803
808
|
},
|
|
804
|
-
[
|
|
805
|
-
address:
|
|
806
|
-
symbol:
|
|
809
|
+
[s.USDC]: {
|
|
810
|
+
address: E("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),
|
|
811
|
+
symbol: s.USDC,
|
|
807
812
|
decimals: 18,
|
|
808
813
|
name: "USD Coin",
|
|
809
814
|
logoURI: "/images/tokens/usdc.svg",
|
|
810
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
815
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
816
|
+
nativeToken: !1
|
|
811
817
|
},
|
|
812
|
-
[
|
|
818
|
+
[s.USDT]: {
|
|
813
819
|
address: "0x55d398326f99059fF775485246999027B3197955",
|
|
814
|
-
symbol:
|
|
820
|
+
symbol: s.USDT,
|
|
815
821
|
name: "Tether USD",
|
|
816
822
|
decimals: 18,
|
|
817
|
-
logoURI: "/images/tokens/usdt.png"
|
|
818
|
-
|
|
823
|
+
logoURI: "/images/tokens/usdt.png",
|
|
824
|
+
nativeToken: !1
|
|
819
825
|
}
|
|
820
826
|
},
|
|
821
827
|
[c.ETHEREUM]: {
|
|
822
|
-
[
|
|
828
|
+
[s.BUSD]: {
|
|
823
829
|
address: "0x4Fabb145d64652a948d72533023f6E7A623C7C53",
|
|
824
|
-
symbol:
|
|
830
|
+
symbol: s.BUSD,
|
|
825
831
|
name: "Binance USD",
|
|
826
832
|
decimals: 18,
|
|
827
|
-
logoURI: "/images/tokens/busd.png"
|
|
828
|
-
|
|
833
|
+
logoURI: "/images/tokens/busd.png",
|
|
834
|
+
nativeToken: !1
|
|
829
835
|
},
|
|
830
|
-
[
|
|
831
|
-
address:
|
|
832
|
-
symbol:
|
|
836
|
+
[s.DAI]: {
|
|
837
|
+
address: E("0x6B175474E89094C44Da98b954EedeAC495271d0F"),
|
|
838
|
+
symbol: s.DAI,
|
|
833
839
|
name: "Dai Stablecoin",
|
|
834
840
|
decimals: 18,
|
|
835
|
-
logoURI: "/images/tokens/dai.png"
|
|
836
|
-
|
|
841
|
+
logoURI: "/images/tokens/dai.png",
|
|
842
|
+
nativeToken: !1
|
|
837
843
|
},
|
|
838
|
-
[
|
|
844
|
+
[s.ETH]: {
|
|
839
845
|
address: "0x0000000000000000000000000000000000000000",
|
|
840
|
-
symbol:
|
|
846
|
+
symbol: s.ETH,
|
|
841
847
|
name: "Ethereum",
|
|
842
848
|
decimals: 18,
|
|
843
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
844
|
-
|
|
849
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
850
|
+
nativeToken: !0
|
|
845
851
|
},
|
|
846
|
-
[
|
|
852
|
+
[s.EURC]: {
|
|
847
853
|
address: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
|
|
848
|
-
symbol:
|
|
854
|
+
symbol: s.EURC,
|
|
849
855
|
name: "Euro Coin",
|
|
850
856
|
decimals: 6,
|
|
851
|
-
logoURI: "/images/tokens/eurc.png"
|
|
852
|
-
|
|
857
|
+
logoURI: "/images/tokens/eurc.png",
|
|
858
|
+
nativeToken: !1
|
|
853
859
|
},
|
|
854
|
-
[
|
|
860
|
+
[s.STRK]: {
|
|
855
861
|
address: "0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",
|
|
856
|
-
symbol:
|
|
862
|
+
symbol: s.STRK,
|
|
857
863
|
name: "Starknet Token",
|
|
858
864
|
decimals: 18,
|
|
859
|
-
logoURI: "/images/chains/starknet.svg"
|
|
860
|
-
|
|
865
|
+
logoURI: "/images/chains/starknet.svg",
|
|
866
|
+
nativeToken: !1
|
|
861
867
|
},
|
|
862
|
-
[
|
|
863
|
-
address:
|
|
864
|
-
symbol:
|
|
868
|
+
[s.USDC]: {
|
|
869
|
+
address: E("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),
|
|
870
|
+
symbol: s.USDC,
|
|
865
871
|
name: "USD Coin",
|
|
866
872
|
decimals: 6,
|
|
867
873
|
logoURI: "/images/tokens/usdc.svg",
|
|
868
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
874
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
875
|
+
nativeToken: !1
|
|
869
876
|
},
|
|
870
|
-
[
|
|
871
|
-
address:
|
|
872
|
-
symbol:
|
|
877
|
+
[s.USDT]: {
|
|
878
|
+
address: E("0xdAC17F958D2ee523a2206206994597C13D831ec7"),
|
|
879
|
+
symbol: s.USDT,
|
|
873
880
|
name: "Tether USD",
|
|
874
881
|
decimals: 6,
|
|
875
|
-
logoURI: "/images/tokens/usdt.png"
|
|
876
|
-
|
|
882
|
+
logoURI: "/images/tokens/usdt.png",
|
|
883
|
+
nativeToken: !1
|
|
877
884
|
},
|
|
878
|
-
[
|
|
879
|
-
address:
|
|
880
|
-
symbol:
|
|
885
|
+
[s.WETH]: {
|
|
886
|
+
address: E("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
|
|
887
|
+
symbol: s.WETH,
|
|
881
888
|
name: "Wrapped Ether",
|
|
882
889
|
decimals: 18,
|
|
883
|
-
logoURI: "/images/tokens/weth.png"
|
|
884
|
-
|
|
890
|
+
logoURI: "/images/tokens/weth.png",
|
|
891
|
+
nativeToken: !1
|
|
885
892
|
}
|
|
886
893
|
},
|
|
887
894
|
[c.ETHEREUM_TESTNET]: {
|
|
888
|
-
[
|
|
889
|
-
address:
|
|
890
|
-
symbol:
|
|
895
|
+
[s.USDC]: {
|
|
896
|
+
address: E("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),
|
|
897
|
+
symbol: s.USDC,
|
|
891
898
|
decimals: 6,
|
|
892
899
|
name: "USD Coin",
|
|
893
900
|
logoURI: "/images/tokens/usdc.svg",
|
|
894
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
901
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
902
|
+
nativeToken: !1
|
|
895
903
|
}
|
|
896
904
|
},
|
|
897
905
|
[c.HYPEREVM]: {
|
|
898
|
-
[
|
|
906
|
+
[s.USDC]: {
|
|
899
907
|
address: "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
|
|
900
|
-
symbol:
|
|
908
|
+
symbol: s.USDC,
|
|
901
909
|
name: "USD Coin",
|
|
902
910
|
decimals: 6,
|
|
903
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
904
|
-
|
|
911
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
912
|
+
nativeToken: !1
|
|
905
913
|
}
|
|
906
914
|
},
|
|
907
915
|
[c.LISK]: {
|
|
908
|
-
[
|
|
916
|
+
[s.USDC]: {
|
|
909
917
|
address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
|
|
910
|
-
symbol:
|
|
918
|
+
symbol: s.USDC,
|
|
911
919
|
name: "USD Coin",
|
|
912
920
|
decimals: 6,
|
|
913
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
914
|
-
|
|
921
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
922
|
+
nativeToken: !1
|
|
915
923
|
}
|
|
916
924
|
},
|
|
917
925
|
[c.MONAD]: {
|
|
918
|
-
[
|
|
926
|
+
[s.USDC]: {
|
|
919
927
|
address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
|
|
920
|
-
symbol:
|
|
928
|
+
symbol: s.USDC,
|
|
921
929
|
name: "USD Coin",
|
|
922
930
|
decimals: 6,
|
|
923
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
924
|
-
|
|
931
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
932
|
+
nativeToken: !1
|
|
925
933
|
}
|
|
926
934
|
},
|
|
927
935
|
[c.MONAD_TESTNET]: {
|
|
928
|
-
[
|
|
936
|
+
[s.USDC]: {
|
|
929
937
|
address: "0x534b2f3A21130d7a60830c2Df862319e593943A3",
|
|
930
|
-
symbol:
|
|
938
|
+
symbol: s.USDC,
|
|
931
939
|
name: "USD Coin",
|
|
932
940
|
decimals: 6,
|
|
933
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
934
|
-
|
|
941
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
942
|
+
nativeToken: !1
|
|
935
943
|
}
|
|
936
944
|
},
|
|
937
945
|
[c.OPTIMISM]: {
|
|
938
|
-
[
|
|
946
|
+
[s.DAI]: {
|
|
939
947
|
address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
|
|
940
|
-
symbol:
|
|
948
|
+
symbol: s.DAI,
|
|
941
949
|
name: "Dai Stablecoin",
|
|
942
950
|
decimals: 18,
|
|
943
|
-
logoURI: "/images/tokens/dai.png"
|
|
944
|
-
|
|
951
|
+
logoURI: "/images/tokens/dai.png",
|
|
952
|
+
nativeToken: !1
|
|
945
953
|
},
|
|
946
|
-
[
|
|
954
|
+
[s.ETH]: {
|
|
947
955
|
address: "0x0000000000000000000000000000000000000000",
|
|
948
|
-
symbol:
|
|
956
|
+
symbol: s.ETH,
|
|
949
957
|
name: "Ethereum",
|
|
950
958
|
decimals: 18,
|
|
951
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
952
|
-
|
|
959
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
960
|
+
nativeToken: !0
|
|
953
961
|
},
|
|
954
|
-
[
|
|
962
|
+
[s.USDC]: {
|
|
955
963
|
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
956
|
-
symbol:
|
|
964
|
+
symbol: s.USDC,
|
|
957
965
|
name: "USD Coin",
|
|
958
966
|
decimals: 6,
|
|
959
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
960
|
-
|
|
967
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
968
|
+
nativeToken: !1
|
|
961
969
|
},
|
|
962
|
-
[
|
|
970
|
+
[s.USDT]: {
|
|
963
971
|
address: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
|
|
964
|
-
symbol:
|
|
972
|
+
symbol: s.USDT,
|
|
965
973
|
name: "Tether USD",
|
|
966
974
|
decimals: 6,
|
|
967
|
-
logoURI: "/images/tokens/usdt.png"
|
|
968
|
-
|
|
975
|
+
logoURI: "/images/tokens/usdt.png",
|
|
976
|
+
nativeToken: !1
|
|
969
977
|
},
|
|
970
|
-
[
|
|
978
|
+
[s.WETH]: {
|
|
971
979
|
address: "0x4200000000000000000000000000000000000006",
|
|
972
|
-
symbol:
|
|
980
|
+
symbol: s.WETH,
|
|
973
981
|
name: "Wrapped Ether",
|
|
974
982
|
decimals: 18,
|
|
975
|
-
logoURI: "/images/tokens/weth.png"
|
|
976
|
-
|
|
983
|
+
logoURI: "/images/tokens/weth.png",
|
|
984
|
+
nativeToken: !1
|
|
977
985
|
}
|
|
978
986
|
},
|
|
979
987
|
[c.OPTIMISM_TESTNET]: {
|
|
980
|
-
[
|
|
988
|
+
[s.USDC]: {
|
|
981
989
|
address: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
|
|
982
|
-
symbol:
|
|
990
|
+
symbol: s.USDC,
|
|
983
991
|
name: "USD Coin",
|
|
984
992
|
decimals: 6,
|
|
985
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
986
|
-
|
|
993
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
994
|
+
nativeToken: !1
|
|
987
995
|
}
|
|
988
996
|
},
|
|
989
997
|
[c.POLYGON]: {
|
|
990
|
-
[
|
|
998
|
+
[s.DAI]: {
|
|
991
999
|
address: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
|
|
992
|
-
symbol:
|
|
1000
|
+
symbol: s.DAI,
|
|
993
1001
|
name: "Dai Stablecoin",
|
|
994
1002
|
decimals: 18,
|
|
995
|
-
logoURI: "/images/tokens/dai.png"
|
|
996
|
-
|
|
1003
|
+
logoURI: "/images/tokens/dai.png",
|
|
1004
|
+
nativeToken: !1
|
|
997
1005
|
},
|
|
998
|
-
[
|
|
1006
|
+
[s.USDC]: {
|
|
999
1007
|
address: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
1000
|
-
symbol:
|
|
1008
|
+
symbol: s.USDC,
|
|
1001
1009
|
name: "USD Coin",
|
|
1002
1010
|
decimals: 6,
|
|
1003
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
1004
|
-
|
|
1011
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
1012
|
+
nativeToken: !1
|
|
1005
1013
|
},
|
|
1006
|
-
[
|
|
1014
|
+
[s.USDT]: {
|
|
1007
1015
|
address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
|
|
1008
|
-
symbol:
|
|
1016
|
+
symbol: s.USDT,
|
|
1009
1017
|
name: "Tether USD",
|
|
1010
1018
|
decimals: 6,
|
|
1011
|
-
logoURI: "/images/tokens/usdt.png"
|
|
1012
|
-
|
|
1019
|
+
logoURI: "/images/tokens/usdt.png",
|
|
1020
|
+
nativeToken: !1
|
|
1013
1021
|
},
|
|
1014
|
-
[
|
|
1022
|
+
[s.WETH]: {
|
|
1015
1023
|
address: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
|
|
1016
|
-
symbol:
|
|
1024
|
+
symbol: s.WETH,
|
|
1017
1025
|
name: "Wrapped Ether",
|
|
1018
1026
|
decimals: 18,
|
|
1019
|
-
logoURI: "/images/tokens/weth.png"
|
|
1020
|
-
|
|
1027
|
+
logoURI: "/images/tokens/weth.png",
|
|
1028
|
+
nativeToken: !1
|
|
1021
1029
|
}
|
|
1022
1030
|
},
|
|
1023
1031
|
[c.STARKNET]: {
|
|
1024
|
-
[
|
|
1032
|
+
[s.DAI]: {
|
|
1025
1033
|
address: "0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",
|
|
1026
|
-
symbol:
|
|
1034
|
+
symbol: s.DAI,
|
|
1027
1035
|
name: "Dai Stablecoin",
|
|
1028
1036
|
decimals: 18,
|
|
1029
|
-
logoURI: "/images/tokens/dai.png"
|
|
1030
|
-
|
|
1037
|
+
logoURI: "/images/tokens/dai.png",
|
|
1038
|
+
nativeToken: !1
|
|
1031
1039
|
},
|
|
1032
|
-
[
|
|
1040
|
+
[s.ETH]: {
|
|
1033
1041
|
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
1034
|
-
symbol:
|
|
1042
|
+
symbol: s.ETH,
|
|
1035
1043
|
name: "Ethereum",
|
|
1036
1044
|
decimals: 18,
|
|
1037
|
-
logoURI: "/images/chains/ethereum.svg"
|
|
1038
|
-
|
|
1045
|
+
logoURI: "/images/chains/ethereum.svg",
|
|
1046
|
+
nativeToken: !1
|
|
1039
1047
|
},
|
|
1040
|
-
[
|
|
1048
|
+
[s.LORDS]: {
|
|
1041
1049
|
address: "0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",
|
|
1042
|
-
symbol:
|
|
1050
|
+
symbol: s.LORDS,
|
|
1043
1051
|
name: "LORDS Token",
|
|
1044
1052
|
decimals: 18,
|
|
1045
|
-
logoURI: "/images/tokens/lords.png"
|
|
1046
|
-
|
|
1053
|
+
logoURI: "/images/tokens/lords.png",
|
|
1054
|
+
nativeToken: !1
|
|
1047
1055
|
},
|
|
1048
|
-
[
|
|
1056
|
+
[s.STRK]: {
|
|
1049
1057
|
address: "0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",
|
|
1050
|
-
symbol:
|
|
1058
|
+
symbol: s.STRK,
|
|
1051
1059
|
name: "Starknet Token",
|
|
1052
1060
|
decimals: 18,
|
|
1053
|
-
logoURI: "/images/chains/starknet.svg"
|
|
1054
|
-
|
|
1061
|
+
logoURI: "/images/chains/starknet.svg",
|
|
1062
|
+
nativeToken: !1
|
|
1055
1063
|
},
|
|
1056
|
-
[
|
|
1064
|
+
[s.USDC]: {
|
|
1057
1065
|
address: "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
|
|
1058
|
-
symbol:
|
|
1066
|
+
symbol: s.USDC,
|
|
1059
1067
|
name: "USD Coin",
|
|
1060
1068
|
decimals: 6,
|
|
1061
1069
|
logoURI: "/images/tokens/usdc.svg",
|
|
1062
|
-
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png"
|
|
1070
|
+
logoSourceURI: "https://pay.daimo.com/coin-logos/usdc.png",
|
|
1071
|
+
nativeToken: !1
|
|
1063
1072
|
},
|
|
1064
|
-
[
|
|
1073
|
+
[s.USDT]: {
|
|
1065
1074
|
address: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
|
|
1066
|
-
symbol:
|
|
1075
|
+
symbol: s.USDT,
|
|
1067
1076
|
name: "Tether USD",
|
|
1068
1077
|
decimals: 6,
|
|
1069
|
-
logoURI: "/images/tokens/usdt.png"
|
|
1070
|
-
|
|
1078
|
+
logoURI: "/images/tokens/usdt.png",
|
|
1079
|
+
nativeToken: !1
|
|
1071
1080
|
}
|
|
1072
1081
|
},
|
|
1073
1082
|
[c.STARKNET_TESTNET]: {
|
|
1074
|
-
[
|
|
1083
|
+
[s.USDC]: {
|
|
1075
1084
|
address: "0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",
|
|
1076
|
-
symbol:
|
|
1085
|
+
symbol: s.USDC,
|
|
1077
1086
|
name: "USD Coin",
|
|
1078
1087
|
decimals: 6,
|
|
1079
|
-
logoURI: "/images/tokens/usdc.svg"
|
|
1080
|
-
|
|
1088
|
+
logoURI: "/images/tokens/usdc.svg",
|
|
1089
|
+
nativeToken: !1
|
|
1081
1090
|
}
|
|
1082
1091
|
}
|
|
1092
|
+
}, mt = {
|
|
1093
|
+
ARBITRUM: l[c.ARBITRUM],
|
|
1094
|
+
ARBITRUM_TESTNET: l[c.ARBITRUM_TESTNET],
|
|
1095
|
+
AVALANCHE: l[c.AVALANCHE],
|
|
1096
|
+
AVALANCHE_TESTNET: l[c.AVALANCHE_TESTNET],
|
|
1097
|
+
BASE: l[c.BASE],
|
|
1098
|
+
BASE_TESTNET: l[c.BASE_TESTNET],
|
|
1099
|
+
BSC: l[c.BSC],
|
|
1100
|
+
ETHEREUM: l[c.ETHEREUM],
|
|
1101
|
+
ETHEREUM_TESTNET: l[c.ETHEREUM_TESTNET],
|
|
1102
|
+
STARKNET: l[c.STARKNET]
|
|
1083
1103
|
}, Et = {
|
|
1084
|
-
ARBITRUM: d[c.ARBITRUM],
|
|
1085
|
-
ARBITRUM_TESTNET: d[c.ARBITRUM_TESTNET],
|
|
1086
|
-
AVALANCHE: d[c.AVALANCHE],
|
|
1087
|
-
AVALANCHE_TESTNET: d[c.AVALANCHE_TESTNET],
|
|
1088
|
-
BASE: d[c.BASE],
|
|
1089
|
-
BASE_TESTNET: d[c.BASE_TESTNET],
|
|
1090
|
-
BSC: d[c.BSC],
|
|
1091
|
-
ETHEREUM: d[c.ETHEREUM],
|
|
1092
|
-
ETHEREUM_TESTNET: d[c.ETHEREUM_TESTNET],
|
|
1093
|
-
STARKNET: d[c.STARKNET]
|
|
1094
|
-
}, ut = {
|
|
1095
1104
|
ARBITRUM_MAINNET: {
|
|
1096
|
-
...
|
|
1097
|
-
tokens:
|
|
1105
|
+
...ne,
|
|
1106
|
+
tokens: l[c.ARBITRUM]
|
|
1098
1107
|
},
|
|
1099
1108
|
ARBITRUM_TESTNET: {
|
|
1100
|
-
...
|
|
1101
|
-
tokens:
|
|
1109
|
+
...se,
|
|
1110
|
+
tokens: l[c.ARBITRUM_TESTNET]
|
|
1102
1111
|
},
|
|
1103
1112
|
AVALANCHE_MAINNET: {
|
|
1104
1113
|
...oe,
|
|
1105
|
-
tokens:
|
|
1114
|
+
tokens: l[c.AVALANCHE]
|
|
1106
1115
|
},
|
|
1107
1116
|
AVALANCHE_TESTNET: {
|
|
1108
1117
|
...ie,
|
|
1109
|
-
tokens:
|
|
1118
|
+
tokens: l[c.AVALANCHE_TESTNET]
|
|
1110
1119
|
},
|
|
1111
1120
|
BASE_MAINNET: {
|
|
1112
1121
|
...ae,
|
|
1113
|
-
tokens:
|
|
1122
|
+
tokens: l[c.BASE]
|
|
1114
1123
|
},
|
|
1115
1124
|
BASE_TESTNET: {
|
|
1116
1125
|
...re,
|
|
1117
|
-
tokens:
|
|
1126
|
+
tokens: l[c.BASE_TESTNET]
|
|
1118
1127
|
},
|
|
1119
1128
|
BSC_MAINNET: {
|
|
1120
1129
|
...ce,
|
|
1121
|
-
tokens:
|
|
1130
|
+
tokens: l[c.BSC]
|
|
1122
1131
|
},
|
|
1123
1132
|
ETHEREUM_MAINNET: {
|
|
1124
|
-
...
|
|
1125
|
-
tokens:
|
|
1133
|
+
...le,
|
|
1134
|
+
tokens: l[c.ETHEREUM]
|
|
1126
1135
|
},
|
|
1127
1136
|
ETHEREUM_TESTNET: {
|
|
1128
|
-
...
|
|
1129
|
-
tokens:
|
|
1137
|
+
...de,
|
|
1138
|
+
tokens: l[c.ETHEREUM_TESTNET]
|
|
1130
1139
|
},
|
|
1131
1140
|
HYPEREVM_MAINNET: {
|
|
1132
|
-
...
|
|
1133
|
-
tokens:
|
|
1141
|
+
...Te,
|
|
1142
|
+
tokens: l[c.HYPEREVM]
|
|
1134
1143
|
},
|
|
1135
1144
|
LISK_MAINNET: {
|
|
1136
|
-
...
|
|
1137
|
-
tokens:
|
|
1145
|
+
...me,
|
|
1146
|
+
tokens: l[c.LISK]
|
|
1138
1147
|
},
|
|
1139
1148
|
MONAD_MAINNET: {
|
|
1140
|
-
...
|
|
1141
|
-
tokens:
|
|
1149
|
+
...Ee,
|
|
1150
|
+
tokens: l[c.MONAD]
|
|
1142
1151
|
},
|
|
1143
1152
|
MONAD_TESTNET: {
|
|
1144
|
-
...
|
|
1145
|
-
tokens:
|
|
1153
|
+
...fe,
|
|
1154
|
+
tokens: l[c.MONAD_TESTNET]
|
|
1146
1155
|
},
|
|
1147
1156
|
OPTIMISM_MAINNET: {
|
|
1148
|
-
...
|
|
1149
|
-
tokens:
|
|
1157
|
+
...ue,
|
|
1158
|
+
tokens: l[c.OPTIMISM]
|
|
1150
1159
|
},
|
|
1151
1160
|
OPTIMISM_TESTNET: {
|
|
1152
|
-
...
|
|
1153
|
-
tokens:
|
|
1161
|
+
...he,
|
|
1162
|
+
tokens: l[c.OPTIMISM_TESTNET]
|
|
1154
1163
|
},
|
|
1155
1164
|
POLYGON_MAINNET: {
|
|
1156
|
-
...
|
|
1157
|
-
tokens:
|
|
1165
|
+
...ge,
|
|
1166
|
+
tokens: l[c.POLYGON]
|
|
1158
1167
|
},
|
|
1159
1168
|
STARKNET_MAINNET: {
|
|
1160
1169
|
...pe,
|
|
1161
|
-
tokens:
|
|
1170
|
+
tokens: l[c.STARKNET]
|
|
1162
1171
|
},
|
|
1163
1172
|
STARKNET_TESTNET: {
|
|
1164
1173
|
...Se,
|
|
1165
|
-
tokens:
|
|
1174
|
+
tokens: l[c.STARKNET_TESTNET]
|
|
1166
1175
|
}
|
|
1167
1176
|
}, ot = new Set(Object.values(c));
|
|
1168
|
-
function
|
|
1177
|
+
function ft(e) {
|
|
1169
1178
|
if (it(e))
|
|
1170
1179
|
return e;
|
|
1171
1180
|
const t = c[e];
|
|
@@ -1173,26 +1182,26 @@ function Tt(e) {
|
|
|
1173
1182
|
throw new Error(`Invalid chain: ${e}. Chain must be a valid chain alias or internal chain value from Chains.`);
|
|
1174
1183
|
return t;
|
|
1175
1184
|
}
|
|
1176
|
-
function
|
|
1177
|
-
for (const [t,
|
|
1178
|
-
if (
|
|
1185
|
+
function ut(e) {
|
|
1186
|
+
for (const [t, n] of Object.entries(c))
|
|
1187
|
+
if (n === e)
|
|
1179
1188
|
return t;
|
|
1180
1189
|
throw new Error(`Invalid internal chain value: ${e}. Internal chain value must be a valid value from InternalChains.`);
|
|
1181
1190
|
}
|
|
1182
|
-
function
|
|
1191
|
+
function ht(e) {
|
|
1183
1192
|
return e in te;
|
|
1184
1193
|
}
|
|
1185
1194
|
function it(e) {
|
|
1186
1195
|
return ot.has(e);
|
|
1187
1196
|
}
|
|
1188
|
-
function
|
|
1197
|
+
function gt(e, t) {
|
|
1189
1198
|
if (e.symbol !== t)
|
|
1190
1199
|
throw new Error(
|
|
1191
1200
|
`Token symbol mismatch: token is ${e.symbol}, tokenSymbol is ${t}. The token symbol must match the tokenSymbol parameter.`
|
|
1192
1201
|
);
|
|
1193
1202
|
}
|
|
1194
1203
|
function at(e, t) {
|
|
1195
|
-
const
|
|
1204
|
+
const n = t.toLowerCase().trim(), o = l[e];
|
|
1196
1205
|
if (!o)
|
|
1197
1206
|
throw new Error(
|
|
1198
1207
|
`Chain not found: ${e}. The chain key must be a valid chain identifier.`
|
|
@@ -1200,7 +1209,7 @@ function at(e, t) {
|
|
|
1200
1209
|
let i;
|
|
1201
1210
|
for (const r in o) {
|
|
1202
1211
|
const a = o[r];
|
|
1203
|
-
if (a && a.address.toLowerCase() ===
|
|
1212
|
+
if (a && a.address.toLowerCase() === n.toLowerCase()) {
|
|
1204
1213
|
i = a;
|
|
1205
1214
|
break;
|
|
1206
1215
|
}
|
|
@@ -1217,16 +1226,16 @@ function pt(e, t) {
|
|
|
1217
1226
|
`Token symbol mismatch: token symbol is "${e.symbol}", expected "${t}". The token symbol must match the expected token symbol.`
|
|
1218
1227
|
);
|
|
1219
1228
|
}
|
|
1220
|
-
function St(e, t,
|
|
1229
|
+
function St(e, t, n) {
|
|
1221
1230
|
const o = at(e, t);
|
|
1222
|
-
if (o.symbol !==
|
|
1231
|
+
if (o.symbol !== n)
|
|
1223
1232
|
throw new Error(
|
|
1224
|
-
`Token address and symbol mismatch: address ${t} on chain ${e} corresponds to token "${o.symbol}", but expected "${
|
|
1233
|
+
`Token address and symbol mismatch: address ${t} on chain ${e} corresponds to token "${o.symbol}", but expected "${n}". The token address must correspond to a token with the expected symbol on the specified chain.`
|
|
1225
1234
|
);
|
|
1226
1235
|
return o;
|
|
1227
1236
|
}
|
|
1228
1237
|
function J(e, t) {
|
|
1229
|
-
return
|
|
1238
|
+
return l[e]?.[t];
|
|
1230
1239
|
}
|
|
1231
1240
|
function At(e, t) {
|
|
1232
1241
|
return J(e, t)?.address;
|
|
@@ -1235,42 +1244,42 @@ function bt(e, t) {
|
|
|
1235
1244
|
return J(e, t)?.decimals;
|
|
1236
1245
|
}
|
|
1237
1246
|
var Q = /* @__PURE__ */ ((e) => (e.PRODUCTION = "production", e.STAGING = "staging", e))(Q || {});
|
|
1238
|
-
class
|
|
1239
|
-
constructor({ api_key: t, env:
|
|
1240
|
-
this.api_key = t || "", this.sessionToken = o || "", this.env =
|
|
1247
|
+
class T {
|
|
1248
|
+
constructor({ api_key: t, env: n, seesion_token: o, props: i }) {
|
|
1249
|
+
this.api_key = t || "", this.sessionToken = o || "", this.env = n ?? Q.PRODUCTION, this.props = i;
|
|
1241
1250
|
}
|
|
1242
1251
|
static async config(t) {
|
|
1243
|
-
if (!
|
|
1252
|
+
if (!T.app) {
|
|
1244
1253
|
if (!t)
|
|
1245
1254
|
throw new Error("Please provide an api_key");
|
|
1246
|
-
|
|
1255
|
+
T.app = new T(t);
|
|
1247
1256
|
}
|
|
1248
|
-
return t && (t.api_key !== void 0 && (
|
|
1257
|
+
return t && (t.api_key !== void 0 && (T.app.api_key = t.api_key), t.seesion_token !== void 0 && (T.app.sessionToken = t.seesion_token), t.env !== void 0 && (T.app.env = t.env), t.props !== void 0 && (T.app.props = t.props)), T.app;
|
|
1249
1258
|
}
|
|
1250
1259
|
static getApiKey() {
|
|
1251
|
-
if (!
|
|
1260
|
+
if (!T.app)
|
|
1252
1261
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1253
|
-
return
|
|
1262
|
+
return T.app.api_key;
|
|
1254
1263
|
}
|
|
1255
1264
|
static getSessionToken() {
|
|
1256
|
-
if (!
|
|
1265
|
+
if (!T.app)
|
|
1257
1266
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1258
|
-
return
|
|
1267
|
+
return T.app.sessionToken;
|
|
1259
1268
|
}
|
|
1260
1269
|
static getProps() {
|
|
1261
|
-
if (!
|
|
1270
|
+
if (!T.app)
|
|
1262
1271
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1263
|
-
return
|
|
1272
|
+
return T.app.props;
|
|
1264
1273
|
}
|
|
1265
1274
|
static getEnv() {
|
|
1266
|
-
if (!
|
|
1275
|
+
if (!T.app)
|
|
1267
1276
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1268
|
-
return
|
|
1277
|
+
return T.app.env === "internal" ? "staging" : T.app.env;
|
|
1269
1278
|
}
|
|
1270
1279
|
static getBaseUrl() {
|
|
1271
|
-
if (!
|
|
1280
|
+
if (!T.app)
|
|
1272
1281
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1273
|
-
switch (
|
|
1282
|
+
switch (T.app.env) {
|
|
1274
1283
|
case "production":
|
|
1275
1284
|
return "https://api.chainrails.io/api/v1";
|
|
1276
1285
|
case "staging":
|
|
@@ -1282,27 +1291,27 @@ class m {
|
|
|
1282
1291
|
}
|
|
1283
1292
|
}
|
|
1284
1293
|
static getPayModalUrl(t) {
|
|
1285
|
-
if (!
|
|
1294
|
+
if (!T.app)
|
|
1286
1295
|
throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1296
|
+
const n = T.app.env === "internal" ? "https://chainrails-frontend-git-staging-horus-labs.vercel.app" : "https://app.chainrails.io", o = Number(t), i = t && !isNaN(Number(t)) && o > 0 ? "/pay/" : "/deposit/", r = `${t && !isNaN(Number(t)) && o > 0 ? o * 100 : ""}`;
|
|
1297
|
+
return n + i + r;
|
|
1289
1298
|
}
|
|
1290
1299
|
}
|
|
1291
1300
|
export {
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1301
|
+
s as AmountSymbols,
|
|
1302
|
+
m as ChainTypes,
|
|
1303
|
+
T as Chainrails,
|
|
1295
1304
|
te as Chains,
|
|
1296
|
-
|
|
1305
|
+
Tt as DEFAULT_AMOUNT_SYMBOL,
|
|
1297
1306
|
c as InternalChains,
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1307
|
+
l as TOKEN_REGISTRY,
|
|
1308
|
+
mt as Tokens,
|
|
1309
|
+
Et as allChains,
|
|
1310
|
+
ne as arbitrum,
|
|
1311
|
+
se as arbitrumTestnet,
|
|
1303
1312
|
at as assertTokenAddressMatchesChain,
|
|
1304
1313
|
St as assertTokenAddressMatchesChainAndSymbol,
|
|
1305
|
-
|
|
1314
|
+
gt as assertTokenMatchesAmountSymbol,
|
|
1306
1315
|
pt as assertTokenSymbolMatches,
|
|
1307
1316
|
oe as avalanche,
|
|
1308
1317
|
ie as avalancheTestnet,
|
|
@@ -1311,25 +1320,25 @@ export {
|
|
|
1311
1320
|
ce as bsc,
|
|
1312
1321
|
rt as celo,
|
|
1313
1322
|
Q as environment,
|
|
1314
|
-
|
|
1315
|
-
|
|
1323
|
+
le as ethereum,
|
|
1324
|
+
de as ethereumTestnet,
|
|
1316
1325
|
J as getToken,
|
|
1317
1326
|
At as getTokenAddress,
|
|
1318
1327
|
bt as getTokenDecimals,
|
|
1319
|
-
|
|
1320
|
-
|
|
1328
|
+
Te as hyperevm,
|
|
1329
|
+
ht as isChainAlias,
|
|
1321
1330
|
it as isInternalChain,
|
|
1322
1331
|
ct as linea,
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1332
|
+
me as lisk,
|
|
1333
|
+
Ee as monad,
|
|
1334
|
+
fe as monadTestnet,
|
|
1335
|
+
ue as optimism,
|
|
1336
|
+
he as optimismTestnet,
|
|
1337
|
+
ge as polygon,
|
|
1329
1338
|
pe as starknet,
|
|
1330
1339
|
Se as starknetTestnet,
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1340
|
+
ut as toChainAlias,
|
|
1341
|
+
ft as toInternalChain,
|
|
1342
|
+
lt as unichain,
|
|
1343
|
+
dt as worldchain
|
|
1335
1344
|
};
|