@imtbl/sdk 0.36.3 → 0.36.5
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 +58 -58
- package/dist/checkout.d.ts +50 -7
- package/dist/checkout.js +433 -159
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +10 -10
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +435 -160
- package/dist/index.d.ts +54 -6
- package/dist/index.js +435 -160
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/checkout.d.ts
CHANGED
|
@@ -10644,12 +10644,12 @@ declare enum ChainId {
|
|
|
10644
10644
|
}
|
|
10645
10645
|
/**
|
|
10646
10646
|
* Enum representing different chain names.
|
|
10647
|
-
* @enum {
|
|
10648
|
-
* @property {
|
|
10649
|
-
* @property {
|
|
10650
|
-
* @property {
|
|
10651
|
-
* @property {
|
|
10652
|
-
* @property {
|
|
10647
|
+
* @enum {string}
|
|
10648
|
+
* @property {string} IMTBL_ZKEVM_MAINNET - The chain name for IMTBL ZKEVM Mainnet.
|
|
10649
|
+
* @property {string} IMTBL_ZKEVM_TESTNET - The chain name for IMTBL ZKEVM Testnet.
|
|
10650
|
+
* @property {string} IMTBL_ZKEVM_DEVNET - The chain name for IMTBL ZKEVM Devnet.
|
|
10651
|
+
* @property {string} ETHEREUM - The chain name for Ethereum.
|
|
10652
|
+
* @property {string} SEPOLIA - The chain name for Sepolia.
|
|
10653
10653
|
*/
|
|
10654
10654
|
declare enum ChainName {
|
|
10655
10655
|
ETHEREUM = "Ethereum",
|
|
@@ -10658,6 +10658,22 @@ declare enum ChainName {
|
|
|
10658
10658
|
IMTBL_ZKEVM_DEVNET = "Immutable zkEVM Dev",
|
|
10659
10659
|
IMTBL_ZKEVM_MAINNET = "Immutable zkEVM"
|
|
10660
10660
|
}
|
|
10661
|
+
/**
|
|
10662
|
+
* Enum representing different chain slugs.
|
|
10663
|
+
* @enum {string}
|
|
10664
|
+
* @property {string} IMTBL_ZKEVM_MAINNET - The chain slug for IMTBL ZKEVM Mainnet.
|
|
10665
|
+
* @property {string} IMTBL_ZKEVM_TESTNET - The chain slug for IMTBL ZKEVM Testnet.
|
|
10666
|
+
* @property {string} IMTBL_ZKEVM_DEVNET - The chain slug for IMTBL ZKEVM Devnet.
|
|
10667
|
+
* @property {string} ETHEREUM - The chain slug for Ethereum.
|
|
10668
|
+
* @property {string} SEPOLIA - The chain slug for Sepolia.
|
|
10669
|
+
*/
|
|
10670
|
+
declare enum ChainSlug {
|
|
10671
|
+
ETHEREUM = "ethereum",
|
|
10672
|
+
SEPOLIA = "sepolia",
|
|
10673
|
+
IMTBL_ZKEVM_MAINNET = "imtbl-zkevm-mainnet",
|
|
10674
|
+
IMTBL_ZKEVM_TESTNET = "imtbl-zkevm-testnet",
|
|
10675
|
+
IMTBL_ZKEVM_DEVNET = "imtbl-zkevm-devnet"
|
|
10676
|
+
}
|
|
10661
10677
|
|
|
10662
10678
|
/**
|
|
10663
10679
|
* Represents information about a token.
|
|
@@ -10675,6 +10691,15 @@ interface TokenInfo {
|
|
|
10675
10691
|
address?: string;
|
|
10676
10692
|
icon?: string;
|
|
10677
10693
|
}
|
|
10694
|
+
/**
|
|
10695
|
+
* Interface representing the parameters for {@link Checkout.getTokenInfo}.
|
|
10696
|
+
* @property {Web3Provider | JsonRpcProvider} provider - The provider used to get the balance.
|
|
10697
|
+
* @property {string} tokenAddress - The contract address of the token.
|
|
10698
|
+
*/
|
|
10699
|
+
interface GetTokenInfoParams {
|
|
10700
|
+
provider: Web3Provider | JsonRpcProvider;
|
|
10701
|
+
tokenAddress: string;
|
|
10702
|
+
}
|
|
10678
10703
|
|
|
10679
10704
|
/**
|
|
10680
10705
|
* Interface representing the parameters for {@link Checkout.getBalance}.
|
|
@@ -11503,6 +11528,7 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
|
|
|
11503
11528
|
* @property {AllowedNetworkConfig[]} allowedNetworks
|
|
11504
11529
|
* @property {GasEstimateTokenConfig | undefined} gasEstimateTokens
|
|
11505
11530
|
* @property {ImxAddressConfig | undefined} imxAddressMapping
|
|
11531
|
+
* @property {TelemetryConfig | undefined} telemetry
|
|
11506
11532
|
*/
|
|
11507
11533
|
type RemoteConfiguration = {
|
|
11508
11534
|
/** The config used for the DEX. */
|
|
@@ -11517,6 +11543,8 @@ type RemoteConfiguration = {
|
|
|
11517
11543
|
gasEstimateTokens?: GasEstimateTokenConfig;
|
|
11518
11544
|
/** The IMX address mappings across available networks. */
|
|
11519
11545
|
imxAddressMapping?: ImxAddressConfig;
|
|
11546
|
+
/** Telemetry config. */
|
|
11547
|
+
telemetry?: TelemetryConfig;
|
|
11520
11548
|
};
|
|
11521
11549
|
/**
|
|
11522
11550
|
* A type representing the fee structure for an OnRamp provider
|
|
@@ -11588,6 +11616,13 @@ type AllowedNetworkConfig = {
|
|
|
11588
11616
|
type ImxAddressConfig = {
|
|
11589
11617
|
[chainId: string]: string;
|
|
11590
11618
|
};
|
|
11619
|
+
/**
|
|
11620
|
+
* A type representing the telemetry configurations.
|
|
11621
|
+
* @property {string} segmentPublishableKey
|
|
11622
|
+
*/
|
|
11623
|
+
type TelemetryConfig = {
|
|
11624
|
+
segmentPublishableKey: string;
|
|
11625
|
+
};
|
|
11591
11626
|
/**
|
|
11592
11627
|
* A type representing the required information to estimate gas for a transaction.
|
|
11593
11628
|
* @type {{ [key: string]: { bridgeToL2Addresses?: GasEstimateBridgeToL2TokenConfig, swapAddresses?: GasEstimateSwapTokenConfig } }}
|
|
@@ -12756,6 +12791,13 @@ declare class Checkout {
|
|
|
12756
12791
|
* @returns {Promise<SwitchNetworkResult>} - A promise that resolves to the result of switching the network.
|
|
12757
12792
|
*/
|
|
12758
12793
|
switchNetwork(params: SwitchNetworkParams): Promise<SwitchNetworkResult>;
|
|
12794
|
+
/**
|
|
12795
|
+
* Retrieves the token information given the token address. This function makes RPC calls to
|
|
12796
|
+
* ERC20 contracts to fetch the main contract information (e.g. symbol).
|
|
12797
|
+
* @param {GetTokenInfoParams} params - The parameters for retrieving the token information.
|
|
12798
|
+
* @returns {Promise<TokenInfo>} - A promise that resolves to the token info request.
|
|
12799
|
+
*/
|
|
12800
|
+
getTokenInfo(params: GetTokenInfoParams): Promise<TokenInfo>;
|
|
12759
12801
|
/**
|
|
12760
12802
|
* Retrieves the balance of a wallet address.
|
|
12761
12803
|
* @param {GetBalanceParams} params - The parameters for retrieving the balance.
|
|
@@ -12936,6 +12978,7 @@ declare enum CheckoutErrorType {
|
|
|
12936
12978
|
CONNECT_PROVIDER_ERROR = "CONNECT_PROVIDER_ERROR",
|
|
12937
12979
|
GET_BALANCE_ERROR = "GET_BALANCE_ERROR",
|
|
12938
12980
|
GET_INDEXER_BALANCE_ERROR = "GET_INDEXER_BALANCE_ERROR",
|
|
12981
|
+
GET_ERC20_INFO_ERROR = "GET_ERC20_INFO_ERROR",
|
|
12939
12982
|
GET_ERC20_BALANCE_ERROR = "GET_ERC20_BALANCE_ERROR",
|
|
12940
12983
|
GET_ERC721_BALANCE_ERROR = "GET_ERC721_BALANCE_ERROR",
|
|
12941
12984
|
GET_NETWORK_INFO_ERROR = "GET_NETWORK_INFO_ERROR",
|
|
@@ -12985,4 +13028,4 @@ type ErrorType = {
|
|
|
12985
13028
|
};
|
|
12986
13029
|
};
|
|
12987
13030
|
|
|
12988
|
-
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, 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, 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 };
|
|
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 };
|