@imtbl/sdk 0.38.0 → 0.39.1-alpha.1

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
@@ -62,22 +62,24 @@ type MethodsHeaders = Partial<{
62
62
  [Key in Method$1 as Lowercase<Key>]: AxiosHeaders;
63
63
  } & {common: AxiosHeaders}>;
64
64
 
65
- type AxiosHeaderMatcher = (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean;
65
+ type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean);
66
+
67
+ type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any;
66
68
 
67
69
  declare class AxiosHeaders {
68
70
  constructor(
69
- headers?: RawAxiosHeaders | AxiosHeaders
71
+ headers?: RawAxiosHeaders | AxiosHeaders | string
70
72
  );
71
73
 
72
74
  [key: string]: any;
73
75
 
74
76
  set(headerName?: string, value?: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
75
- set(headers?: RawAxiosHeaders | AxiosHeaders, rewrite?: boolean): AxiosHeaders;
77
+ set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
76
78
 
77
79
  get(headerName: string, parser: RegExp): RegExpExecArray | null;
78
- get(headerName: string, matcher?: true | AxiosHeaderMatcher): AxiosHeaderValue;
80
+ get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
79
81
 
80
- has(header: string, matcher?: true | AxiosHeaderMatcher): boolean;
82
+ has(header: string, matcher?: AxiosHeaderMatcher): boolean;
81
83
 
82
84
  delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
83
85
 
@@ -172,10 +174,7 @@ interface AxiosBasicCredentials$1 {
172
174
  interface AxiosProxyConfig$1 {
173
175
  host: string;
174
176
  port: number;
175
- auth?: {
176
- username: string;
177
- password: string;
178
- };
177
+ auth?: AxiosBasicCredentials$1;
179
178
  protocol?: string;
180
179
  }
181
180
 
@@ -290,6 +289,15 @@ type AxiosAdapterName = 'xhr' | 'http' | string;
290
289
 
291
290
  type AxiosAdapterConfig = AxiosAdapter$1 | AxiosAdapterName;
292
291
 
292
+ type AddressFamily = 4 | 6 | undefined;
293
+
294
+ interface LookupAddressEntry {
295
+ address: string;
296
+ family?: AddressFamily;
297
+ }
298
+
299
+ type LookupAddress = string | LookupAddressEntry;
300
+
293
301
  interface AxiosRequestConfig$1<D = any> {
294
302
  url?: string;
295
303
  method?: Method$1 | string;
@@ -331,9 +339,10 @@ interface AxiosRequestConfig$1<D = any> {
331
339
  FormData?: new (...args: any[]) => object;
332
340
  };
333
341
  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>);
342
+ family?: AddressFamily;
343
+ lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
344
+ ((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
345
+ withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
337
346
  }
338
347
 
339
348
  interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig$1<D> {
@@ -17752,7 +17761,7 @@ type ExchangeContracts = {
17752
17761
  coreFactory: string;
17753
17762
  quoterV2: string;
17754
17763
  peripheryRouter: string;
17755
- secondaryFee: string;
17764
+ immutableSwapProxy: string;
17756
17765
  };
17757
17766
  /**
17758
17767
  * Type representing an ERC20 token
@@ -17914,11 +17923,18 @@ type DexConfig = {
17914
17923
  /** An array of tokens compatible with the DEX. */
17915
17924
  tokens?: TokenInfo[];
17916
17925
  };
17926
+ /**
17927
+ * A type representing the configuration for the Bridge for all the supported chains.
17928
+ */
17929
+ type BridgeConfig = {
17930
+ /** An object containing the bridge configuration per chain */
17931
+ [chainId: string]: BridgeChainConfig;
17932
+ };
17917
17933
  /**
17918
17934
  * A type representing the configuration for the Bridge.
17919
17935
  * @property {TokenInfo[] | undefined} tokens
17920
17936
  */
17921
- type BridgeConfig = {
17937
+ type BridgeChainConfig = {
17922
17938
  /** An array of tokens compatible with the Bridge. */
17923
17939
  tokens?: TokenInfo[];
17924
17940
  };
@@ -18366,6 +18382,7 @@ declare class RemoteConfigFetcher {
18366
18382
  private version;
18367
18383
  constructor(httpClient: HttpClient, params: RemoteConfigParams);
18368
18384
  private getEndpoint;
18385
+ private parseResponse;
18369
18386
  private loadConfig;
18370
18387
  private loadConfigTokens;
18371
18388
  getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;