@chainrails/sdk 0.2.8 → 0.2.9

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