@imtbl/sdk 0.37.0 → 0.38.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/dist/index.d.ts CHANGED
@@ -51,6 +51,381 @@ declare namespace config_d {
51
51
  };
52
52
  }
53
53
 
54
+ // TypeScript Version: 4.7
55
+ type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
56
+
57
+ interface RawAxiosHeaders {
58
+ [key: string]: AxiosHeaderValue;
59
+ }
60
+
61
+ type MethodsHeaders = Partial<{
62
+ [Key in Method$1 as Lowercase<Key>]: AxiosHeaders;
63
+ } & {common: AxiosHeaders}>;
64
+
65
+ type AxiosHeaderMatcher = (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean;
66
+
67
+ declare class AxiosHeaders {
68
+ constructor(
69
+ headers?: RawAxiosHeaders | AxiosHeaders
70
+ );
71
+
72
+ [key: string]: any;
73
+
74
+ set(headerName?: string, value?: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
75
+ set(headers?: RawAxiosHeaders | AxiosHeaders, rewrite?: boolean): AxiosHeaders;
76
+
77
+ get(headerName: string, parser: RegExp): RegExpExecArray | null;
78
+ get(headerName: string, matcher?: true | AxiosHeaderMatcher): AxiosHeaderValue;
79
+
80
+ has(header: string, matcher?: true | AxiosHeaderMatcher): boolean;
81
+
82
+ delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
83
+
84
+ clear(matcher?: AxiosHeaderMatcher): boolean;
85
+
86
+ normalize(format: boolean): AxiosHeaders;
87
+
88
+ concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
89
+
90
+ toJSON(asStrings?: boolean): RawAxiosHeaders;
91
+
92
+ static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
93
+
94
+ static accessor(header: string | string[]): AxiosHeaders;
95
+
96
+ static concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
97
+
98
+ setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
99
+ getContentType(parser?: RegExp): RegExpExecArray | null;
100
+ getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
101
+ hasContentType(matcher?: AxiosHeaderMatcher): boolean;
102
+
103
+ setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
104
+ getContentLength(parser?: RegExp): RegExpExecArray | null;
105
+ getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
106
+ hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
107
+
108
+ setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
109
+ getAccept(parser?: RegExp): RegExpExecArray | null;
110
+ getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
111
+ hasAccept(matcher?: AxiosHeaderMatcher): boolean;
112
+
113
+ setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
114
+ getUserAgent(parser?: RegExp): RegExpExecArray | null;
115
+ getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
116
+ hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
117
+
118
+ setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
119
+ getContentEncoding(parser?: RegExp): RegExpExecArray | null;
120
+ getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
121
+ hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
122
+
123
+ setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
124
+ getAuthorization(parser?: RegExp): RegExpExecArray | null;
125
+ getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
126
+ hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
127
+
128
+ [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
129
+ }
130
+
131
+ type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent' | 'Content-Encoding' | 'Authorization';
132
+
133
+ type ContentType = AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream';
134
+
135
+ type RawAxiosRequestHeaders = Partial<RawAxiosHeaders & {
136
+ [Key in CommonRequestHeadersList]: AxiosHeaderValue;
137
+ } & {
138
+ 'Content-Type': ContentType
139
+ }>;
140
+
141
+ type AxiosRequestHeaders$1 = RawAxiosRequestHeaders & AxiosHeaders;
142
+
143
+ type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding';
144
+
145
+ type RawCommonResponseHeaders = {
146
+ [Key in CommonResponseHeadersList]: AxiosHeaderValue;
147
+ } & {
148
+ "set-cookie": string[];
149
+ };
150
+
151
+ type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
152
+
153
+ type AxiosResponseHeaders$1 = RawAxiosResponseHeaders & AxiosHeaders;
154
+
155
+ interface AxiosRequestTransformer$1 {
156
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders$1): any;
157
+ }
158
+
159
+ interface AxiosResponseTransformer$1 {
160
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosResponseHeaders$1, status?: number): any;
161
+ }
162
+
163
+ interface AxiosAdapter$1 {
164
+ (config: InternalAxiosRequestConfig): AxiosPromise$1;
165
+ }
166
+
167
+ interface AxiosBasicCredentials$1 {
168
+ username: string;
169
+ password: string;
170
+ }
171
+
172
+ interface AxiosProxyConfig$1 {
173
+ host: string;
174
+ port: number;
175
+ auth?: {
176
+ username: string;
177
+ password: string;
178
+ };
179
+ protocol?: string;
180
+ }
181
+
182
+ type Method$1 =
183
+ | 'get' | 'GET'
184
+ | 'delete' | 'DELETE'
185
+ | 'head' | 'HEAD'
186
+ | 'options' | 'OPTIONS'
187
+ | 'post' | 'POST'
188
+ | 'put' | 'PUT'
189
+ | 'patch' | 'PATCH'
190
+ | 'purge' | 'PURGE'
191
+ | 'link' | 'LINK'
192
+ | 'unlink' | 'UNLINK';
193
+
194
+ type ResponseType$1 =
195
+ | 'arraybuffer'
196
+ | 'blob'
197
+ | 'document'
198
+ | 'json'
199
+ | 'text'
200
+ | 'stream';
201
+
202
+ type responseEncoding$1 =
203
+ | 'ascii' | 'ASCII'
204
+ | 'ansi' | 'ANSI'
205
+ | 'binary' | 'BINARY'
206
+ | 'base64' | 'BASE64'
207
+ | 'base64url' | 'BASE64URL'
208
+ | 'hex' | 'HEX'
209
+ | 'latin1' | 'LATIN1'
210
+ | 'ucs-2' | 'UCS-2'
211
+ | 'ucs2' | 'UCS2'
212
+ | 'utf-8' | 'UTF-8'
213
+ | 'utf8' | 'UTF8'
214
+ | 'utf16le' | 'UTF16LE';
215
+
216
+ interface TransitionalOptions$1 {
217
+ silentJSONParsing?: boolean;
218
+ forcedJSONParsing?: boolean;
219
+ clarifyTimeoutError?: boolean;
220
+ }
221
+
222
+ interface GenericAbortSignal {
223
+ readonly aborted: boolean;
224
+ onabort?: ((...args: any) => any) | null;
225
+ addEventListener?: (...args: any) => any;
226
+ removeEventListener?: (...args: any) => any;
227
+ }
228
+
229
+ interface FormDataVisitorHelpers {
230
+ defaultVisitor: SerializerVisitor;
231
+ convertValue: (value: any) => any;
232
+ isVisitable: (value: any) => boolean;
233
+ }
234
+
235
+ interface SerializerVisitor {
236
+ (
237
+ this: GenericFormData,
238
+ value: any,
239
+ key: string | number,
240
+ path: null | Array<string | number>,
241
+ helpers: FormDataVisitorHelpers
242
+ ): boolean;
243
+ }
244
+
245
+ interface SerializerOptions {
246
+ visitor?: SerializerVisitor;
247
+ dots?: boolean;
248
+ metaTokens?: boolean;
249
+ indexes?: boolean | null;
250
+ }
251
+
252
+ // tslint:disable-next-line
253
+ interface FormSerializerOptions extends SerializerOptions {
254
+ }
255
+
256
+ interface ParamEncoder {
257
+ (value: any, defaultEncoder: (value: any) => any): any;
258
+ }
259
+
260
+ interface CustomParamsSerializer {
261
+ (params: Record<string, any>, options?: ParamsSerializerOptions): string;
262
+ }
263
+
264
+ interface ParamsSerializerOptions extends SerializerOptions {
265
+ encode?: ParamEncoder;
266
+ serialize?: CustomParamsSerializer;
267
+ }
268
+
269
+ type MaxUploadRate = number;
270
+
271
+ type MaxDownloadRate = number;
272
+
273
+ type BrowserProgressEvent = any;
274
+
275
+ interface AxiosProgressEvent {
276
+ loaded: number;
277
+ total?: number;
278
+ progress?: number;
279
+ bytes: number;
280
+ rate?: number;
281
+ estimated?: number;
282
+ upload?: boolean;
283
+ download?: boolean;
284
+ event?: BrowserProgressEvent;
285
+ }
286
+
287
+ type Milliseconds = number;
288
+
289
+ type AxiosAdapterName = 'xhr' | 'http' | string;
290
+
291
+ type AxiosAdapterConfig = AxiosAdapter$1 | AxiosAdapterName;
292
+
293
+ interface AxiosRequestConfig$1<D = any> {
294
+ url?: string;
295
+ method?: Method$1 | string;
296
+ baseURL?: string;
297
+ transformRequest?: AxiosRequestTransformer$1 | AxiosRequestTransformer$1[];
298
+ transformResponse?: AxiosResponseTransformer$1 | AxiosResponseTransformer$1[];
299
+ headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
300
+ params?: any;
301
+ paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
302
+ data?: D;
303
+ timeout?: Milliseconds;
304
+ timeoutErrorMessage?: string;
305
+ withCredentials?: boolean;
306
+ adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
307
+ auth?: AxiosBasicCredentials$1;
308
+ responseType?: ResponseType$1;
309
+ responseEncoding?: responseEncoding$1 | string;
310
+ xsrfCookieName?: string;
311
+ xsrfHeaderName?: string;
312
+ onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
313
+ onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
314
+ maxContentLength?: number;
315
+ validateStatus?: ((status: number) => boolean) | null;
316
+ maxBodyLength?: number;
317
+ maxRedirects?: number;
318
+ maxRate?: number | [MaxUploadRate, MaxDownloadRate];
319
+ beforeRedirect?: (options: Record<string, any>, responseDetails: { headers: Record<string, string> }) => void;
320
+ socketPath?: string | null;
321
+ transport?: any;
322
+ httpAgent?: any;
323
+ httpsAgent?: any;
324
+ proxy?: AxiosProxyConfig$1 | false;
325
+ cancelToken?: CancelToken$1;
326
+ decompress?: boolean;
327
+ transitional?: TransitionalOptions$1;
328
+ signal?: GenericAbortSignal;
329
+ insecureHTTPParser?: boolean;
330
+ env?: {
331
+ FormData?: new (...args: any[]) => object;
332
+ };
333
+ formSerializer?: FormSerializerOptions;
334
+ family?: 4 | 6 | undefined;
335
+ lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: string, family: number) => void) => void) |
336
+ ((hostname: string, options: object) => Promise<[address: string, family: number] | string>);
337
+ }
338
+
339
+ interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig$1<D> {
340
+ headers: AxiosRequestHeaders$1;
341
+ }
342
+
343
+ interface HeadersDefaults$1 {
344
+ common: RawAxiosRequestHeaders;
345
+ delete: RawAxiosRequestHeaders;
346
+ get: RawAxiosRequestHeaders;
347
+ head: RawAxiosRequestHeaders;
348
+ post: RawAxiosRequestHeaders;
349
+ put: RawAxiosRequestHeaders;
350
+ patch: RawAxiosRequestHeaders;
351
+ options?: RawAxiosRequestHeaders;
352
+ purge?: RawAxiosRequestHeaders;
353
+ link?: RawAxiosRequestHeaders;
354
+ unlink?: RawAxiosRequestHeaders;
355
+ }
356
+
357
+ interface AxiosDefaults$1<D = any> extends Omit<AxiosRequestConfig$1<D>, 'headers'> {
358
+ headers: HeadersDefaults$1;
359
+ }
360
+
361
+ interface AxiosResponse$1<T = any, D = any> {
362
+ data: T;
363
+ status: number;
364
+ statusText: string;
365
+ headers: RawAxiosResponseHeaders | AxiosResponseHeaders$1;
366
+ config: InternalAxiosRequestConfig<D>;
367
+ request?: any;
368
+ }
369
+
370
+ type AxiosPromise$1<T = any> = Promise<AxiosResponse$1<T>>;
371
+
372
+ interface Cancel$1 {
373
+ message: string | undefined;
374
+ }
375
+
376
+ interface CancelToken$1 {
377
+ promise: Promise<Cancel$1>;
378
+ reason?: Cancel$1;
379
+ throwIfRequested(): void;
380
+ }
381
+
382
+ interface AxiosInterceptorOptions {
383
+ synchronous?: boolean;
384
+ runWhen?: (config: InternalAxiosRequestConfig) => boolean;
385
+ }
386
+
387
+ interface AxiosInterceptorManager$1<V> {
388
+ use(onFulfilled?: ((value: V) => V | Promise<V>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions): number;
389
+ eject(id: number): void;
390
+ clear(): void;
391
+ }
392
+
393
+ declare class Axios$1 {
394
+ constructor(config?: AxiosRequestConfig$1);
395
+ defaults: AxiosDefaults$1;
396
+ interceptors: {
397
+ request: AxiosInterceptorManager$1<InternalAxiosRequestConfig>;
398
+ response: AxiosInterceptorManager$1<AxiosResponse$1>;
399
+ };
400
+ getUri(config?: AxiosRequestConfig$1): string;
401
+ request<T = any, R = AxiosResponse$1<T>, D = any>(config: AxiosRequestConfig$1<D>): Promise<R>;
402
+ get<T = any, R = AxiosResponse$1<T>, D = any>(url: string, config?: AxiosRequestConfig$1<D>): Promise<R>;
403
+ delete<T = any, R = AxiosResponse$1<T>, D = any>(url: string, config?: AxiosRequestConfig$1<D>): Promise<R>;
404
+ head<T = any, R = AxiosResponse$1<T>, D = any>(url: string, config?: AxiosRequestConfig$1<D>): Promise<R>;
405
+ options<T = any, R = AxiosResponse$1<T>, D = any>(url: string, config?: AxiosRequestConfig$1<D>): Promise<R>;
406
+ post<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
407
+ put<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
408
+ patch<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
409
+ postForm<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
410
+ putForm<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
411
+ patchForm<T = any, R = AxiosResponse$1<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig$1<D>): Promise<R>;
412
+ }
413
+
414
+ interface AxiosInstance$1 extends Axios$1 {
415
+ <T = any, R = AxiosResponse$1<T>, D = any>(config: AxiosRequestConfig$1<D>): Promise<R>;
416
+ <T = any, R = AxiosResponse$1<T>, D = any>(url: string, config?: AxiosRequestConfig$1<D>): Promise<R>;
417
+
418
+ defaults: Omit<AxiosDefaults$1, 'headers'> & {
419
+ headers: HeadersDefaults$1 & {
420
+ [key: string]: AxiosHeaderValue
421
+ }
422
+ };
423
+ }
424
+
425
+ interface GenericFormData {
426
+ append(name: string, value: any, options?: any): any;
427
+ }
428
+
54
429
  /**
55
430
  * Immutable zkEVM API
56
431
  * Immutable Multi Rollup API
@@ -17456,12 +17831,14 @@ interface CheckoutBridgeConfiguration extends CheckoutFeatureConfiguration {
17456
17831
  * @property {CheckoutSwapConfiguration} swap - To configure the swap feature.
17457
17832
  * @property {CheckoutBridgeConfiguration} bridge - To configure the bridge feature.
17458
17833
  * @property {Passport} passport - To enable passport wallet integration.
17834
+ * @property {string} publishableKey - To identify your integration for tracking and analytics purposes.
17459
17835
  */
17460
17836
  interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverrides> {
17461
17837
  onRamp?: CheckoutOnRampConfiguration;
17462
17838
  swap?: CheckoutSwapConfiguration;
17463
17839
  bridge?: CheckoutBridgeConfiguration;
17464
17840
  passport?: Passport;
17841
+ publishableKey?: string;
17465
17842
  }
17466
17843
  /**
17467
17844
  * A type representing various remotely defined configurations which are
@@ -17962,23 +18339,38 @@ interface FiatRampParams {
17962
18339
  passport?: any;
17963
18340
  }
17964
18341
 
18342
+ declare class HttpClient {
18343
+ protected config: any;
18344
+ protected axiosInstance: AxiosInstance$1;
18345
+ constructor(config?: CheckoutModuleConfiguration);
18346
+ private shouldAddPublishableKey;
18347
+ private setupInterceptors;
18348
+ private processResponse;
18349
+ request(config: AxiosRequestConfig$1): Promise<AxiosResponse$1<any, any>>;
18350
+ get(url: string, config?: AxiosRequestConfig$1): Promise<AxiosResponse$1<any, any>>;
18351
+ post(url: string, data?: any, config?: AxiosRequestConfig$1): Promise<AxiosResponse$1<any, any>>;
18352
+ put(url: string, data?: any, config?: AxiosRequestConfig$1): Promise<AxiosResponse$1<any, any>>;
18353
+ delete(url: string, data?: any, config?: AxiosRequestConfig$1): Promise<AxiosResponse$1<any, any>>;
18354
+ }
18355
+
17965
18356
  type RemoteConfigParams = {
17966
18357
  isDevelopment: boolean;
17967
18358
  isProduction: boolean;
17968
18359
  };
17969
18360
  declare class RemoteConfigFetcher {
18361
+ private httpClient;
17970
18362
  private isDevelopment;
17971
18363
  private isProduction;
17972
18364
  private configCache;
17973
18365
  private tokensCache;
17974
18366
  private version;
17975
- constructor(params: RemoteConfigParams);
17976
- private static makeHttpRequest;
18367
+ constructor(httpClient: HttpClient, params: RemoteConfigParams);
17977
18368
  private getEndpoint;
17978
18369
  private loadConfig;
17979
18370
  private loadConfigTokens;
17980
18371
  getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;
17981
18372
  getTokensConfig(chainId: ChainId): Promise<ChainTokensConfig>;
18373
+ getHttpClient: () => HttpClient;
17982
18374
  }
17983
18375
 
17984
18376
  declare class CheckoutConfiguration {
@@ -17990,7 +18382,7 @@ declare class CheckoutConfiguration {
17990
18382
  readonly remote: RemoteConfigFetcher;
17991
18383
  readonly environment: Environment;
17992
18384
  readonly networkMap: NetworkMap;
17993
- constructor(config: CheckoutModuleConfiguration);
18385
+ constructor(config: CheckoutModuleConfiguration, httpClient: HttpClient);
17994
18386
  }
17995
18387
 
17996
18388
  interface FiatRampWidgetParams {
@@ -18032,7 +18424,42 @@ declare enum WidgetTheme {
18032
18424
  type WidgetConfiguration = {
18033
18425
  /** The theme of the Checkout Widget (default: "DARK") */
18034
18426
  theme?: WidgetTheme;
18427
+ language?: WidgetLanguage;
18035
18428
  };
18429
+ /**
18430
+ * Widget Language represents the language options for the Checkout Widgets.
18431
+ */
18432
+ type WidgetLanguage = 'en' | 'ja' | 'ko' | 'zh';
18433
+
18434
+ /**
18435
+ * Connect Widget Configuration represents the configuration options for the Connect Widget.
18436
+ */
18437
+ type ConnectWidgetConfiguration = {} & WidgetConfiguration;
18438
+
18439
+ /**
18440
+ * Bridge Widget Configuration represents the configuration options for the Bridge Widget.
18441
+ */
18442
+ type BridgeWidgetConfiguration = {} & WidgetConfiguration;
18443
+
18444
+ /**
18445
+ * Wallet Widget Configuration represents the configuration options for the Wallet Widget.
18446
+ */
18447
+ type WalletWidgetConfiguration = {} & WidgetConfiguration;
18448
+
18449
+ /**
18450
+ * Swap Widget Configuration represents the configuration options for the Swap Widget.
18451
+ */
18452
+ type SwapWidgetConfiguration = {} & WidgetConfiguration;
18453
+
18454
+ /**
18455
+ * Onramp Widget Configuration represents the configuration options for the Onramp Widget.
18456
+ */
18457
+ type OnrampWidgetConfiguration = {} & WidgetConfiguration;
18458
+
18459
+ /**
18460
+ * Sale Widget Configuration represents the configuration options for the Sale Widget.
18461
+ */
18462
+ type SaleWidgetConfiguration = {} & WidgetConfiguration;
18036
18463
 
18037
18464
  /**
18038
18465
  * Enum representing the events emitted by the widgets.
@@ -18058,6 +18485,12 @@ declare enum ProviderEventType {
18058
18485
  type ProviderUpdated = {
18059
18486
  provider: Web3Provider;
18060
18487
  };
18488
+ /**
18489
+ * Payload type for the LANGUAGE_CHANGED event
18490
+ */
18491
+ type LanguageChanged = {
18492
+ language: WidgetLanguage;
18493
+ };
18061
18494
 
18062
18495
  /**
18063
18496
  * Enum representing possible Connect Widget event types.
@@ -18065,7 +18498,8 @@ type ProviderUpdated = {
18065
18498
  declare enum ConnectEventType {
18066
18499
  CLOSE_WIDGET = "close-widget",
18067
18500
  SUCCESS = "success",
18068
- FAILURE = "failure"
18501
+ FAILURE = "failure",
18502
+ LANGUAGE_CHANGED = "language-changed"
18069
18503
  }
18070
18504
  /**
18071
18505
  * Represents a successful connection.
@@ -18093,7 +18527,8 @@ type ConnectionFailed = {
18093
18527
  declare enum WalletEventType {
18094
18528
  CLOSE_WIDGET = "close-widget",
18095
18529
  NETWORK_SWITCH = "network-switch",
18096
- DISCONNECT_WALLET = "disconnect-wallet"
18530
+ DISCONNECT_WALLET = "disconnect-wallet",
18531
+ LANGUAGE_CHANGED = "language-changed"
18097
18532
  }
18098
18533
  /**
18099
18534
  * Represents an event that is triggered when the user switches the network in their wallet.
@@ -18121,7 +18556,8 @@ declare enum SwapEventType {
18121
18556
  CLOSE_WIDGET = "close-widget",
18122
18557
  SUCCESS = "success",
18123
18558
  FAILURE = "failure",
18124
- REJECTED = "rejected"
18559
+ REJECTED = "rejected",
18560
+ LANGUAGE_CHANGED = "language-changed"
18125
18561
  }
18126
18562
  /**
18127
18563
  * Represents a successful swap transaction.
@@ -18162,7 +18598,8 @@ declare enum SaleEventType {
18162
18598
  SUCCESS = "success",
18163
18599
  FAILURE = "failure",
18164
18600
  REJECTED = "rejected",
18165
- TRANSACTION_SUCCESS = "transaction-success"
18601
+ TRANSACTION_SUCCESS = "transaction-success",
18602
+ LANGUAGE_CHANGED = "language-changed"
18166
18603
  }
18167
18604
  /**
18168
18605
  * Represents a successful Sale transaction.
@@ -18211,7 +18648,8 @@ type SaleTransactionSuccess = {
18211
18648
  declare enum BridgeEventType {
18212
18649
  CLOSE_WIDGET = "close-widget",
18213
18650
  FAILURE = "failure",
18214
- TRANSACTION_SENT = "transaction-sent"
18651
+ TRANSACTION_SENT = "transaction-sent",
18652
+ LANGUAGE_CHANGED = "language-changed"
18215
18653
  }
18216
18654
  /**
18217
18655
  * Represents a successful bridge transaction.
@@ -18303,7 +18741,8 @@ type OrchestrationEventData = RequestConnectEvent | RequestWalletEvent | Request
18303
18741
  declare enum OnRampEventType {
18304
18742
  CLOSE_WIDGET = "close-widget",
18305
18743
  SUCCESS = "success",
18306
- FAILURE = "failure"
18744
+ FAILURE = "failure",
18745
+ LANGUAGE_CHANGED = "language-changed"
18307
18746
  }
18308
18747
  /**
18309
18748
  * Represents a successful on-ramp transaction.
@@ -18329,7 +18768,10 @@ declare enum ConnectTargetLayer {
18329
18768
  LAYER1 = "LAYER1",
18330
18769
  LAYER2 = "LAYER2"
18331
18770
  }
18332
- type ConnectWidgetParams = {};
18771
+ type ConnectWidgetParams = {
18772
+ /** The language to use for the connect widget */
18773
+ language?: WidgetLanguage;
18774
+ };
18333
18775
 
18334
18776
  /**
18335
18777
  * Bridge Widget parameters
@@ -18344,6 +18786,8 @@ type BridgeWidgetParams = {
18344
18786
  amount?: string;
18345
18787
  /** The wallet provider name to use for the bridge widget */
18346
18788
  walletProviderName?: WalletProviderName;
18789
+ /** The language to use for the bridge widget */
18790
+ language?: WidgetLanguage;
18347
18791
  };
18348
18792
 
18349
18793
  /**
@@ -18353,6 +18797,8 @@ type BridgeWidgetParams = {
18353
18797
  type WalletWidgetParams = {
18354
18798
  /** The wallet provider name to use for the wallet widget */
18355
18799
  walletProviderName?: WalletProviderName;
18800
+ /** The language to use for the wallet widget */
18801
+ language?: WidgetLanguage;
18356
18802
  };
18357
18803
 
18358
18804
  /**
@@ -18371,6 +18817,8 @@ type SwapWidgetParams = {
18371
18817
  toTokenAddress?: string;
18372
18818
  /** The wallet provider name to use for the swap widget */
18373
18819
  walletProviderName?: WalletProviderName;
18820
+ /** The language to use for the swap widget */
18821
+ language?: WidgetLanguage;
18374
18822
  };
18375
18823
 
18376
18824
  /**
@@ -18386,6 +18834,8 @@ type OnRampWidgetParams = {
18386
18834
  amount?: string;
18387
18835
  /** The wallet provider name to use for the onramp widget */
18388
18836
  walletProviderName?: WalletProviderName;
18837
+ /** The language to use for the onramp widget */
18838
+ language?: WidgetLanguage;
18389
18839
  };
18390
18840
 
18391
18841
  /**
@@ -18405,6 +18855,8 @@ type SaleWidgetParams = {
18405
18855
  items?: SaleItem[];
18406
18856
  /** The wallet provider name to default to if no web3Provider is passed */
18407
18857
  walletProviderName?: WalletProviderName;
18858
+ /** The language to use for the sales widget */
18859
+ language?: WidgetLanguage;
18408
18860
  };
18409
18861
  /**
18410
18862
  * A product to be purchased
@@ -18427,36 +18879,6 @@ type SaleItem = {
18427
18879
  description: string;
18428
18880
  };
18429
18881
 
18430
- /**
18431
- * Connect Widget Configuration represents the configuration options for the Connect Widget.
18432
- */
18433
- type ConnectWidgetConfiguration = {} & WidgetConfiguration;
18434
-
18435
- /**
18436
- * Bridge Widget Configuration represents the configuration options for the Bridge Widget.
18437
- */
18438
- type BridgeWidgetConfiguration = {} & WidgetConfiguration;
18439
-
18440
- /**
18441
- * Wallet Widget Configuration represents the configuration options for the Wallet Widget.
18442
- */
18443
- type WalletWidgetConfiguration = {} & WidgetConfiguration;
18444
-
18445
- /**
18446
- * Swap Widget Configuration represents the configuration options for the Swap Widget.
18447
- */
18448
- type SwapWidgetConfiguration = {} & WidgetConfiguration;
18449
-
18450
- /**
18451
- * Onramp Widget Configuration represents the configuration options for the Onramp Widget.
18452
- */
18453
- type OnrampWidgetConfiguration = {} & WidgetConfiguration;
18454
-
18455
- /**
18456
- * Sale Widget Configuration represents the configuration options for the Sale Widget.
18457
- */
18458
- type SaleWidgetConfiguration = {} & WidgetConfiguration;
18459
-
18460
18882
  /**
18461
18883
  * Enum representing the list of widget types.
18462
18884
  */
@@ -18696,6 +19118,7 @@ type WidgetsInit = {
18696
19118
 
18697
19119
  declare class Checkout {
18698
19120
  private readOnlyProviders;
19121
+ private httpClient;
18699
19122
  readonly config: CheckoutConfiguration;
18700
19123
  readonly fiatRampService: FiatRampService;
18701
19124
  readonly availability: AvailabilityService;
@@ -19074,6 +19497,7 @@ type checkout_d_IWidgetsFactory = IWidgetsFactory;
19074
19497
  type checkout_d_ItemBalance = ItemBalance;
19075
19498
  type checkout_d_ItemType = ItemType;
19076
19499
  declare const checkout_d_ItemType: typeof ItemType;
19500
+ type checkout_d_LanguageChanged = LanguageChanged;
19077
19501
  type checkout_d_NativeItemRequirement = NativeItemRequirement;
19078
19502
  type checkout_d_NetworkFilter = NetworkFilter;
19079
19503
  type checkout_d_NetworkFilterTypes = NetworkFilterTypes;
@@ -19168,6 +19592,7 @@ type checkout_d_WidgetConfigurations = WidgetConfigurations;
19168
19592
  type checkout_d_WidgetEvent<T extends WidgetType, KEventName extends keyof WidgetEventData[T]> = WidgetEvent<T, KEventName>;
19169
19593
  type checkout_d_WidgetEventData = WidgetEventData;
19170
19594
  type checkout_d_WidgetEventTypes = WidgetEventTypes;
19595
+ type checkout_d_WidgetLanguage = WidgetLanguage;
19171
19596
  type checkout_d_WidgetParameters = WidgetParameters;
19172
19597
  type checkout_d_WidgetProperties<T extends WidgetType> = WidgetProperties<T>;
19173
19598
  type checkout_d_WidgetTheme = WidgetTheme;
@@ -19261,6 +19686,7 @@ declare namespace checkout_d {
19261
19686
  checkout_d_IWidgetsFactory as IWidgetsFactory,
19262
19687
  checkout_d_ItemBalance as ItemBalance,
19263
19688
  checkout_d_ItemType as ItemType,
19689
+ checkout_d_LanguageChanged as LanguageChanged,
19264
19690
  checkout_d_NativeItemRequirement as NativeItemRequirement,
19265
19691
  checkout_d_NetworkFilter as NetworkFilter,
19266
19692
  checkout_d_NetworkFilterTypes as NetworkFilterTypes,
@@ -19343,6 +19769,7 @@ declare namespace checkout_d {
19343
19769
  checkout_d_WidgetEvent as WidgetEvent,
19344
19770
  checkout_d_WidgetEventData as WidgetEventData,
19345
19771
  checkout_d_WidgetEventTypes as WidgetEventTypes,
19772
+ checkout_d_WidgetLanguage as WidgetLanguage,
19346
19773
  checkout_d_WidgetParameters as WidgetParameters,
19347
19774
  checkout_d_WidgetProperties as WidgetProperties,
19348
19775
  checkout_d_WidgetTheme as WidgetTheme,