@imtbl/sdk 0.17.6 → 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/blockchain_data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +29 -10
- package/dist/checkout_sdk.js +350 -59
- package/dist/checkout_widgets.d.ts +4 -5
- package/dist/checkout_widgets.js +17 -19
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +15 -15
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +769 -107
- package/dist/index.d.ts +65 -14
- package/dist/index.js +771 -109
- package/dist/passport.d.ts +22 -1
- package/dist/passport.js +404 -31
- package/package.json +1 -1
package/dist/checkout_sdk.d.ts
CHANGED
|
@@ -1316,7 +1316,7 @@ interface FeeData {
|
|
|
1316
1316
|
* @export
|
|
1317
1317
|
* @interface FeeToken
|
|
1318
1318
|
*/
|
|
1319
|
-
interface FeeToken {
|
|
1319
|
+
interface FeeToken$1 {
|
|
1320
1320
|
/**
|
|
1321
1321
|
*
|
|
1322
1322
|
* @type {FeeData}
|
|
@@ -1353,7 +1353,7 @@ declare type FeeTokenTypeEnum = typeof FeeTokenTypeEnum[keyof typeof FeeTokenTyp
|
|
|
1353
1353
|
* Details of the fee currency
|
|
1354
1354
|
* @export
|
|
1355
1355
|
*/
|
|
1356
|
-
declare type OrderFeeInfoToken = FeeToken;
|
|
1356
|
+
declare type OrderFeeInfoToken = FeeToken$1;
|
|
1357
1357
|
|
|
1358
1358
|
/**
|
|
1359
1359
|
* Immutable X API
|
|
@@ -11426,6 +11426,16 @@ interface CheckConnectionResult {
|
|
|
11426
11426
|
isConnected: boolean;
|
|
11427
11427
|
walletAddress: string;
|
|
11428
11428
|
}
|
|
11429
|
+
interface OrderFee {
|
|
11430
|
+
amount: FeeToken | FeePercentage;
|
|
11431
|
+
recipient: string;
|
|
11432
|
+
}
|
|
11433
|
+
interface FeeToken {
|
|
11434
|
+
token: string;
|
|
11435
|
+
}
|
|
11436
|
+
interface FeePercentage {
|
|
11437
|
+
percentageDecimal: number;
|
|
11438
|
+
}
|
|
11429
11439
|
/**
|
|
11430
11440
|
* An enum representing the type of gas estimate.
|
|
11431
11441
|
* @enum {string}
|
|
@@ -11547,15 +11557,21 @@ interface NetworkFilter {
|
|
|
11547
11557
|
/**
|
|
11548
11558
|
* Interface representing the parameters for {@link Checkout.sell}
|
|
11549
11559
|
* @property {Web3Provider} provider - The provider to use for the sell.
|
|
11550
|
-
* @property {
|
|
11551
|
-
*
|
|
11552
|
-
* @property {BuyToken} buyToken - The token to buy the item with.
|
|
11560
|
+
* @property {Array<SellOrder>} orders - An array of sell orders to execute.
|
|
11561
|
+
* Only currently actions the first order in the array until we support batch processing.
|
|
11553
11562
|
*/
|
|
11554
11563
|
interface SellParams {
|
|
11555
11564
|
provider: Web3Provider;
|
|
11565
|
+
orders: Array<SellOrder>;
|
|
11566
|
+
}
|
|
11567
|
+
interface SellOrder {
|
|
11568
|
+
sellToken: SellToken;
|
|
11569
|
+
buyToken: BuyToken;
|
|
11570
|
+
makerFees?: Array<OrderFee>;
|
|
11571
|
+
}
|
|
11572
|
+
interface SellToken {
|
|
11556
11573
|
id: string;
|
|
11557
11574
|
collectionAddress: string;
|
|
11558
|
-
buyToken: BuyToken;
|
|
11559
11575
|
}
|
|
11560
11576
|
/**
|
|
11561
11577
|
* Interface representing the result of the sell
|
|
@@ -11616,7 +11632,7 @@ type BuyToken = NativeBuyToken | ERC20BuyToken;
|
|
|
11616
11632
|
*/
|
|
11617
11633
|
type NativeBuyToken = {
|
|
11618
11634
|
type: ItemType.NATIVE;
|
|
11619
|
-
amount:
|
|
11635
|
+
amount: string;
|
|
11620
11636
|
};
|
|
11621
11637
|
/**
|
|
11622
11638
|
* Represents a ERC20 buy token
|
|
@@ -11626,7 +11642,7 @@ type NativeBuyToken = {
|
|
|
11626
11642
|
*/
|
|
11627
11643
|
type ERC20BuyToken = {
|
|
11628
11644
|
type: ItemType.ERC20;
|
|
11629
|
-
amount:
|
|
11645
|
+
amount: string;
|
|
11630
11646
|
contractAddress: string;
|
|
11631
11647
|
};
|
|
11632
11648
|
/**
|
|
@@ -11824,7 +11840,8 @@ declare enum CheckoutErrorType {
|
|
|
11824
11840
|
EXECUTE_APPROVAL_TRANSACTION_ERROR = "EXECUTE_APPROVAL_TRANSACTION_ERROR",
|
|
11825
11841
|
EXECUTE_FULFILMENT_TRANSACTION_ERROR = "EXECUTE_FULFILMENT_TRANSACTION_ERROR",
|
|
11826
11842
|
SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR",
|
|
11827
|
-
BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR"
|
|
11843
|
+
BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR",
|
|
11844
|
+
ORDER_FEE_ERROR = "ORDER_FEE_ERROR"
|
|
11828
11845
|
}
|
|
11829
11846
|
/**
|
|
11830
11847
|
* Represents an error object with a specific type, optional message, and optional data.
|
|
@@ -11960,6 +11977,8 @@ declare class Checkout {
|
|
|
11960
11977
|
/**
|
|
11961
11978
|
* Determines the requirements for performing a sell.
|
|
11962
11979
|
* @param {SellParams} params - The parameters for the sell.
|
|
11980
|
+
* Only currently actions the first order in the array until we support batch processing.
|
|
11981
|
+
* Only currently actions the first fee in the fees array of each order until we support multiple fees.
|
|
11963
11982
|
*/
|
|
11964
11983
|
sell(params: SellParams): Promise<void>;
|
|
11965
11984
|
/**
|
|
@@ -11997,4 +12016,4 @@ declare class Checkout {
|
|
|
11997
12016
|
getExchangeFeeEstimate(): Promise<OnRampProviderFees>;
|
|
11998
12017
|
}
|
|
11999
12018
|
|
|
12000
|
-
export { AllowedNetworkConfig, BuyParams, BuyResult, CHECKOUT_API_BASE_URL, CancelParams, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, ExchangeType, FiatRampParams, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, ItemType, NetworkFilter, NetworkFilterTypes, NetworkInfo, RemoteConfiguration, SellParams, SellResult, SendTransactionParams, SendTransactionResult, SmartCheckoutParams, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
|
|
12019
|
+
export { AllowedNetworkConfig, BuyParams, BuyResult, CHECKOUT_API_BASE_URL, CancelParams, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, ExchangeType, FeePercentage, FeeToken, FiatRampParams, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, ItemType, NetworkFilter, NetworkFilterTypes, NetworkInfo, OrderFee, RemoteConfiguration, SellOrder, SellParams, SellResult, SellToken, SendTransactionParams, SendTransactionResult, SmartCheckoutParams, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
|