@imtbl/sdk 0.18.0 → 0.18.1

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.d.ts CHANGED
@@ -3468,7 +3468,7 @@ interface FeeData {
3468
3468
  * @export
3469
3469
  * @interface FeeToken
3470
3470
  */
3471
- interface FeeToken {
3471
+ interface FeeToken$1 {
3472
3472
  /**
3473
3473
  *
3474
3474
  * @type {FeeData}
@@ -3505,7 +3505,7 @@ declare type FeeTokenTypeEnum = typeof FeeTokenTypeEnum[keyof typeof FeeTokenTyp
3505
3505
  * Details of the fee currency
3506
3506
  * @export
3507
3507
  */
3508
- declare type OrderFeeInfoToken = FeeToken;
3508
+ declare type OrderFeeInfoToken = FeeToken$1;
3509
3509
 
3510
3510
  /**
3511
3511
  * Immutable X API
@@ -14686,6 +14686,16 @@ interface CheckConnectionResult {
14686
14686
  isConnected: boolean;
14687
14687
  walletAddress: string;
14688
14688
  }
14689
+ interface OrderFee {
14690
+ amount: FeeToken | FeePercentage;
14691
+ recipient: string;
14692
+ }
14693
+ interface FeeToken {
14694
+ token: string;
14695
+ }
14696
+ interface FeePercentage {
14697
+ percentageDecimal: number;
14698
+ }
14689
14699
  /**
14690
14700
  * An enum representing the type of gas estimate.
14691
14701
  * @enum {string}
@@ -14807,15 +14817,21 @@ interface NetworkFilter {
14807
14817
  /**
14808
14818
  * Interface representing the parameters for {@link Checkout.sell}
14809
14819
  * @property {Web3Provider} provider - The provider to use for the sell.
14810
- * @property {string} id - The ERC721 ID.
14811
- * @property {string} collectionAddress - The contract address of the ERC721s collection.
14812
- * @property {BuyToken} buyToken - The token to buy the item with.
14820
+ * @property {Array<SellOrder>} orders - An array of sell orders to execute.
14821
+ * Only currently actions the first order in the array until we support batch processing.
14813
14822
  */
14814
14823
  interface SellParams {
14815
14824
  provider: Web3Provider;
14825
+ orders: Array<SellOrder>;
14826
+ }
14827
+ interface SellOrder {
14828
+ sellToken: SellToken;
14829
+ buyToken: BuyToken;
14830
+ makerFees?: Array<OrderFee>;
14831
+ }
14832
+ interface SellToken {
14816
14833
  id: string;
14817
14834
  collectionAddress: string;
14818
- buyToken: BuyToken;
14819
14835
  }
14820
14836
  /**
14821
14837
  * Interface representing the result of the sell
@@ -14876,7 +14892,7 @@ type BuyToken = NativeBuyToken | ERC20BuyToken;
14876
14892
  */
14877
14893
  type NativeBuyToken = {
14878
14894
  type: ItemType.NATIVE;
14879
- amount: BigNumber;
14895
+ amount: string;
14880
14896
  };
14881
14897
  /**
14882
14898
  * Represents a ERC20 buy token
@@ -14886,7 +14902,7 @@ type NativeBuyToken = {
14886
14902
  */
14887
14903
  type ERC20BuyToken = {
14888
14904
  type: ItemType.ERC20;
14889
- amount: BigNumber;
14905
+ amount: string;
14890
14906
  contractAddress: string;
14891
14907
  };
14892
14908
  /**
@@ -15084,7 +15100,8 @@ declare enum CheckoutErrorType {
15084
15100
  EXECUTE_APPROVAL_TRANSACTION_ERROR = "EXECUTE_APPROVAL_TRANSACTION_ERROR",
15085
15101
  EXECUTE_FULFILMENT_TRANSACTION_ERROR = "EXECUTE_FULFILMENT_TRANSACTION_ERROR",
15086
15102
  SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR",
15087
- BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR"
15103
+ BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR",
15104
+ ORDER_FEE_ERROR = "ORDER_FEE_ERROR"
15088
15105
  }
15089
15106
  /**
15090
15107
  * Represents an error object with a specific type, optional message, and optional data.
@@ -15220,6 +15237,8 @@ declare class Checkout {
15220
15237
  /**
15221
15238
  * Determines the requirements for performing a sell.
15222
15239
  * @param {SellParams} params - The parameters for the sell.
15240
+ * Only currently actions the first order in the array until we support batch processing.
15241
+ * Only currently actions the first fee in the fees array of each order until we support multiple fees.
15223
15242
  */
15224
15243
  sell(params: SellParams): Promise<void>;
15225
15244
  /**
@@ -15279,6 +15298,8 @@ type checkout_sdk_d_DexConfig = DexConfig;
15279
15298
  type checkout_sdk_d_ErrorType = ErrorType;
15280
15299
  type checkout_sdk_d_ExchangeType = ExchangeType;
15281
15300
  declare const checkout_sdk_d_ExchangeType: typeof ExchangeType;
15301
+ type checkout_sdk_d_FeePercentage = FeePercentage;
15302
+ type checkout_sdk_d_FeeToken = FeeToken;
15282
15303
  type checkout_sdk_d_FiatRampParams = FiatRampParams;
15283
15304
  type checkout_sdk_d_GasEstimateBridgeToL2Result = GasEstimateBridgeToL2Result;
15284
15305
  type checkout_sdk_d_GasEstimateParams = GasEstimateParams;
@@ -15305,9 +15326,12 @@ type checkout_sdk_d_NetworkFilter = NetworkFilter;
15305
15326
  type checkout_sdk_d_NetworkFilterTypes = NetworkFilterTypes;
15306
15327
  declare const checkout_sdk_d_NetworkFilterTypes: typeof NetworkFilterTypes;
15307
15328
  type checkout_sdk_d_NetworkInfo = NetworkInfo;
15329
+ type checkout_sdk_d_OrderFee = OrderFee;
15308
15330
  type checkout_sdk_d_RemoteConfiguration = RemoteConfiguration;
15331
+ type checkout_sdk_d_SellOrder = SellOrder;
15309
15332
  type checkout_sdk_d_SellParams = SellParams;
15310
15333
  type checkout_sdk_d_SellResult = SellResult;
15334
+ type checkout_sdk_d_SellToken = SellToken;
15311
15335
  type checkout_sdk_d_SendTransactionParams = SendTransactionParams;
15312
15336
  type checkout_sdk_d_SendTransactionResult = SendTransactionResult;
15313
15337
  type checkout_sdk_d_SmartCheckoutParams = SmartCheckoutParams;
@@ -15344,6 +15368,8 @@ declare namespace checkout_sdk_d {
15344
15368
  checkout_sdk_d_DexConfig as DexConfig,
15345
15369
  checkout_sdk_d_ErrorType as ErrorType,
15346
15370
  checkout_sdk_d_ExchangeType as ExchangeType,
15371
+ checkout_sdk_d_FeePercentage as FeePercentage,
15372
+ checkout_sdk_d_FeeToken as FeeToken,
15347
15373
  checkout_sdk_d_FiatRampParams as FiatRampParams,
15348
15374
  checkout_sdk_d_GasEstimateBridgeToL2Result as GasEstimateBridgeToL2Result,
15349
15375
  checkout_sdk_d_GasEstimateParams as GasEstimateParams,
@@ -15366,9 +15392,12 @@ declare namespace checkout_sdk_d {
15366
15392
  checkout_sdk_d_NetworkFilter as NetworkFilter,
15367
15393
  checkout_sdk_d_NetworkFilterTypes as NetworkFilterTypes,
15368
15394
  checkout_sdk_d_NetworkInfo as NetworkInfo,
15395
+ checkout_sdk_d_OrderFee as OrderFee,
15369
15396
  checkout_sdk_d_RemoteConfiguration as RemoteConfiguration,
15397
+ checkout_sdk_d_SellOrder as SellOrder,
15370
15398
  checkout_sdk_d_SellParams as SellParams,
15371
15399
  checkout_sdk_d_SellResult as SellResult,
15400
+ checkout_sdk_d_SellToken as SellToken,
15372
15401
  checkout_sdk_d_SendTransactionParams as SendTransactionParams,
15373
15402
  checkout_sdk_d_SendTransactionResult as SendTransactionResult,
15374
15403
  checkout_sdk_d_SmartCheckoutParams as SmartCheckoutParams,
@@ -29815,8 +29844,7 @@ interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}
29815
29844
  */
29816
29845
  declare enum WidgetTheme {
29817
29846
  LIGHT = "light",
29818
- DARK = "dark",
29819
- CUSTOM = "custom"
29847
+ DARK = "dark"
29820
29848
  }
29821
29849
  /**
29822
29850
  * Enum representing list of Checkout Widgets DOM tags.