@halliday-sdk/payments 2.7.4 → 3.0.0
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/README.md +9 -9
- package/dist/paymentsApiClient/index.cjs.min.js +1 -1
- package/dist/paymentsApiClient/index.cjs.min.js.map +1 -1
- package/dist/paymentsApiClient/index.d.ts +3433 -1103
- package/dist/paymentsApiClient/index.esm.min.js +1 -1
- package/dist/paymentsApiClient/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.d.ts +1 -3
- package/dist/paymentsWidget/ethers/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.umd.min.js.map +1 -1
- package/dist/paymentsWidget/index.cjs.min.js +15 -1
- package/dist/paymentsWidget/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/index.d.ts +133 -261
- package/dist/paymentsWidget/index.esm.min.js +15 -1
- package/dist/paymentsWidget/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/index.umd.min.js +15 -1
- package/dist/paymentsWidget/index.umd.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.cjs.min.js +1 -1
- package/dist/paymentsWidget/viem/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.d.ts +1 -3
- package/dist/paymentsWidget/viem/index.esm.min.js +1 -1
- package/dist/paymentsWidget/viem/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.umd.min.js +1 -1
- package/dist/paymentsWidget/viem/index.umd.min.js.map +1 -1
- package/package.json +2 -1
|
@@ -41,35 +41,24 @@ declare const EVMChainConfig: z.ZodObject<{
|
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
type EVMChainConfig = z.infer<typeof EVMChainConfig>;
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
type TypedData = z.infer<typeof TypedData>;
|
|
46
|
-
|
|
44
|
+
type TypedData = string;
|
|
47
45
|
declare const WindowType: z.ZodEnum<{
|
|
48
|
-
EMBED: "EMBED";
|
|
49
|
-
POPUP: "POPUP";
|
|
50
46
|
MODAL: "MODAL";
|
|
47
|
+
EMBED: "EMBED";
|
|
51
48
|
}>;
|
|
52
49
|
type WindowType = z.infer<typeof WindowType>;
|
|
53
|
-
declare const TextMode: z.ZodEnum<{
|
|
54
|
-
DEFAULT: "DEFAULT";
|
|
55
|
-
ALL_UPPERCASE: "ALL_UPPERCASE";
|
|
56
|
-
}>;
|
|
57
|
-
type TextMode = z.infer<typeof TextMode>;
|
|
58
|
-
declare const FontWeight: z.ZodEnum<{
|
|
59
|
-
AUTO: "AUTO";
|
|
60
|
-
MEDIUM: "MEDIUM";
|
|
61
|
-
}>;
|
|
62
|
-
type FontWeight = z.infer<typeof FontWeight>;
|
|
63
|
-
declare const PaymentCategoryGrouping: z.ZodEnum<{
|
|
64
|
-
ATTACHED: "ATTACHED";
|
|
65
|
-
BUTTON: "BUTTON";
|
|
66
|
-
}>;
|
|
67
|
-
type PaymentCategoryGrouping = z.infer<typeof PaymentCategoryGrouping>;
|
|
68
50
|
declare const BorderStyle: z.ZodEnum<{
|
|
69
51
|
SQUARE: "SQUARE";
|
|
70
52
|
DEFAULT: "DEFAULT";
|
|
71
53
|
}>;
|
|
72
54
|
type BorderStyle = z.infer<typeof BorderStyle>;
|
|
55
|
+
declare const BackgroundStyle: z.ZodEnum<{
|
|
56
|
+
BLUR: "BLUR";
|
|
57
|
+
OFF: "OFF";
|
|
58
|
+
}>;
|
|
59
|
+
type BackgroundStyle = z.infer<typeof BackgroundStyle>;
|
|
60
|
+
declare const CssFontSize: z.ZodString;
|
|
61
|
+
type CssFontSize = z.infer<typeof CssFontSize>;
|
|
73
62
|
declare const CustomStyles: z.ZodObject<{
|
|
74
63
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
75
64
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
@@ -77,46 +66,26 @@ declare const CustomStyles: z.ZodObject<{
|
|
|
77
66
|
textColor: z.ZodOptional<z.ZodString>;
|
|
78
67
|
textSecondaryColor: z.ZodOptional<z.ZodString>;
|
|
79
68
|
accentColor: z.ZodOptional<z.ZodString>;
|
|
80
|
-
componentShadow: z.ZodOptional<z.ZodString>;
|
|
81
69
|
borderStyle: z.ZodOptional<z.ZodEnum<{
|
|
82
70
|
SQUARE: "SQUARE";
|
|
83
71
|
DEFAULT: "DEFAULT";
|
|
84
72
|
}>>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}>>;
|
|
93
|
-
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
94
|
-
AUTO: "AUTO";
|
|
95
|
-
MEDIUM: "MEDIUM";
|
|
73
|
+
successColor: z.ZodOptional<z.ZodString>;
|
|
74
|
+
alertColor: z.ZodOptional<z.ZodString>;
|
|
75
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
componentShadow: z.ZodOptional<z.ZodString>;
|
|
77
|
+
backgroundStyle: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
BLUR: "BLUR";
|
|
79
|
+
OFF: "OFF";
|
|
96
80
|
}>>;
|
|
97
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
98
|
-
src: z.ZodURL;
|
|
99
|
-
alt: z.ZodString;
|
|
100
|
-
width: z.ZodNumber;
|
|
101
|
-
height: z.ZodNumber;
|
|
102
|
-
}, z.core.$strip>>;
|
|
103
81
|
}, z.core.$strip>;
|
|
104
82
|
type CustomStyles = z.infer<typeof CustomStyles>;
|
|
105
83
|
declare const OrderStatus: z.ZodAny;
|
|
106
84
|
type OrderStatus = z.infer<typeof OrderStatus>;
|
|
107
|
-
declare const PaymentCategoryOrder: z.ZodArray<z.ZodEnum<{
|
|
108
|
-
wallet: "wallet";
|
|
109
|
-
"open-wallet": "open-wallet";
|
|
110
|
-
exchange: "exchange";
|
|
111
|
-
"open-exchange": "open-exchange";
|
|
112
|
-
cash: "cash";
|
|
113
|
-
"open-cash": "open-cash";
|
|
114
|
-
deposit: "deposit";
|
|
115
|
-
}>>;
|
|
116
|
-
type PaymentCategoryOrder = z.infer<typeof PaymentCategoryOrder>;
|
|
117
85
|
declare const FontName: z.ZodEnum<{
|
|
118
86
|
haffer: "haffer";
|
|
119
87
|
"wudoo-mono": "wudoo-mono";
|
|
88
|
+
inter: "inter";
|
|
120
89
|
}>;
|
|
121
90
|
type FontName = z.infer<typeof FontName>;
|
|
122
91
|
declare const HeaderTitle: z.ZodOptional<z.ZodString>;
|
|
@@ -141,22 +110,9 @@ type StatusCallback = (input: {
|
|
|
141
110
|
payload: OrderStatus;
|
|
142
111
|
}) => void;
|
|
143
112
|
declare const PaymentsWidgetSDKParamsWithoutRolesAndFunctions: z.ZodObject<{
|
|
144
|
-
onramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
145
|
-
offramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
146
113
|
sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
147
|
-
features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
148
|
-
BETA_EDGES: "BETA_EDGES";
|
|
149
|
-
ORG_BETA_EDGES: "ORG_BETA_EDGES";
|
|
150
|
-
ORG_EDGES: "ORG_EDGES";
|
|
151
|
-
}>>>;
|
|
152
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
153
114
|
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
154
115
|
apiKey: z.ZodString;
|
|
155
|
-
destinationAddress: z.ZodOptional<z.ZodString>;
|
|
156
|
-
widgetVersion: z.ZodOptional<z.ZodEnum<{
|
|
157
|
-
1: "1";
|
|
158
|
-
2: "2";
|
|
159
|
-
}>>;
|
|
160
116
|
customStyles: z.ZodOptional<z.ZodObject<{
|
|
161
117
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
162
118
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
@@ -164,60 +120,38 @@ declare const PaymentsWidgetSDKParamsWithoutRolesAndFunctions: z.ZodObject<{
|
|
|
164
120
|
textColor: z.ZodOptional<z.ZodString>;
|
|
165
121
|
textSecondaryColor: z.ZodOptional<z.ZodString>;
|
|
166
122
|
accentColor: z.ZodOptional<z.ZodString>;
|
|
167
|
-
componentShadow: z.ZodOptional<z.ZodString>;
|
|
168
123
|
borderStyle: z.ZodOptional<z.ZodEnum<{
|
|
169
124
|
SQUARE: "SQUARE";
|
|
170
125
|
DEFAULT: "DEFAULT";
|
|
171
126
|
}>>;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}>>;
|
|
180
|
-
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
181
|
-
AUTO: "AUTO";
|
|
182
|
-
MEDIUM: "MEDIUM";
|
|
127
|
+
successColor: z.ZodOptional<z.ZodString>;
|
|
128
|
+
alertColor: z.ZodOptional<z.ZodString>;
|
|
129
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
componentShadow: z.ZodOptional<z.ZodString>;
|
|
131
|
+
backgroundStyle: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
BLUR: "BLUR";
|
|
133
|
+
OFF: "OFF";
|
|
183
134
|
}>>;
|
|
184
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
src: z.ZodURL;
|
|
186
|
-
alt: z.ZodString;
|
|
187
|
-
width: z.ZodNumber;
|
|
188
|
-
height: z.ZodNumber;
|
|
189
|
-
}, z.core.$strip>>;
|
|
190
135
|
}, z.core.$strip>>;
|
|
191
136
|
targetElementId: z.ZodOptional<z.ZodString>;
|
|
192
|
-
windowType: z.ZodOptional<z.ZodEnum<{
|
|
193
|
-
EMBED: "EMBED";
|
|
194
|
-
POPUP: "POPUP";
|
|
195
|
-
MODAL: "MODAL";
|
|
196
|
-
}>>;
|
|
197
|
-
redirects: z.ZodOptional<z.ZodObject<{
|
|
198
|
-
redirectUrl: z.ZodURL;
|
|
199
|
-
ctaText: z.ZodString;
|
|
200
|
-
secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
|
|
201
|
-
secondaryCtaText: z.ZodOptional<z.ZodString>;
|
|
202
|
-
}, z.core.$strip>>;
|
|
203
|
-
paymentCategoryOrder: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
204
|
-
wallet: "wallet";
|
|
205
|
-
"open-wallet": "open-wallet";
|
|
206
|
-
exchange: "exchange";
|
|
207
|
-
"open-exchange": "open-exchange";
|
|
208
|
-
cash: "cash";
|
|
209
|
-
"open-cash": "open-cash";
|
|
210
|
-
deposit: "deposit";
|
|
211
|
-
}>>>;
|
|
212
137
|
fontName: z.ZodOptional<z.ZodEnum<{
|
|
213
138
|
haffer: "haffer";
|
|
214
139
|
"wudoo-mono": "wudoo-mono";
|
|
140
|
+
inter: "inter";
|
|
215
141
|
}>>;
|
|
216
142
|
headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
217
|
-
|
|
218
|
-
|
|
143
|
+
userWalletFunderDisplay: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
SHOW: "SHOW";
|
|
145
|
+
HIDE: "HIDE";
|
|
146
|
+
}>>;
|
|
147
|
+
destinationAddress: z.ZodOptional<z.ZodString>;
|
|
148
|
+
onReady: z.ZodOptional<z.ZodAny>;
|
|
149
|
+
onError: z.ZodOptional<z.ZodAny>;
|
|
219
150
|
}, z.core.$strip>;
|
|
220
151
|
declare const PaymentsWidgetSDKParams: z.ZodObject<{
|
|
152
|
+
apiKey: z.ZodString;
|
|
153
|
+
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
154
|
+
sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
221
155
|
customStyles: z.ZodOptional<z.ZodObject<{
|
|
222
156
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
223
157
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
@@ -225,42 +159,30 @@ declare const PaymentsWidgetSDKParams: z.ZodObject<{
|
|
|
225
159
|
textColor: z.ZodOptional<z.ZodString>;
|
|
226
160
|
textSecondaryColor: z.ZodOptional<z.ZodString>;
|
|
227
161
|
accentColor: z.ZodOptional<z.ZodString>;
|
|
228
|
-
componentShadow: z.ZodOptional<z.ZodString>;
|
|
229
162
|
borderStyle: z.ZodOptional<z.ZodEnum<{
|
|
230
163
|
SQUARE: "SQUARE";
|
|
231
164
|
DEFAULT: "DEFAULT";
|
|
232
165
|
}>>;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}>>;
|
|
241
|
-
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
242
|
-
AUTO: "AUTO";
|
|
243
|
-
MEDIUM: "MEDIUM";
|
|
166
|
+
successColor: z.ZodOptional<z.ZodString>;
|
|
167
|
+
alertColor: z.ZodOptional<z.ZodString>;
|
|
168
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
componentShadow: z.ZodOptional<z.ZodString>;
|
|
170
|
+
backgroundStyle: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
BLUR: "BLUR";
|
|
172
|
+
OFF: "OFF";
|
|
244
173
|
}>>;
|
|
245
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
246
|
-
src: z.ZodURL;
|
|
247
|
-
alt: z.ZodString;
|
|
248
|
-
width: z.ZodNumber;
|
|
249
|
-
height: z.ZodNumber;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
174
|
}, z.core.$strip>>;
|
|
252
175
|
targetElementId: z.ZodOptional<z.ZodString>;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
176
|
+
fontName: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
haffer: "haffer";
|
|
178
|
+
"wudoo-mono": "wudoo-mono";
|
|
179
|
+
inter: "inter";
|
|
180
|
+
}>>;
|
|
181
|
+
headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
182
|
+
userWalletFunderDisplay: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
SHOW: "SHOW";
|
|
184
|
+
HIDE: "HIDE";
|
|
257
185
|
}>>;
|
|
258
|
-
redirects: z.ZodOptional<z.ZodObject<{
|
|
259
|
-
redirectUrl: z.ZodURL;
|
|
260
|
-
ctaText: z.ZodString;
|
|
261
|
-
secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
|
|
262
|
-
secondaryCtaText: z.ZodOptional<z.ZodString>;
|
|
263
|
-
}, z.core.$strip>>;
|
|
264
186
|
statusCallback: z.ZodOptional<z.ZodAny>;
|
|
265
187
|
owner: z.ZodOptional<z.ZodObject<{
|
|
266
188
|
address: z.ZodString;
|
|
@@ -274,38 +196,16 @@ declare const PaymentsWidgetSDKParams: z.ZodObject<{
|
|
|
274
196
|
sendTransaction: z.ZodOptional<z.ZodAny>;
|
|
275
197
|
signTypedData: z.ZodOptional<z.ZodAny>;
|
|
276
198
|
}, z.core.$strip>>;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
"open-wallet": "open-wallet";
|
|
285
|
-
exchange: "exchange";
|
|
286
|
-
"open-exchange": "open-exchange";
|
|
287
|
-
cash: "cash";
|
|
288
|
-
"open-cash": "open-cash";
|
|
289
|
-
deposit: "deposit";
|
|
290
|
-
}>>>;
|
|
291
|
-
fontName: z.ZodOptional<z.ZodEnum<{
|
|
292
|
-
haffer: "haffer";
|
|
293
|
-
"wudoo-mono": "wudoo-mono";
|
|
294
|
-
}>>;
|
|
295
|
-
headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
296
|
-
showSkeleton: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
-
skeletonBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
298
|
-
onramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
299
|
-
offramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
300
|
-
sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
301
|
-
inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
302
|
-
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
303
|
-
apiKey: z.ZodString;
|
|
199
|
+
userWallet: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
address: z.ZodString;
|
|
201
|
+
signMessage: z.ZodOptional<z.ZodAny>;
|
|
202
|
+
sendTransaction: z.ZodOptional<z.ZodAny>;
|
|
203
|
+
signTypedData: z.ZodOptional<z.ZodAny>;
|
|
204
|
+
connect: z.ZodOptional<z.ZodAny>;
|
|
205
|
+
}, z.core.$strip>>;
|
|
304
206
|
destinationAddress: z.ZodOptional<z.ZodString>;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
2: "2";
|
|
308
|
-
}>>;
|
|
207
|
+
onReady: z.ZodOptional<z.ZodAny>;
|
|
208
|
+
onError: z.ZodOptional<z.ZodAny>;
|
|
309
209
|
}, z.core.$strip>;
|
|
310
210
|
type PaymentsWidgetSDKParams = z.input<typeof PaymentsWidgetSDKParamsWithoutRolesAndFunctions> & {
|
|
311
211
|
owner?: Omit<WalletActionsType, "getAddress"> & {
|
|
@@ -314,46 +214,49 @@ type PaymentsWidgetSDKParams = z.input<typeof PaymentsWidgetSDKParamsWithoutRole
|
|
|
314
214
|
funder?: Omit<WalletActionsType, "getAddress"> & {
|
|
315
215
|
address: Address;
|
|
316
216
|
};
|
|
217
|
+
userWallet: Omit<WalletActionsType, "getAddress"> & {
|
|
218
|
+
address: Address;
|
|
219
|
+
connect?: () => void;
|
|
220
|
+
};
|
|
317
221
|
statusCallback?: StatusCallback;
|
|
222
|
+
onReady?: () => void;
|
|
223
|
+
onError?: (error: Error) => void;
|
|
318
224
|
};
|
|
319
225
|
declare const AppMode: z.ZodEnum<{
|
|
320
|
-
EMBED: "EMBED";
|
|
321
|
-
MODAL: "MODAL";
|
|
322
226
|
FULL: "FULL";
|
|
227
|
+
MODAL: "MODAL";
|
|
323
228
|
OVERLAY: "OVERLAY";
|
|
229
|
+
EMBED: "EMBED";
|
|
324
230
|
}>;
|
|
325
231
|
type AppMode = z.infer<typeof AppMode>;
|
|
326
232
|
declare const PaymentsWidgetQueryParams: z.ZodObject<{
|
|
327
|
-
ownerAddress: z.ZodOptional<z.ZodString>;
|
|
328
|
-
funderAddress: z.ZodOptional<z.ZodString>;
|
|
329
233
|
appMode: z.ZodOptional<z.ZodEnum<{
|
|
330
|
-
EMBED: "EMBED";
|
|
331
|
-
MODAL: "MODAL";
|
|
332
234
|
FULL: "FULL";
|
|
235
|
+
MODAL: "MODAL";
|
|
333
236
|
OVERLAY: "OVERLAY";
|
|
237
|
+
EMBED: "EMBED";
|
|
334
238
|
}>>;
|
|
335
239
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
336
240
|
hasOwner: z.ZodBoolean;
|
|
337
241
|
hasTxHandler: z.ZodBoolean;
|
|
242
|
+
hasConnect: z.ZodBoolean;
|
|
338
243
|
hostOrigin: z.ZodNullable<z.ZodURL>;
|
|
339
244
|
ipAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6]>>;
|
|
340
245
|
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
246
|
+
ownerAddress: z.ZodOptional<z.ZodString>;
|
|
247
|
+
funderAddress: z.ZodOptional<z.ZodString>;
|
|
248
|
+
onramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
249
|
+
offramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
+
inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
344
251
|
features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
345
252
|
BETA_EDGES: "BETA_EDGES";
|
|
346
253
|
ORG_BETA_EDGES: "ORG_BETA_EDGES";
|
|
347
254
|
ORG_EDGES: "ORG_EDGES";
|
|
348
255
|
}>>>;
|
|
349
|
-
|
|
256
|
+
hops: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
257
|
+
sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
350
258
|
outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
351
259
|
apiKey: z.ZodString;
|
|
352
|
-
destinationAddress: z.ZodOptional<z.ZodString>;
|
|
353
|
-
widgetVersion: z.ZodOptional<z.ZodEnum<{
|
|
354
|
-
1: "1";
|
|
355
|
-
2: "2";
|
|
356
|
-
}>>;
|
|
357
260
|
customStyles: z.ZodOptional<z.ZodObject<{
|
|
358
261
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
359
262
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
@@ -361,58 +264,33 @@ declare const PaymentsWidgetQueryParams: z.ZodObject<{
|
|
|
361
264
|
textColor: z.ZodOptional<z.ZodString>;
|
|
362
265
|
textSecondaryColor: z.ZodOptional<z.ZodString>;
|
|
363
266
|
accentColor: z.ZodOptional<z.ZodString>;
|
|
364
|
-
componentShadow: z.ZodOptional<z.ZodString>;
|
|
365
267
|
borderStyle: z.ZodOptional<z.ZodEnum<{
|
|
366
268
|
SQUARE: "SQUARE";
|
|
367
269
|
DEFAULT: "DEFAULT";
|
|
368
270
|
}>>;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}>>;
|
|
377
|
-
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
378
|
-
AUTO: "AUTO";
|
|
379
|
-
MEDIUM: "MEDIUM";
|
|
271
|
+
successColor: z.ZodOptional<z.ZodString>;
|
|
272
|
+
alertColor: z.ZodOptional<z.ZodString>;
|
|
273
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
componentShadow: z.ZodOptional<z.ZodString>;
|
|
275
|
+
backgroundStyle: z.ZodOptional<z.ZodEnum<{
|
|
276
|
+
BLUR: "BLUR";
|
|
277
|
+
OFF: "OFF";
|
|
380
278
|
}>>;
|
|
381
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
382
|
-
src: z.ZodURL;
|
|
383
|
-
alt: z.ZodString;
|
|
384
|
-
width: z.ZodNumber;
|
|
385
|
-
height: z.ZodNumber;
|
|
386
|
-
}, z.core.$strip>>;
|
|
387
279
|
}, z.core.$strip>>;
|
|
388
280
|
targetElementId: z.ZodOptional<z.ZodString>;
|
|
389
|
-
windowType: z.ZodOptional<z.ZodEnum<{
|
|
390
|
-
EMBED: "EMBED";
|
|
391
|
-
POPUP: "POPUP";
|
|
392
|
-
MODAL: "MODAL";
|
|
393
|
-
}>>;
|
|
394
|
-
redirects: z.ZodOptional<z.ZodObject<{
|
|
395
|
-
redirectUrl: z.ZodURL;
|
|
396
|
-
ctaText: z.ZodString;
|
|
397
|
-
secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
|
|
398
|
-
secondaryCtaText: z.ZodOptional<z.ZodString>;
|
|
399
|
-
}, z.core.$strip>>;
|
|
400
|
-
paymentCategoryOrder: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
401
|
-
wallet: "wallet";
|
|
402
|
-
"open-wallet": "open-wallet";
|
|
403
|
-
exchange: "exchange";
|
|
404
|
-
"open-exchange": "open-exchange";
|
|
405
|
-
cash: "cash";
|
|
406
|
-
"open-cash": "open-cash";
|
|
407
|
-
deposit: "deposit";
|
|
408
|
-
}>>>;
|
|
409
281
|
fontName: z.ZodOptional<z.ZodEnum<{
|
|
410
282
|
haffer: "haffer";
|
|
411
283
|
"wudoo-mono": "wudoo-mono";
|
|
284
|
+
inter: "inter";
|
|
412
285
|
}>>;
|
|
413
286
|
headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
414
|
-
|
|
415
|
-
|
|
287
|
+
userWalletFunderDisplay: z.ZodOptional<z.ZodEnum<{
|
|
288
|
+
SHOW: "SHOW";
|
|
289
|
+
HIDE: "HIDE";
|
|
290
|
+
}>>;
|
|
291
|
+
destinationAddress: z.ZodOptional<z.ZodString>;
|
|
292
|
+
onReady: z.ZodOptional<z.ZodAny>;
|
|
293
|
+
onError: z.ZodOptional<z.ZodAny>;
|
|
416
294
|
}, z.core.$strip>;
|
|
417
295
|
type PaymentsWidgetQueryParams = z.infer<typeof PaymentsWidgetQueryParams>;
|
|
418
296
|
declare enum MessageType {
|
|
@@ -422,6 +300,7 @@ declare enum MessageType {
|
|
|
422
300
|
ACTION_SIGN_MESSAGE = "ACTION_SIGN_MESSAGE",
|
|
423
301
|
ACTION_PROVIDER_WIDGET = "ACTION_PROVIDER_WIDGET",
|
|
424
302
|
ACTION_SIGN_TYPED_DATA = "ACTION_SIGN_TYPED_DATA",
|
|
303
|
+
ACTION_TRIGGER_CONNECT = "ACTION_TRIGGER_CONNECT",
|
|
425
304
|
EVENT_RESIZE = "EVENT_RESIZE"
|
|
426
305
|
}
|
|
427
306
|
type Message = {
|
|
@@ -437,6 +316,9 @@ type Message = {
|
|
|
437
316
|
} | {
|
|
438
317
|
type: MessageType.EVENT_WINDOW_CLOSE;
|
|
439
318
|
payload: undefined;
|
|
319
|
+
} | {
|
|
320
|
+
type: MessageType.ACTION_TRIGGER_CONNECT;
|
|
321
|
+
payload: undefined;
|
|
440
322
|
} | {
|
|
441
323
|
type: MessageType.ACTION_SIGN_MESSAGE;
|
|
442
324
|
payload: {
|
|
@@ -500,52 +382,40 @@ type MessageResponse = {
|
|
|
500
382
|
error: string;
|
|
501
383
|
};
|
|
502
384
|
};
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
*/
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
type
|
|
516
|
-
|
|
517
|
-
|
|
385
|
+
declare enum WidgetLoadFailureReason {
|
|
386
|
+
/** Host page's Content-Security-Policy blocked the iframe src */
|
|
387
|
+
CSP_BLOCKED = "CSP_BLOCKED",
|
|
388
|
+
/** Network failure: DNS, firewall, proxy, or server unreachable */
|
|
389
|
+
NETWORK_FAILURE = "NETWORK_FAILURE",
|
|
390
|
+
/** The iframe element was removed from the DOM by external code */
|
|
391
|
+
IFRAME_REMOVED = "IFRAME_REMOVED",
|
|
392
|
+
/** A browser extension or privacy tool blocked the request */
|
|
393
|
+
RESOURCE_BLOCKED = "RESOURCE_BLOCKED",
|
|
394
|
+
/** Unable to determine the specific failure reason */
|
|
395
|
+
UNKNOWN = "UNKNOWN"
|
|
396
|
+
}
|
|
397
|
+
type WidgetLoadDiagnostics = {
|
|
398
|
+
onloadFired: boolean;
|
|
399
|
+
cspViolationDetected: boolean;
|
|
400
|
+
cspBlockedURI: string | null;
|
|
401
|
+
iframeInDOM: boolean;
|
|
402
|
+
resourceTimingEntryExists: boolean;
|
|
403
|
+
elapsedMs: number;
|
|
518
404
|
};
|
|
405
|
+
declare class WidgetLoadError extends Error {
|
|
406
|
+
name: "WidgetLoadError";
|
|
407
|
+
readonly reason: WidgetLoadFailureReason;
|
|
408
|
+
readonly diagnostics: WidgetLoadDiagnostics;
|
|
409
|
+
constructor(message: string, reason: WidgetLoadFailureReason, diagnostics: WidgetLoadDiagnostics);
|
|
410
|
+
static isWidgetLoadError(error: unknown): error is WidgetLoadError;
|
|
411
|
+
}
|
|
519
412
|
|
|
520
413
|
/**
|
|
521
414
|
* Opens the Halliday Payments widget.
|
|
522
415
|
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
* @param {PaymentsWidgetSDKParams} params The configurations for the payments widget, which includes:
|
|
526
|
-
*
|
|
527
|
-
* @param {!string} params.apiKey {string} Your API key for authorization.
|
|
528
|
-
* @param {boolean=} params.sandbox {boolean} (optional) Whether the widget is in sandbox mode.
|
|
529
|
-
* @param {string=} params.destinationAddress {string} (optional) The address of the destination of the widget.
|
|
530
|
-
*
|
|
531
|
-
* @param {Asset[]=} params.inputs {{@link Asset}[]} (optional) The input assets for the widget.
|
|
532
|
-
* @param {Asset[]=} params.outputs {{@link Asset}[]} (optional) The output assets for the widget.
|
|
533
|
-
* @param {RampName[]=} params.onramps {{@link RampName}[]} (optional) The onramps for the widget.
|
|
534
|
-
* @param {RampName[]=} params.offramps {{@link RampName}[]} (optional) The offramps for the widget.
|
|
535
|
-
*
|
|
536
|
-
* @param {CustomStyles=} params.customStyles {{@link CustomStyles}} (optional) A list of custom styles to show in the widget.
|
|
537
|
-
* @param {string=} params.targetElementId {string} (required if windowType is "EMBED") The ID of the DOM element where the widget should be embedded.
|
|
538
|
-
* @param {("POPUP" | "EMBED")=} params.windowType {"POPUP" | "EMBED"} The desired display mode of the widget.
|
|
539
|
-
*
|
|
540
|
-
* @param {Role=} params.owner {{@link Role}} (optional) The owner that would have full access to payments workflow.
|
|
541
|
-
* @param {Role=} params.funder {{@link Role}} (optional) The funder that initiates the funding.
|
|
542
|
-
* @param {PaymentCategoryOrder=} params.paymentCategoryOrder {{@link PaymentCategoryOrder}} (optional) On the quote page, these are three displayed paymentcategories (empty or three elements).
|
|
543
|
-
* @param {FontName=} params.fontName {{@link FontName}} (optional) The font name to use in the widget (haffer or wudoo-mono). Defaults to haffer.
|
|
544
|
-
* @param {HeaderTitle=} params.headerTitle {{@link HeaderTitle}} (optional) The header title to use in the widget (Buy or string). Defaults to Buy.
|
|
545
|
-
*
|
|
546
|
-
* @param {StatusCallback=} params.statusCallback {{@link StatusCallback}} (optional) Callback to receive status events.
|
|
416
|
+
* @param {PaymentsWidgetSDKParams} params The configurations for the payments widget
|
|
547
417
|
*/
|
|
548
|
-
declare function openHallidayPayments(params: PaymentsWidgetSDKParams, ...args: any[]):
|
|
418
|
+
declare function openHallidayPayments(params: PaymentsWidgetSDKParams, ...args: any[]): void;
|
|
549
419
|
|
|
550
420
|
/**
|
|
551
421
|
* Serialize the query params to a base64 string.
|
|
@@ -577,14 +447,14 @@ declare const getPaymentsWidgetUrl: (params: PaymentsWidgetQueryParams & {
|
|
|
577
447
|
* This loads the widget in a hidden iframe so that when you call
|
|
578
448
|
* `openHallidayPayments()`, it appears instantly - no loading, no delay.
|
|
579
449
|
*
|
|
580
|
-
* @param
|
|
581
|
-
* @returns Promise that resolves when widget is fully loaded and ready
|
|
450
|
+
* @param params Configuration with apiKey, optional callbacks (onReady, onError), and any business params
|
|
582
451
|
*
|
|
583
452
|
* @example
|
|
584
453
|
* ```javascript
|
|
585
454
|
* // Initialize early in your app
|
|
586
|
-
*
|
|
455
|
+
* initializeClient({
|
|
587
456
|
* apiKey: 'your-api-key',
|
|
457
|
+
* outputs: ['ethereum:usdc'],
|
|
588
458
|
* onReady: () => console.log('Widget fully loaded!'),
|
|
589
459
|
* onError: (err) => console.error('Failed to load:', err),
|
|
590
460
|
* });
|
|
@@ -597,12 +467,14 @@ declare const getPaymentsWidgetUrl: (params: PaymentsWidgetQueryParams & {
|
|
|
597
467
|
* });
|
|
598
468
|
* ```
|
|
599
469
|
*/
|
|
600
|
-
declare const initializeClient: (
|
|
470
|
+
declare const initializeClient: (params: PaymentsWidgetSDKParams, ...args: any[]) => void;
|
|
601
471
|
/**
|
|
602
472
|
* Destroy the preloaded widget and reset state.
|
|
603
473
|
* Call this when you need to re-initialize with different settings.
|
|
604
474
|
*/
|
|
605
475
|
declare const destroyClient: () => void;
|
|
606
476
|
|
|
607
|
-
|
|
608
|
-
|
|
477
|
+
declare function openActivity(): void;
|
|
478
|
+
|
|
479
|
+
export { AppMode, BackgroundStyle, BorderStyle, CssFontSize, CustomStyles, FontName, HeaderTitle, MessageType, OrderStatus, PaymentsWidgetQueryParams, PaymentsWidgetSDKParams, WidgetLoadError, WidgetLoadFailureReason, WindowType, deserializeQueryParams, destroyClient, getPaymentsWidgetUrl, initializeClient, openActivity, openHallidayPayments, serializeQueryParams };
|
|
480
|
+
export type { Message, MessageResponse, WidgetLoadDiagnostics };
|