@imtbl/sdk 0.3.2-alpha → 0.4.0-alpha

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.cjs CHANGED
@@ -5551,7 +5551,7 @@ class MultiRollupApiClients {
5551
5551
  }
5552
5552
 
5553
5553
  // eslint-disable-next-line @typescript-eslint/naming-convention
5554
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.3.2-alpha' };
5554
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.4.0-alpha' };
5555
5555
  const createConfig = ({ basePath, headers, }) => {
5556
5556
  if (!basePath.trim()) {
5557
5557
  throw Error('basePath can not be empty');
@@ -5611,7 +5611,7 @@ class APIError extends Error {
5611
5611
 
5612
5612
  /* eslint-disable implicit-arrow-linebreak */
5613
5613
  const defaultHeaders = {
5614
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.3.2-alpha',
5614
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.4.0-alpha',
5615
5615
  };
5616
5616
  /**
5617
5617
  * createAPIConfiguration to create a custom Configuration
@@ -5877,7 +5877,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
5877
5877
  chainID,
5878
5878
  coreContractAddress,
5879
5879
  registrationContractAddress,
5880
- sdkVersion: 'ts-immutable-sdk-0.3.2-alpha',
5880
+ sdkVersion: 'ts-immutable-sdk-0.4.0-alpha',
5881
5881
  });
5882
5882
  /**
5883
5883
  * Sets `sdkVersion` at the time of build
@@ -27650,8 +27650,8 @@ const $762782b6c862d954$export$db5daa1b5156ccfe = [
27650
27650
  */ exports.ChainId = void 0;
27651
27651
  (function(ChainId) {
27652
27652
  ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
27653
- ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13392] = "IMTBL_ZKEVM_TESTNET";
27654
- ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13403] = "IMTBL_ZKEVM_DEVNET";
27653
+ ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13372] = "IMTBL_ZKEVM_TESTNET";
27654
+ ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13423] = "IMTBL_ZKEVM_DEVNET";
27655
27655
  ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
27656
27656
  ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
27657
27657
  })(exports.ChainId || (exports.ChainId = {}));
@@ -27736,6 +27736,10 @@ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
27736
27736
  [(exports.Environment).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
27737
27737
  [(exports.Environment).PRODUCTION]: "https://checkout-api.immutable.com"
27738
27738
  };
27739
+ const $d85ad1457a3f1a83$export$7b057be2a3f512cc = {
27740
+ [(exports.Environment).SANDBOX]: "https://zkevm-rpc.sandbox.x.immutable.com",
27741
+ [(exports.Environment).PRODUCTION]: "https://zkevm-rpc.x.immutable.com"
27742
+ };
27739
27743
  const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
27740
27744
  [
27741
27745
  (exports.ChainId).ETHEREUM,
@@ -27761,7 +27765,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
27761
27765
  chainIdHex: `0x${(exports.ChainId).IMTBL_ZKEVM_MAINNET.toString(16)}`,
27762
27766
  chainName: (exports.ChainName).IMTBL_ZKEVM_MAINNET,
27763
27767
  rpcUrls: [
27764
- "https://zkevm-rpc.x.immutable.com"
27768
+ "https://rpc.immutable.com"
27765
27769
  ],
27766
27770
  nativeCurrency: {
27767
27771
  name: "IMX",
@@ -27796,7 +27800,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
27796
27800
  chainIdHex: `0x${(exports.ChainId).IMTBL_ZKEVM_TESTNET.toString(16)}`,
27797
27801
  chainName: (exports.ChainName).IMTBL_ZKEVM_TESTNET,
27798
27802
  rpcUrls: [
27799
- "https://zkevm-rpc.sandbox.x.immutable.com"
27803
+ "https://rpc.testnet.immutable.com"
27800
27804
  ],
27801
27805
  nativeCurrency: {
27802
27806
  name: "IMX",
@@ -28404,10 +28408,23 @@ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
28404
28408
  this.message = message;
28405
28409
  }
28406
28410
  }
28407
- const $4013c5c91bb535f6$var$networkMap = (prod, dev)=>{
28408
- if (dev) return $d85ad1457a3f1a83$export$3a9ebede6a150274;
28409
- if (prod) return $d85ad1457a3f1a83$export$6f24f3cef7d501c4;
28410
- return $d85ad1457a3f1a83$export$3e81fc0987227f10;
28411
+ const $4013c5c91bb535f6$var$networkMap = (prod, dev, local)=>{
28412
+ let networks;
28413
+ if (dev) networks = ($d85ad1457a3f1a83$export$3a9ebede6a150274);
28414
+ else if (prod) {
28415
+ networks = ($d85ad1457a3f1a83$export$6f24f3cef7d501c4);
28416
+ if (local) {
28417
+ const rpcUrls = networks.get((exports.ChainId).IMTBL_ZKEVM_MAINNET)?.rpcUrls;
28418
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(exports.Environment).PRODUCTION]);
28419
+ }
28420
+ } else {
28421
+ networks = ($d85ad1457a3f1a83$export$3e81fc0987227f10);
28422
+ if (local) {
28423
+ const rpcUrls = networks.get((exports.ChainId).IMTBL_ZKEVM_TESTNET)?.rpcUrls;
28424
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(exports.Environment).SANDBOX]);
28425
+ }
28426
+ }
28427
+ return networks;
28411
28428
  };
28412
28429
  const $4013c5c91bb535f6$export$9b794d067cdd1af6 = (config)=>{
28413
28430
  // DevMode and Sandbox will both use Sepolia.
@@ -28425,6 +28442,11 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
28425
28442
  // This will be used to get around the lack of
28426
28443
  // Environment.DEVELOPMENT
28427
28444
  isDevelopment = false;
28445
+ // This is a hidden feature that is only available
28446
+ // when building the project from source code.
28447
+ // This will be used to get around the lack of
28448
+ // Environment.LOCAL_DEVELOPMENT
28449
+ isLocal = false;
28428
28450
  isProduction;
28429
28451
  remote;
28430
28452
  environment;
@@ -28434,7 +28456,7 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
28434
28456
  this.environment = config.baseConfig.environment;
28435
28457
  // Developer mode will super set any environment configuration
28436
28458
  this.isProduction = !this.isDevelopment && this.environment === (exports.Environment).PRODUCTION;
28437
- this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
28459
+ this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment, this.isLocal);
28438
28460
  this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
28439
28461
  isDevelopment: this.isDevelopment,
28440
28462
  isProduction: this.isProduction
@@ -28697,7 +28719,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28697
28719
  function $parcel$export(e, n, v, s) {
28698
28720
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
28699
28721
  }
28700
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.3.2-alpha";
28722
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.4.0-alpha";
28701
28723
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
28702
28724
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
28703
28725
 
package/dist/index.d.ts CHANGED
@@ -12976,8 +12976,8 @@ type FungibleToken = Address | 'NATIVE';
12976
12976
  */
12977
12977
  declare enum ChainId {
12978
12978
  IMTBL_ZKEVM_MAINNET = 13371,
12979
- IMTBL_ZKEVM_TESTNET = 13392,
12980
- IMTBL_ZKEVM_DEVNET = 13403,
12979
+ IMTBL_ZKEVM_TESTNET = 13372,
12980
+ IMTBL_ZKEVM_DEVNET = 13423,
12981
12981
  ETHEREUM = 1,
12982
12982
  SEPOLIA = 11155111
12983
12983
  }
@@ -13459,6 +13459,7 @@ declare class RemoteConfigFetcher {
13459
13459
  }
13460
13460
  declare class CheckoutConfiguration {
13461
13461
  readonly isDevelopment: boolean;
13462
+ readonly isLocal: boolean;
13462
13463
  readonly isProduction: boolean;
13463
13464
  readonly remote: RemoteConfigFetcher;
13464
13465
  readonly environment: Environment;
package/dist/index.js CHANGED
@@ -5531,7 +5531,7 @@ class MultiRollupApiClients {
5531
5531
  }
5532
5532
 
5533
5533
  // eslint-disable-next-line @typescript-eslint/naming-convention
5534
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.3.2-alpha' };
5534
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.4.0-alpha' };
5535
5535
  const createConfig = ({ basePath, headers, }) => {
5536
5536
  if (!basePath.trim()) {
5537
5537
  throw Error('basePath can not be empty');
@@ -5591,7 +5591,7 @@ class APIError extends Error {
5591
5591
 
5592
5592
  /* eslint-disable implicit-arrow-linebreak */
5593
5593
  const defaultHeaders = {
5594
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.3.2-alpha',
5594
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.4.0-alpha',
5595
5595
  };
5596
5596
  /**
5597
5597
  * createAPIConfiguration to create a custom Configuration
@@ -5857,7 +5857,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
5857
5857
  chainID,
5858
5858
  coreContractAddress,
5859
5859
  registrationContractAddress,
5860
- sdkVersion: 'ts-immutable-sdk-0.3.2-alpha',
5860
+ sdkVersion: 'ts-immutable-sdk-0.4.0-alpha',
5861
5861
  });
5862
5862
  /**
5863
5863
  * Sets `sdkVersion` at the time of build
@@ -27630,8 +27630,8 @@ const $762782b6c862d954$export$db5daa1b5156ccfe = [
27630
27630
  */ var $0472f23319457bfb$export$c06e1e7429de6283;
27631
27631
  (function(ChainId) {
27632
27632
  ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
27633
- ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13392] = "IMTBL_ZKEVM_TESTNET";
27634
- ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13403] = "IMTBL_ZKEVM_DEVNET";
27633
+ ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13372] = "IMTBL_ZKEVM_TESTNET";
27634
+ ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13423] = "IMTBL_ZKEVM_DEVNET";
27635
27635
  ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
27636
27636
  ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
27637
27637
  })($0472f23319457bfb$export$c06e1e7429de6283 || ($0472f23319457bfb$export$c06e1e7429de6283 = {}));
@@ -27716,6 +27716,10 @@ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
27716
27716
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
27717
27717
  [(Environment$1).PRODUCTION]: "https://checkout-api.immutable.com"
27718
27718
  };
27719
+ const $d85ad1457a3f1a83$export$7b057be2a3f512cc = {
27720
+ [(Environment$1).SANDBOX]: "https://zkevm-rpc.sandbox.x.immutable.com",
27721
+ [(Environment$1).PRODUCTION]: "https://zkevm-rpc.x.immutable.com"
27722
+ };
27719
27723
  const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
27720
27724
  [
27721
27725
  ($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM,
@@ -27741,7 +27745,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
27741
27745
  chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET.toString(16)}`,
27742
27746
  chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_MAINNET,
27743
27747
  rpcUrls: [
27744
- "https://zkevm-rpc.x.immutable.com"
27748
+ "https://rpc.immutable.com"
27745
27749
  ],
27746
27750
  nativeCurrency: {
27747
27751
  name: "IMX",
@@ -27776,7 +27780,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
27776
27780
  chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET.toString(16)}`,
27777
27781
  chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_TESTNET,
27778
27782
  rpcUrls: [
27779
- "https://zkevm-rpc.sandbox.x.immutable.com"
27783
+ "https://rpc.testnet.immutable.com"
27780
27784
  ],
27781
27785
  nativeCurrency: {
27782
27786
  name: "IMX",
@@ -28384,10 +28388,23 @@ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
28384
28388
  this.message = message;
28385
28389
  }
28386
28390
  }
28387
- const $4013c5c91bb535f6$var$networkMap = (prod, dev)=>{
28388
- if (dev) return $d85ad1457a3f1a83$export$3a9ebede6a150274;
28389
- if (prod) return $d85ad1457a3f1a83$export$6f24f3cef7d501c4;
28390
- return $d85ad1457a3f1a83$export$3e81fc0987227f10;
28391
+ const $4013c5c91bb535f6$var$networkMap = (prod, dev, local)=>{
28392
+ let networks;
28393
+ if (dev) networks = ($d85ad1457a3f1a83$export$3a9ebede6a150274);
28394
+ else if (prod) {
28395
+ networks = ($d85ad1457a3f1a83$export$6f24f3cef7d501c4);
28396
+ if (local) {
28397
+ const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET)?.rpcUrls;
28398
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).PRODUCTION]);
28399
+ }
28400
+ } else {
28401
+ networks = ($d85ad1457a3f1a83$export$3e81fc0987227f10);
28402
+ if (local) {
28403
+ const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET)?.rpcUrls;
28404
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).SANDBOX]);
28405
+ }
28406
+ }
28407
+ return networks;
28391
28408
  };
28392
28409
  const $4013c5c91bb535f6$export$9b794d067cdd1af6 = (config)=>{
28393
28410
  // DevMode and Sandbox will both use Sepolia.
@@ -28405,6 +28422,11 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
28405
28422
  // This will be used to get around the lack of
28406
28423
  // Environment.DEVELOPMENT
28407
28424
  isDevelopment = false;
28425
+ // This is a hidden feature that is only available
28426
+ // when building the project from source code.
28427
+ // This will be used to get around the lack of
28428
+ // Environment.LOCAL_DEVELOPMENT
28429
+ isLocal = false;
28408
28430
  isProduction;
28409
28431
  remote;
28410
28432
  environment;
@@ -28414,7 +28436,7 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
28414
28436
  this.environment = config.baseConfig.environment;
28415
28437
  // Developer mode will super set any environment configuration
28416
28438
  this.isProduction = !this.isDevelopment && this.environment === (Environment$1).PRODUCTION;
28417
- this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
28439
+ this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment, this.isLocal);
28418
28440
  this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
28419
28441
  isDevelopment: this.isDevelopment,
28420
28442
  isProduction: this.isProduction
@@ -28677,7 +28699,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28677
28699
  function $parcel$export(e, n, v, s) {
28678
28700
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
28679
28701
  }
28680
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.3.2-alpha";
28702
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.4.0-alpha";
28681
28703
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
28682
28704
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
28683
28705
 
package/dist/passport.js CHANGED
@@ -4607,7 +4607,7 @@ class MultiRollupApiClients {
4607
4607
  }
4608
4608
 
4609
4609
  // eslint-disable-next-line @typescript-eslint/naming-convention
4610
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.3.2-alpha' };
4610
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.4.0-alpha' };
4611
4611
  const createConfig = ({ basePath, headers, }) => {
4612
4612
  if (!basePath.trim()) {
4613
4613
  throw Error('basePath can not be empty');
@@ -4663,7 +4663,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4663
4663
  chainID,
4664
4664
  coreContractAddress,
4665
4665
  registrationContractAddress,
4666
- sdkVersion: 'ts-immutable-sdk-0.3.2-alpha',
4666
+ sdkVersion: 'ts-immutable-sdk-0.4.0-alpha',
4667
4667
  });
4668
4668
  /**
4669
4669
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.3.2-alpha",
4
+ "version": "0.4.0-alpha",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",