@imtbl/sdk 0.36.4 → 0.37.0
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 +6 -6
- package/dist/browser/checkout/widgets.js +57 -57
- package/dist/checkout.d.ts +40 -24
- package/dist/checkout.js +463 -212
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +12 -12
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +466 -214
- package/dist/index.d.ts +45 -28
- package/dist/index.js +466 -214
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/checkout.d.ts
CHANGED
|
@@ -10916,15 +10916,15 @@ type NativeBuyToken = {
|
|
|
10916
10916
|
* Represents a ERC20 buy token
|
|
10917
10917
|
* @property {ItemType} type
|
|
10918
10918
|
* @property {string} amount
|
|
10919
|
-
* @property {string}
|
|
10919
|
+
* @property {string} tokenAddress
|
|
10920
10920
|
*/
|
|
10921
10921
|
type ERC20BuyToken = {
|
|
10922
10922
|
/** The type indicate this is a ERC20 token. */
|
|
10923
10923
|
type: ItemType.ERC20;
|
|
10924
10924
|
/** The amount of native token. */
|
|
10925
10925
|
amount: string;
|
|
10926
|
-
/** The
|
|
10927
|
-
|
|
10926
|
+
/** The token address of the ERC20. */
|
|
10927
|
+
tokenAddress: string;
|
|
10928
10928
|
};
|
|
10929
10929
|
/**
|
|
10930
10930
|
* The SellToken type
|
|
@@ -10965,16 +10965,16 @@ type NativeItemRequirement = {
|
|
|
10965
10965
|
/**
|
|
10966
10966
|
* Represents an ERC20 item requirement for a transaction.
|
|
10967
10967
|
* @property {ItemType.ERC20} type
|
|
10968
|
+
* @property {string} tokenAddress
|
|
10968
10969
|
* @property {string} amount
|
|
10969
|
-
* @property {string} contractAddress
|
|
10970
10970
|
* @property {string} spenderAddress
|
|
10971
10971
|
*/
|
|
10972
10972
|
type ERC20ItemRequirement = {
|
|
10973
10973
|
/** The type to indicate this is a ERC20 item requirement. */
|
|
10974
10974
|
type: ItemType.ERC20;
|
|
10975
|
+
/** The token address of the ERC20. */
|
|
10976
|
+
tokenAddress: string;
|
|
10975
10977
|
/** The amount of the item. */
|
|
10976
|
-
contractAddress: string;
|
|
10977
|
-
/** The contract address of the ERC20. */
|
|
10978
10978
|
amount: string;
|
|
10979
10979
|
/** The contract address of the approver. */
|
|
10980
10980
|
spenderAddress: string;
|
|
@@ -11068,14 +11068,14 @@ type NativeGas = {
|
|
|
11068
11068
|
/**
|
|
11069
11069
|
* Represents an ERC20 gas token.
|
|
11070
11070
|
* @property {GasTokenType} type
|
|
11071
|
-
* @property {string}
|
|
11071
|
+
* @property {string} tokenAddress
|
|
11072
11072
|
* @property {BigNumber} limit
|
|
11073
11073
|
*/
|
|
11074
11074
|
type ERC20Gas = {
|
|
11075
11075
|
/** The type to indicate this is an ERC20 gas token. */
|
|
11076
11076
|
type: GasTokenType.ERC20;
|
|
11077
|
-
/** The
|
|
11078
|
-
|
|
11077
|
+
/** The token address of the ERC20. */
|
|
11078
|
+
tokenAddress: string;
|
|
11079
11079
|
/** The gas limit. */
|
|
11080
11080
|
limit: BigNumber;
|
|
11081
11081
|
};
|
|
@@ -11183,6 +11183,8 @@ type FundingRoute = {
|
|
|
11183
11183
|
* @property {TokenInfo | undefined} token
|
|
11184
11184
|
*/
|
|
11185
11185
|
type Fee = {
|
|
11186
|
+
/** The type of fee */
|
|
11187
|
+
type: FeeType;
|
|
11186
11188
|
/** The amount of the fee */
|
|
11187
11189
|
amount: BigNumber;
|
|
11188
11190
|
/** The formatted amount of the fee */
|
|
@@ -11190,6 +11192,20 @@ type Fee = {
|
|
|
11190
11192
|
/** The token info for the fee */
|
|
11191
11193
|
token?: TokenInfo;
|
|
11192
11194
|
};
|
|
11195
|
+
/**
|
|
11196
|
+
* An enum representing the funding step types
|
|
11197
|
+
* @enum {string}
|
|
11198
|
+
* @property {string} GAS - If the fee is a gas fee.
|
|
11199
|
+
* @property {string} BRIDGE_FEE - If the fee is a bridge fee.
|
|
11200
|
+
* @property {string} SWAP_FEE - If the fee is a swap fee.
|
|
11201
|
+
* @property {string} IMMUTABLE_FEE - If the fee is an immutable fee.
|
|
11202
|
+
*/
|
|
11203
|
+
declare enum FeeType {
|
|
11204
|
+
GAS = "GAS",
|
|
11205
|
+
BRIDGE_FEE = "BRIDGE_FEE",
|
|
11206
|
+
SWAP_FEE = "SWAP_FEE",
|
|
11207
|
+
IMMUTABLE_FEE = "IMMUTABLE_FEE"
|
|
11208
|
+
}
|
|
11193
11209
|
type FundingStep = BridgeFundingStep | SwapFundingStep | OnRampFundingStep;
|
|
11194
11210
|
/**
|
|
11195
11211
|
* Represents a bridge funding route
|
|
@@ -11210,15 +11226,15 @@ type BridgeFundingStep = {
|
|
|
11210
11226
|
};
|
|
11211
11227
|
/**
|
|
11212
11228
|
* Represents the fees for a bridge funding step
|
|
11213
|
-
* @property {Fee}
|
|
11214
|
-
* @property {Fee}
|
|
11229
|
+
* @property {Fee} approvalGasFee
|
|
11230
|
+
* @property {Fee} bridgeGasFee
|
|
11215
11231
|
* @property {Fee[]} bridgeFees
|
|
11216
11232
|
*/
|
|
11217
11233
|
type BridgeFees = {
|
|
11218
|
-
/** The approval gas
|
|
11219
|
-
|
|
11220
|
-
/** The bridge gas
|
|
11221
|
-
|
|
11234
|
+
/** The approval gas fee for the bridge */
|
|
11235
|
+
approvalGasFee: Fee;
|
|
11236
|
+
/** The bridge gas fee for the bridge */
|
|
11237
|
+
bridgeGasFee: Fee;
|
|
11222
11238
|
/** Additional bridge fees for the bridge */
|
|
11223
11239
|
bridgeFees: Fee[];
|
|
11224
11240
|
};
|
|
@@ -11241,15 +11257,15 @@ type SwapFundingStep = {
|
|
|
11241
11257
|
};
|
|
11242
11258
|
/**
|
|
11243
11259
|
* Represents the fees for a swap funding step
|
|
11244
|
-
* @property {Fee}
|
|
11245
|
-
* @property {Fee}
|
|
11260
|
+
* @property {Fee} approvalGasFee
|
|
11261
|
+
* @property {Fee} swapGasFee
|
|
11246
11262
|
* @property {Fee[]} swapFees
|
|
11247
11263
|
*/
|
|
11248
11264
|
type SwapFees = {
|
|
11249
|
-
/** The approval gas
|
|
11250
|
-
|
|
11251
|
-
/** The swap gas
|
|
11252
|
-
|
|
11265
|
+
/** The approval gas fee for the swap */
|
|
11266
|
+
approvalGasFee: Fee;
|
|
11267
|
+
/** The swap gas fee for the swap */
|
|
11268
|
+
swapGasFee: Fee;
|
|
11253
11269
|
/** Additional swap fees for the swap */
|
|
11254
11270
|
swapFees: Fee[];
|
|
11255
11271
|
};
|
|
@@ -11618,10 +11634,10 @@ type ImxAddressConfig = {
|
|
|
11618
11634
|
};
|
|
11619
11635
|
/**
|
|
11620
11636
|
* A type representing the telemetry configurations.
|
|
11621
|
-
* @property {string}
|
|
11637
|
+
* @property {string} segmentPublishableKey
|
|
11622
11638
|
*/
|
|
11623
11639
|
type TelemetryConfig = {
|
|
11624
|
-
|
|
11640
|
+
segmentPublishableKey: string;
|
|
11625
11641
|
};
|
|
11626
11642
|
/**
|
|
11627
11643
|
* A type representing the required information to estimate gas for a transaction.
|
|
@@ -13028,4 +13044,4 @@ type ErrorType = {
|
|
|
13028
13044
|
};
|
|
13029
13045
|
};
|
|
13030
13046
|
|
|
13031
|
-
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, 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, 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, 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, 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, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
|
|
13047
|
+
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, 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, 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, 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, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
|