@paywithglide/glide-react 0.0.32 → 0.0.33
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 +193 -186
- package/dist/theme.d.ts +1 -0
- package/package.json +1 -1
package/dist/glide.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (s, t, e) =>
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var ee = (s, t, e) => t in s ? _(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var k = (s, t, e) => ee(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { useMemo as U } from "react";
|
|
5
|
-
function
|
|
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
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function N(s) {
|
|
9
|
+
return te(s, { strict: !1 }) ? Math.ceil((s.length - 2) / 2) : s.length;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const K = "2.21.51";
|
|
12
12
|
let E = {
|
|
13
13
|
getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
|
|
14
|
-
version: `viem@${
|
|
14
|
+
version: `viem@${K}`
|
|
15
15
|
};
|
|
16
16
|
class x extends Error {
|
|
17
17
|
constructor(t, e = {}) {
|
|
@@ -58,40 +58,40 @@ class x extends Error {
|
|
|
58
58
|
configurable: !0,
|
|
59
59
|
writable: !0,
|
|
60
60
|
value: "BaseError"
|
|
61
|
-
}), this.details = i, this.docsPath = r, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version =
|
|
61
|
+
}), this.details = i, this.docsPath = r, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = K;
|
|
62
62
|
}
|
|
63
63
|
walk(t) {
|
|
64
|
-
return
|
|
64
|
+
return F(this, t);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause !== void 0 ?
|
|
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
|
|
70
|
+
class V extends x {
|
|
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
75
|
function A(s, { dir: t, size: e = 32 } = {}) {
|
|
76
|
-
return typeof s == "string" ?
|
|
76
|
+
return typeof s == "string" ? se(s, { dir: t, size: e }) : ie(s, { dir: t, size: e });
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function se(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
|
|
83
|
+
throw new V({
|
|
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
|
|
90
|
+
function ie(s, { dir: t, size: e = 32 } = {}) {
|
|
91
91
|
if (e === null)
|
|
92
92
|
return s;
|
|
93
93
|
if (s.length > e)
|
|
94
|
-
throw new
|
|
94
|
+
throw new V({
|
|
95
95
|
size: s.length,
|
|
96
96
|
targetSize: e,
|
|
97
97
|
type: "bytes"
|
|
@@ -103,46 +103,46 @@ function se(s, { dir: t, size: e = 32 } = {}) {
|
|
|
103
103
|
}
|
|
104
104
|
return i;
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class re extends x {
|
|
107
107
|
constructor({ max: t, min: e, signed: i, size: r, value: o }) {
|
|
108
108
|
super(`Number "${o}" is not in safe ${r ? `${r * 8}-bit ${i ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${e} to ${t})` : `(above ${e})`}`, { name: "IntegerOutOfRangeError" });
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
class
|
|
111
|
+
class oe extends x {
|
|
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
|
|
117
|
-
if (
|
|
118
|
-
throw new
|
|
119
|
-
givenSize:
|
|
116
|
+
function q(s, { size: t }) {
|
|
117
|
+
if (N(s) > t)
|
|
118
|
+
throw new oe({
|
|
119
|
+
givenSize: N(s),
|
|
120
120
|
maxSize: t
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
function ne(s, t = {}) {
|
|
125
|
-
return typeof s == "number" || typeof s == "bigint" ? ce(s, t) : typeof s == "string" ? le(s, t) : typeof s == "boolean" ? ae(s, t) : q(s, t);
|
|
126
|
-
}
|
|
123
|
+
const ne = /* @__PURE__ */ Array.from({ length: 256 }, (s, t) => t.toString(16).padStart(2, "0"));
|
|
127
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);
|
|
126
|
+
}
|
|
127
|
+
function ce(s, t = {}) {
|
|
128
128
|
const e = `0x${Number(s)}`;
|
|
129
|
-
return typeof t.size == "number" ? (
|
|
129
|
+
return typeof t.size == "number" ? (q(e, { size: t.size }), A(e, { size: t.size })) : e;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function J(s, t = {}) {
|
|
132
132
|
let e = "";
|
|
133
133
|
for (let r = 0; r < s.length; r++)
|
|
134
|
-
e +=
|
|
134
|
+
e += ne[s[r]];
|
|
135
135
|
const i = `0x${e}`;
|
|
136
|
-
return typeof t.size == "number" ? (
|
|
136
|
+
return typeof t.size == "number" ? (q(i, { size: t.size }), A(i, { dir: "right", size: t.size })) : i;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function de(s, t = {}) {
|
|
139
139
|
const { signed: e, size: i } = t, r = BigInt(s);
|
|
140
140
|
let o;
|
|
141
141
|
i ? e ? o = (1n << BigInt(i) * 8n - 1n) - 1n : o = 2n ** (BigInt(i) * 8n) - 1n : typeof s == "number" && (o = BigInt(Number.MAX_SAFE_INTEGER));
|
|
142
142
|
const c = typeof o == "bigint" && e ? -o - 1n : 0;
|
|
143
143
|
if (o && r > o || r < c) {
|
|
144
144
|
const n = typeof s == "bigint" ? "n" : "";
|
|
145
|
-
throw new
|
|
145
|
+
throw new re({
|
|
146
146
|
max: o ? `${o}${n}` : void 0,
|
|
147
147
|
min: `${c}${n}`,
|
|
148
148
|
signed: e,
|
|
@@ -153,10 +153,10 @@ function ce(s, t = {}) {
|
|
|
153
153
|
const a = `0x${(e && r < 0 ? (1n << BigInt(i * 8)) + BigInt(r) : r).toString(16)}`;
|
|
154
154
|
return i ? A(a, { size: i }) : a;
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
function
|
|
158
|
-
const e =
|
|
159
|
-
return
|
|
156
|
+
const le = /* @__PURE__ */ new TextEncoder();
|
|
157
|
+
function pe(s, t = {}) {
|
|
158
|
+
const e = le.encode(s);
|
|
159
|
+
return J(e, t);
|
|
160
160
|
}
|
|
161
161
|
class z {
|
|
162
162
|
constructor(t) {
|
|
@@ -173,20 +173,20 @@ class z {
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
k(this, "iframeEventHandler", async (t) => {
|
|
176
|
-
var i, r, o, c, a, n,
|
|
176
|
+
var i, r, o, c, a, n, u, m, f, g, y, w, b, d, l, p, I, v, P, S, $, M, T, D, C, G, j, B, W, H, O, L, R;
|
|
177
177
|
const e = t.data;
|
|
178
178
|
switch (e.type) {
|
|
179
179
|
case "sendInit": {
|
|
180
|
-
const
|
|
181
|
-
(
|
|
180
|
+
const h = this.opts.recipient, X = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (r = this.opts.walletProvider) == null ? void 0 : r.availableChainIds, Y = (o = this.opts.walletProvider) == null ? void 0 : o.currentChainId, Z = this.opts.preferGaslessPayment || !!((c = this.opts.walletProvider) != null && c.signTypedDataAsync);
|
|
181
|
+
(u = (a = this.iframe) == null ? void 0 : a.contentWindow) == null || u.postMessage(
|
|
182
182
|
{
|
|
183
183
|
type: "initialize",
|
|
184
184
|
sessionId: this.opts.sessionId,
|
|
185
|
-
recipient:
|
|
186
|
-
connectedWalletAddress:
|
|
187
|
-
availableChainIds:
|
|
188
|
-
currentChainId:
|
|
189
|
-
preferGaslessPayment:
|
|
185
|
+
recipient: h,
|
|
186
|
+
connectedWalletAddress: X,
|
|
187
|
+
availableChainIds: Q,
|
|
188
|
+
currentChainId: Y,
|
|
189
|
+
preferGaslessPayment: Z,
|
|
190
190
|
excludeChainIds: this.opts.excludeChainIds,
|
|
191
191
|
excludeCurrencyTiers: this.opts.excludeCurrencyTiers,
|
|
192
192
|
excludeFundingSources: this.opts.excludeFundingSources,
|
|
@@ -198,24 +198,31 @@ class z {
|
|
|
198
198
|
tokenApproval: this.opts.approval,
|
|
199
199
|
sessionMetadata: this.opts.sessionMetadata,
|
|
200
200
|
autoCloseOnSuccess: this.opts.autoCloseOnSuccess,
|
|
201
|
-
theme:
|
|
201
|
+
theme: {
|
|
202
|
+
...this.opts.theme || {},
|
|
203
|
+
colorScheme: ((n = this.opts.theme) == null ? void 0 : n.colorScheme) || getComputedStyle(document.documentElement).colorScheme || ""
|
|
204
|
+
},
|
|
202
205
|
didProvideLocalStorage: !!this.opts.localStorageProvider,
|
|
203
206
|
debug: this.opts.debug,
|
|
204
207
|
popupsBlocked: this.opts.popupsBlocked,
|
|
205
208
|
gasRefuelAmountPerChain: this.opts.gasRefuelAmountPerChain
|
|
206
209
|
},
|
|
207
210
|
new URL(this.baseUrl).origin
|
|
208
|
-
)
|
|
211
|
+
);
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
case "didOpen": {
|
|
215
|
+
this.iframe.style.opacity = "1", (f = (m = this.opts).onOpen) == null || f.call(m);
|
|
209
216
|
break;
|
|
210
217
|
}
|
|
211
218
|
case "localStorage.getKeys": {
|
|
212
219
|
if (!this.opts.localStorageProvider)
|
|
213
220
|
throw new Error("localStorageProvider is not set");
|
|
214
|
-
const
|
|
215
|
-
(
|
|
221
|
+
const h = await this.opts.localStorageProvider.getKeys();
|
|
222
|
+
(y = (g = this.iframe) == null ? void 0 : g.contentWindow) == null || y.postMessage(
|
|
216
223
|
{
|
|
217
224
|
type: "localStorage.didGetKeys",
|
|
218
|
-
keys:
|
|
225
|
+
keys: h
|
|
219
226
|
},
|
|
220
227
|
this.baseUrl
|
|
221
228
|
);
|
|
@@ -237,25 +244,25 @@ class z {
|
|
|
237
244
|
case "localStorage.getItem": {
|
|
238
245
|
if (!this.opts.localStorageProvider)
|
|
239
246
|
throw new Error("localStorageProvider is not set");
|
|
240
|
-
const
|
|
241
|
-
(
|
|
247
|
+
const h = await this.opts.localStorageProvider.getItem(e.key);
|
|
248
|
+
(b = (w = this.iframe) == null ? void 0 : w.contentWindow) == null || b.postMessage(
|
|
242
249
|
{
|
|
243
250
|
type: "localStorage.didGetItem",
|
|
244
251
|
key: e.key,
|
|
245
|
-
value:
|
|
252
|
+
value: h
|
|
246
253
|
},
|
|
247
254
|
this.baseUrl
|
|
248
255
|
);
|
|
249
256
|
break;
|
|
250
257
|
}
|
|
251
258
|
case "success":
|
|
252
|
-
(
|
|
259
|
+
(l = (d = this.opts) == null ? void 0 : d.onSuccess) == null || l.call(d, e.hash, e.session);
|
|
253
260
|
break;
|
|
254
261
|
case "close":
|
|
255
|
-
this.removeIframe(), this.destroy(), (
|
|
262
|
+
this.removeIframe(), this.destroy(), (I = (p = this.opts) == null ? void 0 : p.onClose) == null || I.call(p);
|
|
256
263
|
break;
|
|
257
264
|
case "setMode":
|
|
258
|
-
(
|
|
265
|
+
(P = (v = this.opts) == null ? void 0 : v.onSetMode) == null || P.call(v, e.mode);
|
|
259
266
|
break;
|
|
260
267
|
case "switchChain":
|
|
261
268
|
if (!this.opts.walletProvider)
|
|
@@ -263,7 +270,7 @@ class z {
|
|
|
263
270
|
try {
|
|
264
271
|
await this.opts.walletProvider.switchChainAsync({
|
|
265
272
|
chainId: e.chainId
|
|
266
|
-
}), (
|
|
273
|
+
}), ($ = (S = this.iframe) == null ? void 0 : S.contentWindow) == null || $.postMessage(
|
|
267
274
|
{
|
|
268
275
|
type: "didSwitchChain",
|
|
269
276
|
success: !0,
|
|
@@ -271,12 +278,12 @@ class z {
|
|
|
271
278
|
},
|
|
272
279
|
this.baseUrl
|
|
273
280
|
);
|
|
274
|
-
} catch (
|
|
275
|
-
(
|
|
281
|
+
} catch (h) {
|
|
282
|
+
(T = (M = this.iframe) == null ? void 0 : M.contentWindow) == null || T.postMessage(
|
|
276
283
|
{
|
|
277
284
|
type: "didSwitchChain",
|
|
278
285
|
success: !1,
|
|
279
|
-
error:
|
|
286
|
+
error: h
|
|
280
287
|
},
|
|
281
288
|
this.baseUrl
|
|
282
289
|
);
|
|
@@ -287,23 +294,23 @@ class z {
|
|
|
287
294
|
if (!this.opts.walletProvider)
|
|
288
295
|
throw new Error("walletProvider is not set");
|
|
289
296
|
try {
|
|
290
|
-
const
|
|
297
|
+
const h = await this.opts.walletProvider.sendTransactionAsync(
|
|
291
298
|
e.tx
|
|
292
299
|
);
|
|
293
|
-
(
|
|
300
|
+
(C = (D = this.iframe) == null ? void 0 : D.contentWindow) == null || C.postMessage(
|
|
294
301
|
{
|
|
295
302
|
type: "didSendTransaction",
|
|
296
303
|
success: !0,
|
|
297
|
-
txHash:
|
|
304
|
+
txHash: h
|
|
298
305
|
},
|
|
299
306
|
this.baseUrl
|
|
300
307
|
);
|
|
301
|
-
} catch (
|
|
302
|
-
(
|
|
308
|
+
} catch (h) {
|
|
309
|
+
(j = (G = this.iframe) == null ? void 0 : G.contentWindow) == null || j.postMessage(
|
|
303
310
|
{
|
|
304
311
|
type: "didSendTransaction",
|
|
305
312
|
success: !1,
|
|
306
|
-
error:
|
|
313
|
+
error: h
|
|
307
314
|
},
|
|
308
315
|
this.baseUrl
|
|
309
316
|
);
|
|
@@ -315,7 +322,7 @@ class z {
|
|
|
315
322
|
if (!this.opts.walletProvider)
|
|
316
323
|
throw new Error("walletProvider is not set");
|
|
317
324
|
if (!this.opts.walletProvider.signTypedDataAsync) {
|
|
318
|
-
(
|
|
325
|
+
(W = (B = this.iframe) == null ? void 0 : B.contentWindow) == null || W.postMessage(
|
|
319
326
|
{
|
|
320
327
|
type: "didSignTypedData",
|
|
321
328
|
success: !1,
|
|
@@ -326,23 +333,23 @@ class z {
|
|
|
326
333
|
return;
|
|
327
334
|
}
|
|
328
335
|
try {
|
|
329
|
-
const
|
|
336
|
+
const h = await this.opts.walletProvider.signTypedDataAsync(
|
|
330
337
|
e.data
|
|
331
338
|
);
|
|
332
|
-
(
|
|
339
|
+
(O = (H = this.iframe) == null ? void 0 : H.contentWindow) == null || O.postMessage(
|
|
333
340
|
{
|
|
334
341
|
type: "didSignTypedData",
|
|
335
342
|
success: !0,
|
|
336
|
-
signature:
|
|
343
|
+
signature: h
|
|
337
344
|
},
|
|
338
345
|
this.baseUrl
|
|
339
346
|
);
|
|
340
|
-
} catch (
|
|
341
|
-
(
|
|
347
|
+
} catch (h) {
|
|
348
|
+
(R = (L = this.iframe) == null ? void 0 : L.contentWindow) == null || R.postMessage(
|
|
342
349
|
{
|
|
343
350
|
type: "didSignTypedData",
|
|
344
351
|
success: !1,
|
|
345
|
-
error:
|
|
352
|
+
error: h
|
|
346
353
|
},
|
|
347
354
|
this.baseUrl
|
|
348
355
|
);
|
|
@@ -355,7 +362,7 @@ class z {
|
|
|
355
362
|
}
|
|
356
363
|
get externalUrl() {
|
|
357
364
|
var t, e, i;
|
|
358
|
-
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 ? `¤cyId=${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=${
|
|
365
|
+
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 ? `¤cyId=${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(
|
|
359
366
|
this.opts.evm.value || 0n
|
|
360
367
|
)}` : ""}${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.excludeChainIds) != null && t.length ? `&excludeChainIds=${this.opts.excludeChainIds.join(",")}` : ""}${(e = this.opts.excludeCurrencyTiers) != null && e.length ? `&excludeCurrencyTiers=${this.opts.excludeCurrencyTiers.join(",")}` : ""}${(i = this.opts.excludeFundingSources) != null && i.length ? `&excludeFundingSources=${this.opts.excludeFundingSources.join(",")}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
|
|
361
368
|
}
|
|
@@ -392,7 +399,7 @@ class z {
|
|
|
392
399
|
t && (t.remove(), document.body.classList.remove("glide-deposit-open"));
|
|
393
400
|
}
|
|
394
401
|
}
|
|
395
|
-
const
|
|
402
|
+
const me = ({
|
|
396
403
|
app: s,
|
|
397
404
|
recipient: t,
|
|
398
405
|
chainId: e,
|
|
@@ -402,18 +409,18 @@ const ue = ({
|
|
|
402
409
|
preferGaslessPayment: c,
|
|
403
410
|
excludeChainIds: a,
|
|
404
411
|
excludeCurrencyTiers: n,
|
|
405
|
-
excludeFundingSources:
|
|
406
|
-
mode:
|
|
407
|
-
sessionId:
|
|
408
|
-
sessionMetadata:
|
|
409
|
-
theme:
|
|
410
|
-
walletProvider:
|
|
411
|
-
localStorageProvider:
|
|
412
|
-
onOpen:
|
|
413
|
-
onSuccess:
|
|
414
|
-
onClose:
|
|
415
|
-
autoCloseOnSuccess:
|
|
416
|
-
popupsBlocked:
|
|
412
|
+
excludeFundingSources: u,
|
|
413
|
+
mode: m,
|
|
414
|
+
sessionId: f,
|
|
415
|
+
sessionMetadata: g,
|
|
416
|
+
theme: y,
|
|
417
|
+
walletProvider: w,
|
|
418
|
+
localStorageProvider: b,
|
|
419
|
+
onOpen: d,
|
|
420
|
+
onSuccess: l,
|
|
421
|
+
onClose: p,
|
|
422
|
+
autoCloseOnSuccess: I,
|
|
423
|
+
popupsBlocked: v,
|
|
417
424
|
baseUrl: P,
|
|
418
425
|
debug: S
|
|
419
426
|
}) => {
|
|
@@ -427,18 +434,18 @@ const ue = ({
|
|
|
427
434
|
preferGaslessPayment: c,
|
|
428
435
|
excludeChainIds: a,
|
|
429
436
|
excludeCurrencyTiers: n,
|
|
430
|
-
excludeFundingSources:
|
|
431
|
-
mode:
|
|
432
|
-
sessionId:
|
|
433
|
-
sessionMetadata:
|
|
434
|
-
theme:
|
|
435
|
-
walletProvider:
|
|
436
|
-
localStorageProvider:
|
|
437
|
-
onOpen:
|
|
438
|
-
onSuccess:
|
|
439
|
-
onClose:
|
|
440
|
-
autoCloseOnSuccess:
|
|
441
|
-
popupsBlocked:
|
|
437
|
+
excludeFundingSources: u,
|
|
438
|
+
mode: m,
|
|
439
|
+
sessionId: f,
|
|
440
|
+
sessionMetadata: g,
|
|
441
|
+
theme: y,
|
|
442
|
+
walletProvider: w,
|
|
443
|
+
localStorageProvider: b,
|
|
444
|
+
onOpen: d,
|
|
445
|
+
onSuccess: l,
|
|
446
|
+
onClose: p,
|
|
447
|
+
autoCloseOnSuccess: I,
|
|
448
|
+
popupsBlocked: v,
|
|
442
449
|
baseUrl: P,
|
|
443
450
|
debug: S
|
|
444
451
|
}), [
|
|
@@ -451,18 +458,18 @@ const ue = ({
|
|
|
451
458
|
c,
|
|
452
459
|
a,
|
|
453
460
|
n,
|
|
454
|
-
h,
|
|
455
461
|
u,
|
|
456
462
|
m,
|
|
457
463
|
f,
|
|
458
464
|
g,
|
|
459
465
|
y,
|
|
460
|
-
l,
|
|
461
466
|
w,
|
|
462
|
-
d,
|
|
463
467
|
b,
|
|
464
|
-
|
|
468
|
+
d,
|
|
469
|
+
l,
|
|
470
|
+
p,
|
|
465
471
|
I,
|
|
472
|
+
v,
|
|
466
473
|
P,
|
|
467
474
|
S
|
|
468
475
|
]);
|
|
@@ -471,7 +478,7 @@ const ue = ({
|
|
|
471
478
|
externalUrl: $.externalUrl,
|
|
472
479
|
opts: $.opts
|
|
473
480
|
};
|
|
474
|
-
},
|
|
481
|
+
}, fe = ({
|
|
475
482
|
app: s,
|
|
476
483
|
preferGaslessPayment: t,
|
|
477
484
|
excludeChainIds: e,
|
|
@@ -481,17 +488,17 @@ const ue = ({
|
|
|
481
488
|
sessionId: c,
|
|
482
489
|
sessionMetadata: a,
|
|
483
490
|
theme: n,
|
|
484
|
-
walletProvider:
|
|
485
|
-
localStorageProvider:
|
|
486
|
-
onOpen:
|
|
487
|
-
onSuccess:
|
|
488
|
-
onClose:
|
|
489
|
-
autoCloseOnSuccess:
|
|
490
|
-
popupsBlocked:
|
|
491
|
-
baseUrl:
|
|
492
|
-
debug:
|
|
491
|
+
walletProvider: u,
|
|
492
|
+
localStorageProvider: m,
|
|
493
|
+
onOpen: f,
|
|
494
|
+
onSuccess: g,
|
|
495
|
+
onClose: y,
|
|
496
|
+
autoCloseOnSuccess: w,
|
|
497
|
+
popupsBlocked: b,
|
|
498
|
+
baseUrl: d,
|
|
499
|
+
debug: l
|
|
493
500
|
}) => {
|
|
494
|
-
const
|
|
501
|
+
const p = U(() => new z({
|
|
495
502
|
app: s,
|
|
496
503
|
preferGaslessPayment: t,
|
|
497
504
|
excludeChainIds: e,
|
|
@@ -502,15 +509,15 @@ const ue = ({
|
|
|
502
509
|
amount: o,
|
|
503
510
|
sessionMetadata: a,
|
|
504
511
|
theme: n,
|
|
505
|
-
walletProvider:
|
|
506
|
-
localStorageProvider:
|
|
507
|
-
onOpen:
|
|
508
|
-
onSuccess:
|
|
509
|
-
onClose:
|
|
510
|
-
autoCloseOnSuccess:
|
|
511
|
-
popupsBlocked:
|
|
512
|
-
baseUrl:
|
|
513
|
-
debug:
|
|
512
|
+
walletProvider: u,
|
|
513
|
+
localStorageProvider: m,
|
|
514
|
+
onOpen: f,
|
|
515
|
+
onSuccess: g,
|
|
516
|
+
onClose: y,
|
|
517
|
+
autoCloseOnSuccess: w,
|
|
518
|
+
popupsBlocked: b,
|
|
519
|
+
baseUrl: d,
|
|
520
|
+
debug: l
|
|
514
521
|
}), [
|
|
515
522
|
s,
|
|
516
523
|
t,
|
|
@@ -521,22 +528,22 @@ const ue = ({
|
|
|
521
528
|
o,
|
|
522
529
|
a,
|
|
523
530
|
n,
|
|
524
|
-
h,
|
|
525
531
|
u,
|
|
526
532
|
m,
|
|
527
533
|
f,
|
|
528
534
|
g,
|
|
529
535
|
y,
|
|
530
|
-
l,
|
|
531
536
|
w,
|
|
532
|
-
|
|
537
|
+
b,
|
|
538
|
+
d,
|
|
539
|
+
l
|
|
533
540
|
]);
|
|
534
541
|
return {
|
|
535
|
-
openGlidePay:
|
|
536
|
-
externalUrl:
|
|
537
|
-
opts:
|
|
542
|
+
openGlidePay: p.open,
|
|
543
|
+
externalUrl: p.externalUrl,
|
|
544
|
+
opts: p.opts
|
|
538
545
|
};
|
|
539
|
-
},
|
|
546
|
+
}, ge = ({
|
|
540
547
|
app: s,
|
|
541
548
|
evm: t,
|
|
542
549
|
approval: e,
|
|
@@ -546,17 +553,17 @@ const ue = ({
|
|
|
546
553
|
excludeFundingSources: c,
|
|
547
554
|
sessionMetadata: a,
|
|
548
555
|
theme: n,
|
|
549
|
-
walletProvider:
|
|
550
|
-
localStorageProvider:
|
|
551
|
-
onOpen:
|
|
552
|
-
onSuccess:
|
|
553
|
-
onClose:
|
|
554
|
-
autoCloseOnSuccess:
|
|
555
|
-
popupsBlocked:
|
|
556
|
-
baseUrl:
|
|
557
|
-
debug:
|
|
556
|
+
walletProvider: u,
|
|
557
|
+
localStorageProvider: m,
|
|
558
|
+
onOpen: f,
|
|
559
|
+
onSuccess: g,
|
|
560
|
+
onClose: y,
|
|
561
|
+
autoCloseOnSuccess: w,
|
|
562
|
+
popupsBlocked: b,
|
|
563
|
+
baseUrl: d,
|
|
564
|
+
debug: l
|
|
558
565
|
}) => {
|
|
559
|
-
const
|
|
566
|
+
const p = U(() => new z({
|
|
560
567
|
app: s,
|
|
561
568
|
evm: t,
|
|
562
569
|
approval: e,
|
|
@@ -567,15 +574,15 @@ const ue = ({
|
|
|
567
574
|
sessionMetadata: a,
|
|
568
575
|
mode: "call",
|
|
569
576
|
theme: n,
|
|
570
|
-
walletProvider:
|
|
571
|
-
localStorageProvider:
|
|
572
|
-
onOpen:
|
|
573
|
-
onSuccess:
|
|
574
|
-
onClose:
|
|
575
|
-
autoCloseOnSuccess:
|
|
576
|
-
popupsBlocked:
|
|
577
|
-
baseUrl:
|
|
578
|
-
debug:
|
|
577
|
+
walletProvider: u,
|
|
578
|
+
localStorageProvider: m,
|
|
579
|
+
onOpen: f,
|
|
580
|
+
onSuccess: g,
|
|
581
|
+
onClose: y,
|
|
582
|
+
autoCloseOnSuccess: w,
|
|
583
|
+
popupsBlocked: b,
|
|
584
|
+
baseUrl: d,
|
|
585
|
+
debug: l
|
|
579
586
|
}), [
|
|
580
587
|
s,
|
|
581
588
|
t,
|
|
@@ -586,22 +593,22 @@ const ue = ({
|
|
|
586
593
|
c,
|
|
587
594
|
a,
|
|
588
595
|
n,
|
|
589
|
-
h,
|
|
590
596
|
u,
|
|
591
597
|
m,
|
|
592
598
|
f,
|
|
593
599
|
g,
|
|
594
600
|
y,
|
|
595
|
-
l,
|
|
596
601
|
w,
|
|
597
|
-
|
|
602
|
+
b,
|
|
603
|
+
d,
|
|
604
|
+
l
|
|
598
605
|
]);
|
|
599
606
|
return {
|
|
600
|
-
openGlideCall:
|
|
601
|
-
externalUrl:
|
|
602
|
-
opts:
|
|
607
|
+
openGlideCall: p.open,
|
|
608
|
+
externalUrl: p.externalUrl,
|
|
609
|
+
opts: p.opts
|
|
603
610
|
};
|
|
604
|
-
},
|
|
611
|
+
}, ye = ({
|
|
605
612
|
app: s,
|
|
606
613
|
recipient: t,
|
|
607
614
|
chainId: e,
|
|
@@ -611,16 +618,16 @@ const ue = ({
|
|
|
611
618
|
excludeCurrencyTiers: c,
|
|
612
619
|
excludeFundingSources: a,
|
|
613
620
|
sessionMetadata: n,
|
|
614
|
-
theme:
|
|
615
|
-
walletProvider:
|
|
616
|
-
localStorageProvider:
|
|
617
|
-
onOpen:
|
|
618
|
-
onSuccess:
|
|
619
|
-
onClose:
|
|
620
|
-
autoCloseOnSuccess:
|
|
621
|
-
baseUrl:
|
|
621
|
+
theme: u,
|
|
622
|
+
walletProvider: m,
|
|
623
|
+
localStorageProvider: f,
|
|
624
|
+
onOpen: g,
|
|
625
|
+
onSuccess: y,
|
|
626
|
+
onClose: w,
|
|
627
|
+
autoCloseOnSuccess: b,
|
|
628
|
+
baseUrl: d
|
|
622
629
|
}) => {
|
|
623
|
-
const
|
|
630
|
+
const l = U(() => new z({
|
|
624
631
|
app: s,
|
|
625
632
|
recipient: t,
|
|
626
633
|
chainId: e,
|
|
@@ -631,14 +638,14 @@ const ue = ({
|
|
|
631
638
|
excludeFundingSources: a,
|
|
632
639
|
sessionMetadata: n,
|
|
633
640
|
mode: "buy",
|
|
634
|
-
theme:
|
|
635
|
-
walletProvider:
|
|
636
|
-
localStorageProvider:
|
|
637
|
-
onOpen:
|
|
638
|
-
onSuccess:
|
|
639
|
-
onClose:
|
|
640
|
-
autoCloseOnSuccess:
|
|
641
|
-
baseUrl:
|
|
641
|
+
theme: u,
|
|
642
|
+
walletProvider: m,
|
|
643
|
+
localStorageProvider: f,
|
|
644
|
+
onOpen: g,
|
|
645
|
+
onSuccess: y,
|
|
646
|
+
onClose: w,
|
|
647
|
+
autoCloseOnSuccess: b,
|
|
648
|
+
baseUrl: d
|
|
642
649
|
}), [
|
|
643
650
|
s,
|
|
644
651
|
t,
|
|
@@ -649,21 +656,21 @@ const ue = ({
|
|
|
649
656
|
c,
|
|
650
657
|
a,
|
|
651
658
|
n,
|
|
652
|
-
h,
|
|
653
659
|
u,
|
|
654
660
|
m,
|
|
655
661
|
f,
|
|
656
662
|
g,
|
|
657
663
|
y,
|
|
658
|
-
|
|
659
|
-
|
|
664
|
+
w,
|
|
665
|
+
b,
|
|
666
|
+
d
|
|
660
667
|
]);
|
|
661
668
|
return {
|
|
662
|
-
openGlideBuy:
|
|
663
|
-
externalUrl:
|
|
664
|
-
opts:
|
|
669
|
+
openGlideBuy: l.open,
|
|
670
|
+
externalUrl: l.externalUrl,
|
|
671
|
+
opts: l.opts
|
|
665
672
|
};
|
|
666
|
-
},
|
|
673
|
+
}, we = Object.freeze({
|
|
667
674
|
getItem: (s) => new Promise((t, e) => {
|
|
668
675
|
try {
|
|
669
676
|
const i = localStorage.getItem(s);
|
|
@@ -697,9 +704,9 @@ const ue = ({
|
|
|
697
704
|
});
|
|
698
705
|
export {
|
|
699
706
|
z as GlideDeposit,
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
707
|
+
we as browserLocalStorageProvider,
|
|
708
|
+
ye as useGlideBuy,
|
|
709
|
+
ge as useGlideCall,
|
|
710
|
+
me as useGlideDeposit,
|
|
711
|
+
fe as useGlidePay
|
|
705
712
|
};
|
package/dist/theme.d.ts
CHANGED