@imtbl/sdk 0.39.6 → 0.41.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/checkout.js CHANGED
@@ -21584,8 +21584,8 @@ function getOrderbookConfig(environment) {
21584
21584
  switch (environment) {
21585
21585
  case Environment$1.SANDBOX:
21586
21586
  return {
21587
- seaportContractAddress: '0x3A0C2Ba54D6CBd3121F01b96dFd20e99D1696C9D',
21588
- zoneContractAddress: '0x2EA937879beeF3393853A74Ad62F9ad7DA0B9E81',
21587
+ seaportContractAddress: '0x7d117aA8BD6D31c4fa91722f246388f38ab1942c',
21588
+ zoneContractAddress: '0x8831867E347AB87FA30199C5B695F0A31604Bb52',
21589
21589
  apiEndpoint: 'https://api.sandbox.immutable.com',
21590
21590
  chainName: TESTNET_CHAIN_NAME,
21591
21591
  provider: new providers.JsonRpcProvider('https://rpc.testnet.immutable.com'),
@@ -21593,8 +21593,8 @@ function getOrderbookConfig(environment) {
21593
21593
  // not yet deployed
21594
21594
  case Environment$1.PRODUCTION:
21595
21595
  return {
21596
- seaportContractAddress: '',
21597
- zoneContractAddress: '',
21596
+ seaportContractAddress: '0x6c12aD6F0bD274191075Eb2E78D7dA5ba6453424',
21597
+ zoneContractAddress: '0x00338b92Bec262078B3e49BF12bbEA058916BF91',
21598
21598
  apiEndpoint: 'https://api.immutable.com',
21599
21599
  chainName: MAINNET_CHAIN_NAME,
21600
21600
  provider: new providers.JsonRpcProvider('https://rpc.immutable.com'),
@@ -21739,13 +21739,15 @@ class Orderbook {
21739
21739
  * transaction exists it must be signed and submitted to the chain before the fulfilment
21740
21740
  * transaction can be submitted or it will be reverted.
21741
21741
  * @param {string} listingId - The listingId to fulfil.
21742
- * @param {string} fulfillerAddress - The address of the account fulfilling the order.
21742
+ * @param {string} takerAddress - The address of the account fulfilling the order.
21743
+ * @param {FeeValue[]} takerFees - Taker ecosystem fees to be paid.
21743
21744
  * @return {FulfillOrderResponse} Approval and fulfilment transactions.
21744
21745
  */
21745
21746
  async fulfillOrder(listingId, takerAddress, takerFees) {
21746
21747
  const fulfillmentDataRes = await this.apiClient.fulfillmentData([
21747
21748
  {
21748
21749
  order_id: listingId,
21750
+ taker_address: takerAddress,
21749
21751
  fees: takerFees.map((fee) => ({
21750
21752
  amount: fee.amount,
21751
21753
  type: FeeType$1.TAKER_ECOSYSTEM,
@@ -21769,6 +21771,7 @@ class Orderbook {
21769
21771
  async fulfillBulkOrders(listings, takerAddress) {
21770
21772
  const fulfillmentDataRes = await this.apiClient.fulfillmentData(listings.map((listingRequest) => ({
21771
21773
  order_id: listingRequest.listingId,
21774
+ taker_address: takerAddress,
21772
21775
  fees: listingRequest.takerFees.map((fee) => ({
21773
21776
  amount: fee.amount,
21774
21777
  type: FeeType$1.TAKER_ECOSYSTEM,
@@ -25848,7 +25851,7 @@ class APIError extends Error {
25848
25851
 
25849
25852
  /* eslint-disable implicit-arrow-linebreak */
25850
25853
  const defaultHeaders = {
25851
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.39.6',
25854
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.41.0-alpha',
25852
25855
  };
25853
25856
  /**
25854
25857
  * createAPIConfiguration to create a custom Configuration
@@ -27198,7 +27201,7 @@ const GAS_OVERRIDES = {
27198
27201
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
27199
27202
  };
27200
27203
 
27201
- const SDK_VERSION_MARKER = '0.39.6';
27204
+ const SDK_VERSION_MARKER = '0.41.0-alpha';
27202
27205
  // This SDK version is replaced by the `yarn build` command ran on the root level
27203
27206
  const globalPackageVersion = () => SDK_VERSION_MARKER;
27204
27207
 
@@ -28756,15 +28759,15 @@ const availabilityService = (isDevelopment, isProduction) => {
28756
28759
  response = await globalAxios.post(`${postEndpoint()}/v1/availability/checkout/swap`);
28757
28760
  }
28758
28761
  catch (error) {
28762
+ // The request was made and the server responded with a status code
28763
+ // that falls out of the range of 2xx
28759
28764
  response = error.response;
28765
+ // If 403 then the service is geo-blocked
28766
+ if (response.status === 403)
28767
+ return false;
28768
+ throw new CheckoutError(`Error fetching from api: ${response.status} ${response.statusText}`, CheckoutErrorType.API_ERROR);
28760
28769
  }
28761
- if (response.status === 403) {
28762
- return false;
28763
- }
28764
- if (response.status === 204) {
28765
- return true;
28766
- }
28767
- throw new CheckoutError(`Error fetching from api: ${response.status} ${response.statusText}`, CheckoutErrorType.API_ERROR);
28770
+ return true;
28768
28771
  };
28769
28772
  return {
28770
28773
  checkDexAvailability,
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
17
17
  chainID,
18
18
  coreContractAddress,
19
19
  registrationContractAddress,
20
- sdkVersion: 'ts-immutable-sdk-0.39.6',
20
+ sdkVersion: 'ts-immutable-sdk-0.41.0-alpha',
21
21
  });
22
22
  /**
23
23
  * Sets `sdkVersion` at the time of build