@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/index.d.ts
CHANGED
|
@@ -16861,6 +16861,8 @@ type orderbook_d_OrderStatusName = OrderStatusName;
|
|
|
16861
16861
|
declare const orderbook_d_OrderStatusName: typeof OrderStatusName;
|
|
16862
16862
|
type orderbook_d_Orderbook = Orderbook;
|
|
16863
16863
|
declare const orderbook_d_Orderbook: typeof Orderbook;
|
|
16864
|
+
type orderbook_d_OrderbookModuleConfiguration = OrderbookModuleConfiguration;
|
|
16865
|
+
type orderbook_d_OrderbookOverrides = OrderbookOverrides;
|
|
16864
16866
|
type orderbook_d_Page = Page;
|
|
16865
16867
|
type orderbook_d_PrepareCancelOrdersResponse = PrepareCancelOrdersResponse;
|
|
16866
16868
|
type orderbook_d_PrepareListingParams = PrepareListingParams;
|
|
@@ -16902,6 +16904,8 @@ declare namespace orderbook_d {
|
|
|
16902
16904
|
orderbook_d_Order as Order,
|
|
16903
16905
|
orderbook_d_OrderStatusName as OrderStatusName,
|
|
16904
16906
|
orderbook_d_Orderbook as Orderbook,
|
|
16907
|
+
orderbook_d_OrderbookModuleConfiguration as OrderbookModuleConfiguration,
|
|
16908
|
+
orderbook_d_OrderbookOverrides as OrderbookOverrides,
|
|
16905
16909
|
orderbook_d_Page as Page,
|
|
16906
16910
|
orderbook_d_PrepareCancelOrdersResponse as PrepareCancelOrdersResponse,
|
|
16907
16911
|
orderbook_d_PrepareListingParams as PrepareListingParams,
|
|
@@ -17062,7 +17066,7 @@ interface FeePercentage {
|
|
|
17062
17066
|
percentageDecimal: number;
|
|
17063
17067
|
}
|
|
17064
17068
|
|
|
17065
|
-
type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultInsufficientFunds;
|
|
17069
|
+
type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultFulfillmentsUnsettled | BuyResultInsufficientFunds;
|
|
17066
17070
|
/**
|
|
17067
17071
|
* Represents the result of {@link Checkout.buy}
|
|
17068
17072
|
* @property {CheckoutStatus.SUCCESS} status
|
|
@@ -17091,6 +17095,20 @@ type BuyResultFailed = {
|
|
|
17091
17095
|
/** The sufficient result of smart checkout */
|
|
17092
17096
|
smartCheckoutResult: SmartCheckoutSufficient;
|
|
17093
17097
|
};
|
|
17098
|
+
/**
|
|
17099
|
+
* Represents the result of {@link Checkout.buy}
|
|
17100
|
+
* @property {CheckoutStatus.FULFILLMENTS_UNSETTLED} status
|
|
17101
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult
|
|
17102
|
+
* @property {SendTransactionResult[]} transactions
|
|
17103
|
+
*/
|
|
17104
|
+
type BuyResultFulfillmentsUnsettled = {
|
|
17105
|
+
/** The status to indicate success */
|
|
17106
|
+
status: CheckoutStatus.FULFILLMENTS_UNSETTLED;
|
|
17107
|
+
/** The sufficient result of smart checkout */
|
|
17108
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
17109
|
+
/** Array of transaction results */
|
|
17110
|
+
transactions: TransactionResponse[];
|
|
17111
|
+
};
|
|
17094
17112
|
/**
|
|
17095
17113
|
* Represents the result of {@link Checkout.buy}
|
|
17096
17114
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status
|
|
@@ -17102,6 +17120,14 @@ type BuyResultInsufficientFunds = {
|
|
|
17102
17120
|
/** The insufficient result of smart checkout */
|
|
17103
17121
|
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
17104
17122
|
};
|
|
17123
|
+
/**
|
|
17124
|
+
* Represents the overrides available for {@link Checkout.buy}
|
|
17125
|
+
* @property {boolean} waitFulfillmentSettlements
|
|
17126
|
+
*/
|
|
17127
|
+
type BuyOverrides = {
|
|
17128
|
+
/** If the buy should wait for the fulfillment transactions to settle */
|
|
17129
|
+
waitFulfillmentSettlements?: boolean;
|
|
17130
|
+
};
|
|
17105
17131
|
type SellResult = SellResultSuccess | SellResultFailed | SellResultInsufficientFunds;
|
|
17106
17132
|
/**
|
|
17107
17133
|
* Represents the result of {@link Checkout.sell}
|
|
@@ -17174,11 +17200,13 @@ type CancelResultFailed = {
|
|
|
17174
17200
|
* @property {string} SUCCESS - If checkout succeeded as the transactions were able to be processed
|
|
17175
17201
|
* @property {string} FAILED - If checkout failed due to transactions not settling on chain
|
|
17176
17202
|
* @property {string} INSUFFICIENT_FUNDS - If checkout failed due to insufficient funds
|
|
17203
|
+
* @property {string} FULFILLMENTS_UNSETTLED - If checkout succeeded but the fulfillment transactions are not yet settled
|
|
17177
17204
|
*/
|
|
17178
17205
|
declare enum CheckoutStatus {
|
|
17179
17206
|
SUCCESS = "SUCCESS",
|
|
17180
17207
|
FAILED = "FAILED",
|
|
17181
|
-
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS"
|
|
17208
|
+
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
|
|
17209
|
+
FULFILLMENTS_UNSETTLED = "FULFILLMENTS_UNSETTLED"
|
|
17182
17210
|
}
|
|
17183
17211
|
/**
|
|
17184
17212
|
* The type representing the order to buy
|
|
@@ -17737,11 +17765,13 @@ type AvailableRoutingOptions = {
|
|
|
17737
17765
|
* Interface representing the parameters for {@link Checkout.buy}
|
|
17738
17766
|
* @property {Web3Provider} provider - The provider to use for the buy.
|
|
17739
17767
|
* @property {Array<BuyOrder>} orders - The orders to buy
|
|
17768
|
+
* @property {BuyOverrides} overrides - The overrides to use for the buy.
|
|
17740
17769
|
* Currently only processes the first order in the array until batch processing is supported.
|
|
17741
17770
|
*/
|
|
17742
17771
|
interface BuyParams {
|
|
17743
17772
|
provider: Web3Provider;
|
|
17744
17773
|
orders: Array<BuyOrder>;
|
|
17774
|
+
overrides?: BuyOverrides;
|
|
17745
17775
|
}
|
|
17746
17776
|
|
|
17747
17777
|
/**
|
|
@@ -18055,17 +18085,20 @@ interface CheckConnectionResult {
|
|
|
18055
18085
|
* @typedef {Object} BridgeFeeResponse
|
|
18056
18086
|
* @property {ethers.BigNumber} sourceChainGas - Gas cost to send tokens to the bridge contract on the source chain.
|
|
18057
18087
|
* - priced in the source chain's native token.
|
|
18088
|
+
* @property {ethers.BigNumber} approvalFee - Gas cost to approve bridge contract to spend tokens on the source chain.
|
|
18089
|
+
* - priced in the source chain's native token.
|
|
18058
18090
|
* @property {ethers.BigNumber} bridgeFee - destinationChainGas + validatorFee.
|
|
18059
18091
|
* This will be added to the tx.value of the bridge transaction and forwarded to the Axelar Gas Service contract.
|
|
18060
18092
|
* - priced in the source chain's native token.
|
|
18061
18093
|
* @property {ethers.BigNumber} imtblFee - The fee charged by Immutable to facilitate the bridge.
|
|
18062
18094
|
* - priced in the source chain's native token.
|
|
18063
18095
|
* @property {ethers.BigNumber} totalFees - The total fees the user will be charged which is;
|
|
18064
|
-
* sourceChainGas + bridgeFee + imtblFee.
|
|
18096
|
+
* sourceChainGas + approvalFee + bridgeFee + imtblFee.
|
|
18065
18097
|
* - priced in the source chain's native token.
|
|
18066
18098
|
*/
|
|
18067
18099
|
interface BridgeFeeResponse {
|
|
18068
18100
|
sourceChainGas: BigNumber;
|
|
18101
|
+
approvalFee: BigNumber;
|
|
18069
18102
|
bridgeFee: BigNumber;
|
|
18070
18103
|
imtblFee: BigNumber;
|
|
18071
18104
|
totalFees: BigNumber;
|
|
@@ -19470,6 +19503,7 @@ type checkout_d_BridgeTransactionSent = BridgeTransactionSent;
|
|
|
19470
19503
|
type checkout_d_BridgeWidgetConfiguration = BridgeWidgetConfiguration;
|
|
19471
19504
|
type checkout_d_BridgeWidgetParams = BridgeWidgetParams;
|
|
19472
19505
|
type checkout_d_BuyOrder = BuyOrder;
|
|
19506
|
+
type checkout_d_BuyOverrides = BuyOverrides;
|
|
19473
19507
|
type checkout_d_BuyParams = BuyParams;
|
|
19474
19508
|
type checkout_d_BuyResult = BuyResult;
|
|
19475
19509
|
type checkout_d_BuyResultFailed = BuyResultFailed;
|
|
@@ -19679,6 +19713,7 @@ declare namespace checkout_d {
|
|
|
19679
19713
|
checkout_d_BridgeWidgetConfiguration as BridgeWidgetConfiguration,
|
|
19680
19714
|
checkout_d_BridgeWidgetParams as BridgeWidgetParams,
|
|
19681
19715
|
checkout_d_BuyOrder as BuyOrder,
|
|
19716
|
+
checkout_d_BuyOverrides as BuyOverrides,
|
|
19682
19717
|
checkout_d_BuyParams as BuyParams,
|
|
19683
19718
|
checkout_d_BuyResult as BuyResult,
|
|
19684
19719
|
checkout_d_BuyResultFailed as BuyResultFailed,
|