@halliday-sdk/payments 2.8.0 → 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.
@@ -41,30 +41,12 @@ declare const EVMChainConfig: z.ZodObject<{
41
41
  }, z.core.$strip>;
42
42
  type EVMChainConfig = z.infer<typeof EVMChainConfig>;
43
43
 
44
- declare const TypedData: z.ZodString;
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";
@@ -84,49 +66,22 @@ declare const CustomStyles: z.ZodObject<{
84
66
  textColor: z.ZodOptional<z.ZodString>;
85
67
  textSecondaryColor: z.ZodOptional<z.ZodString>;
86
68
  accentColor: z.ZodOptional<z.ZodString>;
87
- componentShadow: z.ZodOptional<z.ZodString>;
88
69
  borderStyle: z.ZodOptional<z.ZodEnum<{
89
70
  SQUARE: "SQUARE";
90
71
  DEFAULT: "DEFAULT";
91
72
  }>>;
92
- textMode: z.ZodOptional<z.ZodEnum<{
93
- DEFAULT: "DEFAULT";
94
- ALL_UPPERCASE: "ALL_UPPERCASE";
95
- }>>;
96
- paymentCategoryGrouping: z.ZodOptional<z.ZodEnum<{
97
- ATTACHED: "ATTACHED";
98
- BUTTON: "BUTTON";
99
- }>>;
100
- fontWeight: z.ZodOptional<z.ZodEnum<{
101
- AUTO: "AUTO";
102
- MEDIUM: "MEDIUM";
103
- }>>;
104
- baseFontSize: z.ZodOptional<z.ZodString>;
105
- baseBorderRadius: z.ZodOptional<z.ZodString>;
73
+ successColor: z.ZodOptional<z.ZodString>;
74
+ alertColor: z.ZodOptional<z.ZodString>;
75
+ zIndex: z.ZodOptional<z.ZodNumber>;
76
+ componentShadow: z.ZodOptional<z.ZodString>;
106
77
  backgroundStyle: z.ZodOptional<z.ZodEnum<{
107
78
  BLUR: "BLUR";
108
79
  OFF: "OFF";
109
80
  }>>;
110
- logo: z.ZodOptional<z.ZodObject<{
111
- src: z.ZodURL;
112
- alt: z.ZodString;
113
- width: z.ZodNumber;
114
- height: z.ZodNumber;
115
- }, z.core.$strip>>;
116
81
  }, z.core.$strip>;
117
82
  type CustomStyles = z.infer<typeof CustomStyles>;
118
83
  declare const OrderStatus: z.ZodAny;
119
84
  type OrderStatus = z.infer<typeof OrderStatus>;
120
- declare const PaymentCategoryOrder: z.ZodArray<z.ZodEnum<{
121
- wallet: "wallet";
122
- "open-wallet": "open-wallet";
123
- exchange: "exchange";
124
- "open-exchange": "open-exchange";
125
- cash: "cash";
126
- "open-cash": "open-cash";
127
- deposit: "deposit";
128
- }>>;
129
- type PaymentCategoryOrder = z.infer<typeof PaymentCategoryOrder>;
130
85
  declare const FontName: z.ZodEnum<{
131
86
  haffer: "haffer";
132
87
  "wudoo-mono": "wudoo-mono";
@@ -155,22 +110,9 @@ type StatusCallback = (input: {
155
110
  payload: OrderStatus;
156
111
  }) => void;
157
112
  declare const PaymentsWidgetSDKParamsWithoutRolesAndFunctions: z.ZodObject<{
158
- onramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
159
- offramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
160
113
  sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
161
- features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
162
- BETA_EDGES: "BETA_EDGES";
163
- ORG_BETA_EDGES: "ORG_BETA_EDGES";
164
- ORG_EDGES: "ORG_EDGES";
165
- }>>>;
166
- inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
167
114
  outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
168
115
  apiKey: z.ZodString;
169
- destinationAddress: z.ZodOptional<z.ZodString>;
170
- widgetVersion: z.ZodOptional<z.ZodEnum<{
171
- 1: "1";
172
- 2: "2";
173
- }>>;
174
116
  customStyles: z.ZodOptional<z.ZodObject<{
175
117
  primaryColor: z.ZodOptional<z.ZodString>;
176
118
  backgroundColor: z.ZodOptional<z.ZodString>;
@@ -178,67 +120,38 @@ declare const PaymentsWidgetSDKParamsWithoutRolesAndFunctions: z.ZodObject<{
178
120
  textColor: z.ZodOptional<z.ZodString>;
179
121
  textSecondaryColor: z.ZodOptional<z.ZodString>;
180
122
  accentColor: z.ZodOptional<z.ZodString>;
181
- componentShadow: z.ZodOptional<z.ZodString>;
182
123
  borderStyle: z.ZodOptional<z.ZodEnum<{
183
124
  SQUARE: "SQUARE";
184
125
  DEFAULT: "DEFAULT";
185
126
  }>>;
186
- textMode: z.ZodOptional<z.ZodEnum<{
187
- DEFAULT: "DEFAULT";
188
- ALL_UPPERCASE: "ALL_UPPERCASE";
189
- }>>;
190
- paymentCategoryGrouping: z.ZodOptional<z.ZodEnum<{
191
- ATTACHED: "ATTACHED";
192
- BUTTON: "BUTTON";
193
- }>>;
194
- fontWeight: z.ZodOptional<z.ZodEnum<{
195
- AUTO: "AUTO";
196
- MEDIUM: "MEDIUM";
197
- }>>;
198
- baseFontSize: z.ZodOptional<z.ZodString>;
199
- baseBorderRadius: z.ZodOptional<z.ZodString>;
127
+ successColor: z.ZodOptional<z.ZodString>;
128
+ alertColor: z.ZodOptional<z.ZodString>;
129
+ zIndex: z.ZodOptional<z.ZodNumber>;
130
+ componentShadow: z.ZodOptional<z.ZodString>;
200
131
  backgroundStyle: z.ZodOptional<z.ZodEnum<{
201
132
  BLUR: "BLUR";
202
133
  OFF: "OFF";
203
134
  }>>;
204
- logo: z.ZodOptional<z.ZodObject<{
205
- src: z.ZodURL;
206
- alt: z.ZodString;
207
- width: z.ZodNumber;
208
- height: z.ZodNumber;
209
- }, z.core.$strip>>;
210
135
  }, z.core.$strip>>;
211
136
  targetElementId: z.ZodOptional<z.ZodString>;
212
- windowType: z.ZodOptional<z.ZodEnum<{
213
- EMBED: "EMBED";
214
- POPUP: "POPUP";
215
- MODAL: "MODAL";
216
- }>>;
217
- redirects: z.ZodOptional<z.ZodObject<{
218
- redirectUrl: z.ZodURL;
219
- ctaText: z.ZodString;
220
- secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
221
- secondaryCtaText: z.ZodOptional<z.ZodString>;
222
- }, z.core.$strip>>;
223
- paymentCategoryOrder: z.ZodOptional<z.ZodArray<z.ZodEnum<{
224
- wallet: "wallet";
225
- "open-wallet": "open-wallet";
226
- exchange: "exchange";
227
- "open-exchange": "open-exchange";
228
- cash: "cash";
229
- "open-cash": "open-cash";
230
- deposit: "deposit";
231
- }>>>;
232
137
  fontName: z.ZodOptional<z.ZodEnum<{
233
138
  haffer: "haffer";
234
139
  "wudoo-mono": "wudoo-mono";
235
140
  inter: "inter";
236
141
  }>>;
237
142
  headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
238
- showSkeleton: z.ZodOptional<z.ZodBoolean>;
239
- skeletonBackgroundColor: z.ZodOptional<z.ZodString>;
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>;
240
150
  }, z.core.$strip>;
241
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>>;
242
155
  customStyles: z.ZodOptional<z.ZodObject<{
243
156
  primaryColor: z.ZodOptional<z.ZodString>;
244
157
  backgroundColor: z.ZodOptional<z.ZodString>;
@@ -246,48 +159,30 @@ declare const PaymentsWidgetSDKParams: z.ZodObject<{
246
159
  textColor: z.ZodOptional<z.ZodString>;
247
160
  textSecondaryColor: z.ZodOptional<z.ZodString>;
248
161
  accentColor: z.ZodOptional<z.ZodString>;
249
- componentShadow: z.ZodOptional<z.ZodString>;
250
162
  borderStyle: z.ZodOptional<z.ZodEnum<{
251
163
  SQUARE: "SQUARE";
252
164
  DEFAULT: "DEFAULT";
253
165
  }>>;
254
- textMode: z.ZodOptional<z.ZodEnum<{
255
- DEFAULT: "DEFAULT";
256
- ALL_UPPERCASE: "ALL_UPPERCASE";
257
- }>>;
258
- paymentCategoryGrouping: z.ZodOptional<z.ZodEnum<{
259
- ATTACHED: "ATTACHED";
260
- BUTTON: "BUTTON";
261
- }>>;
262
- fontWeight: z.ZodOptional<z.ZodEnum<{
263
- AUTO: "AUTO";
264
- MEDIUM: "MEDIUM";
265
- }>>;
266
- baseFontSize: z.ZodOptional<z.ZodString>;
267
- baseBorderRadius: z.ZodOptional<z.ZodString>;
166
+ successColor: z.ZodOptional<z.ZodString>;
167
+ alertColor: z.ZodOptional<z.ZodString>;
168
+ zIndex: z.ZodOptional<z.ZodNumber>;
169
+ componentShadow: z.ZodOptional<z.ZodString>;
268
170
  backgroundStyle: z.ZodOptional<z.ZodEnum<{
269
171
  BLUR: "BLUR";
270
172
  OFF: "OFF";
271
173
  }>>;
272
- logo: z.ZodOptional<z.ZodObject<{
273
- src: z.ZodURL;
274
- alt: z.ZodString;
275
- width: z.ZodNumber;
276
- height: z.ZodNumber;
277
- }, z.core.$strip>>;
278
174
  }, z.core.$strip>>;
279
175
  targetElementId: z.ZodOptional<z.ZodString>;
280
- windowType: z.ZodOptional<z.ZodEnum<{
281
- EMBED: "EMBED";
282
- POPUP: "POPUP";
283
- MODAL: "MODAL";
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";
284
185
  }>>;
285
- redirects: z.ZodOptional<z.ZodObject<{
286
- redirectUrl: z.ZodURL;
287
- ctaText: z.ZodString;
288
- secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
289
- secondaryCtaText: z.ZodOptional<z.ZodString>;
290
- }, z.core.$strip>>;
291
186
  statusCallback: z.ZodOptional<z.ZodAny>;
292
187
  owner: z.ZodOptional<z.ZodObject<{
293
188
  address: z.ZodString;
@@ -301,39 +196,16 @@ declare const PaymentsWidgetSDKParams: z.ZodObject<{
301
196
  sendTransaction: z.ZodOptional<z.ZodAny>;
302
197
  signTypedData: z.ZodOptional<z.ZodAny>;
303
198
  }, z.core.$strip>>;
304
- features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
305
- BETA_EDGES: "BETA_EDGES";
306
- ORG_BETA_EDGES: "ORG_BETA_EDGES";
307
- ORG_EDGES: "ORG_EDGES";
308
- }>>>;
309
- paymentCategoryOrder: z.ZodOptional<z.ZodArray<z.ZodEnum<{
310
- wallet: "wallet";
311
- "open-wallet": "open-wallet";
312
- exchange: "exchange";
313
- "open-exchange": "open-exchange";
314
- cash: "cash";
315
- "open-cash": "open-cash";
316
- deposit: "deposit";
317
- }>>>;
318
- fontName: z.ZodOptional<z.ZodEnum<{
319
- haffer: "haffer";
320
- "wudoo-mono": "wudoo-mono";
321
- inter: "inter";
322
- }>>;
323
- headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
324
- onramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
325
- showSkeleton: z.ZodOptional<z.ZodBoolean>;
326
- skeletonBackgroundColor: z.ZodOptional<z.ZodString>;
327
- offramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
328
- sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
329
- inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
330
- outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
331
- 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>>;
332
206
  destinationAddress: z.ZodOptional<z.ZodString>;
333
- widgetVersion: z.ZodOptional<z.ZodEnum<{
334
- 1: "1";
335
- 2: "2";
336
- }>>;
207
+ onReady: z.ZodOptional<z.ZodAny>;
208
+ onError: z.ZodOptional<z.ZodAny>;
337
209
  }, z.core.$strip>;
338
210
  type PaymentsWidgetSDKParams = z.input<typeof PaymentsWidgetSDKParamsWithoutRolesAndFunctions> & {
339
211
  owner?: Omit<WalletActionsType, "getAddress"> & {
@@ -342,46 +214,49 @@ type PaymentsWidgetSDKParams = z.input<typeof PaymentsWidgetSDKParamsWithoutRole
342
214
  funder?: Omit<WalletActionsType, "getAddress"> & {
343
215
  address: Address;
344
216
  };
217
+ userWallet: Omit<WalletActionsType, "getAddress"> & {
218
+ address: Address;
219
+ connect?: () => void;
220
+ };
345
221
  statusCallback?: StatusCallback;
222
+ onReady?: () => void;
223
+ onError?: (error: Error) => void;
346
224
  };
347
225
  declare const AppMode: z.ZodEnum<{
348
- EMBED: "EMBED";
349
- MODAL: "MODAL";
350
226
  FULL: "FULL";
227
+ MODAL: "MODAL";
351
228
  OVERLAY: "OVERLAY";
229
+ EMBED: "EMBED";
352
230
  }>;
353
231
  type AppMode = z.infer<typeof AppMode>;
354
232
  declare const PaymentsWidgetQueryParams: z.ZodObject<{
355
- ownerAddress: z.ZodOptional<z.ZodString>;
356
- funderAddress: z.ZodOptional<z.ZodString>;
357
233
  appMode: z.ZodOptional<z.ZodEnum<{
358
- EMBED: "EMBED";
359
- MODAL: "MODAL";
360
234
  FULL: "FULL";
235
+ MODAL: "MODAL";
361
236
  OVERLAY: "OVERLAY";
237
+ EMBED: "EMBED";
362
238
  }>>;
363
239
  apiBaseUrl: z.ZodOptional<z.ZodString>;
364
240
  hasOwner: z.ZodBoolean;
365
241
  hasTxHandler: z.ZodBoolean;
242
+ hasConnect: z.ZodBoolean;
366
243
  hostOrigin: z.ZodNullable<z.ZodURL>;
367
244
  ipAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6]>>;
368
245
  featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
246
+ ownerAddress: z.ZodOptional<z.ZodString>;
247
+ funderAddress: z.ZodOptional<z.ZodString>;
369
248
  onramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
370
- offramps: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
371
- sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
249
+ offramps: z.ZodOptional<z.ZodArray<z.ZodString>>;
250
+ inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
372
251
  features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
373
252
  BETA_EDGES: "BETA_EDGES";
374
253
  ORG_BETA_EDGES: "ORG_BETA_EDGES";
375
254
  ORG_EDGES: "ORG_EDGES";
376
255
  }>>>;
377
- inputs: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
256
+ hops: z.ZodOptional<z.ZodArray<z.ZodString>>;
257
+ sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
378
258
  outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
379
259
  apiKey: z.ZodString;
380
- destinationAddress: z.ZodOptional<z.ZodString>;
381
- widgetVersion: z.ZodOptional<z.ZodEnum<{
382
- 1: "1";
383
- 2: "2";
384
- }>>;
385
260
  customStyles: z.ZodOptional<z.ZodObject<{
386
261
  primaryColor: z.ZodOptional<z.ZodString>;
387
262
  backgroundColor: z.ZodOptional<z.ZodString>;
@@ -389,65 +264,33 @@ declare const PaymentsWidgetQueryParams: z.ZodObject<{
389
264
  textColor: z.ZodOptional<z.ZodString>;
390
265
  textSecondaryColor: z.ZodOptional<z.ZodString>;
391
266
  accentColor: z.ZodOptional<z.ZodString>;
392
- componentShadow: z.ZodOptional<z.ZodString>;
393
267
  borderStyle: z.ZodOptional<z.ZodEnum<{
394
268
  SQUARE: "SQUARE";
395
269
  DEFAULT: "DEFAULT";
396
270
  }>>;
397
- textMode: z.ZodOptional<z.ZodEnum<{
398
- DEFAULT: "DEFAULT";
399
- ALL_UPPERCASE: "ALL_UPPERCASE";
400
- }>>;
401
- paymentCategoryGrouping: z.ZodOptional<z.ZodEnum<{
402
- ATTACHED: "ATTACHED";
403
- BUTTON: "BUTTON";
404
- }>>;
405
- fontWeight: z.ZodOptional<z.ZodEnum<{
406
- AUTO: "AUTO";
407
- MEDIUM: "MEDIUM";
408
- }>>;
409
- baseFontSize: z.ZodOptional<z.ZodString>;
410
- baseBorderRadius: z.ZodOptional<z.ZodString>;
271
+ successColor: z.ZodOptional<z.ZodString>;
272
+ alertColor: z.ZodOptional<z.ZodString>;
273
+ zIndex: z.ZodOptional<z.ZodNumber>;
274
+ componentShadow: z.ZodOptional<z.ZodString>;
411
275
  backgroundStyle: z.ZodOptional<z.ZodEnum<{
412
276
  BLUR: "BLUR";
413
277
  OFF: "OFF";
414
278
  }>>;
415
- logo: z.ZodOptional<z.ZodObject<{
416
- src: z.ZodURL;
417
- alt: z.ZodString;
418
- width: z.ZodNumber;
419
- height: z.ZodNumber;
420
- }, z.core.$strip>>;
421
279
  }, z.core.$strip>>;
422
280
  targetElementId: z.ZodOptional<z.ZodString>;
423
- windowType: z.ZodOptional<z.ZodEnum<{
424
- EMBED: "EMBED";
425
- POPUP: "POPUP";
426
- MODAL: "MODAL";
427
- }>>;
428
- redirects: z.ZodOptional<z.ZodObject<{
429
- redirectUrl: z.ZodURL;
430
- ctaText: z.ZodString;
431
- secondaryRedirectUrl: z.ZodOptional<z.ZodURL>;
432
- secondaryCtaText: z.ZodOptional<z.ZodString>;
433
- }, z.core.$strip>>;
434
- paymentCategoryOrder: z.ZodOptional<z.ZodArray<z.ZodEnum<{
435
- wallet: "wallet";
436
- "open-wallet": "open-wallet";
437
- exchange: "exchange";
438
- "open-exchange": "open-exchange";
439
- cash: "cash";
440
- "open-cash": "open-cash";
441
- deposit: "deposit";
442
- }>>>;
443
281
  fontName: z.ZodOptional<z.ZodEnum<{
444
282
  haffer: "haffer";
445
283
  "wudoo-mono": "wudoo-mono";
446
284
  inter: "inter";
447
285
  }>>;
448
286
  headerTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
449
- showSkeleton: z.ZodOptional<z.ZodBoolean>;
450
- skeletonBackgroundColor: z.ZodOptional<z.ZodString>;
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>;
451
294
  }, z.core.$strip>;
452
295
  type PaymentsWidgetQueryParams = z.infer<typeof PaymentsWidgetQueryParams>;
453
296
  declare enum MessageType {
@@ -457,6 +300,7 @@ declare enum MessageType {
457
300
  ACTION_SIGN_MESSAGE = "ACTION_SIGN_MESSAGE",
458
301
  ACTION_PROVIDER_WIDGET = "ACTION_PROVIDER_WIDGET",
459
302
  ACTION_SIGN_TYPED_DATA = "ACTION_SIGN_TYPED_DATA",
303
+ ACTION_TRIGGER_CONNECT = "ACTION_TRIGGER_CONNECT",
460
304
  EVENT_RESIZE = "EVENT_RESIZE"
461
305
  }
462
306
  type Message = {
@@ -472,6 +316,9 @@ type Message = {
472
316
  } | {
473
317
  type: MessageType.EVENT_WINDOW_CLOSE;
474
318
  payload: undefined;
319
+ } | {
320
+ type: MessageType.ACTION_TRIGGER_CONNECT;
321
+ payload: undefined;
475
322
  } | {
476
323
  type: MessageType.ACTION_SIGN_MESSAGE;
477
324
  payload: {
@@ -535,53 +382,40 @@ type MessageResponse = {
535
382
  error: string;
536
383
  };
537
384
  };
538
- /**
539
- * Configuration for initializeClient.
540
- *
541
- * This is intentionally minimal - init is just for preloading.
542
- * All business logic params (outputs, customStyles, etc.) go in openHallidayPayments.
543
- */
544
- declare const InitConfig: z.ZodObject<{
545
- apiKey: z.ZodString;
546
- sandbox: z.ZodOptional<z.ZodBoolean>;
547
- onReady: z.ZodOptional<z.ZodAny>;
548
- onError: z.ZodOptional<z.ZodAny>;
549
- }, z.core.$strip>;
550
- type InitConfig = z.input<typeof InitConfig> & {
551
- onReady?: () => void;
552
- onError?: (error: Error) => void;
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;
553
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
+ }
554
412
 
555
413
  /**
556
414
  * Opens the Halliday Payments widget.
557
415
  *
558
- * This function initializes and opens the payment widget window in a popup or embedded mode.
559
- *
560
- * @param {PaymentsWidgetSDKParams} params The configurations for the payments widget, which includes:
561
- *
562
- * @param {!string} params.apiKey {string} Your API key for authorization.
563
- * @param {boolean=} params.sandbox {boolean} (optional) Whether the widget is in sandbox mode.
564
- * @param {string=} params.destinationAddress {string} (optional) The address of the destination of the widget.
565
- *
566
- * @param {Asset[]=} params.inputs {{@link Asset}[]} (optional) The input assets for the widget.
567
- * @param {Asset[]=} params.outputs {{@link Asset}[]} (optional) The output assets for the widget.
568
- * @param {string[]=} params.onramps {string[]} (optional) Array of onramp provider names to filter/display in the widget.
569
- * @param {RampName[]=} params.onramps {{@link RampName}[]} (optional) The onramps for the widget.
570
- * @param {RampName[]=} params.offramps {{@link RampName}[]} (optional) The offramps for the widget.
571
- *
572
- * @param {CustomStyles=} params.customStyles {{@link CustomStyles}} (optional) A list of custom styles to show in the widget.
573
- * @param {string=} params.targetElementId {string} (required if windowType is "EMBED") The ID of the DOM element where the widget should be embedded.
574
- * @param {("POPUP" | "EMBED")=} params.windowType {"POPUP" | "EMBED"} The desired display mode of the widget.
575
- *
576
- * @param {Role=} params.owner {{@link Role}} (optional) The owner that would have full access to payments workflow.
577
- * @param {Role=} params.funder {{@link Role}} (optional) The funder that initiates the funding.
578
- * @param {PaymentCategoryOrder=} params.paymentCategoryOrder {{@link PaymentCategoryOrder}} (optional) On the quote page, these are three displayed paymentcategories (empty or three elements).
579
- * @param {FontName=} params.fontName {{@link FontName}} (optional) The font name to use in the widget (haffer or wudoo-mono or inter). Defaults to haffer.
580
- * @param {HeaderTitle=} params.headerTitle {{@link HeaderTitle}} (optional) The header title to use in the widget (Buy or string). Defaults to Buy.
581
- *
582
- * @param {StatusCallback=} params.statusCallback {{@link StatusCallback}} (optional) Callback to receive status events.
416
+ * @param {PaymentsWidgetSDKParams} params The configurations for the payments widget
583
417
  */
584
- declare function openHallidayPayments(params: PaymentsWidgetSDKParams, ...args: any[]): Promise<void>;
418
+ declare function openHallidayPayments(params: PaymentsWidgetSDKParams, ...args: any[]): void;
585
419
 
586
420
  /**
587
421
  * Serialize the query params to a base64 string.
@@ -613,14 +447,14 @@ declare const getPaymentsWidgetUrl: (params: PaymentsWidgetQueryParams & {
613
447
  * This loads the widget in a hidden iframe so that when you call
614
448
  * `openHallidayPayments()`, it appears instantly - no loading, no delay.
615
449
  *
616
- * @param config Configuration with apiKey and optional callbacks
617
- * @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
618
451
  *
619
452
  * @example
620
453
  * ```javascript
621
454
  * // Initialize early in your app
622
- * await initializeClient({
455
+ * initializeClient({
623
456
  * apiKey: 'your-api-key',
457
+ * outputs: ['ethereum:usdc'],
624
458
  * onReady: () => console.log('Widget fully loaded!'),
625
459
  * onError: (err) => console.error('Failed to load:', err),
626
460
  * });
@@ -633,12 +467,14 @@ declare const getPaymentsWidgetUrl: (params: PaymentsWidgetQueryParams & {
633
467
  * });
634
468
  * ```
635
469
  */
636
- declare const initializeClient: (config: InitConfig, ...args: any[]) => Promise<void>;
470
+ declare const initializeClient: (params: PaymentsWidgetSDKParams, ...args: any[]) => void;
637
471
  /**
638
472
  * Destroy the preloaded widget and reset state.
639
473
  * Call this when you need to re-initialize with different settings.
640
474
  */
641
475
  declare const destroyClient: () => void;
642
476
 
643
- export { AppMode, BackgroundStyle, BorderStyle, CssFontSize, CustomStyles, FontName, FontWeight, HeaderTitle, InitConfig, MessageType, OrderStatus, PaymentCategoryGrouping, PaymentCategoryOrder, PaymentsWidgetQueryParams, PaymentsWidgetSDKParams, TextMode, WindowType, deserializeQueryParams, destroyClient, getPaymentsWidgetUrl, initializeClient, openHallidayPayments, serializeQueryParams };
644
- export type { Message, MessageResponse };
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 };