@openfort/openfort-js 1.3.3 → 1.3.4
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/cjs/sdk/src/api/embeddedWallet.cjs +1 -1
- package/dist/cjs/sdk/src/core/passkey/handler.cjs +1 -1
- package/dist/cjs/sdk/src/version.cjs +1 -1
- package/dist/cjs/sdk/src/wallets/embedded.cjs +1 -1
- package/dist/cjs/sdk/src/wallets/iframeManager.cjs +1 -1
- package/dist/cjs/sdk/src/wallets/types.cjs +1 -1
- package/dist/index.d.cts +134 -202
- package/dist/index.d.ts +134 -202
- package/dist/sdk/src/api/embeddedWallet.js +1 -1
- package/dist/sdk/src/core/passkey/handler.js +1 -1
- package/dist/sdk/src/version.js +1 -1
- package/dist/sdk/src/wallets/embedded.js +1 -1
- package/dist/sdk/src/wallets/iframeManager.js +1 -1
- package/dist/sdk/src/wallets/types.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -37,13 +37,7 @@ interface ShieldOptions {
|
|
|
37
37
|
// TypeScript Version: 4.7
|
|
38
38
|
type StringLiteralsOrString<Literals extends string> = Literals | (string & {});
|
|
39
39
|
|
|
40
|
-
type AxiosHeaderValue =
|
|
41
|
-
| AxiosHeaders
|
|
42
|
-
| string
|
|
43
|
-
| string[]
|
|
44
|
-
| number
|
|
45
|
-
| boolean
|
|
46
|
-
| null;
|
|
40
|
+
type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
|
|
47
41
|
|
|
48
42
|
interface RawAxiosHeaders {
|
|
49
43
|
[key: string]: AxiosHeaderValue;
|
|
@@ -60,11 +54,7 @@ type AxiosHeaderMatcher =
|
|
|
60
54
|
| RegExp
|
|
61
55
|
| ((this: AxiosHeaders, value: string, name: string) => boolean);
|
|
62
56
|
|
|
63
|
-
type AxiosHeaderParser = (
|
|
64
|
-
this: AxiosHeaders,
|
|
65
|
-
value: AxiosHeaderValue,
|
|
66
|
-
header: string,
|
|
67
|
-
) => any;
|
|
57
|
+
type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any;
|
|
68
58
|
|
|
69
59
|
declare class AxiosHeaders {
|
|
70
60
|
constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
|
|
@@ -74,12 +64,9 @@ declare class AxiosHeaders {
|
|
|
74
64
|
set(
|
|
75
65
|
headerName?: string,
|
|
76
66
|
value?: AxiosHeaderValue,
|
|
77
|
-
rewrite?: boolean | AxiosHeaderMatcher
|
|
78
|
-
): AxiosHeaders;
|
|
79
|
-
set(
|
|
80
|
-
headers?: RawAxiosHeaders | AxiosHeaders | string,
|
|
81
|
-
rewrite?: boolean,
|
|
67
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
82
68
|
): AxiosHeaders;
|
|
69
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
|
|
83
70
|
|
|
84
71
|
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
85
72
|
get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
|
|
@@ -93,9 +80,7 @@ declare class AxiosHeaders {
|
|
|
93
80
|
normalize(format: boolean): AxiosHeaders;
|
|
94
81
|
|
|
95
82
|
concat(
|
|
96
|
-
...targets: Array<
|
|
97
|
-
AxiosHeaders | RawAxiosHeaders | string | undefined | null
|
|
98
|
-
>
|
|
83
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
99
84
|
): AxiosHeaders;
|
|
100
85
|
|
|
101
86
|
toJSON(asStrings?: boolean): RawAxiosHeaders;
|
|
@@ -105,55 +90,35 @@ declare class AxiosHeaders {
|
|
|
105
90
|
static accessor(header: string | string[]): AxiosHeaders;
|
|
106
91
|
|
|
107
92
|
static concat(
|
|
108
|
-
...targets: Array<
|
|
109
|
-
AxiosHeaders | RawAxiosHeaders | string | undefined | null
|
|
110
|
-
>
|
|
93
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
111
94
|
): AxiosHeaders;
|
|
112
95
|
|
|
113
|
-
setContentType(
|
|
114
|
-
value: ContentType,
|
|
115
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
116
|
-
): AxiosHeaders;
|
|
96
|
+
setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
117
97
|
getContentType(parser?: RegExp): RegExpExecArray | null;
|
|
118
98
|
getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
119
99
|
hasContentType(matcher?: AxiosHeaderMatcher): boolean;
|
|
120
100
|
|
|
121
|
-
setContentLength(
|
|
122
|
-
value: AxiosHeaderValue,
|
|
123
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
124
|
-
): AxiosHeaders;
|
|
101
|
+
setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
125
102
|
getContentLength(parser?: RegExp): RegExpExecArray | null;
|
|
126
103
|
getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
127
104
|
hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
|
|
128
105
|
|
|
129
|
-
setAccept(
|
|
130
|
-
value: AxiosHeaderValue,
|
|
131
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
132
|
-
): AxiosHeaders;
|
|
106
|
+
setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
133
107
|
getAccept(parser?: RegExp): RegExpExecArray | null;
|
|
134
108
|
getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
135
109
|
hasAccept(matcher?: AxiosHeaderMatcher): boolean;
|
|
136
110
|
|
|
137
|
-
setUserAgent(
|
|
138
|
-
value: AxiosHeaderValue,
|
|
139
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
140
|
-
): AxiosHeaders;
|
|
111
|
+
setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
141
112
|
getUserAgent(parser?: RegExp): RegExpExecArray | null;
|
|
142
113
|
getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
143
114
|
hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
|
|
144
115
|
|
|
145
|
-
setContentEncoding(
|
|
146
|
-
value: AxiosHeaderValue,
|
|
147
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
148
|
-
): AxiosHeaders;
|
|
116
|
+
setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
149
117
|
getContentEncoding(parser?: RegExp): RegExpExecArray | null;
|
|
150
118
|
getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
151
119
|
hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
|
|
152
120
|
|
|
153
|
-
setAuthorization(
|
|
154
|
-
value: AxiosHeaderValue,
|
|
155
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
156
|
-
): AxiosHeaders;
|
|
121
|
+
setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
157
122
|
getAuthorization(parser?: RegExp): RegExpExecArray | null;
|
|
158
123
|
getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
159
124
|
hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
|
|
@@ -164,56 +129,53 @@ declare class AxiosHeaders {
|
|
|
164
129
|
}
|
|
165
130
|
|
|
166
131
|
type CommonRequestHeadersList =
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
132
|
+
| 'Accept'
|
|
133
|
+
| 'Content-Length'
|
|
134
|
+
| 'User-Agent'
|
|
135
|
+
| 'Content-Encoding'
|
|
136
|
+
| 'Authorization'
|
|
137
|
+
| 'Location';
|
|
172
138
|
|
|
173
139
|
type ContentType =
|
|
174
140
|
| AxiosHeaderValue
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
141
|
+
| 'text/html'
|
|
142
|
+
| 'text/plain'
|
|
143
|
+
| 'multipart/form-data'
|
|
144
|
+
| 'application/json'
|
|
145
|
+
| 'application/x-www-form-urlencoded'
|
|
146
|
+
| 'application/octet-stream';
|
|
181
147
|
|
|
182
148
|
type RawAxiosRequestHeaders = Partial<
|
|
183
149
|
RawAxiosHeaders & {
|
|
184
150
|
[Key in CommonRequestHeadersList]: AxiosHeaderValue;
|
|
185
151
|
} & {
|
|
186
|
-
|
|
152
|
+
'Content-Type': ContentType;
|
|
187
153
|
}
|
|
188
154
|
>;
|
|
189
155
|
|
|
190
156
|
type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
|
|
191
157
|
|
|
192
158
|
type CommonResponseHeadersList =
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
159
|
+
| 'Server'
|
|
160
|
+
| 'Content-Type'
|
|
161
|
+
| 'Content-Length'
|
|
162
|
+
| 'Cache-Control'
|
|
163
|
+
| 'Content-Encoding';
|
|
164
|
+
|
|
165
|
+
type CommonResponseHeaderKey = CommonResponseHeadersList | Lowercase<CommonResponseHeadersList>;
|
|
198
166
|
|
|
199
167
|
type RawCommonResponseHeaders = {
|
|
200
|
-
[Key in
|
|
168
|
+
[Key in CommonResponseHeaderKey]: AxiosHeaderValue;
|
|
201
169
|
} & {
|
|
202
|
-
|
|
170
|
+
'set-cookie': string[];
|
|
203
171
|
};
|
|
204
172
|
|
|
205
|
-
type RawAxiosResponseHeaders = Partial<
|
|
206
|
-
RawAxiosHeaders & RawCommonResponseHeaders
|
|
207
|
-
>;
|
|
173
|
+
type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
|
|
208
174
|
|
|
209
175
|
type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
|
|
210
176
|
|
|
211
177
|
interface AxiosRequestTransformer {
|
|
212
|
-
(
|
|
213
|
-
this: InternalAxiosRequestConfig,
|
|
214
|
-
data: any,
|
|
215
|
-
headers: AxiosRequestHeaders,
|
|
216
|
-
): any;
|
|
178
|
+
(this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
|
|
217
179
|
}
|
|
218
180
|
|
|
219
181
|
interface AxiosResponseTransformer {
|
|
@@ -221,7 +183,7 @@ interface AxiosResponseTransformer {
|
|
|
221
183
|
this: InternalAxiosRequestConfig,
|
|
222
184
|
data: any,
|
|
223
185
|
headers: AxiosResponseHeaders,
|
|
224
|
-
status?: number
|
|
186
|
+
status?: number
|
|
225
187
|
): any;
|
|
226
188
|
}
|
|
227
189
|
|
|
@@ -307,62 +269,48 @@ declare enum HttpStatusCode {
|
|
|
307
269
|
NetworkAuthenticationRequired = 511,
|
|
308
270
|
}
|
|
309
271
|
|
|
310
|
-
type
|
|
311
|
-
|
|
|
312
|
-
|
|
|
313
|
-
|
|
|
314
|
-
|
|
|
315
|
-
|
|
|
316
|
-
|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
|
321
|
-
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
| "PATCH"
|
|
325
|
-
| "purge"
|
|
326
|
-
| "PURGE"
|
|
327
|
-
| "link"
|
|
328
|
-
| "LINK"
|
|
329
|
-
| "unlink"
|
|
330
|
-
| "UNLINK";
|
|
272
|
+
type UppercaseMethod =
|
|
273
|
+
| 'GET'
|
|
274
|
+
| 'DELETE'
|
|
275
|
+
| 'HEAD'
|
|
276
|
+
| 'OPTIONS'
|
|
277
|
+
| 'POST'
|
|
278
|
+
| 'PUT'
|
|
279
|
+
| 'PATCH'
|
|
280
|
+
| 'PURGE'
|
|
281
|
+
| 'LINK'
|
|
282
|
+
| 'UNLINK'
|
|
283
|
+
| 'QUERY';
|
|
284
|
+
|
|
285
|
+
type Method = (UppercaseMethod | Lowercase<UppercaseMethod>) & {};
|
|
331
286
|
|
|
332
287
|
type ResponseType =
|
|
333
|
-
|
|
|
334
|
-
|
|
|
335
|
-
|
|
|
336
|
-
|
|
|
337
|
-
|
|
|
338
|
-
|
|
|
339
|
-
|
|
|
340
|
-
|
|
341
|
-
type
|
|
342
|
-
|
|
|
343
|
-
|
|
|
344
|
-
|
|
|
345
|
-
|
|
|
346
|
-
|
|
|
347
|
-
|
|
|
348
|
-
|
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
359
|
-
| "UCS2"
|
|
360
|
-
| "utf-8"
|
|
361
|
-
| "UTF-8"
|
|
362
|
-
| "utf8"
|
|
363
|
-
| "UTF8"
|
|
364
|
-
| "utf16le"
|
|
365
|
-
| "UTF16LE";
|
|
288
|
+
| 'arraybuffer'
|
|
289
|
+
| 'blob'
|
|
290
|
+
| 'document'
|
|
291
|
+
| 'json'
|
|
292
|
+
| 'text'
|
|
293
|
+
| 'stream'
|
|
294
|
+
| 'formdata';
|
|
295
|
+
|
|
296
|
+
type UppercaseResponseEncoding =
|
|
297
|
+
| 'ASCII'
|
|
298
|
+
| 'ANSI'
|
|
299
|
+
| 'BINARY'
|
|
300
|
+
| 'BASE64'
|
|
301
|
+
| 'BASE64URL'
|
|
302
|
+
| 'HEX'
|
|
303
|
+
| 'LATIN1'
|
|
304
|
+
| 'UCS-2'
|
|
305
|
+
| 'UCS2'
|
|
306
|
+
| 'UTF-8'
|
|
307
|
+
| 'UTF8'
|
|
308
|
+
| 'UTF16LE';
|
|
309
|
+
|
|
310
|
+
type responseEncoding = (
|
|
311
|
+
| UppercaseResponseEncoding
|
|
312
|
+
| Lowercase<UppercaseResponseEncoding>
|
|
313
|
+
) & {};
|
|
366
314
|
|
|
367
315
|
interface TransitionalOptions {
|
|
368
316
|
silentJSONParsing?: boolean;
|
|
@@ -390,7 +338,7 @@ interface SerializerVisitor {
|
|
|
390
338
|
value: any,
|
|
391
339
|
key: string | number,
|
|
392
340
|
path: null | Array<string | number>,
|
|
393
|
-
helpers: FormDataVisitorHelpers
|
|
341
|
+
helpers: FormDataVisitorHelpers
|
|
394
342
|
): boolean;
|
|
395
343
|
}
|
|
396
344
|
|
|
@@ -438,7 +386,7 @@ interface AxiosProgressEvent {
|
|
|
438
386
|
|
|
439
387
|
type Milliseconds = number;
|
|
440
388
|
|
|
441
|
-
type AxiosAdapterName = StringLiteralsOrString<
|
|
389
|
+
type AxiosAdapterName = StringLiteralsOrString<'xhr' | 'http' | 'fetch'>;
|
|
442
390
|
|
|
443
391
|
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
|
|
444
392
|
|
|
@@ -484,8 +432,14 @@ interface AxiosRequestConfig<D = any> {
|
|
|
484
432
|
headers: Record<string, string>;
|
|
485
433
|
statusCode: HttpStatusCode;
|
|
486
434
|
},
|
|
435
|
+
requestDetails: {
|
|
436
|
+
headers: Record<string, string>;
|
|
437
|
+
url: string;
|
|
438
|
+
method: string;
|
|
439
|
+
},
|
|
487
440
|
) => void;
|
|
488
441
|
socketPath?: string | null;
|
|
442
|
+
allowedSocketPaths?: string | string[] | null;
|
|
489
443
|
transport?: any;
|
|
490
444
|
httpAgent?: any;
|
|
491
445
|
httpsAgent?: any;
|
|
@@ -497,24 +451,11 @@ interface AxiosRequestConfig<D = any> {
|
|
|
497
451
|
insecureHTTPParser?: boolean;
|
|
498
452
|
env?: {
|
|
499
453
|
FormData?: new (...args: any[]) => object;
|
|
500
|
-
fetch?: (
|
|
501
|
-
|
|
502
|
-
init?: RequestInit,
|
|
503
|
-
) => Promise<Response>;
|
|
504
|
-
Request?: new (
|
|
505
|
-
input: URL | Request | string,
|
|
506
|
-
init?: RequestInit,
|
|
507
|
-
) => Request;
|
|
454
|
+
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
|
|
455
|
+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
|
|
508
456
|
Response?: new (
|
|
509
|
-
body?:
|
|
510
|
-
|
|
511
|
-
| ArrayBufferView
|
|
512
|
-
| Blob
|
|
513
|
-
| FormData
|
|
514
|
-
| URLSearchParams
|
|
515
|
-
| string
|
|
516
|
-
| null,
|
|
517
|
-
init?: ResponseInit,
|
|
457
|
+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
|
|
458
|
+
init?: ResponseInit
|
|
518
459
|
) => Response;
|
|
519
460
|
};
|
|
520
461
|
formSerializer?: FormSerializerOptions;
|
|
@@ -526,35 +467,27 @@ interface AxiosRequestConfig<D = any> {
|
|
|
526
467
|
cb: (
|
|
527
468
|
err: Error | null,
|
|
528
469
|
address: LookupAddress | LookupAddress[],
|
|
529
|
-
family?: AddressFamily
|
|
530
|
-
) => void
|
|
470
|
+
family?: AddressFamily
|
|
471
|
+
) => void
|
|
531
472
|
) => void)
|
|
532
473
|
| ((
|
|
533
474
|
hostname: string,
|
|
534
|
-
options: object
|
|
475
|
+
options: object
|
|
535
476
|
) => Promise<
|
|
536
|
-
| [
|
|
537
|
-
address: LookupAddressEntry | LookupAddressEntry[],
|
|
538
|
-
family?: AddressFamily,
|
|
539
|
-
]
|
|
540
|
-
| LookupAddress
|
|
477
|
+
[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress
|
|
541
478
|
>);
|
|
542
|
-
withXSRFToken?:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
parseReviver?: (this: any, key: string, value: any) => any;
|
|
546
|
-
fetchOptions?:
|
|
547
|
-
| Omit<RequestInit, "body" | "headers" | "method" | "signal">
|
|
548
|
-
| Record<string, any>;
|
|
479
|
+
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
|
480
|
+
parseReviver?: (this: any, key: string, value: any, context?: { source?: string }) => any;
|
|
481
|
+
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
|
|
549
482
|
httpVersion?: 1 | 2;
|
|
550
483
|
http2Options?: Record<string, any> & {
|
|
551
484
|
sessionTimeout?: number;
|
|
552
485
|
};
|
|
486
|
+
formDataHeaderPolicy?: 'legacy' | 'content-only';
|
|
487
|
+
redact?: string[];
|
|
553
488
|
}
|
|
554
489
|
|
|
555
|
-
interface InternalAxiosRequestConfig<
|
|
556
|
-
D = any,
|
|
557
|
-
> extends AxiosRequestConfig<D> {
|
|
490
|
+
interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
|
|
558
491
|
headers: AxiosRequestHeaders;
|
|
559
492
|
}
|
|
560
493
|
|
|
@@ -570,19 +503,14 @@ interface HeadersDefaults {
|
|
|
570
503
|
purge?: RawAxiosRequestHeaders;
|
|
571
504
|
link?: RawAxiosRequestHeaders;
|
|
572
505
|
unlink?: RawAxiosRequestHeaders;
|
|
506
|
+
query?: RawAxiosRequestHeaders;
|
|
573
507
|
}
|
|
574
508
|
|
|
575
|
-
interface AxiosDefaults<D = any> extends Omit<
|
|
576
|
-
AxiosRequestConfig<D>,
|
|
577
|
-
"headers"
|
|
578
|
-
> {
|
|
509
|
+
interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
|
|
579
510
|
headers: HeadersDefaults;
|
|
580
511
|
}
|
|
581
512
|
|
|
582
|
-
interface CreateAxiosDefaults<D = any> extends Omit<
|
|
583
|
-
AxiosRequestConfig<D>,
|
|
584
|
-
"headers"
|
|
585
|
-
> {
|
|
513
|
+
interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
|
|
586
514
|
headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
|
|
587
515
|
}
|
|
588
516
|
|
|
@@ -609,7 +537,7 @@ interface CancelToken {
|
|
|
609
537
|
|
|
610
538
|
interface AxiosInterceptorOptions {
|
|
611
539
|
synchronous?: boolean;
|
|
612
|
-
runWhen?: (config: InternalAxiosRequestConfig) => boolean;
|
|
540
|
+
runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null;
|
|
613
541
|
}
|
|
614
542
|
|
|
615
543
|
type AxiosInterceptorFulfilled<T> = (value: T) => T | Promise<T>;
|
|
@@ -618,25 +546,23 @@ type AxiosInterceptorRejected = (error: any) => any;
|
|
|
618
546
|
type AxiosRequestInterceptorUse<T> = (
|
|
619
547
|
onFulfilled?: AxiosInterceptorFulfilled<T> | null,
|
|
620
548
|
onRejected?: AxiosInterceptorRejected | null,
|
|
621
|
-
options?: AxiosInterceptorOptions
|
|
549
|
+
options?: AxiosInterceptorOptions
|
|
622
550
|
) => number;
|
|
623
551
|
|
|
624
552
|
type AxiosResponseInterceptorUse<T> = (
|
|
625
553
|
onFulfilled?: AxiosInterceptorFulfilled<T> | null,
|
|
626
|
-
onRejected?: AxiosInterceptorRejected | null
|
|
554
|
+
onRejected?: AxiosInterceptorRejected | null
|
|
627
555
|
) => number;
|
|
628
556
|
|
|
629
557
|
interface AxiosInterceptorHandler<T> {
|
|
630
558
|
fulfilled: AxiosInterceptorFulfilled<T>;
|
|
631
559
|
rejected?: AxiosInterceptorRejected;
|
|
632
560
|
synchronous: boolean;
|
|
633
|
-
runWhen
|
|
561
|
+
runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null;
|
|
634
562
|
}
|
|
635
563
|
|
|
636
564
|
interface AxiosInterceptorManager<V> {
|
|
637
|
-
use: V extends AxiosResponse
|
|
638
|
-
? AxiosResponseInterceptorUse<V>
|
|
639
|
-
: AxiosRequestInterceptorUse<V>;
|
|
565
|
+
use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>;
|
|
640
566
|
eject(id: number): void;
|
|
641
567
|
clear(): void;
|
|
642
568
|
handlers?: Array<AxiosInterceptorHandler<V>>;
|
|
@@ -650,68 +576,66 @@ declare class Axios {
|
|
|
650
576
|
response: AxiosInterceptorManager<AxiosResponse>;
|
|
651
577
|
};
|
|
652
578
|
getUri(config?: AxiosRequestConfig): string;
|
|
653
|
-
request<T = any, R = AxiosResponse<T>, D = any>(
|
|
654
|
-
config: AxiosRequestConfig<D>,
|
|
655
|
-
): Promise<R>;
|
|
579
|
+
request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
|
|
656
580
|
get<T = any, R = AxiosResponse<T>, D = any>(
|
|
657
581
|
url: string,
|
|
658
|
-
config?: AxiosRequestConfig<D
|
|
582
|
+
config?: AxiosRequestConfig<D>
|
|
659
583
|
): Promise<R>;
|
|
660
584
|
delete<T = any, R = AxiosResponse<T>, D = any>(
|
|
661
585
|
url: string,
|
|
662
|
-
config?: AxiosRequestConfig<D
|
|
586
|
+
config?: AxiosRequestConfig<D>
|
|
663
587
|
): Promise<R>;
|
|
664
588
|
head<T = any, R = AxiosResponse<T>, D = any>(
|
|
665
589
|
url: string,
|
|
666
|
-
config?: AxiosRequestConfig<D
|
|
590
|
+
config?: AxiosRequestConfig<D>
|
|
667
591
|
): Promise<R>;
|
|
668
592
|
options<T = any, R = AxiosResponse<T>, D = any>(
|
|
669
593
|
url: string,
|
|
670
|
-
config?: AxiosRequestConfig<D
|
|
594
|
+
config?: AxiosRequestConfig<D>
|
|
671
595
|
): Promise<R>;
|
|
672
596
|
post<T = any, R = AxiosResponse<T>, D = any>(
|
|
673
597
|
url: string,
|
|
674
598
|
data?: D,
|
|
675
|
-
config?: AxiosRequestConfig<D
|
|
599
|
+
config?: AxiosRequestConfig<D>
|
|
676
600
|
): Promise<R>;
|
|
677
601
|
put<T = any, R = AxiosResponse<T>, D = any>(
|
|
678
602
|
url: string,
|
|
679
603
|
data?: D,
|
|
680
|
-
config?: AxiosRequestConfig<D
|
|
604
|
+
config?: AxiosRequestConfig<D>
|
|
681
605
|
): Promise<R>;
|
|
682
606
|
patch<T = any, R = AxiosResponse<T>, D = any>(
|
|
683
607
|
url: string,
|
|
684
608
|
data?: D,
|
|
685
|
-
config?: AxiosRequestConfig<D
|
|
609
|
+
config?: AxiosRequestConfig<D>
|
|
686
610
|
): Promise<R>;
|
|
687
611
|
postForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
688
612
|
url: string,
|
|
689
613
|
data?: D,
|
|
690
|
-
config?: AxiosRequestConfig<D
|
|
614
|
+
config?: AxiosRequestConfig<D>
|
|
691
615
|
): Promise<R>;
|
|
692
616
|
putForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
693
617
|
url: string,
|
|
694
618
|
data?: D,
|
|
695
|
-
config?: AxiosRequestConfig<D
|
|
619
|
+
config?: AxiosRequestConfig<D>
|
|
696
620
|
): Promise<R>;
|
|
697
621
|
patchForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
698
622
|
url: string,
|
|
699
623
|
data?: D,
|
|
700
|
-
config?: AxiosRequestConfig<D
|
|
624
|
+
config?: AxiosRequestConfig<D>
|
|
625
|
+
): Promise<R>;
|
|
626
|
+
query<T = any, R = AxiosResponse<T>, D = any>(
|
|
627
|
+
url: string,
|
|
628
|
+
data?: D,
|
|
629
|
+
config?: AxiosRequestConfig<D>
|
|
701
630
|
): Promise<R>;
|
|
702
631
|
}
|
|
703
632
|
|
|
704
633
|
interface AxiosInstance extends Axios {
|
|
705
|
-
<T = any, R = AxiosResponse<T>, D = any>(
|
|
706
|
-
|
|
707
|
-
): Promise<R>;
|
|
708
|
-
<T = any, R = AxiosResponse<T>, D = any>(
|
|
709
|
-
url: string,
|
|
710
|
-
config?: AxiosRequestConfig<D>,
|
|
711
|
-
): Promise<R>;
|
|
634
|
+
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
|
|
635
|
+
<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
|
|
712
636
|
|
|
713
637
|
create(config?: CreateAxiosDefaults): AxiosInstance;
|
|
714
|
-
defaults: Omit<AxiosDefaults,
|
|
638
|
+
defaults: Omit<AxiosDefaults, 'headers'> & {
|
|
715
639
|
headers: HeadersDefaults & {
|
|
716
640
|
[key: string]: AxiosHeaderValue;
|
|
717
641
|
};
|
|
@@ -11549,6 +11473,13 @@ type EmbeddedAccountCreateParams = {
|
|
|
11549
11473
|
chainId?: number;
|
|
11550
11474
|
recoveryParams: RecoveryParams;
|
|
11551
11475
|
};
|
|
11476
|
+
type EmbeddedAccountImportParams = {
|
|
11477
|
+
privateKey: string;
|
|
11478
|
+
accountType: AccountTypeEnum;
|
|
11479
|
+
chainType: ChainTypeEnum;
|
|
11480
|
+
chainId?: number;
|
|
11481
|
+
recoveryParams: RecoveryParams;
|
|
11482
|
+
};
|
|
11552
11483
|
type PasskeyInfo = {
|
|
11553
11484
|
passkeyId: string;
|
|
11554
11485
|
passkeyKey?: string;
|
|
@@ -11814,6 +11745,7 @@ declare class EmbeddedWalletApi {
|
|
|
11814
11745
|
private getEntropy;
|
|
11815
11746
|
configure(params: EmbeddedAccountConfigureParams): Promise<EmbeddedAccount>;
|
|
11816
11747
|
create(params: EmbeddedAccountCreateParams): Promise<EmbeddedAccount>;
|
|
11748
|
+
import(params: EmbeddedAccountImportParams): Promise<EmbeddedAccount>;
|
|
11817
11749
|
recover(params: EmbeddedAccountRecoverParams): Promise<EmbeddedAccount>;
|
|
11818
11750
|
/**
|
|
11819
11751
|
* Signs a personal message using the configured signer
|