@imtbl/sdk 0.4.0-alpha.2 → 0.4.1-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.
@@ -565,6 +565,16 @@ interface ModuleConfiguration<T> {
565
565
  overrides?: T;
566
566
  }
567
567
 
568
+ /**
569
+ * Interface representing the secondary fees for a swap
570
+ * @property {string} feeRecipient - The fee recipient address
571
+ * @property {number} feeBasisPoints - The fee percentage in basis points
572
+ * @example 100 basis points = 1%
573
+ */
574
+ type SecondaryFee = {
575
+ feeRecipient: string;
576
+ feeBasisPoints: number;
577
+ };
568
578
  /**
569
579
  * Interface representing a token
570
580
  * @property {number} chainId - The chain ID
@@ -585,6 +595,7 @@ interface ExchangeOverrides {
585
595
  exchangeContracts: ExchangeContracts;
586
596
  commonRoutingTokens: TokenInfo$1[];
587
597
  nativeToken: TokenInfo$1;
598
+ secondaryFees?: SecondaryFee[];
588
599
  }
589
600
 
590
601
  /**
@@ -607,8 +618,8 @@ type FungibleToken = Address | 'NATIVE';
607
618
  */
608
619
  declare enum ChainId {
609
620
  IMTBL_ZKEVM_MAINNET = 13371,
610
- IMTBL_ZKEVM_TESTNET = 13392,
611
- IMTBL_ZKEVM_DEVNET = 13403,
621
+ IMTBL_ZKEVM_TESTNET = 13372,
622
+ IMTBL_ZKEVM_DEVNET = 13423,
612
623
  ETHEREUM = 1,
613
624
  SEPOLIA = 11155111
614
625
  }
@@ -978,9 +989,11 @@ interface CreateProviderParams {
978
989
  /**
979
990
  * Represents the result of creating a Web3 provider {@link Checkout.createProvider}.
980
991
  * @property {Web3Provider} provider - The created Web3 provider.
992
+ * @property {WalletProviderName} providerName - The name of the wallet provider.
981
993
  */
982
994
  type CreateProviderResult = {
983
995
  provider: Web3Provider;
996
+ walletProviderName: WalletProviderName;
984
997
  };
985
998
  /**
986
999
  * Interface representing a wallet filter to be used in {@link GetWalletAllowListParams}.
@@ -1088,6 +1101,7 @@ declare class RemoteConfigFetcher {
1088
1101
  }
1089
1102
  declare class CheckoutConfiguration {
1090
1103
  readonly isDevelopment: boolean;
1104
+ readonly isLocal: boolean;
1091
1105
  readonly isProduction: boolean;
1092
1106
  readonly remote: RemoteConfigFetcher;
1093
1107
  readonly environment: Environment;
@@ -10216,7 +10216,7 @@ const ETH_MAINNET_CHAIN_ID = 'eip155:1';
10216
10216
  /**
10217
10217
  * @constant {string} ZKEVM_DEVNET_CHAIN_ID - The chain ID for the zkEVM devnet (EIP-155 compatible format).
10218
10218
  */
10219
- const ZKEVM_DEVNET_CHAIN_ID = 'eip155:13403';
10219
+ const ZKEVM_DEVNET_CHAIN_ID = 'eip155:13423';
10220
10220
  /**
10221
10221
  /**
10222
10222
  * @constant {string} ZKEVM_TESTNET_CHAIN_ID - The chain ID for the zkEVM testnet (EIP-155 compatible format).
@@ -10274,14 +10274,14 @@ const SUPPORTED_BRIDGES_FOR_ENVIRONMENT = {
10274
10274
  */
10275
10275
  const CONTRACTS_FOR_BRIDGE = new Map()
10276
10276
  .set(ETH_SEPOLIA_TO_ZKEVM_DEVNET, {
10277
- rootChainERC20Predicate: '0x15Dd735de418B6d290727aed82cC25F8966dE4A5',
10278
- rootChainStateSender: '0xb3Bac13799dAca9D9eC9307303a65fA1218b4724',
10277
+ rootChainERC20Predicate: '0xf0b3435411A74F1aeCBD0fd6D53a90D5227fEeba',
10278
+ rootChainStateSender: '0x868097dbAcfD431F441d09D0e4D3B5eD3182E597',
10279
10279
  childChainERC20Predicate: '0x0000000000000000000000000000000000001004',
10280
10280
  childChainStateReceiver: '0x0000000000000000000000000000000000001001',
10281
10281
  })
10282
10282
  .set(ETH_SEPOLIA_TO_ZKEVM_TESTNET, {
10283
- rootChainERC20Predicate: '0x9A7E4C4337a70C6754a9672F5ba69084463794B8',
10284
- rootChainStateSender: '0xfBfF6FD165adFA113bE39eE85ef030A996153253',
10283
+ rootChainERC20Predicate: '0x0C15a8359865867CdCC44f98b2F3fd5DF098C7E0',
10284
+ rootChainStateSender: '0x4C80001188db53dbc2eaAb32d5ef825feEedECA5',
10285
10285
  childChainERC20Predicate: '0x0000000000000000000000000000000000001004',
10286
10286
  childChainStateReceiver: '0x0000000000000000000000000000000000001001',
10287
10287
  })
@@ -10873,7 +10873,7 @@ function getQuote(otherCurrency, tradeType, tradeInfo, slippage) {
10873
10873
  }
10874
10874
 
10875
10875
  const IMMUTABLE_TESTNET_RPC_URL = 'https://zkevm-rpc.sandbox.x.immutable.com';
10876
- const IMMUTABLE_TESTNET_CHAIN_ID = 13392;
10876
+ const IMMUTABLE_TESTNET_CHAIN_ID = 13372;
10877
10877
 
10878
10878
  const TIMX_IMMUTABLE_TESTNET = {
10879
10879
  chainId: IMMUTABLE_TESTNET_CHAIN_ID,
@@ -12512,16 +12512,28 @@ const SUPPORTED_CHAIN_IDS_FOR_ENVIRONMENT = {
12512
12512
  [Environment$1.PRODUCTION]: SUPPORTED_PRODUCTION_CHAINS,
12513
12513
  };
12514
12514
  function validateOverrides(overrides) {
12515
- Object.entries(overrides).forEach(([key, value]) => {
12516
- if (!value) {
12515
+ const keysToCheck = ['rpcURL', 'exchangeContracts', 'commonRoutingTokens', 'nativeToken'];
12516
+ for (const key of keysToCheck) {
12517
+ if (!overrides[key]) {
12517
12518
  throw new InvalidConfigurationError(`Missing override: ${key}`);
12518
12519
  }
12519
- });
12520
+ }
12520
12521
  Object.entries(overrides.exchangeContracts).forEach(([key, contract]) => {
12521
12522
  if (!isValidNonZeroAddress(contract)) {
12522
12523
  throw new InvalidConfigurationError(`Invalid exchange contract address for ${key}`);
12523
12524
  }
12524
12525
  });
12526
+ if (!overrides.secondaryFees) {
12527
+ return;
12528
+ }
12529
+ for (const secondaryFee of overrides.secondaryFees) {
12530
+ if (!isValidNonZeroAddress(secondaryFee.feeRecipient)) {
12531
+ throw new InvalidConfigurationError(`Invalid secondary fee recipient address: ${secondaryFee.feeRecipient}`);
12532
+ }
12533
+ if (secondaryFee.feeBasisPoints < 0 || secondaryFee.feeBasisPoints > 10000) {
12534
+ throw new InvalidConfigurationError(`Invalid secondary fee percentage: ${secondaryFee.feeBasisPoints}`);
12535
+ }
12536
+ }
12525
12537
  }
12526
12538
  /**
12527
12539
  * {@link ExchangeConfiguration} is used to configure the {@link Exchange} class.
@@ -12531,6 +12543,7 @@ function validateOverrides(overrides) {
12531
12543
  class ExchangeConfiguration {
12532
12544
  baseConfig;
12533
12545
  chain;
12546
+ secondaryFees;
12534
12547
  constructor({ chainId, baseConfig, overrides }) {
12535
12548
  this.baseConfig = baseConfig;
12536
12549
  if (overrides) {
@@ -12542,8 +12555,10 @@ class ExchangeConfiguration {
12542
12555
  commonRoutingTokens: overrides.commonRoutingTokens,
12543
12556
  nativeToken: overrides.nativeToken,
12544
12557
  };
12558
+ this.secondaryFees = overrides.secondaryFees ? overrides.secondaryFees : [];
12545
12559
  return;
12546
12560
  }
12561
+ this.secondaryFees = [];
12547
12562
  const chain = SUPPORTED_CHAIN_IDS_FOR_ENVIRONMENT[baseConfig.environment][chainId];
12548
12563
  if (!chain) {
12549
12564
  throw new ChainNotSupportedError(chainId, baseConfig.environment);
@@ -12557,11 +12572,13 @@ class Exchange {
12557
12572
  router;
12558
12573
  chainId;
12559
12574
  nativeToken;
12575
+ secondaryFees;
12560
12576
  constructor(configuration) {
12561
12577
  const config = new ExchangeConfiguration(configuration);
12562
12578
  this.chainId = config.chain.chainId;
12563
12579
  this.nativeToken = config.chain.nativeToken;
12564
12580
  this.provider = new ethers.providers.JsonRpcProvider(config.chain.rpcUrl);
12581
+ this.secondaryFees = config.secondaryFees;
12565
12582
  this.router = new Router(this.provider, config.chain.commonRoutingTokens, {
12566
12583
  multicallAddress: config.chain.contracts.multicall,
12567
12584
  factoryAddress: config.chain.contracts.coreFactory,
@@ -12644,6 +12661,9 @@ class Exchange {
12644
12661
  async getUnsignedSwapTxFromAmountOut(fromAddress, tokenInAddress, tokenOutAddress, amountOut, slippagePercent = DEFAULT_SLIPPAGE, maxHops = DEFAULT_MAX_HOPS, deadline = DEFAULT_DEADLINE) {
12645
12662
  return await this.getUnsignedSwapTx(fromAddress, tokenInAddress, tokenOutAddress, amountOut, slippagePercent, maxHops, deadline, TradeType.EXACT_OUTPUT);
12646
12663
  }
12664
+ thereAreSecondaryFees() {
12665
+ return this.secondaryFees.length > 0;
12666
+ }
12647
12667
  }
12648
12668
 
12649
12669
  /* eslint-disable class-methods-use-this */
@@ -12720,8 +12740,8 @@ const $762782b6c862d954$export$db5daa1b5156ccfe = [
12720
12740
  */ var $0472f23319457bfb$export$c06e1e7429de6283;
12721
12741
  (function(ChainId) {
12722
12742
  ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
12723
- ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13392] = "IMTBL_ZKEVM_TESTNET";
12724
- ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13403] = "IMTBL_ZKEVM_DEVNET";
12743
+ ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13372] = "IMTBL_ZKEVM_TESTNET";
12744
+ ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13423] = "IMTBL_ZKEVM_DEVNET";
12725
12745
  ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
12726
12746
  ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
12727
12747
  })($0472f23319457bfb$export$c06e1e7429de6283 || ($0472f23319457bfb$export$c06e1e7429de6283 = {}));
@@ -12806,6 +12826,10 @@ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
12806
12826
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
12807
12827
  [(Environment$1).PRODUCTION]: "https://checkout-api.immutable.com"
12808
12828
  };
12829
+ const $d85ad1457a3f1a83$export$7b057be2a3f512cc = {
12830
+ [(Environment$1).SANDBOX]: "https://zkevm-rpc.sandbox.x.immutable.com",
12831
+ [(Environment$1).PRODUCTION]: "https://zkevm-rpc.x.immutable.com"
12832
+ };
12809
12833
  const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
12810
12834
  [
12811
12835
  ($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM,
@@ -12831,7 +12855,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
12831
12855
  chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET.toString(16)}`,
12832
12856
  chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_MAINNET,
12833
12857
  rpcUrls: [
12834
- "https://zkevm-rpc.x.immutable.com"
12858
+ "https://rpc.immutable.com"
12835
12859
  ],
12836
12860
  nativeCurrency: {
12837
12861
  name: "IMX",
@@ -12866,7 +12890,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
12866
12890
  chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET.toString(16)}`,
12867
12891
  chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_TESTNET,
12868
12892
  rpcUrls: [
12869
- "https://zkevm-rpc.sandbox.x.immutable.com"
12893
+ "https://rpc.testnet.immutable.com"
12870
12894
  ],
12871
12895
  nativeCurrency: {
12872
12896
  name: "IMX",
@@ -13242,16 +13266,19 @@ async function $5c763be0b0b81038$var$getMetaMaskProvider() {
13242
13266
  if (!provider || !provider.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No MetaMask provider installed.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).METAMASK_PROVIDER_ERROR);
13243
13267
  return new (Web3Provider)(provider);
13244
13268
  }
13245
- async function $5c763be0b0b81038$export$500fbc0cd14cdbaa(defaultProvider) {
13246
- let web3Provider = null;
13247
- switch(defaultProvider){
13269
+ async function $5c763be0b0b81038$export$500fbc0cd14cdbaa(walletProviderName) {
13270
+ let provider = null;
13271
+ switch(walletProviderName){
13248
13272
  case ($e768639828688ca3$export$2d7a51a18d87e21d).METAMASK:
13249
- web3Provider = await $5c763be0b0b81038$var$getMetaMaskProvider();
13273
+ provider = await $5c763be0b0b81038$var$getMetaMaskProvider();
13250
13274
  break;
13251
13275
  default:
13252
13276
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Provider not supported", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).DEFAULT_PROVIDER_ERROR);
13253
13277
  }
13254
- return web3Provider;
13278
+ return {
13279
+ provider: provider,
13280
+ walletProviderName: walletProviderName
13281
+ };
13255
13282
  }
13256
13283
 
13257
13284
 
@@ -13260,9 +13287,8 @@ async function $5c763be0b0b81038$export$500fbc0cd14cdbaa(defaultProvider) {
13260
13287
 
13261
13288
 
13262
13289
 
13263
-
13264
13290
  function $bb88265fe45a0393$export$ebe4804963e71f98(web3Provider) {
13265
- if (web3Provider && web3Provider instanceof (Web3Provider) && web3Provider.provider?.request) return true;
13291
+ if (web3Provider && web3Provider.provider?.request && typeof web3Provider.provider.request === "function") return true;
13266
13292
  return false;
13267
13293
  }
13268
13294
  async function $bb88265fe45a0393$export$9e1fd9cc88c637a0(config, web3Provider, validateProviderOptions) {
@@ -13472,10 +13498,23 @@ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
13472
13498
  this.message = message;
13473
13499
  }
13474
13500
  }
13475
- const $4013c5c91bb535f6$var$networkMap = (prod, dev)=>{
13476
- if (dev) return $d85ad1457a3f1a83$export$3a9ebede6a150274;
13477
- if (prod) return $d85ad1457a3f1a83$export$6f24f3cef7d501c4;
13478
- return $d85ad1457a3f1a83$export$3e81fc0987227f10;
13501
+ const $4013c5c91bb535f6$var$networkMap = (prod, dev, local)=>{
13502
+ let networks;
13503
+ if (dev) networks = ($d85ad1457a3f1a83$export$3a9ebede6a150274);
13504
+ else if (prod) {
13505
+ networks = ($d85ad1457a3f1a83$export$6f24f3cef7d501c4);
13506
+ if (local) {
13507
+ const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET)?.rpcUrls;
13508
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).PRODUCTION]);
13509
+ }
13510
+ } else {
13511
+ networks = ($d85ad1457a3f1a83$export$3e81fc0987227f10);
13512
+ if (local) {
13513
+ const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET)?.rpcUrls;
13514
+ rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).SANDBOX]);
13515
+ }
13516
+ }
13517
+ return networks;
13479
13518
  };
13480
13519
  const $4013c5c91bb535f6$export$9b794d067cdd1af6 = (config)=>{
13481
13520
  // DevMode and Sandbox will both use Sepolia.
@@ -13493,6 +13532,11 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
13493
13532
  // This will be used to get around the lack of
13494
13533
  // Environment.DEVELOPMENT
13495
13534
  isDevelopment = false;
13535
+ // This is a hidden feature that is only available
13536
+ // when building the project from source code.
13537
+ // This will be used to get around the lack of
13538
+ // Environment.LOCAL_DEVELOPMENT
13539
+ isLocal = false;
13496
13540
  isProduction;
13497
13541
  remote;
13498
13542
  environment;
@@ -13502,7 +13546,7 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
13502
13546
  this.environment = config.baseConfig.environment;
13503
13547
  // Developer mode will super set any environment configuration
13504
13548
  this.isProduction = !this.isDevelopment && this.environment === (Environment$1).PRODUCTION;
13505
- this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
13549
+ this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment, this.isLocal);
13506
13550
  this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
13507
13551
  isDevelopment: this.isDevelopment,
13508
13552
  isProduction: this.isProduction
@@ -13648,10 +13692,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
13648
13692
  * @param {CreateProviderParams} params - The parameters for creating the provider.
13649
13693
  * @returns {Promise<CreateProviderResult>} A promise that resolves to the created provider.
13650
13694
  */ async createProvider(params) {
13651
- const web3Provider = await $5c763be0b0b81038$export$500fbc0cd14cdbaa(params.walletProvider);
13652
- return {
13653
- provider: web3Provider
13654
- };
13695
+ return await $5c763be0b0b81038$export$500fbc0cd14cdbaa(params.walletProvider);
13655
13696
  }
13656
13697
  /**
13657
13698
  * Checks if a wallet is connected to the specified provider.
@@ -14135,6 +14135,9 @@ declare namespace React {
14135
14135
  // - "string"
14136
14136
  // - union of string literals
14137
14137
  interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
14138
+ // React-specific Attributes
14139
+ suppressHydrationWarning?: boolean | undefined;
14140
+
14138
14141
  // Attributes which also defined in HTMLAttributes
14139
14142
  // See comment in SVGDOMPropertyConfig.js
14140
14143
  className?: string | undefined;
@@ -15024,7 +15027,6 @@ type SemanticVersion = {
15024
15027
  * @property {WidgetTheme | undefined} theme - The theme of the Checkout Widget (default: "DARK")
15025
15028
  * @property {Environment | undefined} environment - The environment configuration (default: "SANDBOX")
15026
15029
  * @property {SemanticVersion | undefined} version - The version of the checkout widgets js file to use (default: "0.1.0")
15027
- * @property {boolean | undefined} isOnRampEnabled - Enable on-ramp top-up method (default: "true")
15028
15030
  * @property {boolean | undefined} isSwapEnabled - Enable swap top-up method (default: "true")
15029
15031
  * @property {boolean | undefined} isBridgeEnabled - Enable bridge top-up method (default: "true")
15030
15032
  */
@@ -15032,7 +15034,6 @@ type CheckoutWidgetsConfig = {
15032
15034
  theme?: WidgetTheme;
15033
15035
  environment?: Environment;
15034
15036
  version?: SemanticVersion;
15035
- isOnRampEnabled?: boolean;
15036
15037
  isSwapEnabled?: boolean;
15037
15038
  isBridgeEnabled?: boolean;
15038
15039
  };
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
4
4
  function $parcel$export(e, n, v, s) {
5
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
6
  }
7
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.4.0-alpha.2";
7
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.4.1-alpha";
8
8
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
9
9
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
10
10
 
@@ -825,7 +825,7 @@ interface TokenData {
825
825
  */
826
826
  'quantity': string;
827
827
  /**
828
- * Quantity of this asset with the sum of all fees applied to the asset
828
+ * [DEPRECATED for v3 endpoints] Quantity of this asset with the sum of all fees applied to the asset. Replaced by quantity_with_fees in maker_fees / taker_fees depending on the type of order. Refer https://docs.x.immutable.com/docs/maker-taker-fees/#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell.
829
829
  * @type {string}
830
830
  * @memberof TokenData
831
831
  */
@@ -3688,7 +3688,7 @@ interface GetSignableOrderRequestV3 {
3688
3688
  */
3689
3689
  'amount_sell': string;
3690
3690
  /**
3691
- * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
3691
+ * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
3692
3692
  * @type {number}
3693
3693
  * @memberof GetSignableOrderRequestV3
3694
3694
  */
@@ -3787,7 +3787,7 @@ interface GetSignableOrderResponse {
3787
3787
  */
3788
3788
  'asset_id_sell': string;
3789
3789
  /**
3790
- * Expiration timestamp for this order
3790
+ * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
3791
3791
  * @type {number}
3792
3792
  * @memberof GetSignableOrderResponse
3793
3793
  */
@@ -3948,7 +3948,7 @@ interface GetSignableRegistrationResponse {
3948
3948
  */
3949
3949
  interface GetSignableTradeRequest {
3950
3950
  /**
3951
- * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
3951
+ * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
3952
3952
  * @type {number}
3953
3953
  * @memberof GetSignableTradeRequest
3954
3954
  */
@@ -4035,7 +4035,7 @@ interface GetSignableTradeResponse {
4035
4035
  */
4036
4036
  'asset_id_sell': string;
4037
4037
  /**
4038
- * Expiration timestamp for this order
4038
+ * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
4039
4039
  * @type {number}
4040
4040
  * @memberof GetSignableTradeResponse
4041
4041
  */
@@ -5122,7 +5122,7 @@ interface OrderV3 {
5122
5122
  */
5123
5123
  'expiration_timestamp': string | null;
5124
5124
  /**
5125
- * Fee information for the order
5125
+ * [DEPRECATED] Fee information for the order. Replaced by maker_fees / taker_fees depending on the type of order. Refer https://docs.x.immutable.com/docs/maker-taker-fees/#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell.
5126
5126
  * @type {Array<OrderFeeInfo>}
5127
5127
  * @memberof OrderV3
5128
5128
  */
@@ -8676,10 +8676,11 @@ interface OrdersApiListOrdersV3Request {
8676
8676
  */
8677
8677
  declare class OrdersApi extends BaseAPI {
8678
8678
  /**
8679
- * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params.
8679
+ * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
8680
8680
  * @summary Cancel an order
8681
8681
  * @param {OrdersApiCancelOrderRequest} requestParameters Request parameters.
8682
8682
  * @param {*} [options] Override http request option.
8683
+ * @deprecated
8683
8684
  * @throws {RequiredError}
8684
8685
  * @memberof OrdersApi
8685
8686
  */
@@ -8694,10 +8695,11 @@ declare class OrdersApi extends BaseAPI {
8694
8695
  */
8695
8696
  cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse, any>>;
8696
8697
  /**
8697
- * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params.
8698
+ * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
8698
8699
  * @summary Create an order
8699
8700
  * @param {OrdersApiCreateOrderRequest} requestParameters Request parameters.
8700
8701
  * @param {*} [options] Override http request option.
8702
+ * @deprecated
8701
8703
  * @throws {RequiredError}
8702
8704
  * @memberof OrdersApi
8703
8705
  */
@@ -8712,10 +8714,11 @@ declare class OrdersApi extends BaseAPI {
8712
8714
  */
8713
8715
  createOrderV3(requestParameters: OrdersApiCreateOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateOrderResponse, any>>;
8714
8716
  /**
8715
- * Get an order
8717
+ * Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
8716
8718
  * @summary Get an order
8717
8719
  * @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
8718
8720
  * @param {*} [options] Override http request option.
8721
+ * @deprecated
8719
8722
  * @throws {RequiredError}
8720
8723
  * @memberof OrdersApi
8721
8724
  */
@@ -8730,17 +8733,18 @@ declare class OrdersApi extends BaseAPI {
8730
8733
  */
8731
8734
  getOrderV3(requestParameters: OrdersApiGetOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<OrderV3, any>>;
8732
8735
  /**
8733
- * Get a signable cancel order message
8734
- * @summary Get a signable cancel order message
8736
+ * Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
8737
+ * @summary Sign cancel order message
8735
8738
  * @param {OrdersApiGetSignableCancelOrderRequest} requestParameters Request parameters.
8736
8739
  * @param {*} [options] Override http request option.
8740
+ * @deprecated
8737
8741
  * @throws {RequiredError}
8738
8742
  * @memberof OrdersApi
8739
8743
  */
8740
8744
  getSignableCancelOrder(requestParameters: OrdersApiGetSignableCancelOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableCancelOrderResponse, any>>;
8741
8745
  /**
8742
- * Get a signable cancel order message (V3)
8743
- * @summary Get a signable cancel order message (V3)
8746
+ * Generate a signable cancel order message (V3)
8747
+ * @summary Generate a signable cancel order message (V3)
8744
8748
  * @param {OrdersApiGetSignableCancelOrderV3Request} requestParameters Request parameters.
8745
8749
  * @param {*} [options] Override http request option.
8746
8750
  * @throws {RequiredError}
@@ -8748,8 +8752,8 @@ declare class OrdersApi extends BaseAPI {
8748
8752
  */
8749
8753
  getSignableCancelOrderV3(requestParameters: OrdersApiGetSignableCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableCancelOrderResponse, any>>;
8750
8754
  /**
8751
- * Get a signable order request (V3)
8752
- * @summary Get a signable order request (V3)
8755
+ * Generate a signable order request (V3)
8756
+ * @summary Generate a signable order request (V3)
8753
8757
  * @param {OrdersApiGetSignableOrderRequest} requestParameters Request parameters.
8754
8758
  * @param {*} [options] Override http request option.
8755
8759
  * @throws {RequiredError}
@@ -8757,10 +8761,11 @@ declare class OrdersApi extends BaseAPI {
8757
8761
  */
8758
8762
  getSignableOrder(requestParameters: OrdersApiGetSignableOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableOrderResponse, any>>;
8759
8763
  /**
8760
- * Get a list of orders
8761
- * @summary Get a list of orders
8764
+ * Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
8765
+ * @summary Get a list of orders.
8762
8766
  * @param {OrdersApiListOrdersRequest} requestParameters Request parameters.
8763
8767
  * @param {*} [options] Override http request option.
8768
+ * @deprecated
8764
8769
  * @throws {RequiredError}
8765
8770
  * @memberof OrdersApi
8766
8771
  */
@@ -9123,10 +9128,10 @@ interface TradesApiListTradesRequest {
9123
9128
  readonly cursor?: string;
9124
9129
  /**
9125
9130
  * Property to sort by
9126
- * @type {'created_at' | 'updated_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'}
9131
+ * @type {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'}
9127
9132
  * @memberof TradesApiListTrades
9128
9133
  */
9129
- readonly orderBy?: 'created_at' | 'updated_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity';
9134
+ readonly orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity';
9130
9135
  /**
9131
9136
  * Direction to sort (asc/desc)
9132
9137
  * @type {string}
@@ -9196,10 +9201,10 @@ interface TradesApiListTradesV3Request {
9196
9201
  readonly cursor?: string;
9197
9202
  /**
9198
9203
  * Property to sort by
9199
- * @type {'created_at' | 'updated_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'}
9204
+ * @type {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'}
9200
9205
  * @memberof TradesApiListTradesV3
9201
9206
  */
9202
- readonly orderBy?: 'created_at' | 'updated_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp';
9207
+ readonly orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp';
9203
9208
  /**
9204
9209
  * Direction to sort (asc/desc)
9205
9210
  * @type {string}
@@ -9227,10 +9232,11 @@ interface TradesApiListTradesV3Request {
9227
9232
  */
9228
9233
  declare class TradesApi extends BaseAPI {
9229
9234
  /**
9230
- * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params.
9235
+ * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
9231
9236
  * @summary Create a Trade between two parties
9232
9237
  * @param {TradesApiCreateTradeRequest} requestParameters Request parameters.
9233
9238
  * @param {*} [options] Override http request option.
9239
+ * @deprecated
9234
9240
  * @throws {RequiredError}
9235
9241
  * @memberof TradesApi
9236
9242
  */
@@ -9245,8 +9251,8 @@ declare class TradesApi extends BaseAPI {
9245
9251
  */
9246
9252
  createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse, any>>;
9247
9253
  /**
9248
- * Get a signable trade V3 message
9249
- * @summary Get a signable trade V3 message
9254
+ * Generate a signable trade message (V3)
9255
+ * @summary Generate a signable trade message (V3)
9250
9256
  * @param {TradesApiGetSignableTradeRequest} requestParameters Request parameters.
9251
9257
  * @param {*} [options] Override http request option.
9252
9258
  * @throws {RequiredError}
@@ -9263,10 +9269,11 @@ declare class TradesApi extends BaseAPI {
9263
9269
  */
9264
9270
  getTrade(requestParameters: TradesApiGetTradeRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade, any>>;
9265
9271
  /**
9266
- * Get a list of trades
9272
+ * Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
9267
9273
  * @summary Get a list of trades
9268
9274
  * @param {TradesApiListTradesRequest} requestParameters Request parameters.
9269
9275
  * @param {*} [options] Override http request option.
9276
+ * @deprecated
9270
9277
  * @throws {RequiredError}
9271
9278
  * @memberof TradesApi
9272
9279
  */
@@ -9499,7 +9506,7 @@ interface TransfersApiListTransfersRequest {
9499
9506
  */
9500
9507
  declare class TransfersApi extends BaseAPI {
9501
9508
  /**
9502
- * Create a new transfer request.
9509
+ * Create a new transfer request. Use https://docs.x.immutable.com/reference#/operations/getSignableTransfer to get request body params.
9503
9510
  * @summary Creates a transfer of multiple tokens between two parties
9504
9511
  * @param {TransfersApiCreateTransferRequest} requestParameters Request parameters.
9505
9512
  * @param {*} [options] Override http request option.
@@ -9508,7 +9515,7 @@ declare class TransfersApi extends BaseAPI {
9508
9515
  */
9509
9516
  createTransfer(requestParameters: TransfersApiCreateTransferRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponse, any>>;
9510
9517
  /**
9511
- * Create a new transfer request.
9518
+ * Create a new transfer request. Use https://docs.x.immutable.com/reference#/operations/getSignableTransferV1 to get request body params.
9512
9519
  * @summary Creates a transfer of tokens between two parties
9513
9520
  * @param {TransfersApiCreateTransferV1Request} requestParameters Request parameters.
9514
9521
  * @param {*} [options] Override http request option.
@@ -10194,14 +10201,14 @@ declare class ImmutableXClient {
10194
10201
  * @returns a promise that resolves with the requested Order
10195
10202
  * @throws {@link index.IMXError}
10196
10203
  */
10197
- getOrder(request: OrdersApiGetOrderRequest): Promise<Order>;
10204
+ getOrder(request: OrdersApiGetOrderRequest): Promise<OrderV3>;
10198
10205
  /**
10199
10206
  * Get a list of Orders
10200
10207
  * @param request - optional object containing the parameters to be provided in the API request
10201
10208
  * @returns a promise that resolves with the requested list of Orders
10202
10209
  * @throws {@link index.IMXError}
10203
10210
  */
10204
- listOrders(request?: OrdersApiListOrdersRequest): Promise<ListOrdersResponse>;
10211
+ listOrders(request?: OrdersApiListOrdersRequest): Promise<ListOrdersResponseV3>;
10205
10212
  /**
10206
10213
  * Get details of a Trade with the given ID
10207
10214
  * @param request - the request object containing the parameters to be provided in the API request
@@ -16,7 +16,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
16
16
  chainID,
17
17
  coreContractAddress,
18
18
  registrationContractAddress,
19
- sdkVersion: 'ts-immutable-sdk-0.4.0-alpha.2',
19
+ sdkVersion: 'ts-immutable-sdk-0.4.1-alpha',
20
20
  });
21
21
  /**
22
22
  * Sets `sdkVersion` at the time of build