@imtbl/sdk 0.37.0 → 0.39.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/blockchain_data.js +1 -1
- package/dist/browser/checkout/sdk.js +3 -3
- package/dist/browser/checkout/widgets.js +58 -58
- package/dist/checkout.d.ts +597 -173
- package/dist/checkout.js +141 -39
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +12 -12
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +145 -43
- package/dist/index.d.ts +468 -40
- package/dist/index.js +145 -43
- package/dist/passport.js +2 -2
- package/package.json +4 -1
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,39 @@ 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;
|
|
18369
|
+
private parseResponse;
|
|
17978
18370
|
private loadConfig;
|
|
17979
18371
|
private loadConfigTokens;
|
|
17980
18372
|
getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;
|
|
17981
18373
|
getTokensConfig(chainId: ChainId): Promise<ChainTokensConfig>;
|
|
18374
|
+
getHttpClient: () => HttpClient;
|
|
17982
18375
|
}
|
|
17983
18376
|
|
|
17984
18377
|
declare class CheckoutConfiguration {
|
|
@@ -17990,7 +18383,7 @@ declare class CheckoutConfiguration {
|
|
|
17990
18383
|
readonly remote: RemoteConfigFetcher;
|
|
17991
18384
|
readonly environment: Environment;
|
|
17992
18385
|
readonly networkMap: NetworkMap;
|
|
17993
|
-
constructor(config: CheckoutModuleConfiguration);
|
|
18386
|
+
constructor(config: CheckoutModuleConfiguration, httpClient: HttpClient);
|
|
17994
18387
|
}
|
|
17995
18388
|
|
|
17996
18389
|
interface FiatRampWidgetParams {
|
|
@@ -18032,7 +18425,42 @@ declare enum WidgetTheme {
|
|
|
18032
18425
|
type WidgetConfiguration = {
|
|
18033
18426
|
/** The theme of the Checkout Widget (default: "DARK") */
|
|
18034
18427
|
theme?: WidgetTheme;
|
|
18428
|
+
language?: WidgetLanguage;
|
|
18035
18429
|
};
|
|
18430
|
+
/**
|
|
18431
|
+
* Widget Language represents the language options for the Checkout Widgets.
|
|
18432
|
+
*/
|
|
18433
|
+
type WidgetLanguage = 'en' | 'ja' | 'ko' | 'zh';
|
|
18434
|
+
|
|
18435
|
+
/**
|
|
18436
|
+
* Connect Widget Configuration represents the configuration options for the Connect Widget.
|
|
18437
|
+
*/
|
|
18438
|
+
type ConnectWidgetConfiguration = {} & WidgetConfiguration;
|
|
18439
|
+
|
|
18440
|
+
/**
|
|
18441
|
+
* Bridge Widget Configuration represents the configuration options for the Bridge Widget.
|
|
18442
|
+
*/
|
|
18443
|
+
type BridgeWidgetConfiguration = {} & WidgetConfiguration;
|
|
18444
|
+
|
|
18445
|
+
/**
|
|
18446
|
+
* Wallet Widget Configuration represents the configuration options for the Wallet Widget.
|
|
18447
|
+
*/
|
|
18448
|
+
type WalletWidgetConfiguration = {} & WidgetConfiguration;
|
|
18449
|
+
|
|
18450
|
+
/**
|
|
18451
|
+
* Swap Widget Configuration represents the configuration options for the Swap Widget.
|
|
18452
|
+
*/
|
|
18453
|
+
type SwapWidgetConfiguration = {} & WidgetConfiguration;
|
|
18454
|
+
|
|
18455
|
+
/**
|
|
18456
|
+
* Onramp Widget Configuration represents the configuration options for the Onramp Widget.
|
|
18457
|
+
*/
|
|
18458
|
+
type OnrampWidgetConfiguration = {} & WidgetConfiguration;
|
|
18459
|
+
|
|
18460
|
+
/**
|
|
18461
|
+
* Sale Widget Configuration represents the configuration options for the Sale Widget.
|
|
18462
|
+
*/
|
|
18463
|
+
type SaleWidgetConfiguration = {} & WidgetConfiguration;
|
|
18036
18464
|
|
|
18037
18465
|
/**
|
|
18038
18466
|
* Enum representing the events emitted by the widgets.
|
|
@@ -18058,6 +18486,12 @@ declare enum ProviderEventType {
|
|
|
18058
18486
|
type ProviderUpdated = {
|
|
18059
18487
|
provider: Web3Provider;
|
|
18060
18488
|
};
|
|
18489
|
+
/**
|
|
18490
|
+
* Payload type for the LANGUAGE_CHANGED event
|
|
18491
|
+
*/
|
|
18492
|
+
type LanguageChanged = {
|
|
18493
|
+
language: WidgetLanguage;
|
|
18494
|
+
};
|
|
18061
18495
|
|
|
18062
18496
|
/**
|
|
18063
18497
|
* Enum representing possible Connect Widget event types.
|
|
@@ -18065,7 +18499,8 @@ type ProviderUpdated = {
|
|
|
18065
18499
|
declare enum ConnectEventType {
|
|
18066
18500
|
CLOSE_WIDGET = "close-widget",
|
|
18067
18501
|
SUCCESS = "success",
|
|
18068
|
-
FAILURE = "failure"
|
|
18502
|
+
FAILURE = "failure",
|
|
18503
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18069
18504
|
}
|
|
18070
18505
|
/**
|
|
18071
18506
|
* Represents a successful connection.
|
|
@@ -18093,7 +18528,8 @@ type ConnectionFailed = {
|
|
|
18093
18528
|
declare enum WalletEventType {
|
|
18094
18529
|
CLOSE_WIDGET = "close-widget",
|
|
18095
18530
|
NETWORK_SWITCH = "network-switch",
|
|
18096
|
-
DISCONNECT_WALLET = "disconnect-wallet"
|
|
18531
|
+
DISCONNECT_WALLET = "disconnect-wallet",
|
|
18532
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18097
18533
|
}
|
|
18098
18534
|
/**
|
|
18099
18535
|
* Represents an event that is triggered when the user switches the network in their wallet.
|
|
@@ -18121,7 +18557,8 @@ declare enum SwapEventType {
|
|
|
18121
18557
|
CLOSE_WIDGET = "close-widget",
|
|
18122
18558
|
SUCCESS = "success",
|
|
18123
18559
|
FAILURE = "failure",
|
|
18124
|
-
REJECTED = "rejected"
|
|
18560
|
+
REJECTED = "rejected",
|
|
18561
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18125
18562
|
}
|
|
18126
18563
|
/**
|
|
18127
18564
|
* Represents a successful swap transaction.
|
|
@@ -18162,7 +18599,8 @@ declare enum SaleEventType {
|
|
|
18162
18599
|
SUCCESS = "success",
|
|
18163
18600
|
FAILURE = "failure",
|
|
18164
18601
|
REJECTED = "rejected",
|
|
18165
|
-
TRANSACTION_SUCCESS = "transaction-success"
|
|
18602
|
+
TRANSACTION_SUCCESS = "transaction-success",
|
|
18603
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18166
18604
|
}
|
|
18167
18605
|
/**
|
|
18168
18606
|
* Represents a successful Sale transaction.
|
|
@@ -18211,7 +18649,8 @@ type SaleTransactionSuccess = {
|
|
|
18211
18649
|
declare enum BridgeEventType {
|
|
18212
18650
|
CLOSE_WIDGET = "close-widget",
|
|
18213
18651
|
FAILURE = "failure",
|
|
18214
|
-
TRANSACTION_SENT = "transaction-sent"
|
|
18652
|
+
TRANSACTION_SENT = "transaction-sent",
|
|
18653
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18215
18654
|
}
|
|
18216
18655
|
/**
|
|
18217
18656
|
* Represents a successful bridge transaction.
|
|
@@ -18303,7 +18742,8 @@ type OrchestrationEventData = RequestConnectEvent | RequestWalletEvent | Request
|
|
|
18303
18742
|
declare enum OnRampEventType {
|
|
18304
18743
|
CLOSE_WIDGET = "close-widget",
|
|
18305
18744
|
SUCCESS = "success",
|
|
18306
|
-
FAILURE = "failure"
|
|
18745
|
+
FAILURE = "failure",
|
|
18746
|
+
LANGUAGE_CHANGED = "language-changed"
|
|
18307
18747
|
}
|
|
18308
18748
|
/**
|
|
18309
18749
|
* Represents a successful on-ramp transaction.
|
|
@@ -18329,7 +18769,10 @@ declare enum ConnectTargetLayer {
|
|
|
18329
18769
|
LAYER1 = "LAYER1",
|
|
18330
18770
|
LAYER2 = "LAYER2"
|
|
18331
18771
|
}
|
|
18332
|
-
type ConnectWidgetParams = {
|
|
18772
|
+
type ConnectWidgetParams = {
|
|
18773
|
+
/** The language to use for the connect widget */
|
|
18774
|
+
language?: WidgetLanguage;
|
|
18775
|
+
};
|
|
18333
18776
|
|
|
18334
18777
|
/**
|
|
18335
18778
|
* Bridge Widget parameters
|
|
@@ -18344,6 +18787,8 @@ type BridgeWidgetParams = {
|
|
|
18344
18787
|
amount?: string;
|
|
18345
18788
|
/** The wallet provider name to use for the bridge widget */
|
|
18346
18789
|
walletProviderName?: WalletProviderName;
|
|
18790
|
+
/** The language to use for the bridge widget */
|
|
18791
|
+
language?: WidgetLanguage;
|
|
18347
18792
|
};
|
|
18348
18793
|
|
|
18349
18794
|
/**
|
|
@@ -18353,6 +18798,8 @@ type BridgeWidgetParams = {
|
|
|
18353
18798
|
type WalletWidgetParams = {
|
|
18354
18799
|
/** The wallet provider name to use for the wallet widget */
|
|
18355
18800
|
walletProviderName?: WalletProviderName;
|
|
18801
|
+
/** The language to use for the wallet widget */
|
|
18802
|
+
language?: WidgetLanguage;
|
|
18356
18803
|
};
|
|
18357
18804
|
|
|
18358
18805
|
/**
|
|
@@ -18371,6 +18818,8 @@ type SwapWidgetParams = {
|
|
|
18371
18818
|
toTokenAddress?: string;
|
|
18372
18819
|
/** The wallet provider name to use for the swap widget */
|
|
18373
18820
|
walletProviderName?: WalletProviderName;
|
|
18821
|
+
/** The language to use for the swap widget */
|
|
18822
|
+
language?: WidgetLanguage;
|
|
18374
18823
|
};
|
|
18375
18824
|
|
|
18376
18825
|
/**
|
|
@@ -18386,6 +18835,8 @@ type OnRampWidgetParams = {
|
|
|
18386
18835
|
amount?: string;
|
|
18387
18836
|
/** The wallet provider name to use for the onramp widget */
|
|
18388
18837
|
walletProviderName?: WalletProviderName;
|
|
18838
|
+
/** The language to use for the onramp widget */
|
|
18839
|
+
language?: WidgetLanguage;
|
|
18389
18840
|
};
|
|
18390
18841
|
|
|
18391
18842
|
/**
|
|
@@ -18405,6 +18856,8 @@ type SaleWidgetParams = {
|
|
|
18405
18856
|
items?: SaleItem[];
|
|
18406
18857
|
/** The wallet provider name to default to if no web3Provider is passed */
|
|
18407
18858
|
walletProviderName?: WalletProviderName;
|
|
18859
|
+
/** The language to use for the sales widget */
|
|
18860
|
+
language?: WidgetLanguage;
|
|
18408
18861
|
};
|
|
18409
18862
|
/**
|
|
18410
18863
|
* A product to be purchased
|
|
@@ -18427,36 +18880,6 @@ type SaleItem = {
|
|
|
18427
18880
|
description: string;
|
|
18428
18881
|
};
|
|
18429
18882
|
|
|
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
18883
|
/**
|
|
18461
18884
|
* Enum representing the list of widget types.
|
|
18462
18885
|
*/
|
|
@@ -18696,6 +19119,7 @@ type WidgetsInit = {
|
|
|
18696
19119
|
|
|
18697
19120
|
declare class Checkout {
|
|
18698
19121
|
private readOnlyProviders;
|
|
19122
|
+
private httpClient;
|
|
18699
19123
|
readonly config: CheckoutConfiguration;
|
|
18700
19124
|
readonly fiatRampService: FiatRampService;
|
|
18701
19125
|
readonly availability: AvailabilityService;
|
|
@@ -19074,6 +19498,7 @@ type checkout_d_IWidgetsFactory = IWidgetsFactory;
|
|
|
19074
19498
|
type checkout_d_ItemBalance = ItemBalance;
|
|
19075
19499
|
type checkout_d_ItemType = ItemType;
|
|
19076
19500
|
declare const checkout_d_ItemType: typeof ItemType;
|
|
19501
|
+
type checkout_d_LanguageChanged = LanguageChanged;
|
|
19077
19502
|
type checkout_d_NativeItemRequirement = NativeItemRequirement;
|
|
19078
19503
|
type checkout_d_NetworkFilter = NetworkFilter;
|
|
19079
19504
|
type checkout_d_NetworkFilterTypes = NetworkFilterTypes;
|
|
@@ -19168,6 +19593,7 @@ type checkout_d_WidgetConfigurations = WidgetConfigurations;
|
|
|
19168
19593
|
type checkout_d_WidgetEvent<T extends WidgetType, KEventName extends keyof WidgetEventData[T]> = WidgetEvent<T, KEventName>;
|
|
19169
19594
|
type checkout_d_WidgetEventData = WidgetEventData;
|
|
19170
19595
|
type checkout_d_WidgetEventTypes = WidgetEventTypes;
|
|
19596
|
+
type checkout_d_WidgetLanguage = WidgetLanguage;
|
|
19171
19597
|
type checkout_d_WidgetParameters = WidgetParameters;
|
|
19172
19598
|
type checkout_d_WidgetProperties<T extends WidgetType> = WidgetProperties<T>;
|
|
19173
19599
|
type checkout_d_WidgetTheme = WidgetTheme;
|
|
@@ -19261,6 +19687,7 @@ declare namespace checkout_d {
|
|
|
19261
19687
|
checkout_d_IWidgetsFactory as IWidgetsFactory,
|
|
19262
19688
|
checkout_d_ItemBalance as ItemBalance,
|
|
19263
19689
|
checkout_d_ItemType as ItemType,
|
|
19690
|
+
checkout_d_LanguageChanged as LanguageChanged,
|
|
19264
19691
|
checkout_d_NativeItemRequirement as NativeItemRequirement,
|
|
19265
19692
|
checkout_d_NetworkFilter as NetworkFilter,
|
|
19266
19693
|
checkout_d_NetworkFilterTypes as NetworkFilterTypes,
|
|
@@ -19343,6 +19770,7 @@ declare namespace checkout_d {
|
|
|
19343
19770
|
checkout_d_WidgetEvent as WidgetEvent,
|
|
19344
19771
|
checkout_d_WidgetEventData as WidgetEventData,
|
|
19345
19772
|
checkout_d_WidgetEventTypes as WidgetEventTypes,
|
|
19773
|
+
checkout_d_WidgetLanguage as WidgetLanguage,
|
|
19346
19774
|
checkout_d_WidgetParameters as WidgetParameters,
|
|
19347
19775
|
checkout_d_WidgetProperties as WidgetProperties,
|
|
19348
19776
|
checkout_d_WidgetTheme as WidgetTheme,
|