@paywithglide/glide-react 0.0.44 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/glide.js CHANGED
@@ -1,34 +1,34 @@
1
- var ee = Object.defineProperty;
2
- var te = (s, t, e) => t in s ? ee(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var j = (s, t, e) => te(s, typeof t != "symbol" ? t + "" : t, e);
1
+ var te = Object.defineProperty;
2
+ var se = (s, t, e) => t in s ? te(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var W = (s, t, e) => se(s, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { useMemo as G } from "react";
5
- function se(s, { strict: t = !0 } = {}) {
5
+ function ie(s, { strict: t = !0 } = {}) {
6
6
  return !s || typeof s != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(s) : s.startsWith("0x");
7
7
  }
8
8
  function q(s) {
9
- return se(s, { strict: !1 }) ? Math.ceil((s.length - 2) / 2) : s.length;
9
+ return ie(s, { strict: !1 }) ? Math.ceil((s.length - 2) / 2) : s.length;
10
10
  }
11
- const N = "2.21.51";
11
+ const V = "2.21.51";
12
12
  let L = {
13
13
  getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
14
- version: `viem@${N}`
14
+ version: `viem@${V}`
15
15
  };
16
- class z extends Error {
16
+ class A extends Error {
17
17
  constructor(t, e = {}) {
18
18
  var d;
19
19
  const i = (() => {
20
20
  var a;
21
- return e.cause instanceof z ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
22
- })(), o = e.cause instanceof z && e.cause.docsPath || e.docsPath, r = (d = L.getDocsUrl) == null ? void 0 : d.call(L, { ...e, docsPath: o }), p = [
21
+ return e.cause instanceof A ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
22
+ })(), o = e.cause instanceof A && e.cause.docsPath || e.docsPath, n = (d = L.getDocsUrl) == null ? void 0 : d.call(L, { ...e, docsPath: o }), c = [
23
23
  t || "An error occurred.",
24
24
  "",
25
25
  ...e.metaMessages ? [...e.metaMessages, ""] : [],
26
- ...r ? [`Docs: ${r}`] : [],
26
+ ...n ? [`Docs: ${n}`] : [],
27
27
  ...i ? [`Details: ${i}`] : [],
28
28
  ...L.version ? [`Version: ${L.version}`] : []
29
29
  ].join(`
30
30
  `);
31
- super(p, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
31
+ super(c, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
32
32
  enumerable: !0,
33
33
  configurable: !0,
34
34
  writable: !0,
@@ -58,151 +58,151 @@ class z extends Error {
58
58
  configurable: !0,
59
59
  writable: !0,
60
60
  value: "BaseError"
61
- }), this.details = i, this.docsPath = o, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = N;
61
+ }), this.details = i, this.docsPath = o, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = V;
62
62
  }
63
63
  walk(t) {
64
- return V(this, t);
64
+ return F(this, t);
65
65
  }
66
66
  }
67
- function V(s, t) {
68
- return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause !== void 0 ? V(s.cause, t) : t ? null : s;
67
+ function F(s, t) {
68
+ return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause !== void 0 ? F(s.cause, t) : t ? null : s;
69
69
  }
70
- class F extends z {
70
+ class J extends A {
71
71
  constructor({ size: t, targetSize: e, type: i }) {
72
72
  super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`, { name: "SizeExceedsPaddingSizeError" });
73
73
  }
74
74
  }
75
- function O(s, { dir: t, size: e = 32 } = {}) {
76
- return typeof s == "string" ? ie(s, { dir: t, size: e }) : oe(s, { dir: t, size: e });
75
+ function H(s, { dir: t, size: e = 32 } = {}) {
76
+ return typeof s == "string" ? oe(s, { dir: t, size: e }) : ne(s, { dir: t, size: e });
77
77
  }
78
- function ie(s, { dir: t, size: e = 32 } = {}) {
78
+ function oe(s, { dir: t, size: e = 32 } = {}) {
79
79
  if (e === null)
80
80
  return s;
81
81
  const i = s.replace("0x", "");
82
82
  if (i.length > e * 2)
83
- throw new F({
83
+ throw new J({
84
84
  size: Math.ceil(i.length / 2),
85
85
  targetSize: e,
86
86
  type: "hex"
87
87
  });
88
88
  return `0x${i[t === "right" ? "padEnd" : "padStart"](e * 2, "0")}`;
89
89
  }
90
- function oe(s, { dir: t, size: e = 32 } = {}) {
90
+ function ne(s, { dir: t, size: e = 32 } = {}) {
91
91
  if (e === null)
92
92
  return s;
93
93
  if (s.length > e)
94
- throw new F({
94
+ throw new J({
95
95
  size: s.length,
96
96
  targetSize: e,
97
97
  type: "bytes"
98
98
  });
99
99
  const i = new Uint8Array(e);
100
100
  for (let o = 0; o < e; o++) {
101
- const r = t === "right";
102
- i[r ? o : e - o - 1] = s[r ? o : s.length - o - 1];
101
+ const n = t === "right";
102
+ i[n ? o : e - o - 1] = s[n ? o : s.length - o - 1];
103
103
  }
104
104
  return i;
105
105
  }
106
- class re extends z {
107
- constructor({ max: t, min: e, signed: i, size: o, value: r }) {
108
- super(`Number "${r}" is not in safe ${o ? `${o * 8}-bit ${i ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${e} to ${t})` : `(above ${e})`}`, { name: "IntegerOutOfRangeError" });
106
+ class re extends A {
107
+ constructor({ max: t, min: e, signed: i, size: o, value: n }) {
108
+ super(`Number "${n}" is not in safe ${o ? `${o * 8}-bit ${i ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${e} to ${t})` : `(above ${e})`}`, { name: "IntegerOutOfRangeError" });
109
109
  }
110
110
  }
111
- class ne extends z {
111
+ class ae extends A {
112
112
  constructor({ givenSize: t, maxSize: e }) {
113
113
  super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
114
114
  }
115
115
  }
116
- function J(s, { size: t }) {
116
+ function _(s, { size: t }) {
117
117
  if (q(s) > t)
118
- throw new ne({
118
+ throw new ae({
119
119
  givenSize: q(s),
120
120
  maxSize: t
121
121
  });
122
122
  }
123
- const ae = /* @__PURE__ */ Array.from({ length: 256 }, (s, t) => t.toString(16).padStart(2, "0"));
124
- function de(s, t = {}) {
125
- return typeof s == "number" || typeof s == "bigint" ? ce(s, t) : typeof s == "string" ? he(s, t) : typeof s == "boolean" ? pe(s, t) : X(s, t);
123
+ const de = /* @__PURE__ */ Array.from({ length: 256 }, (s, t) => t.toString(16).padStart(2, "0"));
124
+ function ce(s, t = {}) {
125
+ return typeof s == "number" || typeof s == "bigint" ? le(s, t) : typeof s == "string" ? ue(s, t) : typeof s == "boolean" ? pe(s, t) : X(s, t);
126
126
  }
127
127
  function pe(s, t = {}) {
128
128
  const e = `0x${Number(s)}`;
129
- return typeof t.size == "number" ? (J(e, { size: t.size }), O(e, { size: t.size })) : e;
129
+ return typeof t.size == "number" ? (_(e, { size: t.size }), H(e, { size: t.size })) : e;
130
130
  }
131
131
  function X(s, t = {}) {
132
132
  let e = "";
133
133
  for (let o = 0; o < s.length; o++)
134
- e += ae[s[o]];
134
+ e += de[s[o]];
135
135
  const i = `0x${e}`;
136
- return typeof t.size == "number" ? (J(i, { size: t.size }), O(i, { dir: "right", size: t.size })) : i;
136
+ return typeof t.size == "number" ? (_(i, { size: t.size }), H(i, { dir: "right", size: t.size })) : i;
137
137
  }
138
- function ce(s, t = {}) {
138
+ function le(s, t = {}) {
139
139
  const { signed: e, size: i } = t, o = BigInt(s);
140
- let r;
141
- i ? e ? r = (1n << BigInt(i) * 8n - 1n) - 1n : r = 2n ** (BigInt(i) * 8n) - 1n : typeof s == "number" && (r = BigInt(Number.MAX_SAFE_INTEGER));
142
- const p = typeof r == "bigint" && e ? -r - 1n : 0;
143
- if (r && o > r || o < p) {
140
+ let n;
141
+ i ? e ? n = (1n << BigInt(i) * 8n - 1n) - 1n : n = 2n ** (BigInt(i) * 8n) - 1n : typeof s == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
142
+ const c = typeof n == "bigint" && e ? -n - 1n : 0;
143
+ if (n && o > n || o < c) {
144
144
  const a = typeof s == "bigint" ? "n" : "";
145
145
  throw new re({
146
- max: r ? `${r}${a}` : void 0,
147
- min: `${p}${a}`,
146
+ max: n ? `${n}${a}` : void 0,
147
+ min: `${c}${a}`,
148
148
  signed: e,
149
149
  size: i,
150
150
  value: `${s}${a}`
151
151
  });
152
152
  }
153
153
  const d = `0x${(e && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
154
- return i ? O(d, { size: i }) : d;
154
+ return i ? H(d, { size: i }) : d;
155
155
  }
156
- const le = /* @__PURE__ */ new TextEncoder();
157
- function he(s, t = {}) {
158
- const e = le.encode(s);
156
+ const he = /* @__PURE__ */ new TextEncoder();
157
+ function ue(s, t = {}) {
158
+ const e = he.encode(s);
159
159
  return X(e, t);
160
160
  }
161
- function ue(s) {
161
+ function me(s) {
162
162
  return s instanceof Error;
163
163
  }
164
- let K = !1;
165
- function me(s) {
166
- if (K)
164
+ let N = !1;
165
+ function ge(s) {
166
+ if (N)
167
167
  return;
168
- K = !0;
169
- const t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = (p) => {
170
- const d = p.detail;
168
+ N = !0;
169
+ const t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = (c) => {
170
+ const d = c.detail;
171
171
  t.has(d.info.uuid) || t.set(d.info.uuid, d);
172
172
  };
173
- window.addEventListener("eip6963:announceProvider", o), window.dispatchEvent(new Event("eip6963:requestProvider")), window.addEventListener("message", async (p) => {
173
+ window.addEventListener("eip6963:announceProvider", o), window.dispatchEvent(new Event("eip6963:requestProvider")), window.addEventListener("message", async (c) => {
174
174
  var f;
175
- if (p.origin !== s) return;
176
- const { type: d, data: a } = p.data;
175
+ if (c.origin !== s) return;
176
+ const { type: d, data: a } = c.data;
177
177
  switch (d) {
178
178
  case "glide:getProviders": {
179
- const c = Array.from(t.values()).map(
179
+ const p = Array.from(t.values()).map(
180
180
  ({ info: h, provider: l }) => ({
181
181
  info: h,
182
182
  isConnected: typeof l.isConnected == "boolean" ? l.isConnected : void 0,
183
183
  chainId: l.chainId,
184
184
  selectedAddress: l.selectedAddress
185
185
  })
186
- ), n = document.getElementById(
186
+ ), r = document.getElementById(
187
187
  "glide-deposit-iframe"
188
188
  );
189
- n != null && n.contentWindow && n.contentWindow.postMessage(
189
+ r != null && r.contentWindow && r.contentWindow.postMessage(
190
190
  {
191
191
  type: "glide:providers",
192
- providers: c
192
+ providers: p
193
193
  },
194
194
  s
195
195
  );
196
196
  break;
197
197
  }
198
198
  case "glide:providerRequest": {
199
- const { uuid: c, requestId: n, method: h, params: l } = a;
200
- if (i.has(n))
199
+ const { uuid: p, requestId: r, method: h, params: l } = a;
200
+ if (i.has(r))
201
201
  return;
202
- i.set(n, !0);
203
- const m = t.get(c);
202
+ i.set(r, !0);
203
+ const m = t.get(p);
204
204
  if (!m) {
205
- i.delete(n), r(n, { error: "Provider not found" });
205
+ i.delete(r), n(r, { error: "Provider not found" });
206
206
  return;
207
207
  }
208
208
  try {
@@ -210,22 +210,22 @@ function me(s) {
210
210
  method: h,
211
211
  params: l
212
212
  });
213
- i.delete(n), r(n, { result: u });
213
+ i.delete(r), n(r, { result: u });
214
214
  } catch (u) {
215
- i.delete(n), ue(u) ? r(n, {
215
+ i.delete(r), me(u) ? n(r, {
216
216
  error: u.message || String(u),
217
217
  code: u.code,
218
218
  data: u.data
219
- }) : r(n, {
219
+ }) : n(r, {
220
220
  error: String(u)
221
221
  });
222
222
  }
223
223
  break;
224
224
  }
225
225
  case "glide:addEventListener": {
226
- const { uuid: c, requestId: n, eventName: h } = a, l = t.get(c);
226
+ const { uuid: p, requestId: r, eventName: h } = a, l = t.get(p);
227
227
  if (!l || !l.provider.on) {
228
- r(n, { error: "Provider or method not found" });
228
+ n(r, { error: "Provider or method not found" });
229
229
  return;
230
230
  }
231
231
  const m = (...u) => {
@@ -235,48 +235,61 @@ function me(s) {
235
235
  g != null && g.contentWindow && g.contentWindow.postMessage(
236
236
  {
237
237
  type: "glide:providerEvent",
238
- uuid: c,
238
+ uuid: p,
239
239
  eventName: h,
240
240
  args: u
241
241
  },
242
242
  s
243
243
  );
244
244
  };
245
- e.has(c) || e.set(c, /* @__PURE__ */ new Map()), e.get(c).has(h) || e.get(c).set(h, /* @__PURE__ */ new Set()), e.get(c).get(h).add(m), l.provider.on(h, m), r(n, { result: !0 });
245
+ e.has(p) || e.set(p, /* @__PURE__ */ new Map()), e.get(p).has(h) || e.get(p).set(h, /* @__PURE__ */ new Set()), e.get(p).get(h).add(m), l.provider.on(h, m), n(r, { result: !0 });
246
246
  break;
247
247
  }
248
248
  case "glide:removeEventListener": {
249
- const { uuid: c, requestId: n, eventName: h } = a, l = t.get(c);
249
+ const { uuid: p, requestId: r, eventName: h } = a, l = t.get(p);
250
250
  if (!l || !l.provider.removeListener) {
251
- r(n, { error: "Provider or method not found" });
251
+ n(r, { error: "Provider or method not found" });
252
252
  return;
253
253
  }
254
- const m = (f = e.get(c)) == null ? void 0 : f.get(h);
254
+ const m = (f = e.get(p)) == null ? void 0 : f.get(h);
255
255
  m && (m.forEach((u) => {
256
256
  l.provider.removeListener(h, u);
257
- }), m.clear()), r(n, { result: !0 });
257
+ }), m.clear()), n(r, { result: !0 });
258
258
  break;
259
259
  }
260
260
  }
261
261
  });
262
- function r(p, d) {
262
+ function n(c, d) {
263
263
  const a = document.getElementById(
264
264
  "glide-deposit-iframe"
265
265
  );
266
266
  a != null && a.contentWindow && a.contentWindow.postMessage(
267
267
  {
268
268
  type: "glide:providerResponse",
269
- requestId: p,
269
+ requestId: c,
270
270
  ...d
271
271
  },
272
272
  s
273
273
  );
274
274
  }
275
275
  }
276
- class H {
276
+ const fe = "@paywithglide/glide-react", ye = "0.0.46", we = "module", ve = ["dist"], be = "dist/glide.js", $e = "dist/index.d.ts", Ie = { ".": { types: "./dist/index.d.ts", default: "./dist/glide.js" }, "./package.json": "./package.json" }, xe = !1, Se = { dev: "vite", build: "bun run lint && vite build", "build-web": "tsc --p ./tsconfig.build.json && vite build --mode web", "build-chromeext": "tsc --p ./tsconfig.build.json && vite build --mode chromeext:popup && vite build --mode chromeext:content && vite build --mode chromeext:background", lint: "prettier --check . && eslint . --max-warnings 0 && tsc --p ./tsconfig.build.json", preview: "vite preview", prepublishOnly: "bun run build" }, Pe = { "@paywithglide/glide-js": "0.13.10" }, Ee = { "@antiwork/shortest": "^0.2.1", "@eslint/js": "^9.15.0", "@tanstack/react-query": "^5.61.5", "@types/chrome": "^0.0.299", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.4", eslint: "^9.15.0", "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.14", globals: "^15.12.0", prettier: "^3.6.2", react: "^18.3.1", "react-dom": "^18.3.1", typescript: "~5.6.2", "typescript-eslint": "^8.15.0", viem: "^2.21.51", vite: "^6.0.1", "vite-plugin-dts": "^4.3.0", "vite-plugin-static-copy": "^2.2.0", wagmi: "^2.13.0" }, ke = {
277
+ name: fe,
278
+ version: ye,
279
+ type: we,
280
+ files: ve,
281
+ module: be,
282
+ types: $e,
283
+ exports: Ie,
284
+ sideEffects: xe,
285
+ scripts: Se,
286
+ dependencies: Pe,
287
+ devDependencies: Ee
288
+ }, Ue = ke.version, K = 999999;
289
+ class O {
277
290
  constructor(t) {
278
- j(this, "opts");
279
- j(this, "open", () => {
291
+ W(this, "opts");
292
+ W(this, "open", () => {
280
293
  if (!(!this.opts.container && document.body.classList.contains("glide-deposit-open"))) {
281
294
  if (this.opts.container || document.body.classList.add("glide-deposit-open"), (this.opts.mode === "deposit" || this.opts.mode === "buy") && !this.opts.recipient)
282
295
  throw new Error("recipient is required for deposit/buy mode");
@@ -287,21 +300,21 @@ class H {
287
300
  this.openUrl(`${this.baseUrl}${this.opts.app}?init=true&embed=true`), this.initialize();
288
301
  }
289
302
  });
290
- j(this, "iframeEventHandler", async (t) => {
291
- var i, o, r, p, d, a, f, c, n, h, l, m, u, g, $, y, I, w, S, v, x, E, U, M, C, k, P, D, T, R, B, W, A;
303
+ W(this, "iframeEventHandler", async (t) => {
304
+ var i, o, n, c, d, a, f, p, r, h, l, m, u, g, $, y, I, w, x, v, S, E, k, U, M, C, P, z, j, T, R, B, D;
292
305
  const e = t.data;
293
306
  switch (e.type) {
294
307
  case "sendInit": {
295
- const b = this.opts.recipient, Q = (i = this.opts.walletProvider) == null ? void 0 : i.address, Y = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Z = (r = this.opts.walletProvider) == null ? void 0 : r.currentChainId, _ = this.opts.preferGaslessPayment || !!((p = this.opts.walletProvider) != null && p.signTypedDataAsync);
308
+ const b = this.opts.recipient, Z = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Y = (n = this.opts.walletProvider) == null ? void 0 : n.currentChainId, ee = this.opts.preferGaslessPayment || !!((c = this.opts.walletProvider) != null && c.signTypedDataAsync);
296
309
  (f = (d = this.iframe) == null ? void 0 : d.contentWindow) == null || f.postMessage(
297
310
  {
298
311
  type: "initialize",
299
312
  sessionId: this.opts.sessionId,
300
313
  recipient: b,
301
- connectedWalletAddress: Q,
302
- availableChainIds: Y,
303
- currentChainId: Z,
304
- preferGaslessPayment: _,
314
+ connectedWalletAddress: Z,
315
+ availableChainIds: Q,
316
+ currentChainId: Y,
317
+ preferGaslessPayment: ee,
305
318
  chainIds: this.opts.chainIds,
306
319
  excludeChainIds: this.opts.excludeChainIds,
307
320
  excludeCurrencyTiers: this.opts.excludeCurrencyTiers,
@@ -334,14 +347,16 @@ class H {
334
347
  didProvideLocalStorage: !!this.opts.localStorageProvider,
335
348
  debug: this.opts.debug,
336
349
  popupsBlocked: this.opts.popupsBlocked,
337
- gasRefuelAmountPerChain: this.opts.gasRefuelAmountPerChain
350
+ gasRefuelAmountPerChain: this.opts.gasRefuelAmountPerChain,
351
+ sdkVersion: Ue,
352
+ referrerDomain: typeof window < "u" ? window.location.origin : void 0
338
353
  },
339
354
  new URL(this.baseUrl).origin
340
355
  );
341
356
  break;
342
357
  }
343
358
  case "didOpen": {
344
- this.iframe.style.opacity = "1", (n = (c = this.opts).onOpen) == null || n.call(c);
359
+ this.iframe.style.opacity = "1", (r = (p = this.opts).onOpen) == null || r.call(p);
345
360
  break;
346
361
  }
347
362
  case "localStorage.getKeys": {
@@ -391,7 +406,7 @@ class H {
391
406
  this.removeIframe(), this.destroy(), (I = (y = this.opts) == null ? void 0 : y.onClose) == null || I.call(y);
392
407
  break;
393
408
  case "setMode":
394
- (S = (w = this.opts) == null ? void 0 : w.onSetMode) == null || S.call(w, e.mode);
409
+ (x = (w = this.opts) == null ? void 0 : w.onSetMode) == null || x.call(w, e.mode);
395
410
  break;
396
411
  case "switchChain":
397
412
  if (!this.opts.walletProvider)
@@ -399,7 +414,7 @@ class H {
399
414
  try {
400
415
  await this.opts.walletProvider.switchChainAsync({
401
416
  chainId: e.chainId
402
- }), (x = (v = this.iframe) == null ? void 0 : v.contentWindow) == null || x.postMessage(
417
+ }), (S = (v = this.iframe) == null ? void 0 : v.contentWindow) == null || S.postMessage(
403
418
  {
404
419
  type: "didSwitchChain",
405
420
  success: !0,
@@ -408,7 +423,7 @@ class H {
408
423
  this.baseUrl
409
424
  );
410
425
  } catch (b) {
411
- (U = (E = this.iframe) == null ? void 0 : E.contentWindow) == null || U.postMessage(
426
+ (k = (E = this.iframe) == null ? void 0 : E.contentWindow) == null || k.postMessage(
412
427
  {
413
428
  type: "didSwitchChain",
414
429
  success: !1,
@@ -426,7 +441,7 @@ class H {
426
441
  const b = await this.opts.walletProvider.sendTransactionAsync(
427
442
  e.tx
428
443
  );
429
- (C = (M = this.iframe) == null ? void 0 : M.contentWindow) == null || C.postMessage(
444
+ (M = (U = this.iframe) == null ? void 0 : U.contentWindow) == null || M.postMessage(
430
445
  {
431
446
  type: "didSendTransaction",
432
447
  success: !0,
@@ -435,7 +450,7 @@ class H {
435
450
  this.baseUrl
436
451
  );
437
452
  } catch (b) {
438
- (P = (k = this.iframe) == null ? void 0 : k.contentWindow) == null || P.postMessage(
453
+ (P = (C = this.iframe) == null ? void 0 : C.contentWindow) == null || P.postMessage(
439
454
  {
440
455
  type: "didSendTransaction",
441
456
  success: !1,
@@ -451,7 +466,7 @@ class H {
451
466
  if (!this.opts.walletProvider)
452
467
  throw new Error("walletProvider is not set");
453
468
  if (!this.opts.walletProvider.signTypedDataAsync) {
454
- (T = (D = this.iframe) == null ? void 0 : D.contentWindow) == null || T.postMessage(
469
+ (j = (z = this.iframe) == null ? void 0 : z.contentWindow) == null || j.postMessage(
455
470
  {
456
471
  type: "didSignTypedData",
457
472
  success: !1,
@@ -465,7 +480,7 @@ class H {
465
480
  const b = await this.opts.walletProvider.signTypedDataAsync(
466
481
  e.data
467
482
  );
468
- (B = (R = this.iframe) == null ? void 0 : R.contentWindow) == null || B.postMessage(
483
+ (R = (T = this.iframe) == null ? void 0 : T.contentWindow) == null || R.postMessage(
469
484
  {
470
485
  type: "didSignTypedData",
471
486
  success: !0,
@@ -474,7 +489,7 @@ class H {
474
489
  this.baseUrl
475
490
  );
476
491
  } catch (b) {
477
- (A = (W = this.iframe) == null ? void 0 : W.contentWindow) == null || A.postMessage(
492
+ (D = (B = this.iframe) == null ? void 0 : B.contentWindow) == null || D.postMessage(
478
493
  {
479
494
  type: "didSignTypedData",
480
495
  success: !1,
@@ -490,15 +505,15 @@ class H {
490
505
  this.opts = t;
491
506
  }
492
507
  get externalUrl() {
493
- var t, e, i, o, r, p, d, a, f;
494
- return `${this.baseUrl}${this.opts.app}?${this.opts.recipient ? `&recipient=${this.opts.recipient}` : ""}${this.opts.preferGaslessPayment ? "&preferGaslessPayment=true" : ""}${this.opts.mode ? `&mode=${this.opts.mode}` : ""}${this.opts.amount ? `&amount=${this.opts.amount}` : ""}${this.opts.chainId ? `&chainId=${this.opts.chainId}` : ""}${this.opts.currencyId ? `&currencyId=${this.opts.currencyId}` : ""}${this.opts.evm ? `&evm.chainId=${this.opts.evm.chainId}&evm.to=${this.opts.evm.to}&evm.data=${this.opts.evm.data || "0x0"}&evm.value=${de(
508
+ var t, e, i, o, n, c, d, a, f;
509
+ return `${this.baseUrl}${this.opts.app}?${this.opts.recipient ? `&recipient=${this.opts.recipient}` : ""}${this.opts.preferGaslessPayment ? "&preferGaslessPayment=true" : ""}${this.opts.mode ? `&mode=${this.opts.mode}` : ""}${this.opts.amount ? `&amount=${this.opts.amount}` : ""}${this.opts.chainId ? `&chainId=${this.opts.chainId}` : ""}${this.opts.currencyId ? `&currencyId=${this.opts.currencyId}` : ""}${this.opts.evm ? `&evm.chainId=${this.opts.evm.chainId}&evm.to=${this.opts.evm.to}&evm.data=${this.opts.evm.data || "0x0"}&evm.value=${ce(
495
510
  this.opts.evm.value || 0n
496
- )}` : ""}${this.opts.approval ? `&approval.token=${this.opts.approval.token}&approval.amount=${this.opts.approval.amount}` : ""}${this.opts.sessionMetadata ? `&metadata=${this.opts.sessionMetadata}` : ""}${this.opts.autoCloseOnSuccess ? "&autoCloseOnSuccess=true" : ""}${this.opts.sessionId ? `&sessionId=${this.opts.sessionId}` : ""}${(t = this.opts.chainIds) != null && t.length ? `&chainIds=${this.opts.chainIds.join(",")}` : ""}${(e = this.opts.excludeChainIds) != null && e.length ? `&excludeChainIds=${this.opts.excludeChainIds.join(",")}` : ""}${(i = this.opts.excludeCurrencyTiers) != null && i.length ? `&excludeCurrencyTiers=${this.opts.excludeCurrencyTiers.join(",")}` : ""}${(o = this.opts.excludeFundingSources) != null && o.length ? `&excludeFundingSources=${this.opts.excludeFundingSources.join(",")}` : ""}${(r = this.opts.fundingSources) != null && r.length ? `&fundingSources=${this.opts.fundingSources.join(",")}` : ""}${(p = this.opts.allowedPaymentCurrencies) != null && p.length ? `&allowedPaymentCurrencies=${this.opts.allowedPaymentCurrencies.join(",")}` : ""}${(d = this.opts.appMetadata) != null && d.name ? `&appMetadata.name=${encodeURIComponent(this.opts.appMetadata.name)}` : ""}${(a = this.opts.appMetadata) != null && a.logoUrl ? `&appMetadata.logoUrl=${encodeURIComponent(this.opts.appMetadata.logoUrl)}` : ""}${(f = this.opts.appMetadata) != null && f.faviconUrl ? `&appMetadata.faviconUrl=${encodeURIComponent(this.opts.appMetadata.faviconUrl)}` : ""}${this.opts.enableRefundEmails ? "&enableRefundEmails=true" : ""}${this.opts.payerEmail ? `&payerEmail=${encodeURIComponent(this.opts.payerEmail)}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.disableWithdrawToSelfSuggestion ? "&disableWithdrawToSelfSuggestion=true" : ""}${this.opts.hideSettlementCopy ? "&hideSettlementCopy=true" : ""}${this.opts.showAppLogo ? `&showAppLogo=${this.opts.showAppLogo}` : ""}${this.opts.showOnrampFirst ? "&showOnrampFirst=true" : ""}${this.opts.debitCardAlias ? `&debitCardAlias=${this.opts.debitCardAlias}` : ""}${this.opts.copyOverrides ? `&copyOverrides=${encodeURIComponent(JSON.stringify(this.opts.copyOverrides))}` : ""}${this.opts.stableDepositAddressKey ? `&stableDepositAddressKey=${encodeURIComponent(this.opts.stableDepositAddressKey)}` : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
511
+ )}` : ""}${this.opts.approval ? `&approval.token=${this.opts.approval.token}&approval.amount=${this.opts.approval.amount}` : ""}${this.opts.sessionMetadata ? `&metadata=${this.opts.sessionMetadata}` : ""}${this.opts.autoCloseOnSuccess ? "&autoCloseOnSuccess=true" : ""}${this.opts.sessionId ? `&sessionId=${this.opts.sessionId}` : ""}${(t = this.opts.chainIds) != null && t.length ? `&chainIds=${this.opts.chainIds.join(",")}` : ""}${(e = this.opts.excludeChainIds) != null && e.length ? `&excludeChainIds=${this.opts.excludeChainIds.join(",")}` : ""}${(i = this.opts.excludeCurrencyTiers) != null && i.length ? `&excludeCurrencyTiers=${this.opts.excludeCurrencyTiers.join(",")}` : ""}${(o = this.opts.excludeFundingSources) != null && o.length ? `&excludeFundingSources=${this.opts.excludeFundingSources.join(",")}` : ""}${(n = this.opts.fundingSources) != null && n.length ? `&fundingSources=${this.opts.fundingSources.join(",")}` : ""}${(c = this.opts.allowedPaymentCurrencies) != null && c.length ? `&allowedPaymentCurrencies=${this.opts.allowedPaymentCurrencies.join(",")}` : ""}${(d = this.opts.appMetadata) != null && d.name ? `&appMetadata.name=${encodeURIComponent(this.opts.appMetadata.name)}` : ""}${(a = this.opts.appMetadata) != null && a.logoUrl ? `&appMetadata.logoUrl=${encodeURIComponent(this.opts.appMetadata.logoUrl)}` : ""}${(f = this.opts.appMetadata) != null && f.faviconUrl ? `&appMetadata.faviconUrl=${encodeURIComponent(this.opts.appMetadata.faviconUrl)}` : ""}${this.opts.enableRefundEmails ? "&enableRefundEmails=true" : ""}${this.opts.payerEmail ? `&payerEmail=${encodeURIComponent(this.opts.payerEmail)}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.disableWithdrawToSelfSuggestion ? "&disableWithdrawToSelfSuggestion=true" : ""}${this.opts.hideSettlementCopy ? "&hideSettlementCopy=true" : ""}${this.opts.showAppLogo ? `&showAppLogo=${this.opts.showAppLogo}` : ""}${this.opts.showOnrampFirst ? "&showOnrampFirst=true" : ""}${this.opts.debitCardAlias ? `&debitCardAlias=${this.opts.debitCardAlias}` : ""}${this.opts.copyOverrides ? `&copyOverrides=${encodeURIComponent(JSON.stringify(this.opts.copyOverrides))}` : ""}${this.opts.stableDepositAddressKey ? `&stableDepositAddressKey=${encodeURIComponent(this.opts.stableDepositAddressKey)}` : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
497
512
  }
498
513
  initialize() {
499
514
  window.addEventListener("message", this.iframeEventHandler);
500
515
  const t = new URL(this.baseUrl).origin;
501
- me(t);
516
+ ge(t);
502
517
  }
503
518
  destroy() {
504
519
  window.removeEventListener("message", this.iframeEventHandler);
@@ -528,33 +543,27 @@ class H {
528
543
  this.removeIframe();
529
544
  const e = document.createElement("iframe");
530
545
  e.id = "glide-deposit-iframe";
531
- const i = this.opts.container;
532
- i ? e.setAttribute(
533
- "style",
534
- "z-index: 2147483647; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: relative; width: 100%; height: 100%; opacity: 0;"
535
- ) : e.setAttribute(
536
- "style",
537
- "z-index: 2147483647; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; opacity: 0;"
538
- ), e.src = t, e.allow = "payment *; clipboard-write *", i ? i.appendChild(e) : document.body.appendChild(e);
546
+ const i = this.opts.container, o = i ? `z-index: ${K}; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: relative; width: 100%; height: 100%; opacity: 0;` : `z-index: ${K}; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; opacity: 0;`;
547
+ e.setAttribute("style", o), e.src = t, e.allow = "payment *; clipboard-write *", i ? i.appendChild(e) : document.body.appendChild(e);
539
548
  }
540
549
  removeIframe() {
541
550
  const t = document.getElementById("glide-deposit-iframe");
542
551
  t && (t.remove(), document.body.classList.remove("glide-deposit-open"));
543
552
  }
544
553
  }
545
- const ye = ({
554
+ const De = ({
546
555
  app: s,
547
556
  recipient: t,
548
557
  chainId: e,
549
558
  currencyId: i,
550
559
  amount: o,
551
- gasRefuelAmountPerChain: r,
552
- preferGaslessPayment: p,
560
+ gasRefuelAmountPerChain: n,
561
+ preferGaslessPayment: c,
553
562
  chainIds: d,
554
563
  excludeChainIds: a,
555
564
  excludeCurrencyTiers: f,
556
- excludeFundingSources: c,
557
- fundingSources: n,
565
+ excludeFundingSources: p,
566
+ fundingSources: r,
558
567
  appMetadata: h,
559
568
  enableRefundEmails: l,
560
569
  payerEmail: m,
@@ -564,34 +573,34 @@ const ye = ({
564
573
  showOnrampFirst: y,
565
574
  debitCardAlias: I,
566
575
  copyOverrides: w,
567
- stableDepositAddressKey: S,
576
+ stableDepositAddressKey: x,
568
577
  sessionId: v,
569
- sessionMetadata: x,
578
+ sessionMetadata: S,
570
579
  disableWithdrawToSelfSuggestion: E,
571
- theme: U,
572
- walletProvider: M,
573
- localStorageProvider: C,
574
- onOpen: k,
580
+ theme: k,
581
+ walletProvider: U,
582
+ localStorageProvider: M,
583
+ onOpen: C,
575
584
  onSuccess: P,
576
- onClose: D,
577
- autoCloseOnSuccess: T,
578
- popupsBlocked: R,
579
- baseUrl: B,
580
- debug: W
585
+ onClose: z,
586
+ autoCloseOnSuccess: j,
587
+ popupsBlocked: T,
588
+ baseUrl: R,
589
+ debug: B
581
590
  }) => {
582
- const A = G(() => new H({
591
+ const D = G(() => new O({
583
592
  app: s,
584
593
  recipient: t,
585
594
  chainId: e,
586
595
  currencyId: i,
587
596
  amount: o,
588
- gasRefuelAmountPerChain: r,
589
- preferGaslessPayment: p,
597
+ gasRefuelAmountPerChain: n,
598
+ preferGaslessPayment: c,
590
599
  chainIds: d,
591
600
  excludeChainIds: a,
592
601
  excludeCurrencyTiers: f,
593
- excludeFundingSources: c,
594
- fundingSources: n,
602
+ excludeFundingSources: p,
603
+ fundingSources: r,
595
604
  appMetadata: h,
596
605
  enableRefundEmails: l,
597
606
  payerEmail: m,
@@ -601,33 +610,33 @@ const ye = ({
601
610
  showOnrampFirst: y,
602
611
  debitCardAlias: I,
603
612
  copyOverrides: w,
604
- stableDepositAddressKey: S,
613
+ stableDepositAddressKey: x,
605
614
  sessionId: v,
606
- sessionMetadata: x,
615
+ sessionMetadata: S,
607
616
  disableWithdrawToSelfSuggestion: E,
608
- theme: U,
609
- walletProvider: M,
610
- localStorageProvider: C,
611
- onOpen: k,
617
+ theme: k,
618
+ walletProvider: U,
619
+ localStorageProvider: M,
620
+ onOpen: C,
612
621
  onSuccess: P,
613
- onClose: D,
614
- autoCloseOnSuccess: T,
615
- popupsBlocked: R,
616
- baseUrl: B,
617
- debug: W
622
+ onClose: z,
623
+ autoCloseOnSuccess: j,
624
+ popupsBlocked: T,
625
+ baseUrl: R,
626
+ debug: B
618
627
  }), [
619
628
  s,
620
629
  t,
621
630
  e,
622
631
  i,
623
632
  o,
624
- r,
625
- p,
633
+ n,
634
+ c,
626
635
  d,
627
636
  a,
628
637
  f,
629
- c,
630
- n,
638
+ p,
639
+ r,
631
640
  h,
632
641
  l,
633
642
  m,
@@ -637,39 +646,39 @@ const ye = ({
637
646
  y,
638
647
  I,
639
648
  w,
640
- S,
641
- v,
642
649
  x,
650
+ v,
651
+ S,
643
652
  E,
653
+ k,
644
654
  U,
645
655
  M,
646
656
  C,
647
- k,
648
657
  P,
649
- D,
658
+ z,
659
+ j,
650
660
  T,
651
661
  R,
652
- B,
653
- W
662
+ B
654
663
  ]);
655
664
  return {
656
- openGlideDeposit: A.open,
657
- externalUrl: A.externalUrl,
658
- opts: A.opts
665
+ openGlideDeposit: D.open,
666
+ externalUrl: D.externalUrl,
667
+ opts: D.opts
659
668
  };
660
- }, we = ({
669
+ }, Ae = ({
661
670
  app: s,
662
671
  preferGaslessPayment: t,
663
672
  chainIds: e,
664
673
  excludeChainIds: i,
665
674
  excludeCurrencyTiers: o,
666
- excludeFundingSources: r,
667
- fundingSources: p,
675
+ excludeFundingSources: n,
676
+ fundingSources: c,
668
677
  allowedPaymentCurrencies: d,
669
678
  appMetadata: a,
670
679
  enableRefundEmails: f,
671
- payerEmail: c,
672
- hideSettlementCopy: n,
680
+ payerEmail: p,
681
+ hideSettlementCopy: r,
673
682
  showAppLogo: h,
674
683
  showOnrampFirst: l,
675
684
  debitCardAlias: m,
@@ -679,29 +688,29 @@ const ye = ({
679
688
  sessionMetadata: y,
680
689
  theme: I,
681
690
  walletProvider: w,
682
- localStorageProvider: S,
691
+ localStorageProvider: x,
683
692
  onOpen: v,
684
- onSuccess: x,
693
+ onSuccess: S,
685
694
  onClose: E,
686
- autoCloseOnSuccess: U,
687
- popupsBlocked: M,
688
- baseUrl: C,
689
- debug: k
695
+ autoCloseOnSuccess: k,
696
+ popupsBlocked: U,
697
+ baseUrl: M,
698
+ debug: C
690
699
  }) => {
691
- const P = G(() => new H({
700
+ const P = G(() => new O({
692
701
  app: s,
693
702
  preferGaslessPayment: t,
694
703
  chainIds: e,
695
704
  excludeChainIds: i,
696
705
  excludeCurrencyTiers: o,
697
- excludeFundingSources: r,
698
- fundingSources: p,
706
+ excludeFundingSources: n,
707
+ fundingSources: c,
699
708
  allowedPaymentCurrencies: d,
700
709
  appMetadata: a,
701
710
  enableRefundEmails: f,
702
- payerEmail: c,
711
+ payerEmail: p,
703
712
  mode: "pay",
704
- hideSettlementCopy: n,
713
+ hideSettlementCopy: r,
705
714
  showAppLogo: h,
706
715
  showOnrampFirst: l,
707
716
  debitCardAlias: m,
@@ -711,27 +720,27 @@ const ye = ({
711
720
  sessionMetadata: y,
712
721
  theme: I,
713
722
  walletProvider: w,
714
- localStorageProvider: S,
723
+ localStorageProvider: x,
715
724
  onOpen: v,
716
- onSuccess: x,
725
+ onSuccess: S,
717
726
  onClose: E,
718
- autoCloseOnSuccess: U,
719
- popupsBlocked: M,
720
- baseUrl: C,
721
- debug: k
727
+ autoCloseOnSuccess: k,
728
+ popupsBlocked: U,
729
+ baseUrl: M,
730
+ debug: C
722
731
  }), [
723
732
  s,
724
733
  t,
725
734
  e,
726
735
  i,
727
736
  o,
728
- r,
729
- p,
737
+ n,
738
+ c,
730
739
  d,
731
740
  a,
732
741
  f,
733
- c,
734
- n,
742
+ p,
743
+ r,
735
744
  h,
736
745
  l,
737
746
  m,
@@ -741,33 +750,33 @@ const ye = ({
741
750
  y,
742
751
  I,
743
752
  w,
744
- S,
745
- v,
746
753
  x,
754
+ v,
755
+ S,
747
756
  E,
757
+ k,
748
758
  U,
749
759
  M,
750
- C,
751
- k
760
+ C
752
761
  ]);
753
762
  return {
754
763
  openGlidePay: P.open,
755
764
  externalUrl: P.externalUrl,
756
765
  opts: P.opts
757
766
  };
758
- }, ve = ({
767
+ }, ze = ({
759
768
  app: s,
760
769
  evm: t,
761
770
  approval: e,
762
771
  preferGaslessPayment: i,
763
772
  chainIds: o,
764
- excludeChainIds: r,
765
- excludeCurrencyTiers: p,
773
+ excludeChainIds: n,
774
+ excludeCurrencyTiers: c,
766
775
  excludeFundingSources: d,
767
776
  sessionMetadata: a,
768
777
  showAppLogo: f,
769
- showOnrampFirst: c,
770
- debitCardAlias: n,
778
+ showOnrampFirst: p,
779
+ debitCardAlias: r,
771
780
  copyOverrides: h,
772
781
  theme: l,
773
782
  walletProvider: m,
@@ -777,22 +786,22 @@ const ye = ({
777
786
  onClose: y,
778
787
  autoCloseOnSuccess: I,
779
788
  popupsBlocked: w,
780
- baseUrl: S,
789
+ baseUrl: x,
781
790
  debug: v
782
791
  }) => {
783
- const x = G(() => new H({
792
+ const S = G(() => new O({
784
793
  app: s,
785
794
  evm: t,
786
795
  approval: e,
787
796
  preferGaslessPayment: i,
788
797
  chainIds: o,
789
- excludeChainIds: r,
790
- excludeCurrencyTiers: p,
798
+ excludeChainIds: n,
799
+ excludeCurrencyTiers: c,
791
800
  excludeFundingSources: d,
792
801
  sessionMetadata: a,
793
802
  showAppLogo: f,
794
- showOnrampFirst: c,
795
- debitCardAlias: n,
803
+ showOnrampFirst: p,
804
+ debitCardAlias: r,
796
805
  copyOverrides: h,
797
806
  mode: "call",
798
807
  theme: l,
@@ -803,7 +812,7 @@ const ye = ({
803
812
  onClose: y,
804
813
  autoCloseOnSuccess: I,
805
814
  popupsBlocked: w,
806
- baseUrl: S,
815
+ baseUrl: x,
807
816
  debug: v
808
817
  }), [
809
818
  s,
@@ -811,13 +820,13 @@ const ye = ({
811
820
  e,
812
821
  i,
813
822
  o,
814
- r,
815
- p,
823
+ n,
824
+ c,
816
825
  d,
817
826
  a,
818
827
  f,
819
- c,
820
- n,
828
+ p,
829
+ r,
821
830
  h,
822
831
  l,
823
832
  m,
@@ -827,27 +836,27 @@ const ye = ({
827
836
  y,
828
837
  I,
829
838
  w,
830
- S,
839
+ x,
831
840
  v
832
841
  ]);
833
842
  return {
834
- openGlideCall: x.open,
835
- externalUrl: x.externalUrl,
836
- opts: x.opts
843
+ openGlideCall: S.open,
844
+ externalUrl: S.externalUrl,
845
+ opts: S.opts
837
846
  };
838
- }, be = ({
847
+ }, je = ({
839
848
  app: s,
840
849
  recipient: t,
841
850
  chainId: e,
842
851
  currencyId: i,
843
852
  preferGaslessPayment: o,
844
- chainIds: r,
845
- excludeChainIds: p,
853
+ chainIds: n,
854
+ excludeChainIds: c,
846
855
  excludeCurrencyTiers: d,
847
856
  excludeFundingSources: a,
848
857
  sessionMetadata: f,
849
- showAppLogo: c,
850
- showOnrampFirst: n,
858
+ showAppLogo: p,
859
+ showOnrampFirst: r,
851
860
  debitCardAlias: h,
852
861
  copyOverrides: l,
853
862
  theme: m,
@@ -857,21 +866,21 @@ const ye = ({
857
866
  onSuccess: y,
858
867
  onClose: I,
859
868
  autoCloseOnSuccess: w,
860
- baseUrl: S
869
+ baseUrl: x
861
870
  }) => {
862
- const v = G(() => new H({
871
+ const v = G(() => new O({
863
872
  app: s,
864
873
  recipient: t,
865
874
  chainId: e,
866
875
  currencyId: i,
867
876
  preferGaslessPayment: o,
868
- chainIds: r,
869
- excludeChainIds: p,
877
+ chainIds: n,
878
+ excludeChainIds: c,
870
879
  excludeCurrencyTiers: d,
871
880
  excludeFundingSources: a,
872
881
  sessionMetadata: f,
873
- showAppLogo: c,
874
- showOnrampFirst: n,
882
+ showAppLogo: p,
883
+ showOnrampFirst: r,
875
884
  debitCardAlias: h,
876
885
  copyOverrides: l,
877
886
  mode: "buy",
@@ -882,20 +891,20 @@ const ye = ({
882
891
  onSuccess: y,
883
892
  onClose: I,
884
893
  autoCloseOnSuccess: w,
885
- baseUrl: S
894
+ baseUrl: x
886
895
  }), [
887
896
  s,
888
897
  t,
889
898
  e,
890
899
  i,
891
900
  o,
892
- r,
893
- p,
901
+ n,
902
+ c,
894
903
  d,
895
904
  a,
896
905
  f,
897
- c,
898
- n,
906
+ p,
907
+ r,
899
908
  h,
900
909
  l,
901
910
  m,
@@ -905,14 +914,14 @@ const ye = ({
905
914
  y,
906
915
  I,
907
916
  w,
908
- S
917
+ x
909
918
  ]);
910
919
  return {
911
920
  openGlideBuy: v.open,
912
921
  externalUrl: v.externalUrl,
913
922
  opts: v.opts
914
923
  };
915
- }, $e = Object.freeze({
924
+ }, Te = Object.freeze({
916
925
  getItem: (s) => new Promise((t, e) => {
917
926
  try {
918
927
  const i = localStorage.getItem(s);
@@ -945,11 +954,11 @@ const ye = ({
945
954
  })
946
955
  });
947
956
  export {
948
- H as GlideDeposit,
949
- $e as browserLocalStorageProvider,
950
- me as initializeParentBridge,
951
- be as useGlideBuy,
952
- ve as useGlideCall,
953
- ye as useGlideDeposit,
954
- we as useGlidePay
957
+ O as GlideDeposit,
958
+ Te as browserLocalStorageProvider,
959
+ ge as initializeParentBridge,
960
+ je as useGlideBuy,
961
+ ze as useGlideCall,
962
+ De as useGlideDeposit,
963
+ Ae as useGlidePay
955
964
  };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,2 @@
1
- export * from './GlideDeposit.ts';
2
- export * from './useGlideDeposit.ts';
3
- export * from './useGlidePay.ts';
4
- export * from './useGlideCall.ts';
5
- export * from './useGlideBuy.ts';
6
- export * from './theme.ts';
7
- export * from './browserLocalStorageProvider.ts';
8
- export * from './walletProviderBridge.ts';
1
+ export * from './pkg/index'
2
+ export {}
@@ -0,0 +1,8 @@
1
+ export * from './GlideDeposit.ts';
2
+ export * from './useGlideDeposit.ts';
3
+ export * from './useGlidePay.ts';
4
+ export * from './useGlideCall.ts';
5
+ export * from './useGlideBuy.ts';
6
+ export * from './theme.ts';
7
+ export * from './browserLocalStorageProvider.ts';
8
+ export * from './walletProviderBridge.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paywithglide/glide-react",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
File without changes
File without changes
File without changes