@imtbl/sdk 0.44.1 → 0.44.3
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/sdk.js +3 -3
- package/dist/browser/checkout/widgets.js +60 -60
- package/dist/checkout.d.ts +33 -4
- package/dist/checkout.js +213 -143
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +11 -11
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +215 -145
- package/dist/index.d.ts +38 -3
- package/dist/index.js +215 -145
- package/dist/orderbook.d.ts +1 -1
- package/dist/passport.js +2 -2
- package/package.json +6 -6
package/dist/checkout.d.ts
CHANGED
|
@@ -10748,7 +10748,7 @@ interface FeePercentage {
|
|
|
10748
10748
|
percentageDecimal: number;
|
|
10749
10749
|
}
|
|
10750
10750
|
|
|
10751
|
-
type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultInsufficientFunds;
|
|
10751
|
+
type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultFulfillmentsUnsettled | BuyResultInsufficientFunds;
|
|
10752
10752
|
/**
|
|
10753
10753
|
* Represents the result of {@link Checkout.buy}
|
|
10754
10754
|
* @property {CheckoutStatus.SUCCESS} status
|
|
@@ -10777,6 +10777,20 @@ type BuyResultFailed = {
|
|
|
10777
10777
|
/** The sufficient result of smart checkout */
|
|
10778
10778
|
smartCheckoutResult: SmartCheckoutSufficient;
|
|
10779
10779
|
};
|
|
10780
|
+
/**
|
|
10781
|
+
* Represents the result of {@link Checkout.buy}
|
|
10782
|
+
* @property {CheckoutStatus.FULFILLMENTS_UNSETTLED} status
|
|
10783
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult
|
|
10784
|
+
* @property {SendTransactionResult[]} transactions
|
|
10785
|
+
*/
|
|
10786
|
+
type BuyResultFulfillmentsUnsettled = {
|
|
10787
|
+
/** The status to indicate success */
|
|
10788
|
+
status: CheckoutStatus.FULFILLMENTS_UNSETTLED;
|
|
10789
|
+
/** The sufficient result of smart checkout */
|
|
10790
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
10791
|
+
/** Array of transaction results */
|
|
10792
|
+
transactions: TransactionResponse[];
|
|
10793
|
+
};
|
|
10780
10794
|
/**
|
|
10781
10795
|
* Represents the result of {@link Checkout.buy}
|
|
10782
10796
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status
|
|
@@ -10788,6 +10802,14 @@ type BuyResultInsufficientFunds = {
|
|
|
10788
10802
|
/** The insufficient result of smart checkout */
|
|
10789
10803
|
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
10790
10804
|
};
|
|
10805
|
+
/**
|
|
10806
|
+
* Represents the overrides available for {@link Checkout.buy}
|
|
10807
|
+
* @property {boolean} waitFulfillmentSettlements
|
|
10808
|
+
*/
|
|
10809
|
+
type BuyOverrides = {
|
|
10810
|
+
/** If the buy should wait for the fulfillment transactions to settle */
|
|
10811
|
+
waitFulfillmentSettlements?: boolean;
|
|
10812
|
+
};
|
|
10791
10813
|
type SellResult = SellResultSuccess | SellResultFailed | SellResultInsufficientFunds;
|
|
10792
10814
|
/**
|
|
10793
10815
|
* Represents the result of {@link Checkout.sell}
|
|
@@ -10860,11 +10882,13 @@ type CancelResultFailed = {
|
|
|
10860
10882
|
* @property {string} SUCCESS - If checkout succeeded as the transactions were able to be processed
|
|
10861
10883
|
* @property {string} FAILED - If checkout failed due to transactions not settling on chain
|
|
10862
10884
|
* @property {string} INSUFFICIENT_FUNDS - If checkout failed due to insufficient funds
|
|
10885
|
+
* @property {string} FULFILLMENTS_UNSETTLED - If checkout succeeded but the fulfillment transactions are not yet settled
|
|
10863
10886
|
*/
|
|
10864
10887
|
declare enum CheckoutStatus {
|
|
10865
10888
|
SUCCESS = "SUCCESS",
|
|
10866
10889
|
FAILED = "FAILED",
|
|
10867
|
-
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS"
|
|
10890
|
+
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
|
|
10891
|
+
FULFILLMENTS_UNSETTLED = "FULFILLMENTS_UNSETTLED"
|
|
10868
10892
|
}
|
|
10869
10893
|
/**
|
|
10870
10894
|
* The type representing the order to buy
|
|
@@ -11423,11 +11447,13 @@ type AvailableRoutingOptions = {
|
|
|
11423
11447
|
* Interface representing the parameters for {@link Checkout.buy}
|
|
11424
11448
|
* @property {Web3Provider} provider - The provider to use for the buy.
|
|
11425
11449
|
* @property {Array<BuyOrder>} orders - The orders to buy
|
|
11450
|
+
* @property {BuyOverrides} overrides - The overrides to use for the buy.
|
|
11426
11451
|
* Currently only processes the first order in the array until batch processing is supported.
|
|
11427
11452
|
*/
|
|
11428
11453
|
interface BuyParams {
|
|
11429
11454
|
provider: Web3Provider;
|
|
11430
11455
|
orders: Array<BuyOrder>;
|
|
11456
|
+
overrides?: BuyOverrides;
|
|
11431
11457
|
}
|
|
11432
11458
|
|
|
11433
11459
|
/**
|
|
@@ -11741,17 +11767,20 @@ interface CheckConnectionResult {
|
|
|
11741
11767
|
* @typedef {Object} BridgeFeeResponse
|
|
11742
11768
|
* @property {ethers.BigNumber} sourceChainGas - Gas cost to send tokens to the bridge contract on the source chain.
|
|
11743
11769
|
* - priced in the source chain's native token.
|
|
11770
|
+
* @property {ethers.BigNumber} approvalFee - Gas cost to approve bridge contract to spend tokens on the source chain.
|
|
11771
|
+
* - priced in the source chain's native token.
|
|
11744
11772
|
* @property {ethers.BigNumber} bridgeFee - destinationChainGas + validatorFee.
|
|
11745
11773
|
* This will be added to the tx.value of the bridge transaction and forwarded to the Axelar Gas Service contract.
|
|
11746
11774
|
* - priced in the source chain's native token.
|
|
11747
11775
|
* @property {ethers.BigNumber} imtblFee - The fee charged by Immutable to facilitate the bridge.
|
|
11748
11776
|
* - priced in the source chain's native token.
|
|
11749
11777
|
* @property {ethers.BigNumber} totalFees - The total fees the user will be charged which is;
|
|
11750
|
-
* sourceChainGas + bridgeFee + imtblFee.
|
|
11778
|
+
* sourceChainGas + approvalFee + bridgeFee + imtblFee.
|
|
11751
11779
|
* - priced in the source chain's native token.
|
|
11752
11780
|
*/
|
|
11753
11781
|
interface BridgeFeeResponse {
|
|
11754
11782
|
sourceChainGas: BigNumber;
|
|
11783
|
+
approvalFee: BigNumber;
|
|
11755
11784
|
bridgeFee: BigNumber;
|
|
11756
11785
|
imtblFee: BigNumber;
|
|
11757
11786
|
totalFees: BigNumber;
|
|
@@ -13527,4 +13556,4 @@ declare class BlockExplorerService {
|
|
|
13527
13556
|
static getTransactionLink(chainId: ChainId, hash: string): string | undefined;
|
|
13528
13557
|
}
|
|
13529
13558
|
|
|
13530
|
-
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BlockExplorerService, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, ChainSlug, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, CreateProviderParams, CreateProviderResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FeeType, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetTokenInfoParams, GetWalletAllowListParams, GetWalletAllowListResult, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, LanguageChanged, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SalePaymentMethod, SalePaymentTypes, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetLanguage, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
|
|
13559
|
+
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BlockExplorerService, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyOverrides, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, ChainSlug, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, CreateProviderParams, CreateProviderResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FeeType, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetTokenInfoParams, GetWalletAllowListParams, GetWalletAllowListResult, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, LanguageChanged, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SalePaymentMethod, SalePaymentTypes, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetLanguage, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
|