@imtbl/checkout-sdk 2.2.0 → 2.2.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.
@@ -20,6 +20,8 @@ export declare class CheckoutConfiguration {
20
20
  readonly environment: Environment;
21
21
  readonly networkMap: NetworkMap;
22
22
  readonly publishableKey: string;
23
+ readonly l1ChainId: ChainId;
24
+ readonly l2ChainId: ChainId;
23
25
  readonly overrides: CheckoutModuleConfiguration['overrides'];
24
26
  constructor(config: CheckoutModuleConfiguration, httpClient: HttpClient);
25
27
  get sdkVersion(): string;
@@ -1,17 +1,14 @@
1
1
  import { RemoteConfiguration } from '../types';
2
2
  import { HttpClient } from '../api/http';
3
3
  export type RemoteConfigParams = {
4
- isDevelopment: boolean;
5
- isProduction: boolean;
4
+ remoteConfigEndpoint: string;
6
5
  };
7
6
  export declare class RemoteConfigFetcher {
8
7
  private httpClient;
9
- private isDevelopment;
10
- private isProduction;
8
+ private endpoint;
11
9
  private configCache;
12
10
  private version;
13
11
  constructor(httpClient: HttpClient, params: RemoteConfigParams);
14
- private getEndpoint;
15
12
  private parseResponse;
16
13
  private loadConfig;
17
14
  getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;
@@ -1,19 +1,17 @@
1
- import { ChainId, ChainTokensConfig, TokenBridgeInfo } from '../types';
1
+ import { ChainId, ChainSlug, ChainTokensConfig, TokenBridgeInfo } from '../types';
2
2
  import { HttpClient } from '../api/http';
3
3
  import { RemoteConfigFetcher } from './remoteConfigFetcher';
4
4
  export type RemoteConfigParams = {
5
- isDevelopment: boolean;
6
- isProduction: boolean;
5
+ baseUrl: string;
6
+ chainSlug: ChainSlug;
7
7
  };
8
8
  export declare class TokensFetcher {
9
9
  private httpClient;
10
10
  private remoteConfig;
11
- private readonly isDevelopment;
12
- private readonly isProduction;
11
+ private readonly baseUrl;
12
+ private readonly chainSlug;
13
13
  private tokensCache;
14
14
  constructor(httpClient: HttpClient, remoteConfig: RemoteConfigFetcher, params: RemoteConfigParams);
15
- private getBaseUrl;
16
- private getChainSlug;
17
15
  private loadTokens;
18
16
  getChainTokensConfig(): Promise<ChainTokensConfig>;
19
17
  getTokensConfig(chainId: ChainId): Promise<TokenBridgeInfo[]>;
@@ -2,9 +2,15 @@ import { Environment, ModuleConfiguration } from '@imtbl/config';
2
2
  import { ExchangeOverrides, SecondaryFee } from '@imtbl/dex-sdk';
3
3
  import { Passport } from '@imtbl/passport';
4
4
  import { TokenBridgeInfo, TokenInfo } from './tokenInfo';
5
- import { ChainId } from './chains';
5
+ import { ChainId, ChainSlug } from './chains';
6
+ import { NetworkMap } from './network';
6
7
  export interface CheckoutOverrides {
7
8
  environment?: Environment;
9
+ networkMap?: NetworkMap;
10
+ chainSlug?: ChainSlug;
11
+ baseUrl?: string;
12
+ l2ChainId?: ChainId;
13
+ remoteConfigEndpoint?: string;
8
14
  [key: string]: unknown;
9
15
  }
10
16
  interface CheckoutFeatureConfiguration {
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@imtbl/checkout-sdk",
3
3
  "description": "Immutable Checkout SDK",
4
- "version": "2.2.0",
4
+ "version": "2.2.1-alpha.1",
5
5
  "author": "immutable",
6
6
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
7
7
  "dependencies": {
8
- "@imtbl/blockchain-data": "2.2.0",
9
- "@imtbl/bridge-sdk": "2.2.0",
10
- "@imtbl/config": "2.2.0",
11
- "@imtbl/dex-sdk": "2.2.0",
12
- "@imtbl/generated-clients": "2.2.0",
13
- "@imtbl/metrics": "2.2.0",
14
- "@imtbl/orderbook": "2.2.0",
15
- "@imtbl/passport": "2.2.0",
8
+ "@imtbl/blockchain-data": "2.2.1-alpha.1",
9
+ "@imtbl/bridge-sdk": "2.2.1-alpha.1",
10
+ "@imtbl/config": "2.2.1-alpha.1",
11
+ "@imtbl/dex-sdk": "2.2.1-alpha.1",
12
+ "@imtbl/generated-clients": "2.2.1-alpha.1",
13
+ "@imtbl/metrics": "2.2.1-alpha.1",
14
+ "@imtbl/orderbook": "2.2.1-alpha.1",
15
+ "@imtbl/passport": "2.2.1-alpha.1",
16
16
  "@metamask/detect-provider": "^2.0.0",
17
17
  "axios": "^1.6.5",
18
18
  "ethers": "^6.13.4",