@paywithglide/glide-react 0.0.47 → 0.0.49
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/core.js +291 -379
- package/dist/glide.js +152 -136
- package/dist/pkg/GlideDeposit.d.ts +8 -8
- package/dist/pkg/analytics.d.ts +0 -19
- package/dist/pkg/useGlideBuy.d.ts +3 -2
- package/dist/pkg/useGlideCall.d.ts +3 -2
- package/dist/pkg/useGlideDeposit.d.ts +5 -2
- package/dist/pkg/useGlidePay.d.ts +3 -2
- package/package.json +6 -1
package/dist/glide.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GlideDeposit as
|
|
2
|
-
import {
|
|
3
|
-
import { useMemo as
|
|
4
|
-
const
|
|
1
|
+
import { GlideDeposit as g } from "./core.js";
|
|
2
|
+
import { browserLocalStorageProvider as c, initializeParentBridge as d } from "./core.js";
|
|
3
|
+
import { useMemo as I } from "react";
|
|
4
|
+
const u = ({
|
|
5
5
|
app: G,
|
|
6
6
|
recipient: U,
|
|
7
7
|
chainId: z,
|
|
@@ -14,31 +14,34 @@ const C = ({
|
|
|
14
14
|
excludeCurrencyTiers: Q,
|
|
15
15
|
excludeFundingSources: V,
|
|
16
16
|
fundingSources: X,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
allowedPaymentCurrencies: Y,
|
|
18
|
+
excludePaymentCurrencies: Z,
|
|
19
|
+
appMetadata: _,
|
|
20
|
+
enableRefundEmails: $,
|
|
21
|
+
payerEmail: K,
|
|
22
|
+
mode: k,
|
|
23
|
+
hideSettlementCopy: x,
|
|
24
|
+
showAppLogo: L,
|
|
25
|
+
showOnrampFirst: R,
|
|
26
|
+
debitCardAlias: E,
|
|
27
|
+
copyOverrides: M,
|
|
28
|
+
stableDepositAddressKey: D,
|
|
29
|
+
sessionId: T,
|
|
30
|
+
sessionMetadata: f,
|
|
31
|
+
disableWithdrawToSelfSuggestion: F,
|
|
32
|
+
theme: w,
|
|
33
|
+
walletProvider: A,
|
|
34
|
+
solanaWalletProvider: b,
|
|
35
|
+
localStorageProvider: W,
|
|
36
|
+
onOpen: y,
|
|
37
|
+
onSuccess: O,
|
|
38
|
+
onClose: P,
|
|
39
|
+
autoCloseOnSuccess: m,
|
|
37
40
|
popupsBlocked: v,
|
|
38
|
-
baseUrl:
|
|
39
|
-
debug:
|
|
41
|
+
baseUrl: S,
|
|
42
|
+
debug: C
|
|
40
43
|
}) => {
|
|
41
|
-
const
|
|
44
|
+
const t = I(() => new g({
|
|
42
45
|
app: G,
|
|
43
46
|
recipient: U,
|
|
44
47
|
chainId: z,
|
|
@@ -51,29 +54,32 @@ const C = ({
|
|
|
51
54
|
excludeCurrencyTiers: Q,
|
|
52
55
|
excludeFundingSources: V,
|
|
53
56
|
fundingSources: X,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
allowedPaymentCurrencies: Y,
|
|
58
|
+
excludePaymentCurrencies: Z,
|
|
59
|
+
appMetadata: _,
|
|
60
|
+
enableRefundEmails: $,
|
|
61
|
+
payerEmail: K,
|
|
62
|
+
mode: k,
|
|
63
|
+
hideSettlementCopy: x,
|
|
64
|
+
showAppLogo: L,
|
|
65
|
+
showOnrampFirst: R,
|
|
66
|
+
debitCardAlias: E,
|
|
67
|
+
copyOverrides: M,
|
|
68
|
+
stableDepositAddressKey: D,
|
|
69
|
+
sessionId: T,
|
|
70
|
+
sessionMetadata: f,
|
|
71
|
+
disableWithdrawToSelfSuggestion: F,
|
|
72
|
+
theme: w,
|
|
73
|
+
walletProvider: A,
|
|
74
|
+
solanaWalletProvider: b,
|
|
75
|
+
localStorageProvider: W,
|
|
76
|
+
onOpen: y,
|
|
77
|
+
onSuccess: O,
|
|
78
|
+
onClose: P,
|
|
79
|
+
autoCloseOnSuccess: m,
|
|
74
80
|
popupsBlocked: v,
|
|
75
|
-
baseUrl:
|
|
76
|
-
debug:
|
|
81
|
+
baseUrl: S,
|
|
82
|
+
debug: C
|
|
77
83
|
}), [
|
|
78
84
|
G,
|
|
79
85
|
U,
|
|
@@ -92,31 +98,34 @@ const C = ({
|
|
|
92
98
|
_,
|
|
93
99
|
$,
|
|
94
100
|
K,
|
|
95
|
-
W,
|
|
96
|
-
x,
|
|
97
101
|
k,
|
|
102
|
+
x,
|
|
98
103
|
L,
|
|
99
104
|
R,
|
|
100
|
-
D,
|
|
101
105
|
E,
|
|
106
|
+
M,
|
|
107
|
+
D,
|
|
102
108
|
T,
|
|
103
109
|
f,
|
|
104
|
-
t,
|
|
105
|
-
A,
|
|
106
110
|
F,
|
|
107
|
-
|
|
111
|
+
w,
|
|
112
|
+
A,
|
|
108
113
|
b,
|
|
109
|
-
|
|
114
|
+
W,
|
|
115
|
+
y,
|
|
116
|
+
O,
|
|
117
|
+
P,
|
|
118
|
+
m,
|
|
110
119
|
v,
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
S,
|
|
121
|
+
C
|
|
113
122
|
]);
|
|
114
123
|
return {
|
|
115
|
-
openGlideDeposit:
|
|
116
|
-
externalUrl:
|
|
117
|
-
opts:
|
|
124
|
+
openGlideDeposit: t.open,
|
|
125
|
+
externalUrl: t.externalUrl,
|
|
126
|
+
opts: t.opts
|
|
118
127
|
};
|
|
119
|
-
},
|
|
128
|
+
}, i = ({
|
|
120
129
|
app: G,
|
|
121
130
|
preferGaslessPayment: U,
|
|
122
131
|
chainIds: z,
|
|
@@ -134,20 +143,21 @@ const C = ({
|
|
|
134
143
|
debitCardAlias: _,
|
|
135
144
|
copyOverrides: $,
|
|
136
145
|
amount: K,
|
|
137
|
-
sessionId:
|
|
146
|
+
sessionId: k,
|
|
138
147
|
sessionMetadata: x,
|
|
139
|
-
theme:
|
|
140
|
-
walletProvider:
|
|
141
|
-
|
|
148
|
+
theme: L,
|
|
149
|
+
walletProvider: R,
|
|
150
|
+
solanaWalletProvider: E,
|
|
151
|
+
localStorageProvider: M,
|
|
142
152
|
onOpen: D,
|
|
143
|
-
onSuccess:
|
|
144
|
-
onClose:
|
|
145
|
-
autoCloseOnSuccess:
|
|
146
|
-
popupsBlocked:
|
|
153
|
+
onSuccess: T,
|
|
154
|
+
onClose: f,
|
|
155
|
+
autoCloseOnSuccess: F,
|
|
156
|
+
popupsBlocked: w,
|
|
147
157
|
baseUrl: A,
|
|
148
|
-
debug:
|
|
158
|
+
debug: b
|
|
149
159
|
}) => {
|
|
150
|
-
const
|
|
160
|
+
const W = I(() => new g({
|
|
151
161
|
app: G,
|
|
152
162
|
preferGaslessPayment: U,
|
|
153
163
|
chainIds: z,
|
|
@@ -165,19 +175,20 @@ const C = ({
|
|
|
165
175
|
showOnrampFirst: Z,
|
|
166
176
|
debitCardAlias: _,
|
|
167
177
|
copyOverrides: $,
|
|
168
|
-
sessionId:
|
|
178
|
+
sessionId: k,
|
|
169
179
|
amount: K,
|
|
170
180
|
sessionMetadata: x,
|
|
171
|
-
theme:
|
|
172
|
-
walletProvider:
|
|
173
|
-
|
|
181
|
+
theme: L,
|
|
182
|
+
walletProvider: R,
|
|
183
|
+
solanaWalletProvider: E,
|
|
184
|
+
localStorageProvider: M,
|
|
174
185
|
onOpen: D,
|
|
175
|
-
onSuccess:
|
|
176
|
-
onClose:
|
|
177
|
-
autoCloseOnSuccess:
|
|
178
|
-
popupsBlocked:
|
|
186
|
+
onSuccess: T,
|
|
187
|
+
onClose: f,
|
|
188
|
+
autoCloseOnSuccess: F,
|
|
189
|
+
popupsBlocked: w,
|
|
179
190
|
baseUrl: A,
|
|
180
|
-
debug:
|
|
191
|
+
debug: b
|
|
181
192
|
}), [
|
|
182
193
|
G,
|
|
183
194
|
U,
|
|
@@ -195,26 +206,27 @@ const C = ({
|
|
|
195
206
|
Z,
|
|
196
207
|
_,
|
|
197
208
|
$,
|
|
198
|
-
|
|
209
|
+
k,
|
|
199
210
|
K,
|
|
200
211
|
x,
|
|
201
|
-
k,
|
|
202
212
|
L,
|
|
203
213
|
R,
|
|
204
|
-
D,
|
|
205
214
|
E,
|
|
215
|
+
M,
|
|
216
|
+
D,
|
|
206
217
|
T,
|
|
207
218
|
f,
|
|
208
|
-
|
|
219
|
+
F,
|
|
220
|
+
w,
|
|
209
221
|
A,
|
|
210
|
-
|
|
222
|
+
b
|
|
211
223
|
]);
|
|
212
224
|
return {
|
|
213
|
-
openGlidePay:
|
|
214
|
-
externalUrl:
|
|
215
|
-
opts:
|
|
225
|
+
openGlidePay: W.open,
|
|
226
|
+
externalUrl: W.externalUrl,
|
|
227
|
+
opts: W.opts
|
|
216
228
|
};
|
|
217
|
-
},
|
|
229
|
+
}, l = ({
|
|
218
230
|
app: G,
|
|
219
231
|
evm: U,
|
|
220
232
|
approval: z,
|
|
@@ -230,16 +242,17 @@ const C = ({
|
|
|
230
242
|
copyOverrides: Y,
|
|
231
243
|
theme: Z,
|
|
232
244
|
walletProvider: _,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
245
|
+
solanaWalletProvider: $,
|
|
246
|
+
localStorageProvider: K,
|
|
247
|
+
onOpen: k,
|
|
248
|
+
onSuccess: x,
|
|
249
|
+
onClose: L,
|
|
250
|
+
autoCloseOnSuccess: R,
|
|
251
|
+
popupsBlocked: E,
|
|
252
|
+
baseUrl: M,
|
|
240
253
|
debug: D
|
|
241
254
|
}) => {
|
|
242
|
-
const
|
|
255
|
+
const T = I(() => new g({
|
|
243
256
|
app: G,
|
|
244
257
|
evm: U,
|
|
245
258
|
approval: z,
|
|
@@ -256,13 +269,14 @@ const C = ({
|
|
|
256
269
|
mode: "call",
|
|
257
270
|
theme: Z,
|
|
258
271
|
walletProvider: _,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
272
|
+
solanaWalletProvider: $,
|
|
273
|
+
localStorageProvider: K,
|
|
274
|
+
onOpen: k,
|
|
275
|
+
onSuccess: x,
|
|
276
|
+
onClose: L,
|
|
277
|
+
autoCloseOnSuccess: R,
|
|
278
|
+
popupsBlocked: E,
|
|
279
|
+
baseUrl: M,
|
|
266
280
|
debug: D
|
|
267
281
|
}), [
|
|
268
282
|
G,
|
|
@@ -282,19 +296,20 @@ const C = ({
|
|
|
282
296
|
_,
|
|
283
297
|
$,
|
|
284
298
|
K,
|
|
285
|
-
W,
|
|
286
|
-
x,
|
|
287
299
|
k,
|
|
300
|
+
x,
|
|
288
301
|
L,
|
|
289
302
|
R,
|
|
303
|
+
E,
|
|
304
|
+
M,
|
|
290
305
|
D
|
|
291
306
|
]);
|
|
292
307
|
return {
|
|
293
|
-
openGlideCall:
|
|
294
|
-
externalUrl:
|
|
295
|
-
opts:
|
|
308
|
+
openGlideCall: T.open,
|
|
309
|
+
externalUrl: T.externalUrl,
|
|
310
|
+
opts: T.opts
|
|
296
311
|
};
|
|
297
|
-
},
|
|
312
|
+
}, n = ({
|
|
298
313
|
app: G,
|
|
299
314
|
recipient: U,
|
|
300
315
|
chainId: z,
|
|
@@ -311,14 +326,15 @@ const C = ({
|
|
|
311
326
|
copyOverrides: Z,
|
|
312
327
|
theme: _,
|
|
313
328
|
walletProvider: $,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
329
|
+
solanaWalletProvider: K,
|
|
330
|
+
localStorageProvider: k,
|
|
331
|
+
onOpen: x,
|
|
332
|
+
onSuccess: L,
|
|
333
|
+
onClose: R,
|
|
334
|
+
autoCloseOnSuccess: E,
|
|
335
|
+
baseUrl: M
|
|
320
336
|
}) => {
|
|
321
|
-
const D =
|
|
337
|
+
const D = I(() => new g({
|
|
322
338
|
app: G,
|
|
323
339
|
recipient: U,
|
|
324
340
|
chainId: z,
|
|
@@ -336,12 +352,13 @@ const C = ({
|
|
|
336
352
|
mode: "buy",
|
|
337
353
|
theme: _,
|
|
338
354
|
walletProvider: $,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
355
|
+
solanaWalletProvider: K,
|
|
356
|
+
localStorageProvider: k,
|
|
357
|
+
onOpen: x,
|
|
358
|
+
onSuccess: L,
|
|
359
|
+
onClose: R,
|
|
360
|
+
autoCloseOnSuccess: E,
|
|
361
|
+
baseUrl: M
|
|
345
362
|
}), [
|
|
346
363
|
G,
|
|
347
364
|
U,
|
|
@@ -360,11 +377,12 @@ const C = ({
|
|
|
360
377
|
_,
|
|
361
378
|
$,
|
|
362
379
|
K,
|
|
363
|
-
W,
|
|
364
|
-
x,
|
|
365
380
|
k,
|
|
381
|
+
x,
|
|
366
382
|
L,
|
|
367
|
-
R
|
|
383
|
+
R,
|
|
384
|
+
E,
|
|
385
|
+
M
|
|
368
386
|
]);
|
|
369
387
|
return {
|
|
370
388
|
openGlideBuy: D.open,
|
|
@@ -373,13 +391,11 @@ const C = ({
|
|
|
373
391
|
};
|
|
374
392
|
};
|
|
375
393
|
export {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
C as useGlideDeposit,
|
|
384
|
-
l as useGlidePay
|
|
394
|
+
g as GlideDeposit,
|
|
395
|
+
c as browserLocalStorageProvider,
|
|
396
|
+
d as initializeParentBridge,
|
|
397
|
+
n as useGlideBuy,
|
|
398
|
+
l as useGlideCall,
|
|
399
|
+
u as useGlideDeposit,
|
|
400
|
+
i as useGlidePay
|
|
385
401
|
};
|
|
@@ -77,6 +77,12 @@ export type GlideDepositWalletProvider = {
|
|
|
77
77
|
sendTransactionAsync: (tx: EVMTransaction) => Promise<Hex>;
|
|
78
78
|
signTypedDataAsync?: (args: PermitTypedData<bigint>) => Promise<Hex>;
|
|
79
79
|
};
|
|
80
|
+
export type GlideSolanaWalletProvider = {
|
|
81
|
+
address: string | undefined;
|
|
82
|
+
currentChainId: "solana:101" | "solana:103";
|
|
83
|
+
signMessageAsync: (message: Uint8Array) => Promise<Uint8Array>;
|
|
84
|
+
sendTransactionAsync: (transaction: Uint8Array) => Promise<Uint8Array>;
|
|
85
|
+
};
|
|
80
86
|
export type GlideLocalStorageProvider = {
|
|
81
87
|
getItem: (key: string) => Promise<string | null>;
|
|
82
88
|
setItem: (key: string, value: string) => Promise<void>;
|
|
@@ -117,6 +123,7 @@ export type GlideDepositOptions = {
|
|
|
117
123
|
excludeFundingSources?: FundingSource[];
|
|
118
124
|
fundingSources?: FundingSource[];
|
|
119
125
|
allowedPaymentCurrencies?: string[];
|
|
126
|
+
excludePaymentCurrencies?: string[];
|
|
120
127
|
appMetadata?: {
|
|
121
128
|
name?: string;
|
|
122
129
|
logoUrl?: string;
|
|
@@ -125,6 +132,7 @@ export type GlideDepositOptions = {
|
|
|
125
132
|
enableRefundEmails?: boolean;
|
|
126
133
|
payerEmail?: string;
|
|
127
134
|
walletProvider?: GlideDepositWalletProvider;
|
|
135
|
+
solanaWalletProvider?: GlideSolanaWalletProvider;
|
|
128
136
|
localStorageProvider?: GlideLocalStorageProvider;
|
|
129
137
|
onOpen?: () => void;
|
|
130
138
|
onSuccess?: (fulfillmentTxHash: Hex, session: Session) => void;
|
|
@@ -153,14 +161,6 @@ export type GlideDepositOptions = {
|
|
|
153
161
|
export declare class GlideDeposit {
|
|
154
162
|
opts: GlideDepositOptions;
|
|
155
163
|
constructor(opts: GlideDepositOptions);
|
|
156
|
-
/**
|
|
157
|
-
* Get analytics context for events tracked directly in SDK
|
|
158
|
-
*/
|
|
159
|
-
private getAnalyticsContext;
|
|
160
|
-
/**
|
|
161
|
-
* Track an analytics event with context
|
|
162
|
-
*/
|
|
163
|
-
private trackEvent;
|
|
164
164
|
open: () => void;
|
|
165
165
|
get externalUrl(): string;
|
|
166
166
|
private initialize;
|
package/dist/pkg/analytics.d.ts
CHANGED
|
@@ -199,22 +199,3 @@ export type GlideAnalyticsEvent = GlideAnalyticsEventType & GlideAnalyticsContex
|
|
|
199
199
|
* Callback function type for analytics events
|
|
200
200
|
*/
|
|
201
201
|
export type GlideAnalyticsCallback = (event: GlideAnalyticsEvent) => void;
|
|
202
|
-
/**
|
|
203
|
-
* Helper class for emitting analytics events
|
|
204
|
-
*/
|
|
205
|
-
export declare class GlideAnalytics {
|
|
206
|
-
private callback?;
|
|
207
|
-
private startTime?;
|
|
208
|
-
private currentStep?;
|
|
209
|
-
constructor(callback?: GlideAnalyticsCallback);
|
|
210
|
-
setCallback(callback: GlideAnalyticsCallback | undefined): void;
|
|
211
|
-
track(event: GlideAnalyticsEvent): void;
|
|
212
|
-
modalOpened(): void;
|
|
213
|
-
modalClosed(completedTransaction: boolean): void;
|
|
214
|
-
stepViewed(step: string): void;
|
|
215
|
-
stepExited(step: string, direction: "forward" | "back"): void;
|
|
216
|
-
paymentMethodSelected(paymentMethod: "wallet" | "transfer" | "coinbase" | "coinbase_app" | "fiat" | "interac" | "debit_card_alias"): void;
|
|
217
|
-
transactionCompleted(sessionId: string, txHash: string, paymentMethod: string, amountUSD?: number): void;
|
|
218
|
-
errorOccurred(errorType: string, errorMessage: string, step?: string): void;
|
|
219
|
-
}
|
|
220
|
-
export declare const glideAnalytics: GlideAnalytics;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
|
|
1
|
+
import { FundingSource, GlideDepositWalletProvider, GlideSolanaWalletProvider, 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 {
|
|
@@ -18,6 +18,7 @@ interface UseGlideBuyProps {
|
|
|
18
18
|
copyOverrides?: Record<string, string>;
|
|
19
19
|
theme?: GlideWidgetTheme;
|
|
20
20
|
walletProvider?: GlideDepositWalletProvider;
|
|
21
|
+
solanaWalletProvider?: GlideSolanaWalletProvider;
|
|
21
22
|
localStorageProvider?: GlideLocalStorageProvider;
|
|
22
23
|
onOpen?: () => void;
|
|
23
24
|
onSuccess?: (hash: Hex, session: Session) => void;
|
|
@@ -25,7 +26,7 @@ interface UseGlideBuyProps {
|
|
|
25
26
|
autoCloseOnSuccess?: boolean;
|
|
26
27
|
baseUrl?: string;
|
|
27
28
|
}
|
|
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) => {
|
|
29
|
+
export declare const useGlideBuy: ({ app, recipient, chainId, currencyId, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, theme, walletProvider, solanaWalletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, baseUrl, }: UseGlideBuyProps) => {
|
|
29
30
|
openGlideBuy: () => void;
|
|
30
31
|
externalUrl: string;
|
|
31
32
|
opts: import('./GlideDeposit.ts').GlideDepositOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, Hex, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
|
|
1
|
+
import { FundingSource, GlideDepositWalletProvider, GlideSolanaWalletProvider, 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 {
|
|
@@ -25,6 +25,7 @@ interface UseGlideCallProps {
|
|
|
25
25
|
copyOverrides?: Record<string, string>;
|
|
26
26
|
theme?: GlideWidgetTheme;
|
|
27
27
|
walletProvider?: GlideDepositWalletProvider;
|
|
28
|
+
solanaWalletProvider?: GlideSolanaWalletProvider;
|
|
28
29
|
localStorageProvider?: GlideLocalStorageProvider;
|
|
29
30
|
onOpen?: () => void;
|
|
30
31
|
onSuccess?: (hash: Hex, session: Session) => void;
|
|
@@ -34,7 +35,7 @@ interface UseGlideCallProps {
|
|
|
34
35
|
baseUrl?: string;
|
|
35
36
|
debug?: boolean;
|
|
36
37
|
}
|
|
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) => {
|
|
38
|
+
export declare const useGlideCall: ({ app, evm, approval, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, theme, walletProvider, solanaWalletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideCallProps) => {
|
|
38
39
|
openGlideCall: () => void;
|
|
39
40
|
externalUrl: string;
|
|
40
41
|
opts: import('./GlideDeposit.ts').GlideDepositOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
|
|
1
|
+
import { FundingSource, GlideDepositWalletProvider, GlideSolanaWalletProvider, 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,6 +14,8 @@ interface UseGlideDepositProps {
|
|
|
14
14
|
excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
|
|
15
15
|
excludeFundingSources?: FundingSource[];
|
|
16
16
|
fundingSources?: FundingSource[];
|
|
17
|
+
allowedPaymentCurrencies?: string[];
|
|
18
|
+
excludePaymentCurrencies?: string[];
|
|
17
19
|
appMetadata?: {
|
|
18
20
|
name?: string;
|
|
19
21
|
logoUrl?: string;
|
|
@@ -34,6 +36,7 @@ interface UseGlideDepositProps {
|
|
|
34
36
|
disableWithdrawToSelfSuggestion?: boolean;
|
|
35
37
|
theme?: GlideWidgetTheme;
|
|
36
38
|
walletProvider?: GlideDepositWalletProvider;
|
|
39
|
+
solanaWalletProvider?: GlideSolanaWalletProvider;
|
|
37
40
|
localStorageProvider?: GlideLocalStorageProvider;
|
|
38
41
|
onOpen?: () => void;
|
|
39
42
|
onSuccess?: (hash: Hex, session: Session) => void;
|
|
@@ -43,7 +46,7 @@ interface UseGlideDepositProps {
|
|
|
43
46
|
baseUrl?: string;
|
|
44
47
|
debug?: boolean;
|
|
45
48
|
}
|
|
46
|
-
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, stableDepositAddressKey, sessionId, sessionMetadata, disableWithdrawToSelfSuggestion, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideDepositProps) => {
|
|
49
|
+
export declare const useGlideDeposit: ({ app, recipient, chainId, currencyId, amount, gasRefuelAmountPerChain, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, allowedPaymentCurrencies, excludePaymentCurrencies, appMetadata, enableRefundEmails, payerEmail, mode, hideSettlementCopy, showAppLogo, showOnrampFirst, debitCardAlias, copyOverrides, stableDepositAddressKey, sessionId, sessionMetadata, disableWithdrawToSelfSuggestion, theme, walletProvider, solanaWalletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideDepositProps) => {
|
|
47
50
|
openGlideDeposit: () => void;
|
|
48
51
|
externalUrl: string;
|
|
49
52
|
opts: import('./GlideDeposit.ts').GlideDepositOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FundingSource, GlideDepositWalletProvider, GlideLocalStorageProvider, ShowAppLogo, DebitCardAlias } from './GlideDeposit.ts';
|
|
1
|
+
import { FundingSource, GlideDepositWalletProvider, GlideSolanaWalletProvider, 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 = {
|
|
@@ -27,6 +27,7 @@ type UseGlidePayProps = {
|
|
|
27
27
|
sessionMetadata?: string;
|
|
28
28
|
theme?: GlideWidgetTheme;
|
|
29
29
|
walletProvider?: GlideDepositWalletProvider;
|
|
30
|
+
solanaWalletProvider?: GlideSolanaWalletProvider;
|
|
30
31
|
localStorageProvider?: GlideLocalStorageProvider;
|
|
31
32
|
onOpen?: () => void;
|
|
32
33
|
onSuccess?: (hash: Hex, session: Session) => void;
|
|
@@ -36,7 +37,7 @@ type UseGlidePayProps = {
|
|
|
36
37
|
baseUrl?: string;
|
|
37
38
|
debug?: boolean;
|
|
38
39
|
};
|
|
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) => {
|
|
40
|
+
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, solanaWalletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlidePayProps) => {
|
|
40
41
|
openGlidePay: () => void;
|
|
41
42
|
externalUrl: string;
|
|
42
43
|
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.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@antiwork/shortest": "^0.2.1",
|
|
36
36
|
"@eslint/js": "^9.15.0",
|
|
37
|
+
"@privy-io/react-auth": "^3.10.1",
|
|
38
|
+
"@solana-program/memo": "^0.10.0",
|
|
39
|
+
"@solana-program/system": "^0.10.0",
|
|
40
|
+
"@solana-program/token": "^0.9.0",
|
|
41
|
+
"@solana/kit": "^5.1.0",
|
|
37
42
|
"@tanstack/react-query": "^5.61.5",
|
|
38
43
|
"@types/chrome": "^0.0.299",
|
|
39
44
|
"@types/react": "^18.3.12",
|