@imtbl/sdk 0.15.0-alpha → 0.15.2-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.
@@ -16975,7 +16975,8 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
16975
16975
  nativeCurrency: {
16976
16976
  name: "IMX",
16977
16977
  symbol: "IMX",
16978
- decimals: 18
16978
+ decimals: 18,
16979
+ address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
16979
16980
  }
16980
16981
  }
16981
16982
  ]
@@ -17010,7 +17011,8 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
17010
17011
  nativeCurrency: {
17011
17012
  name: "IMX",
17012
17013
  symbol: "IMX",
17013
- decimals: 18
17014
+ decimals: 18,
17015
+ address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
17014
17016
  }
17015
17017
  }
17016
17018
  ]
@@ -17045,7 +17047,8 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
17045
17047
  nativeCurrency: {
17046
17048
  name: "IMX",
17047
17049
  symbol: "IMX",
17048
- decimals: 18
17050
+ decimals: 18,
17051
+ address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
17049
17052
  }
17050
17053
  }
17051
17054
  ]
@@ -17261,13 +17264,6 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
17261
17264
  GasTokenType["NATIVE"] = "NATIVE";
17262
17265
  GasTokenType["ERC20"] = "ERC20";
17263
17266
  })($4b58188d47aafe8d$export$537fa3efd10ed435 || ($4b58188d47aafe8d$export$537fa3efd10ed435 = {}));
17264
- var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
17265
- (function(TransactionRequirementType) {
17266
- TransactionRequirementType["GAS"] = "GAS";
17267
- TransactionRequirementType["NATIVE"] = "NATIVE";
17268
- TransactionRequirementType["ERC20"] = "ERC20";
17269
- TransactionRequirementType["ERC721"] = "ERC721";
17270
- })($4b58188d47aafe8d$export$5d3b0ad129b9b98e || ($4b58188d47aafe8d$export$5d3b0ad129b9b98e = {}));
17271
17267
 
17272
17268
 
17273
17269
 
@@ -17721,13 +17717,19 @@ const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transacti
17721
17717
 
17722
17718
 
17723
17719
 
17720
+ const $dff2555fa96dda9a$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
17721
+ const $dff2555fa96dda9a$export$aa28f3111c524ec5 = (feeData)=>{
17722
+ if ($dff2555fa96dda9a$var$doesChainSupportEIP1559(feeData)) return (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas));
17723
+ if (feeData.gasPrice) return (BigNumber$1).from(feeData.gasPrice);
17724
+ return null;
17725
+ };
17726
+
17727
+
17724
17728
  const $570856c68db0bd36$var$GAS_LIMIT = 140000;
17725
- const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
17726
- const $570856c68db0bd36$var$getGasPriceInWei = (feeData)=>$570856c68db0bd36$var$doesChainSupportEIP1559(feeData) ? (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas)) : feeData.gasPrice && (BigNumber$1).from(feeData.gasPrice);
17727
17729
  const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
17728
17730
  const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
17729
17731
  const feeData = await provider.getFeeData();
17730
- const gasPriceInWei = $570856c68db0bd36$var$getGasPriceInWei(feeData);
17732
+ const gasPriceInWei = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
17731
17733
  if (!gasPriceInWei) return undefined;
17732
17734
  return gasPriceInWei.mul(txnGasLimitInWei);
17733
17735
  };
@@ -18004,8 +18006,6 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
18004
18006
 
18005
18007
 
18006
18008
 
18007
-
18008
-
18009
18009
  const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
18010
18010
  const aggregatedAllowances = [];
18011
18011
  if (!erc20allowances.sufficient) {
@@ -18374,12 +18374,9 @@ const $aa6caea9a60d18c7$export$f96d1c819a615a64 = (itemRequirements)=>$aa6caea9a
18374
18374
 
18375
18375
  const $73d2282a108cc7e2$export$ed7929b58bab85da = (itemRequirements)=>itemRequirements.map((itemRequirement)=>{
18376
18376
  if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
18377
- name: "IMX",
18378
- symbol: "IMX",
18379
18377
  address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
18380
18378
  };
18381
18379
  return {
18382
- name: itemRequirement.type,
18383
18380
  address: itemRequirement.contractAddress
18384
18381
  };
18385
18382
  });
@@ -18395,6 +18392,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
18395
18392
  const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
18396
18393
  let erc721BalanceResult = itemBalanceResult;
18397
18394
  if (!erc721BalanceResult) erc721BalanceResult = {
18395
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
18398
18396
  balance: (BigNumber$1).from(0),
18399
18397
  formattedBalance: "0",
18400
18398
  contractAddress: itemRequirement.contractAddress,
@@ -18402,7 +18400,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
18402
18400
  };
18403
18401
  return {
18404
18402
  sufficient: sufficient,
18405
- type: itemRequirement.type,
18403
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
18406
18404
  delta: {
18407
18405
  balance: delta,
18408
18406
  formattedBalance: delta.toString()
@@ -18422,23 +18420,30 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
18422
18420
  return balance.token?.address === itemRequirement.contractAddress;
18423
18421
  });
18424
18422
  else if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) itemBalanceResult = balances.find((balance)=>{
18425
- return !("address" in balance.token) || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
18423
+ return balance.token?.address === "" || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
18426
18424
  });
18427
18425
  // Calculate the balance delta
18428
18426
  const requiredBalance = itemRequirement.amount;
18429
18427
  const sufficient = requiredBalance.isNegative() || requiredBalance.isZero() || (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
18430
18428
  const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
18429
+ let name = "";
18430
+ let symbol = "";
18431
18431
  let decimals = ($d85ad1457a3f1a83$export$903389470ba9433c);
18432
- if (itemBalanceResult) decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
18432
+ if (itemBalanceResult) {
18433
+ decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
18434
+ name = itemBalanceResult.token.name;
18435
+ symbol = itemBalanceResult.token.symbol;
18436
+ }
18433
18437
  let tokenBalanceResult = itemBalanceResult;
18434
18438
  if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) {
18435
18439
  // No token balance so mark as zero native
18436
18440
  if (!tokenBalanceResult) tokenBalanceResult = {
18441
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
18437
18442
  balance: (BigNumber$1).from(0),
18438
18443
  formattedBalance: "0",
18439
18444
  token: {
18440
- name: "IMX",
18441
- symbol: "IMX",
18445
+ name: name,
18446
+ symbol: symbol,
18442
18447
  decimals: ($d85ad1457a3f1a83$export$903389470ba9433c),
18443
18448
  address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
18444
18449
  }
@@ -18450,9 +18455,13 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
18450
18455
  balance: delta,
18451
18456
  formattedBalance: (utils).formatUnits(delta, decimals)
18452
18457
  },
18453
- current: tokenBalanceResult,
18458
+ current: {
18459
+ ...tokenBalanceResult,
18460
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE
18461
+ },
18454
18462
  required: {
18455
18463
  ...tokenBalanceResult,
18464
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
18456
18465
  balance: (BigNumber$1).from(itemRequirement.amount),
18457
18466
  formattedBalance: (utils).formatUnits(itemRequirement.amount, decimals)
18458
18467
  }
@@ -18460,10 +18469,14 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
18460
18469
  }
18461
18470
  // No token balance so mark as zero
18462
18471
  if (!tokenBalanceResult) tokenBalanceResult = {
18472
+ type: itemRequirement.type,
18463
18473
  balance: (BigNumber$1).from(0),
18464
18474
  formattedBalance: "0",
18465
18475
  token: {
18466
- address: itemRequirement.contractAddress
18476
+ name: name,
18477
+ symbol: symbol,
18478
+ address: itemRequirement.contractAddress,
18479
+ decimals: decimals
18467
18480
  }
18468
18481
  };
18469
18482
  return {
@@ -18505,11 +18518,11 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
18505
18518
  // Setup maps to be able to link data back to the associated promises
18506
18519
  const erc721s = new Map();
18507
18520
  const erc721OwnershipPromises = new Map();
18508
- itemRequirements.filter((itemRequirement)=>itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721).forEach((itemRequirement)=>{
18509
- const erc721Requirement = itemRequirement;
18510
- const contract = new (Contract$1)(erc721Requirement.contractAddress, JSON.stringify(($d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
18511
- erc721s.set(erc721Requirement.contractAddress, itemRequirement);
18512
- erc721OwnershipPromises.set(erc721Requirement.contractAddress, contract.ownerOf(erc721Requirement.id));
18521
+ itemRequirements.forEach((itemRequirement)=>{
18522
+ if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) return;
18523
+ const contract = new (Contract$1)(itemRequirement.contractAddress, JSON.stringify(($d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
18524
+ erc721s.set(itemRequirement.contractAddress, itemRequirement);
18525
+ erc721OwnershipPromises.set(itemRequirement.contractAddress, contract.ownerOf(itemRequirement.id));
18513
18526
  });
18514
18527
  try {
18515
18528
  // Convert ERC721 ownership into a balance result
@@ -18520,6 +18533,7 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
18520
18533
  let itemCount = 0;
18521
18534
  if (itemRequirement && ownerAddress === erc721OwnerAddress) itemCount = 1;
18522
18535
  erc721Balances.push({
18536
+ type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
18523
18537
  balance: (0, BigNumber$1).from(itemCount),
18524
18538
  formattedBalance: itemCount.toString(),
18525
18539
  contractAddress: itemRequirement.contractAddress,
@@ -18571,7 +18585,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
18571
18585
  }, true);
18572
18586
  return {
18573
18587
  sufficient: sufficient,
18574
- itemRequirements: balanceRequirements
18588
+ balanceRequirements: balanceRequirements
18575
18589
  };
18576
18590
  };
18577
18591
 
@@ -18582,12 +18596,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
18582
18596
 
18583
18597
 
18584
18598
 
18585
- const $7d1bfafb81e64d74$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
18586
- const $7d1bfafb81e64d74$var$getGasPriceInWei = (feeData)=>{
18587
- if ($7d1bfafb81e64d74$var$doesChainSupportEIP1559(feeData)) return (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas));
18588
- if (feeData.gasPrice) return (BigNumber$1).from(feeData.gasPrice);
18589
- return undefined;
18590
- };
18599
+
18591
18600
  const $7d1bfafb81e64d74$export$e0580ae1f48db848 = async (provider, transaction)=>{
18592
18601
  try {
18593
18602
  return await provider.estimateGas(transaction);
@@ -18620,9 +18629,11 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
18620
18629
  if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
18621
18630
  else {
18622
18631
  const feeData = await provider.getFeeData();
18623
- const gasPrice = $7d1bfafb81e64d74$var$getGasPriceInWei(feeData);
18624
- const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
18625
- if (gas) totalGas = totalGas.add(gas);
18632
+ const gasPrice = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
18633
+ if (gasPrice !== null) {
18634
+ const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
18635
+ if (gas) totalGas = totalGas.add(gas);
18636
+ }
18626
18637
  }
18627
18638
  // Get the gas estimates for all the transactions and calculate the total gas
18628
18639
  const gasEstimatePromises = await Promise.all(estimateGasPromises);
@@ -18634,57 +18645,39 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
18634
18645
  };
18635
18646
 
18636
18647
 
18648
+
18649
+
18650
+ const $0e7419077c373b24$export$4a2a19d99fef3b1b = (balanceCheckResult)=>{
18651
+ let sufficient = true;
18652
+ const transactionRequirements = [];
18653
+ for (const balance of balanceCheckResult.balanceRequirements){
18654
+ if (!balance.sufficient) sufficient = false;
18655
+ transactionRequirements.push({
18656
+ type: balance.type,
18657
+ sufficient: balance.sufficient,
18658
+ required: balance.required,
18659
+ current: balance.current,
18660
+ delta: balance.delta
18661
+ });
18662
+ }
18663
+ return {
18664
+ sufficient: sufficient,
18665
+ transactionRequirements: transactionRequirements
18666
+ };
18667
+ };
18637
18668
  const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemRequirements, transactionOrGasAmount)=>{
18638
- // eslint-disable-next-line no-console
18639
- console.log(provider, itemRequirements, transactionOrGasAmount);
18640
18669
  const ownerAddress = await provider.getSigner().getAddress();
18641
18670
  let aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(itemRequirements);
18642
18671
  const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
18643
18672
  const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
18644
- // eslint-disable-next-line no-console
18645
- console.log("ERC20 Allowances", erc20Allowances);
18646
- // eslint-disable-next-line no-console
18647
- console.log("ERC721 Allowances", erc721Allowances);
18648
18673
  const aggregatedAllowances = ($ddc6bcd0896481e5$export$2fbfa41a4de56a89)(erc20Allowances, erc721Allowances);
18649
18674
  const gasItem = await ($7d1bfafb81e64d74$export$3a4140bd9e983e4e)(provider, aggregatedAllowances, transactionOrGasAmount);
18650
18675
  if (gasItem !== null) {
18651
18676
  aggregatedItems.push(gasItem);
18652
18677
  aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
18653
18678
  }
18654
- // eslint-disable-next-line no-console
18655
- console.log("Aggregated Items", aggregatedItems);
18656
18679
  const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
18657
- // eslint-disable-next-line no-console
18658
- console.log("Balance Requirements", balanceRequirements);
18659
- return {
18660
- sufficient: true,
18661
- transactionRequirements: [
18662
- {
18663
- type: ($4b58188d47aafe8d$export$5d3b0ad129b9b98e).GAS,
18664
- sufficient: true,
18665
- required: {
18666
- balance: (BigNumber$1).from(0),
18667
- formattedBalance: "0",
18668
- token: {
18669
- name: "IMX",
18670
- symbol: "IMX",
18671
- address: "0x0",
18672
- decimals: 18
18673
- }
18674
- },
18675
- current: {
18676
- balance: (BigNumber$1).from(1),
18677
- formattedBalance: "1",
18678
- token: {
18679
- name: "IMX",
18680
- symbol: "IMX",
18681
- address: "0x0",
18682
- decimals: 18
18683
- }
18684
- }
18685
- }
18686
- ]
18687
- };
18680
+ return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
18688
18681
  };
18689
18682
 
18690
18683
 
@@ -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.15.0-alpha";
7
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.2-alpha";
8
8
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
9
9
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
10
10
 
@@ -462,6 +462,14 @@ interface ERC20Token {
462
462
  type: 'ERC20';
463
463
  tokenAddress: string;
464
464
  }
465
+ /**
466
+ * An ERC721 token
467
+ */
468
+ interface ERC721Token {
469
+ type: 'ERC721';
470
+ tokenId: string;
471
+ tokenAddress: string;
472
+ }
465
473
  /**
466
474
  * An ETH token
467
475
  */
@@ -486,6 +494,14 @@ interface ERC20Amount extends ERC20Token {
486
494
  */
487
495
  amount: string;
488
496
  }
497
+ /**
498
+ * Union type that represents all token types
499
+ */
500
+ declare type AnyToken = ETHToken | ERC721Token | ERC20Token;
501
+ /**
502
+ * Union type that represents all token type amounts
503
+ */
504
+ declare type TokenAmount = ETHAmount | ERC20Amount | ERC721Token;
489
505
  /**
490
506
  * Union type that represents exchange token type amounts
491
507
  */
@@ -586,6 +602,43 @@ declare class BaseAPI {
586
602
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
587
603
  }
588
604
 
605
+ /**
606
+ * Immutable X API
607
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
608
+ *
609
+ * The version of the OpenAPI document: 3.0
610
+ * Contact: support@immutable.com
611
+ *
612
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
613
+ * https://openapi-generator.tech
614
+ * Do not edit the class manually.
615
+ */
616
+ /**
617
+ *
618
+ * @export
619
+ * @interface APIError
620
+ */
621
+ interface APIError {
622
+ /**
623
+ * The error code
624
+ * @type {string}
625
+ * @memberof APIError
626
+ */
627
+ 'code': string;
628
+ /**
629
+ * The error details
630
+ * @type {string}
631
+ * @memberof APIError
632
+ */
633
+ 'details'?: string;
634
+ /**
635
+ * The error message
636
+ * @type {string}
637
+ * @memberof APIError
638
+ */
639
+ 'message': string;
640
+ }
641
+
589
642
  /**
590
643
  * Immutable X API
591
644
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -9894,6 +9947,37 @@ declare class WithdrawalsApi extends BaseAPI {
9894
9947
  */
9895
9948
  listWithdrawals(requestParameters?: WithdrawalsApiListWithdrawalsRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<ListWithdrawalsResponse, any>>;
9896
9949
  }
9950
+
9951
+ /**
9952
+ * Parameter required to create an Order
9953
+ */
9954
+ interface UnsignedOrderRequest {
9955
+ /**
9956
+ * The amount of tokens that will be bought for this order
9957
+ */
9958
+ buy: TokenAmount;
9959
+ /**
9960
+ * The amount of tokens that will be sold for this order
9961
+ */
9962
+ sell: TokenAmount;
9963
+ /**
9964
+ * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
9965
+ */
9966
+ expiration_timestamp?: number;
9967
+ /**
9968
+ * Inclusion of either maker or taker fees
9969
+ */
9970
+ fees?: Array<FeeEntry>;
9971
+ }
9972
+ /**
9973
+ * Parameter required to create a Transfer
9974
+ */
9975
+ declare type UnsignedTransferRequest = TokenAmount & {
9976
+ /**
9977
+ * Ethereum address of the receiving user
9978
+ */
9979
+ receiver: string;
9980
+ };
9897
9981
  /**
9898
9982
  * Parameter required to Mint tokens
9899
9983
  */
@@ -9912,6 +9996,36 @@ declare type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
9912
9996
  transactionID: string;
9913
9997
  };
9914
9998
 
9999
+ /**
10000
+ * Parameter required to create a batchNftTransfer
10001
+ */
10002
+ interface NftTransferDetails {
10003
+ /**
10004
+ * Ethereum address of the receiving user
10005
+ */
10006
+ receiver: string;
10007
+ /**
10008
+ * The token ID
10009
+ */
10010
+ tokenId: string;
10011
+ /**
10012
+ * The token contract address
10013
+ */
10014
+ tokenAddress: string;
10015
+ }
10016
+
10017
+ /**
10018
+ * Custom Error class that is returned from the API when a request fails
10019
+ */
10020
+ declare class IMXError extends Error {
10021
+ /**
10022
+ * [See a list of thrown error codes](https://docs.x.immutable.com/docs/error-codes/)
10023
+ */
10024
+ readonly code: string;
10025
+ readonly details?: string;
10026
+ constructor({ code, details, message }: APIError);
10027
+ }
10028
+
9915
10029
  /**
9916
10030
  * Creates a new Stark Signer
9917
10031
  * @params starkPrivateKey - the private key as a hex string
@@ -10310,4 +10424,4 @@ declare class ImmutableXClient {
10310
10424
  getNftPrimaryTransactions(request: NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest): Promise<NftprimarytransactionListTransactionsResponse>;
10311
10425
  }
10312
10426
 
10313
- export { ImmutableXClient, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey };
10427
+ export { AnyToken, ERC20Amount, ERC20Token, ERC721Token, ETHAmount, ETHToken, ExchangeTokenAmount, IMXError, ImmutableXClient, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, NftTransferDetails, StarkSigner, TokenAmount, UnsignedExchangeTransferRequest, UnsignedMintRequest, UnsignedOrderRequest, UnsignedTransferRequest, WalletConnection, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey };
@@ -1,5 +1,5 @@
1
1
  import { ImmutableX, Config } from '@imtbl/core-sdk';
2
- export { createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey } from '@imtbl/core-sdk';
2
+ export { IMXError, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey } from '@imtbl/core-sdk';
3
3
 
4
4
  var Environment;
5
5
  (function (Environment) {
@@ -16,7 +16,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
16
16
  chainID,
17
17
  coreContractAddress,
18
18
  registrationContractAddress,
19
- sdkVersion: 'ts-immutable-sdk-0.15.0-alpha',
19
+ sdkVersion: 'ts-immutable-sdk-0.15.2-alpha',
20
20
  });
21
21
  /**
22
22
  * Sets `sdkVersion` at the time of build