@imtbl/sdk 0.30.4 → 0.31.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/orderbook.js CHANGED
@@ -679,13 +679,13 @@ function mapFromOpenApiOrder(order) {
679
679
  return {
680
680
  type: 'ERC20',
681
681
  contractAddress: item.contract_address,
682
- amount: item.start_amount,
682
+ amount: item.amount,
683
683
  };
684
684
  }
685
685
  if (item.item_type === 'NATIVE') {
686
686
  return {
687
687
  type: 'NATIVE',
688
- amount: item.start_amount,
688
+ amount: item.amount,
689
689
  };
690
690
  }
691
691
  throw new Error('Buy items must be either ERC20 or NATIVE');
@@ -733,13 +733,13 @@ function mapFromOpenApiTrade(trade) {
733
733
  return {
734
734
  type: 'ERC20',
735
735
  contractAddress: item.contract_address,
736
- amount: item.start_amount,
736
+ amount: item.amount,
737
737
  };
738
738
  }
739
739
  if (item.item_type === 'NATIVE') {
740
740
  return {
741
741
  type: 'NATIVE',
742
- amount: item.start_amount,
742
+ amount: item.amount,
743
743
  };
744
744
  }
745
745
  throw new Error('Buy items must be either ERC20 or NATIVE');
@@ -879,8 +879,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
879
879
  switch (buyItem.item_type) {
880
880
  case 'NATIVE':
881
881
  return {
882
- startAmount: buyItem.start_amount,
883
- endAmount: buyItem.start_amount,
882
+ startAmount: buyItem.amount,
883
+ endAmount: buyItem.amount,
884
884
  itemType: ItemType.NATIVE,
885
885
  recipient: order.account_address,
886
886
  token: constants$1.AddressZero,
@@ -888,8 +888,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
888
888
  };
889
889
  case 'ERC20':
890
890
  return {
891
- startAmount: buyItem.start_amount,
892
- endAmount: buyItem.start_amount,
891
+ startAmount: buyItem.amount,
892
+ endAmount: buyItem.amount,
893
893
  itemType: ItemType.ERC20,
894
894
  recipient: order.account_address,
895
895
  token: buyItem.contract_address || constants$1.AddressZero,
@@ -1210,7 +1210,7 @@ class ImmutableApiClient {
1210
1210
  === ItemType.NATIVE
1211
1211
  ? 'NATIVE'
1212
1212
  : 'ERC20',
1213
- start_amount: orderComponents.consideration[0].startAmount,
1213
+ amount: orderComponents.consideration[0].startAmount,
1214
1214
  contract_address: orderComponents.consideration[0].token,
1215
1215
  },
1216
1216
  ],
@@ -1265,8 +1265,8 @@ function getOrderbookConfig(environment) {
1265
1265
  switch (environment) {
1266
1266
  case Environment.SANDBOX:
1267
1267
  return {
1268
- seaportContractAddress: '0x7Fb7Da6De152597830eD16361633e362A2F59410',
1269
- zoneContractAddress: '0x63441cBfBd15Dd8f5E92598E535661Ac5aCB808E',
1268
+ seaportContractAddress: '0x2CFA8f64e1B49A2DF28532D1D30Cda45117cF778',
1269
+ zoneContractAddress: '0x1Bb4Fb11Ba021Bd0104F0Ee8E5F5c728Bc83d7F1',
1270
1270
  apiEndpoint: 'https://api.sandbox.immutable.com',
1271
1271
  chainName: TESTNET_CHAIN_NAME,
1272
1272
  provider: new providers.JsonRpcProvider('https://rpc.testnet.immutable.com'),
package/dist/passport.js CHANGED
@@ -2191,7 +2191,7 @@ class MultiRollupApiClients {
2191
2191
  }
2192
2192
 
2193
2193
  // eslint-disable-next-line @typescript-eslint/naming-convention
2194
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.30.4' };
2194
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.31.0' };
2195
2195
  const createConfig = ({ basePath, headers, }) => {
2196
2196
  if (!basePath.trim()) {
2197
2197
  throw Error('basePath can not be empty');
@@ -2247,7 +2247,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2247
2247
  chainID,
2248
2248
  coreContractAddress,
2249
2249
  registrationContractAddress,
2250
- sdkVersion: 'ts-immutable-sdk-0.30.4',
2250
+ sdkVersion: 'ts-immutable-sdk-0.31.0',
2251
2251
  });
2252
2252
  /**
2253
2253
  * Sets `sdkVersion` at the time of build
@@ -6757,7 +6757,7 @@ const withPassportError = async (fn, customErrorType) => {
6757
6757
  var ChainId;
6758
6758
  (function (ChainId) {
6759
6759
  ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
6760
- ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13472] = "IMTBL_ZKEVM_TESTNET";
6760
+ ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
6761
6761
  ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13433] = "IMTBL_ZKEVM_DEVNET";
6762
6762
  ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
6763
6763
  ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.30.4",
4
+ "version": "0.31.0",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",