@paywithglide/glide-react 0.0.39 → 0.0.41

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.
@@ -82,7 +82,9 @@ export type GlideLocalStorageProvider = {
82
82
  removeItem: (key: string) => Promise<void>;
83
83
  getKeys: () => Promise<string[]>;
84
84
  };
85
- export type FundingSource = "transfer" | "coinbase" | "coinbase_app" | "interac" | "fiat" | "wallet";
85
+ export type FundingSource = "transfer" | "coinbase" | "coinbase_app" | "interac" | "fiat" | "wallet" | "debit_card_alias";
86
+ export type ShowAppLogo = "default" | "always" | "never";
87
+ export type DebitCardAlias = "fiat" | "coinbase";
86
88
  export type GlideDepositOptions = {
87
89
  app: string;
88
90
  recipient?: string;
@@ -110,6 +112,13 @@ export type GlideDepositOptions = {
110
112
  excludeFundingSources?: FundingSource[];
111
113
  fundingSources?: FundingSource[];
112
114
  allowedPaymentCurrencies?: string[];
115
+ appMetadata?: {
116
+ name?: string;
117
+ logoUrl?: string;
118
+ faviconUrl?: string;
119
+ };
120
+ enableRefundEmails?: boolean;
121
+ payerEmail?: string;
113
122
  walletProvider?: GlideDepositWalletProvider;
114
123
  localStorageProvider?: GlideLocalStorageProvider;
115
124
  onOpen?: () => void;
@@ -120,6 +129,10 @@ export type GlideDepositOptions = {
120
129
  container?: HTMLElement;
121
130
  disableWithdrawToSelfSuggestion?: boolean;
122
131
  hideSettlementCopy?: boolean;
132
+ showAppLogo?: ShowAppLogo;
133
+ showOnrampFirst?: boolean;
134
+ debitCardAlias?: DebitCardAlias;
135
+ copyOverrides?: Record<string, string>;
123
136
  theme?: GlideWidgetTheme;
124
137
  popupsBlocked?: boolean;
125
138
  baseUrl?: string;
package/dist/glide.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var _ = Object.defineProperty;
2
2
  var ee = (s, t, e) => t in s ? _(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var C = (s, t, e) => ee(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { useMemo as A } from "react";
3
+ var W = (s, t, e) => ee(s, typeof t != "symbol" ? t + "" : t, e);
4
+ import { useMemo as B } from "react";
5
5
  function te(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
  }
@@ -9,26 +9,26 @@ function N(s) {
9
9
  return te(s, { strict: !1 }) ? Math.ceil((s.length - 2) / 2) : s.length;
10
10
  }
11
11
  const K = "2.21.51";
12
- let T = {
12
+ let G = {
13
13
  getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
14
14
  version: `viem@${K}`
15
15
  };
16
- class I extends Error {
16
+ class A extends Error {
17
17
  constructor(t, e = {}) {
18
- var c;
18
+ var a;
19
19
  const i = (() => {
20
- var a;
21
- return e.cause instanceof I ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
22
- })(), o = e.cause instanceof I && e.cause.docsPath || e.docsPath, r = (c = T.getDocsUrl) == null ? void 0 : c.call(T, { ...e, docsPath: o }), n = [
20
+ var n;
21
+ return e.cause instanceof A ? e.cause.details : (n = e.cause) != null && n.message ? e.cause.message : e.details;
22
+ })(), o = e.cause instanceof A && e.cause.docsPath || e.docsPath, r = (a = G.getDocsUrl) == null ? void 0 : a.call(G, { ...e, docsPath: o }), p = [
23
23
  t || "An error occurred.",
24
24
  "",
25
25
  ...e.metaMessages ? [...e.metaMessages, ""] : [],
26
26
  ...r ? [`Docs: ${r}`] : [],
27
27
  ...i ? [`Details: ${i}`] : [],
28
- ...T.version ? [`Version: ${T.version}`] : []
28
+ ...G.version ? [`Version: ${G.version}`] : []
29
29
  ].join(`
30
30
  `);
31
- super(n, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
31
+ super(p, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
32
32
  enumerable: !0,
33
33
  configurable: !0,
34
34
  writable: !0,
@@ -67,12 +67,12 @@ class I extends Error {
67
67
  function F(s, t) {
68
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 V extends I {
70
+ class V 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 D(s, { dir: t, size: e = 32 } = {}) {
75
+ function H(s, { dir: t, size: e = 32 } = {}) {
76
76
  return typeof s == "string" ? se(s, { dir: t, size: e }) : ie(s, { dir: t, size: e });
77
77
  }
78
78
  function se(s, { dir: t, size: e = 32 } = {}) {
@@ -103,12 +103,12 @@ function ie(s, { dir: t, size: e = 32 } = {}) {
103
103
  }
104
104
  return i;
105
105
  }
106
- class oe extends I {
106
+ class oe extends A {
107
107
  constructor({ max: t, min: e, signed: i, size: o, value: r }) {
108
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" });
109
109
  }
110
110
  }
111
- class re extends I {
111
+ class re 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
  }
@@ -122,46 +122,46 @@ function q(s, { size: t }) {
122
122
  }
123
123
  const ne = /* @__PURE__ */ Array.from({ length: 256 }, (s, t) => t.toString(16).padStart(2, "0"));
124
124
  function ae(s, t = {}) {
125
- return typeof s == "number" || typeof s == "bigint" ? de(s, t) : typeof s == "string" ? pe(s, t) : typeof s == "boolean" ? ce(s, t) : J(s, t);
125
+ return typeof s == "number" || typeof s == "bigint" ? de(s, t) : typeof s == "string" ? ce(s, t) : typeof s == "boolean" ? pe(s, t) : J(s, t);
126
126
  }
127
- function ce(s, t = {}) {
127
+ function pe(s, t = {}) {
128
128
  const e = `0x${Number(s)}`;
129
- return typeof t.size == "number" ? (q(e, { size: t.size }), D(e, { size: t.size })) : e;
129
+ return typeof t.size == "number" ? (q(e, { size: t.size }), H(e, { size: t.size })) : e;
130
130
  }
131
131
  function J(s, t = {}) {
132
132
  let e = "";
133
133
  for (let o = 0; o < s.length; o++)
134
134
  e += ne[s[o]];
135
135
  const i = `0x${e}`;
136
- return typeof t.size == "number" ? (q(i, { size: t.size }), D(i, { dir: "right", size: t.size })) : i;
136
+ return typeof t.size == "number" ? (q(i, { size: t.size }), H(i, { dir: "right", size: t.size })) : i;
137
137
  }
138
138
  function de(s, t = {}) {
139
139
  const { signed: e, size: i } = t, o = BigInt(s);
140
140
  let r;
141
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 n = typeof r == "bigint" && e ? -r - 1n : 0;
143
- if (r && o > r || o < n) {
144
- const a = typeof s == "bigint" ? "n" : "";
142
+ const p = typeof r == "bigint" && e ? -r - 1n : 0;
143
+ if (r && o > r || o < p) {
144
+ const n = typeof s == "bigint" ? "n" : "";
145
145
  throw new oe({
146
- max: r ? `${r}${a}` : void 0,
147
- min: `${n}${a}`,
146
+ max: r ? `${r}${n}` : void 0,
147
+ min: `${p}${n}`,
148
148
  signed: e,
149
149
  size: i,
150
- value: `${s}${a}`
150
+ value: `${s}${n}`
151
151
  });
152
152
  }
153
- const c = `0x${(e && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
154
- return i ? D(c, { size: i }) : c;
153
+ const a = `0x${(e && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
154
+ return i ? H(a, { size: i }) : a;
155
155
  }
156
156
  const le = /* @__PURE__ */ new TextEncoder();
157
- function pe(s, t = {}) {
157
+ function ce(s, t = {}) {
158
158
  const e = le.encode(s);
159
159
  return J(e, t);
160
160
  }
161
- class M {
161
+ class O {
162
162
  constructor(t) {
163
- C(this, "opts");
164
- C(this, "open", () => {
163
+ W(this, "opts");
164
+ W(this, "open", () => {
165
165
  if (!(!this.opts.container && document.body.classList.contains("glide-deposit-open"))) {
166
166
  if (this.opts.container || document.body.classList.add("glide-deposit-open"), (this.opts.mode === "deposit" || this.opts.mode === "buy") && !this.opts.recipient)
167
167
  throw new Error("recipient is required for deposit/buy mode");
@@ -172,17 +172,17 @@ class M {
172
172
  this.openUrl(`${this.baseUrl}${this.opts.app}?init=true&embed=true`), this.initialize();
173
173
  }
174
174
  });
175
- C(this, "iframeEventHandler", async (t) => {
176
- var i, o, r, n, c, a, h, u, m, g, f, y, w, l, b, d, v, $, S, x, E, k, U, z, P, j, G, W, B, H, O, L, R;
175
+ W(this, "iframeEventHandler", async (t) => {
176
+ var i, o, r, p, a, n, d, g, f, y, w, b, $, l, v, c, S, h, x, u, I, U, E, k, M, C, P, T, D, j, R, z, L;
177
177
  const e = t.data;
178
178
  switch (e.type) {
179
179
  case "sendInit": {
180
- const p = this.opts.recipient, X = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Y = (r = this.opts.walletProvider) == null ? void 0 : r.currentChainId, Z = this.opts.preferGaslessPayment || !!((n = this.opts.walletProvider) != null && n.signTypedDataAsync);
181
- (h = (c = this.iframe) == null ? void 0 : c.contentWindow) == null || h.postMessage(
180
+ const m = this.opts.recipient, X = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Y = (r = this.opts.walletProvider) == null ? void 0 : r.currentChainId, Z = this.opts.preferGaslessPayment || !!((p = this.opts.walletProvider) != null && p.signTypedDataAsync);
181
+ (d = (a = this.iframe) == null ? void 0 : a.contentWindow) == null || d.postMessage(
182
182
  {
183
183
  type: "initialize",
184
184
  sessionId: this.opts.sessionId,
185
- recipient: p,
185
+ recipient: m,
186
186
  connectedWalletAddress: X,
187
187
  availableChainIds: Q,
188
188
  currentChainId: Y,
@@ -193,6 +193,9 @@ class M {
193
193
  excludeFundingSources: this.opts.excludeFundingSources,
194
194
  fundingSources: this.opts.fundingSources,
195
195
  allowedPaymentCurrencies: this.opts.allowedPaymentCurrencies,
196
+ appMetadata: this.opts.appMetadata,
197
+ enableRefundEmails: this.opts.enableRefundEmails,
198
+ payerEmail: this.opts.payerEmail,
196
199
  mode: this.opts.mode,
197
200
  amount: this.opts.amount,
198
201
  chainId: this.opts.chainId,
@@ -203,9 +206,13 @@ class M {
203
206
  autoCloseOnSuccess: this.opts.autoCloseOnSuccess,
204
207
  disableWithdrawToSelfSuggestion: this.opts.disableWithdrawToSelfSuggestion,
205
208
  hideSettlementCopy: this.opts.hideSettlementCopy,
209
+ showAppLogo: this.opts.showAppLogo,
210
+ showOnrampFirst: this.opts.showOnrampFirst,
211
+ debitCardAlias: this.opts.debitCardAlias,
212
+ copyOverrides: this.opts.copyOverrides,
206
213
  theme: {
207
214
  ...this.opts.theme || {},
208
- colorScheme: ((a = this.opts.theme) == null ? void 0 : a.colorScheme) || getComputedStyle(document.documentElement).colorScheme || ""
215
+ colorScheme: ((n = this.opts.theme) == null ? void 0 : n.colorScheme) || getComputedStyle(document.documentElement).colorScheme || ""
209
216
  },
210
217
  didProvideLocalStorage: !!this.opts.localStorageProvider,
211
218
  debug: this.opts.debug,
@@ -217,17 +224,17 @@ class M {
217
224
  break;
218
225
  }
219
226
  case "didOpen": {
220
- this.iframe.style.opacity = "1", (m = (u = this.opts).onOpen) == null || m.call(u);
227
+ this.iframe.style.opacity = "1", (f = (g = this.opts).onOpen) == null || f.call(g);
221
228
  break;
222
229
  }
223
230
  case "localStorage.getKeys": {
224
231
  if (!this.opts.localStorageProvider)
225
232
  throw new Error("localStorageProvider is not set");
226
- const p = await this.opts.localStorageProvider.getKeys();
227
- (f = (g = this.iframe) == null ? void 0 : g.contentWindow) == null || f.postMessage(
233
+ const m = await this.opts.localStorageProvider.getKeys();
234
+ (w = (y = this.iframe) == null ? void 0 : y.contentWindow) == null || w.postMessage(
228
235
  {
229
236
  type: "localStorage.didGetKeys",
230
- keys: p
237
+ keys: m
231
238
  },
232
239
  this.baseUrl
233
240
  );
@@ -249,25 +256,25 @@ class M {
249
256
  case "localStorage.getItem": {
250
257
  if (!this.opts.localStorageProvider)
251
258
  throw new Error("localStorageProvider is not set");
252
- const p = await this.opts.localStorageProvider.getItem(e.key);
253
- (w = (y = this.iframe) == null ? void 0 : y.contentWindow) == null || w.postMessage(
259
+ const m = await this.opts.localStorageProvider.getItem(e.key);
260
+ ($ = (b = this.iframe) == null ? void 0 : b.contentWindow) == null || $.postMessage(
254
261
  {
255
262
  type: "localStorage.didGetItem",
256
263
  key: e.key,
257
- value: p
264
+ value: m
258
265
  },
259
266
  this.baseUrl
260
267
  );
261
268
  break;
262
269
  }
263
270
  case "success":
264
- (b = (l = this.opts) == null ? void 0 : l.onSuccess) == null || b.call(l, e.hash, e.session);
271
+ (v = (l = this.opts) == null ? void 0 : l.onSuccess) == null || v.call(l, e.hash, e.session);
265
272
  break;
266
273
  case "close":
267
- this.removeIframe(), this.destroy(), (v = (d = this.opts) == null ? void 0 : d.onClose) == null || v.call(d);
274
+ this.removeIframe(), this.destroy(), (S = (c = this.opts) == null ? void 0 : c.onClose) == null || S.call(c);
268
275
  break;
269
276
  case "setMode":
270
- (S = ($ = this.opts) == null ? void 0 : $.onSetMode) == null || S.call($, e.mode);
277
+ (x = (h = this.opts) == null ? void 0 : h.onSetMode) == null || x.call(h, e.mode);
271
278
  break;
272
279
  case "switchChain":
273
280
  if (!this.opts.walletProvider)
@@ -275,7 +282,7 @@ class M {
275
282
  try {
276
283
  await this.opts.walletProvider.switchChainAsync({
277
284
  chainId: e.chainId
278
- }), (E = (x = this.iframe) == null ? void 0 : x.contentWindow) == null || E.postMessage(
285
+ }), (I = (u = this.iframe) == null ? void 0 : u.contentWindow) == null || I.postMessage(
279
286
  {
280
287
  type: "didSwitchChain",
281
288
  success: !0,
@@ -283,12 +290,12 @@ class M {
283
290
  },
284
291
  this.baseUrl
285
292
  );
286
- } catch (p) {
287
- (U = (k = this.iframe) == null ? void 0 : k.contentWindow) == null || U.postMessage(
293
+ } catch (m) {
294
+ (E = (U = this.iframe) == null ? void 0 : U.contentWindow) == null || E.postMessage(
288
295
  {
289
296
  type: "didSwitchChain",
290
297
  success: !1,
291
- error: p
298
+ error: m
292
299
  },
293
300
  this.baseUrl
294
301
  );
@@ -299,23 +306,23 @@ class M {
299
306
  if (!this.opts.walletProvider)
300
307
  throw new Error("walletProvider is not set");
301
308
  try {
302
- const p = await this.opts.walletProvider.sendTransactionAsync(
309
+ const m = await this.opts.walletProvider.sendTransactionAsync(
303
310
  e.tx
304
311
  );
305
- (P = (z = this.iframe) == null ? void 0 : z.contentWindow) == null || P.postMessage(
312
+ (M = (k = this.iframe) == null ? void 0 : k.contentWindow) == null || M.postMessage(
306
313
  {
307
314
  type: "didSendTransaction",
308
315
  success: !0,
309
- txHash: p
316
+ txHash: m
310
317
  },
311
318
  this.baseUrl
312
319
  );
313
- } catch (p) {
314
- (G = (j = this.iframe) == null ? void 0 : j.contentWindow) == null || G.postMessage(
320
+ } catch (m) {
321
+ (P = (C = this.iframe) == null ? void 0 : C.contentWindow) == null || P.postMessage(
315
322
  {
316
323
  type: "didSendTransaction",
317
324
  success: !1,
318
- error: p
325
+ error: m
319
326
  },
320
327
  this.baseUrl
321
328
  );
@@ -327,7 +334,7 @@ class M {
327
334
  if (!this.opts.walletProvider)
328
335
  throw new Error("walletProvider is not set");
329
336
  if (!this.opts.walletProvider.signTypedDataAsync) {
330
- (B = (W = this.iframe) == null ? void 0 : W.contentWindow) == null || B.postMessage(
337
+ (D = (T = this.iframe) == null ? void 0 : T.contentWindow) == null || D.postMessage(
331
338
  {
332
339
  type: "didSignTypedData",
333
340
  success: !1,
@@ -338,23 +345,23 @@ class M {
338
345
  return;
339
346
  }
340
347
  try {
341
- const p = await this.opts.walletProvider.signTypedDataAsync(
348
+ const m = await this.opts.walletProvider.signTypedDataAsync(
342
349
  e.data
343
350
  );
344
- (O = (H = this.iframe) == null ? void 0 : H.contentWindow) == null || O.postMessage(
351
+ (R = (j = this.iframe) == null ? void 0 : j.contentWindow) == null || R.postMessage(
345
352
  {
346
353
  type: "didSignTypedData",
347
354
  success: !0,
348
- signature: p
355
+ signature: m
349
356
  },
350
357
  this.baseUrl
351
358
  );
352
- } catch (p) {
353
- (R = (L = this.iframe) == null ? void 0 : L.contentWindow) == null || R.postMessage(
359
+ } catch (m) {
360
+ (L = (z = this.iframe) == null ? void 0 : z.contentWindow) == null || L.postMessage(
354
361
  {
355
362
  type: "didSignTypedData",
356
363
  success: !1,
357
- error: p
364
+ error: m
358
365
  },
359
366
  this.baseUrl
360
367
  );
@@ -366,10 +373,10 @@ class M {
366
373
  this.opts = t;
367
374
  }
368
375
  get externalUrl() {
369
- var t, e, i, o, r, n;
376
+ var t, e, i, o, r, p, a, n, d;
370
377
  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=${ae(
371
378
  this.opts.evm.value || 0n
372
- )}` : ""}${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(",")}` : ""}${(n = this.opts.allowedPaymentCurrencies) != null && n.length ? `&allowedPaymentCurrencies=${this.opts.allowedPaymentCurrencies.join(",")}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.disableWithdrawToSelfSuggestion ? "&disableWithdrawToSelfSuggestion=true" : ""}${this.opts.hideSettlementCopy ? "&hideSettlementCopy=true" : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
379
+ )}` : ""}${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(",")}` : ""}${(a = this.opts.appMetadata) != null && a.name ? `&appMetadata.name=${encodeURIComponent(this.opts.appMetadata.name)}` : ""}${(n = this.opts.appMetadata) != null && n.logoUrl ? `&appMetadata.logoUrl=${encodeURIComponent(this.opts.appMetadata.logoUrl)}` : ""}${(d = this.opts.appMetadata) != null && d.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.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
373
380
  }
374
381
  initialize() {
375
382
  window.addEventListener("message", this.iframeEventHandler);
@@ -411,56 +418,70 @@ const me = ({
411
418
  currencyId: i,
412
419
  amount: o,
413
420
  gasRefuelAmountPerChain: r,
414
- preferGaslessPayment: n,
415
- chainIds: c,
416
- excludeChainIds: a,
417
- excludeCurrencyTiers: h,
418
- excludeFundingSources: u,
419
- fundingSources: m,
420
- mode: g,
421
- hideSettlementCopy: f,
422
- sessionId: y,
423
- sessionMetadata: w,
424
- disableWithdrawToSelfSuggestion: l,
425
- theme: b,
426
- walletProvider: d,
427
- localStorageProvider: v,
428
- onOpen: $,
429
- onSuccess: S,
430
- onClose: x,
431
- autoCloseOnSuccess: E,
432
- popupsBlocked: k,
433
- baseUrl: U,
434
- debug: z
421
+ preferGaslessPayment: p,
422
+ chainIds: a,
423
+ excludeChainIds: n,
424
+ excludeCurrencyTiers: d,
425
+ excludeFundingSources: g,
426
+ fundingSources: f,
427
+ appMetadata: y,
428
+ enableRefundEmails: w,
429
+ payerEmail: b,
430
+ mode: $,
431
+ hideSettlementCopy: l,
432
+ showAppLogo: v,
433
+ showOnrampFirst: c,
434
+ debitCardAlias: S,
435
+ copyOverrides: h,
436
+ sessionId: x,
437
+ sessionMetadata: u,
438
+ disableWithdrawToSelfSuggestion: I,
439
+ theme: U,
440
+ walletProvider: E,
441
+ localStorageProvider: k,
442
+ onOpen: M,
443
+ onSuccess: C,
444
+ onClose: P,
445
+ autoCloseOnSuccess: T,
446
+ popupsBlocked: D,
447
+ baseUrl: j,
448
+ debug: R
435
449
  }) => {
436
- const P = A(() => new M({
450
+ const z = B(() => new O({
437
451
  app: s,
438
452
  recipient: t,
439
453
  chainId: e,
440
454
  currencyId: i,
441
455
  amount: o,
442
456
  gasRefuelAmountPerChain: r,
443
- preferGaslessPayment: n,
444
- chainIds: c,
445
- excludeChainIds: a,
446
- excludeCurrencyTiers: h,
447
- excludeFundingSources: u,
448
- fundingSources: m,
449
- mode: g,
450
- hideSettlementCopy: f,
451
- sessionId: y,
452
- sessionMetadata: w,
453
- disableWithdrawToSelfSuggestion: l,
454
- theme: b,
455
- walletProvider: d,
456
- localStorageProvider: v,
457
- onOpen: $,
458
- onSuccess: S,
459
- onClose: x,
460
- autoCloseOnSuccess: E,
461
- popupsBlocked: k,
462
- baseUrl: U,
463
- debug: z
457
+ preferGaslessPayment: p,
458
+ chainIds: a,
459
+ excludeChainIds: n,
460
+ excludeCurrencyTiers: d,
461
+ excludeFundingSources: g,
462
+ fundingSources: f,
463
+ appMetadata: y,
464
+ enableRefundEmails: w,
465
+ payerEmail: b,
466
+ mode: $,
467
+ hideSettlementCopy: l,
468
+ showAppLogo: v,
469
+ showOnrampFirst: c,
470
+ debitCardAlias: S,
471
+ copyOverrides: h,
472
+ sessionId: x,
473
+ sessionMetadata: u,
474
+ disableWithdrawToSelfSuggestion: I,
475
+ theme: U,
476
+ walletProvider: E,
477
+ localStorageProvider: k,
478
+ onOpen: M,
479
+ onSuccess: C,
480
+ onClose: P,
481
+ autoCloseOnSuccess: T,
482
+ popupsBlocked: D,
483
+ baseUrl: j,
484
+ debug: R
464
485
  }), [
465
486
  s,
466
487
  t,
@@ -468,32 +489,39 @@ const me = ({
468
489
  i,
469
490
  o,
470
491
  r,
471
- n,
472
- c,
492
+ p,
473
493
  a,
474
- h,
475
- u,
476
- m,
494
+ n,
495
+ d,
477
496
  g,
478
497
  f,
479
498
  y,
480
499
  w,
481
- l,
482
500
  b,
483
- d,
484
- v,
485
501
  $,
502
+ l,
503
+ v,
504
+ c,
486
505
  S,
506
+ h,
487
507
  x,
508
+ u,
509
+ I,
510
+ U,
488
511
  E,
489
512
  k,
490
- U,
491
- z
513
+ M,
514
+ C,
515
+ P,
516
+ T,
517
+ D,
518
+ j,
519
+ R
492
520
  ]);
493
521
  return {
494
- openGlideDeposit: P.open,
495
- externalUrl: P.externalUrl,
496
- opts: P.opts
522
+ openGlideDeposit: z.open,
523
+ externalUrl: z.externalUrl,
524
+ opts: z.opts
497
525
  };
498
526
  }, ge = ({
499
527
  app: s,
@@ -502,47 +530,61 @@ const me = ({
502
530
  excludeChainIds: i,
503
531
  excludeCurrencyTiers: o,
504
532
  excludeFundingSources: r,
505
- fundingSources: n,
506
- allowedPaymentCurrencies: c,
507
- hideSettlementCopy: a,
508
- amount: h,
509
- sessionId: u,
510
- sessionMetadata: m,
511
- theme: g,
512
- walletProvider: f,
513
- localStorageProvider: y,
514
- onOpen: w,
515
- onSuccess: l,
516
- onClose: b,
517
- autoCloseOnSuccess: d,
518
- popupsBlocked: v,
519
- baseUrl: $,
520
- debug: S
533
+ fundingSources: p,
534
+ allowedPaymentCurrencies: a,
535
+ appMetadata: n,
536
+ enableRefundEmails: d,
537
+ payerEmail: g,
538
+ hideSettlementCopy: f,
539
+ showAppLogo: y,
540
+ showOnrampFirst: w,
541
+ debitCardAlias: b,
542
+ copyOverrides: $,
543
+ amount: l,
544
+ sessionId: v,
545
+ sessionMetadata: c,
546
+ theme: S,
547
+ walletProvider: h,
548
+ localStorageProvider: x,
549
+ onOpen: u,
550
+ onSuccess: I,
551
+ onClose: U,
552
+ autoCloseOnSuccess: E,
553
+ popupsBlocked: k,
554
+ baseUrl: M,
555
+ debug: C
521
556
  }) => {
522
- const x = A(() => new M({
557
+ const P = B(() => new O({
523
558
  app: s,
524
559
  preferGaslessPayment: t,
525
560
  chainIds: e,
526
561
  excludeChainIds: i,
527
562
  excludeCurrencyTiers: o,
528
563
  excludeFundingSources: r,
529
- fundingSources: n,
530
- allowedPaymentCurrencies: c,
564
+ fundingSources: p,
565
+ allowedPaymentCurrencies: a,
566
+ appMetadata: n,
567
+ enableRefundEmails: d,
568
+ payerEmail: g,
531
569
  mode: "pay",
532
- hideSettlementCopy: a,
533
- sessionId: u,
534
- amount: h,
535
- sessionMetadata: m,
536
- theme: g,
537
- walletProvider: f,
538
- localStorageProvider: y,
539
- onOpen: w,
540
- onSuccess: l,
541
- onClose: b,
542
- autoCloseOnSuccess: d,
543
- popupsBlocked: v,
544
- baseUrl: $,
545
- debug: S
570
+ hideSettlementCopy: f,
571
+ showAppLogo: y,
572
+ showOnrampFirst: w,
573
+ debitCardAlias: b,
574
+ copyOverrides: $,
575
+ sessionId: v,
576
+ amount: l,
577
+ sessionMetadata: c,
578
+ theme: S,
579
+ walletProvider: h,
580
+ localStorageProvider: x,
581
+ onOpen: u,
582
+ onSuccess: I,
583
+ onClose: U,
584
+ autoCloseOnSuccess: E,
585
+ popupsBlocked: k,
586
+ baseUrl: M,
587
+ debug: C
546
588
  }), [
547
589
  s,
548
590
  t,
@@ -550,27 +592,34 @@ const me = ({
550
592
  i,
551
593
  o,
552
594
  r,
553
- n,
554
- c,
595
+ p,
555
596
  a,
556
- u,
557
- h,
558
- m,
597
+ n,
598
+ d,
559
599
  g,
560
600
  f,
561
601
  y,
562
602
  w,
563
- l,
564
603
  b,
565
- d,
566
- v,
567
604
  $,
568
- S
605
+ v,
606
+ l,
607
+ c,
608
+ S,
609
+ h,
610
+ x,
611
+ u,
612
+ I,
613
+ U,
614
+ E,
615
+ k,
616
+ M,
617
+ C
569
618
  ]);
570
619
  return {
571
- openGlidePay: x.open,
572
- externalUrl: x.externalUrl,
573
- opts: x.opts
620
+ openGlidePay: P.open,
621
+ externalUrl: P.externalUrl,
622
+ opts: P.opts
574
623
  };
575
624
  }, fe = ({
576
625
  app: s,
@@ -579,41 +628,49 @@ const me = ({
579
628
  preferGaslessPayment: i,
580
629
  chainIds: o,
581
630
  excludeChainIds: r,
582
- excludeCurrencyTiers: n,
583
- excludeFundingSources: c,
584
- sessionMetadata: a,
585
- theme: h,
586
- walletProvider: u,
587
- localStorageProvider: m,
588
- onOpen: g,
589
- onSuccess: f,
590
- onClose: y,
591
- autoCloseOnSuccess: w,
592
- popupsBlocked: l,
593
- baseUrl: b,
594
- debug: d
631
+ excludeCurrencyTiers: p,
632
+ excludeFundingSources: a,
633
+ sessionMetadata: n,
634
+ showAppLogo: d,
635
+ showOnrampFirst: g,
636
+ debitCardAlias: f,
637
+ copyOverrides: y,
638
+ theme: w,
639
+ walletProvider: b,
640
+ localStorageProvider: $,
641
+ onOpen: l,
642
+ onSuccess: v,
643
+ onClose: c,
644
+ autoCloseOnSuccess: S,
645
+ popupsBlocked: h,
646
+ baseUrl: x,
647
+ debug: u
595
648
  }) => {
596
- const v = A(() => new M({
649
+ const I = B(() => new O({
597
650
  app: s,
598
651
  evm: t,
599
652
  approval: e,
600
653
  preferGaslessPayment: i,
601
654
  chainIds: o,
602
655
  excludeChainIds: r,
603
- excludeCurrencyTiers: n,
604
- excludeFundingSources: c,
605
- sessionMetadata: a,
656
+ excludeCurrencyTiers: p,
657
+ excludeFundingSources: a,
658
+ sessionMetadata: n,
659
+ showAppLogo: d,
660
+ showOnrampFirst: g,
661
+ debitCardAlias: f,
662
+ copyOverrides: y,
606
663
  mode: "call",
607
- theme: h,
608
- walletProvider: u,
609
- localStorageProvider: m,
610
- onOpen: g,
611
- onSuccess: f,
612
- onClose: y,
613
- autoCloseOnSuccess: w,
614
- popupsBlocked: l,
615
- baseUrl: b,
616
- debug: d
664
+ theme: w,
665
+ walletProvider: b,
666
+ localStorageProvider: $,
667
+ onOpen: l,
668
+ onSuccess: v,
669
+ onClose: c,
670
+ autoCloseOnSuccess: S,
671
+ popupsBlocked: h,
672
+ baseUrl: x,
673
+ debug: u
617
674
  }), [
618
675
  s,
619
676
  t,
@@ -621,24 +678,28 @@ const me = ({
621
678
  i,
622
679
  o,
623
680
  r,
624
- n,
625
- c,
681
+ p,
626
682
  a,
627
- h,
628
- u,
629
- m,
683
+ n,
684
+ d,
630
685
  g,
631
686
  f,
632
687
  y,
633
688
  w,
634
- l,
635
689
  b,
636
- d
690
+ $,
691
+ l,
692
+ v,
693
+ c,
694
+ S,
695
+ h,
696
+ x,
697
+ u
637
698
  ]);
638
699
  return {
639
- openGlideCall: v.open,
640
- externalUrl: v.externalUrl,
641
- opts: v.opts
700
+ openGlideCall: I.open,
701
+ externalUrl: I.externalUrl,
702
+ opts: I.opts
642
703
  };
643
704
  }, ye = ({
644
705
  app: s,
@@ -647,39 +708,47 @@ const me = ({
647
708
  currencyId: i,
648
709
  preferGaslessPayment: o,
649
710
  chainIds: r,
650
- excludeChainIds: n,
651
- excludeCurrencyTiers: c,
652
- excludeFundingSources: a,
653
- sessionMetadata: h,
654
- theme: u,
655
- walletProvider: m,
656
- localStorageProvider: g,
657
- onOpen: f,
658
- onSuccess: y,
659
- onClose: w,
660
- autoCloseOnSuccess: l,
661
- baseUrl: b
711
+ excludeChainIds: p,
712
+ excludeCurrencyTiers: a,
713
+ excludeFundingSources: n,
714
+ sessionMetadata: d,
715
+ showAppLogo: g,
716
+ showOnrampFirst: f,
717
+ debitCardAlias: y,
718
+ copyOverrides: w,
719
+ theme: b,
720
+ walletProvider: $,
721
+ localStorageProvider: l,
722
+ onOpen: v,
723
+ onSuccess: c,
724
+ onClose: S,
725
+ autoCloseOnSuccess: h,
726
+ baseUrl: x
662
727
  }) => {
663
- const d = A(() => new M({
728
+ const u = B(() => new O({
664
729
  app: s,
665
730
  recipient: t,
666
731
  chainId: e,
667
732
  currencyId: i,
668
733
  preferGaslessPayment: o,
669
734
  chainIds: r,
670
- excludeChainIds: n,
671
- excludeCurrencyTiers: c,
672
- excludeFundingSources: a,
673
- sessionMetadata: h,
735
+ excludeChainIds: p,
736
+ excludeCurrencyTiers: a,
737
+ excludeFundingSources: n,
738
+ sessionMetadata: d,
739
+ showAppLogo: g,
740
+ showOnrampFirst: f,
741
+ debitCardAlias: y,
742
+ copyOverrides: w,
674
743
  mode: "buy",
675
- theme: u,
676
- walletProvider: m,
677
- localStorageProvider: g,
678
- onOpen: f,
679
- onSuccess: y,
680
- onClose: w,
681
- autoCloseOnSuccess: l,
682
- baseUrl: b
744
+ theme: b,
745
+ walletProvider: $,
746
+ localStorageProvider: l,
747
+ onOpen: v,
748
+ onSuccess: c,
749
+ onClose: S,
750
+ autoCloseOnSuccess: h,
751
+ baseUrl: x
683
752
  }), [
684
753
  s,
685
754
  t,
@@ -687,23 +756,27 @@ const me = ({
687
756
  i,
688
757
  o,
689
758
  r,
690
- n,
691
- c,
759
+ p,
692
760
  a,
693
- h,
694
- u,
695
- m,
761
+ n,
762
+ d,
696
763
  g,
697
764
  f,
698
765
  y,
699
766
  w,
767
+ b,
768
+ $,
700
769
  l,
701
- b
770
+ v,
771
+ c,
772
+ S,
773
+ h,
774
+ x
702
775
  ]);
703
776
  return {
704
- openGlideBuy: d.open,
705
- externalUrl: d.externalUrl,
706
- opts: d.opts
777
+ openGlideBuy: u.open,
778
+ externalUrl: u.externalUrl,
779
+ opts: u.opts
707
780
  };
708
781
  }, we = Object.freeze({
709
782
  getItem: (s) => new Promise((t, e) => {
@@ -738,7 +811,7 @@ const me = ({
738
811
  })
739
812
  });
740
813
  export {
741
- M as GlideDeposit,
814
+ O as GlideDeposit,
742
815
  we as browserLocalStorageProvider,
743
816
  ye as useGlideBuy,
744
817
  fe as useGlideCall,
@@ -1,4 +1,4 @@
1
- import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex } from './GlideDeposit.ts';
1
+ import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
2
2
  import { GlideWidgetTheme } from './theme.ts';
3
3
  import { CAIP2, Session } from '@paywithglide/glide-js';
4
4
  interface UseGlideBuyProps {
@@ -12,6 +12,10 @@ interface UseGlideBuyProps {
12
12
  excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
13
13
  excludeFundingSources?: FundingSource[];
14
14
  sessionMetadata?: string;
15
+ showAppLogo?: ShowAppLogo;
16
+ showOnrampFirst?: boolean;
17
+ debitCardAlias?: DebitCardAlias;
18
+ copyOverrides?: Record<string, string>;
15
19
  theme?: GlideWidgetTheme;
16
20
  walletProvider?: GlideDepositWalletProvider;
17
21
  localStorageProvider?: GlideLocalStorageProvider;
@@ -21,7 +25,7 @@ interface UseGlideBuyProps {
21
25
  autoCloseOnSuccess?: boolean;
22
26
  baseUrl?: string;
23
27
  }
24
- export declare const useGlideBuy: ({ app, recipient, chainId, currencyId, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, baseUrl, }: UseGlideBuyProps) => {
28
+ export declare const useGlideBuy: ({ app, recipient, chainId, currencyId, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, baseUrl, }: UseGlideBuyProps) => {
25
29
  openGlideBuy: () => void;
26
30
  externalUrl: string;
27
31
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
@@ -1,4 +1,4 @@
1
- import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex } from './GlideDeposit.ts';
1
+ import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
2
2
  import { GlideWidgetTheme } from './theme.ts';
3
3
  import { CAIP2, Session } from '@paywithglide/glide-js';
4
4
  interface UseGlideCallProps {
@@ -19,6 +19,10 @@ interface UseGlideCallProps {
19
19
  excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
20
20
  excludeFundingSources?: FundingSource[];
21
21
  sessionMetadata?: string;
22
+ showAppLogo?: ShowAppLogo;
23
+ showOnrampFirst?: boolean;
24
+ debitCardAlias?: DebitCardAlias;
25
+ copyOverrides?: Record<string, string>;
22
26
  theme?: GlideWidgetTheme;
23
27
  walletProvider?: GlideDepositWalletProvider;
24
28
  localStorageProvider?: GlideLocalStorageProvider;
@@ -30,7 +34,7 @@ interface UseGlideCallProps {
30
34
  baseUrl?: string;
31
35
  debug?: boolean;
32
36
  }
33
- export declare const useGlideCall: ({ app, evm, approval, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideCallProps) => {
37
+ export declare const useGlideCall: ({ app, evm, approval, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideCallProps) => {
34
38
  openGlideCall: () => void;
35
39
  externalUrl: string;
36
40
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
@@ -1,4 +1,4 @@
1
- import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider } from './GlideDeposit.ts';
1
+ import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
2
2
  import { GlideWidgetTheme } from './theme.ts';
3
3
  import { CAIP2, Hex, Session } from '@paywithglide/glide-js';
4
4
  interface UseGlideDepositProps {
@@ -14,9 +14,20 @@ interface UseGlideDepositProps {
14
14
  excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
15
15
  excludeFundingSources?: FundingSource[];
16
16
  fundingSources?: FundingSource[];
17
+ appMetadata?: {
18
+ name?: string;
19
+ logoUrl?: string;
20
+ faviconUrl?: string;
21
+ };
22
+ enableRefundEmails?: boolean;
23
+ payerEmail?: string;
17
24
  mode?: "deposit" | "withdraw";
18
25
  hideWithdrawAddress?: boolean;
19
26
  hideSettlementCopy?: boolean;
27
+ showAppLogo?: ShowAppLogo;
28
+ showOnrampFirst?: boolean;
29
+ debitCardAlias?: DebitCardAlias;
30
+ copyOverrides?: Record<string, string>;
20
31
  sessionId?: string;
21
32
  sessionMetadata?: string;
22
33
  disableWithdrawToSelfSuggestion?: boolean;
@@ -31,7 +42,7 @@ interface UseGlideDepositProps {
31
42
  baseUrl?: string;
32
43
  debug?: boolean;
33
44
  }
34
- export declare const useGlideDeposit: ({ app, recipient, chainId, currencyId, amount, gasRefuelAmountPerChain, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, mode, hideSettlementCopy, sessionId, sessionMetadata, disableWithdrawToSelfSuggestion, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideDepositProps) => {
45
+ export declare const useGlideDeposit: ({ app, recipient, chainId, currencyId, amount, gasRefuelAmountPerChain, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, appMetadata, enableRefundEmails, payerEmail, mode, hideSettlementCopy, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, sessionId, sessionMetadata, disableWithdrawToSelfSuggestion, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideDepositProps) => {
35
46
  openGlideDeposit: () => void;
36
47
  externalUrl: string;
37
48
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
@@ -1,4 +1,4 @@
1
- import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider } from './GlideDeposit.ts';
1
+ import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
2
2
  import { GlideWidgetTheme } from './theme.ts';
3
3
  import { CAIP2, Hex, Session } from '@paywithglide/glide-js';
4
4
  type UseGlidePayProps = {
@@ -11,7 +11,18 @@ type UseGlidePayProps = {
11
11
  excludeFundingSources?: FundingSource[];
12
12
  fundingSources?: FundingSource[];
13
13
  allowedPaymentCurrencies?: string[];
14
+ appMetadata?: {
15
+ name?: string;
16
+ logoUrl?: string;
17
+ faviconUrl?: string;
18
+ };
19
+ enableRefundEmails?: boolean;
20
+ payerEmail?: string;
14
21
  hideSettlementCopy?: boolean;
22
+ showAppLogo?: ShowAppLogo;
23
+ showOnrampFirst?: boolean;
24
+ debitCardAlias?: DebitCardAlias;
25
+ copyOverrides?: Record<string, string>;
15
26
  sessionId?: string;
16
27
  sessionMetadata?: string;
17
28
  theme?: GlideWidgetTheme;
@@ -25,7 +36,7 @@ type UseGlidePayProps = {
25
36
  baseUrl?: string;
26
37
  debug?: boolean;
27
38
  };
28
- export declare const useGlidePay: ({ app, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, allowedPaymentCurrencies, hideSettlementCopy, amount, sessionId, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlidePayProps) => {
39
+ export declare const useGlidePay: ({ app, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, allowedPaymentCurrencies, appMetadata, enableRefundEmails, payerEmail, hideSettlementCopy, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, amount, sessionId, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlidePayProps) => {
29
40
  openGlidePay: () => void;
30
41
  externalUrl: string;
31
42
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paywithglide/glide-react",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"