@chainrails/common 0.2.4 → 0.2.6

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