@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/index.d.ts
CHANGED
|
@@ -16574,12 +16574,12 @@ declare enum ChainId {
|
|
|
16574
16574
|
}
|
|
16575
16575
|
/**
|
|
16576
16576
|
* Enum representing different chain names.
|
|
16577
|
-
* @enum {
|
|
16578
|
-
* @property {
|
|
16579
|
-
* @property {
|
|
16580
|
-
* @property {
|
|
16581
|
-
* @property {
|
|
16582
|
-
* @property {
|
|
16577
|
+
* @enum {string}
|
|
16578
|
+
* @property {string} IMTBL_ZKEVM_MAINNET - The chain name for IMTBL ZKEVM Mainnet.
|
|
16579
|
+
* @property {string} IMTBL_ZKEVM_TESTNET - The chain name for IMTBL ZKEVM Testnet.
|
|
16580
|
+
* @property {string} IMTBL_ZKEVM_DEVNET - The chain name for IMTBL ZKEVM Devnet.
|
|
16581
|
+
* @property {string} ETHEREUM - The chain name for Ethereum.
|
|
16582
|
+
* @property {string} SEPOLIA - The chain name for Sepolia.
|
|
16583
16583
|
*/
|
|
16584
16584
|
declare enum ChainName {
|
|
16585
16585
|
ETHEREUM = "Ethereum",
|
|
@@ -16588,6 +16588,22 @@ declare enum ChainName {
|
|
|
16588
16588
|
IMTBL_ZKEVM_DEVNET = "Immutable zkEVM Dev",
|
|
16589
16589
|
IMTBL_ZKEVM_MAINNET = "Immutable zkEVM"
|
|
16590
16590
|
}
|
|
16591
|
+
/**
|
|
16592
|
+
* Enum representing different chain slugs.
|
|
16593
|
+
* @enum {string}
|
|
16594
|
+
* @property {string} IMTBL_ZKEVM_MAINNET - The chain slug for IMTBL ZKEVM Mainnet.
|
|
16595
|
+
* @property {string} IMTBL_ZKEVM_TESTNET - The chain slug for IMTBL ZKEVM Testnet.
|
|
16596
|
+
* @property {string} IMTBL_ZKEVM_DEVNET - The chain slug for IMTBL ZKEVM Devnet.
|
|
16597
|
+
* @property {string} ETHEREUM - The chain slug for Ethereum.
|
|
16598
|
+
* @property {string} SEPOLIA - The chain slug for Sepolia.
|
|
16599
|
+
*/
|
|
16600
|
+
declare enum ChainSlug {
|
|
16601
|
+
ETHEREUM = "ethereum",
|
|
16602
|
+
SEPOLIA = "sepolia",
|
|
16603
|
+
IMTBL_ZKEVM_MAINNET = "imtbl-zkevm-mainnet",
|
|
16604
|
+
IMTBL_ZKEVM_TESTNET = "imtbl-zkevm-testnet",
|
|
16605
|
+
IMTBL_ZKEVM_DEVNET = "imtbl-zkevm-devnet"
|
|
16606
|
+
}
|
|
16591
16607
|
|
|
16592
16608
|
/**
|
|
16593
16609
|
* Represents information about a token.
|
|
@@ -16605,6 +16621,15 @@ interface TokenInfo {
|
|
|
16605
16621
|
address?: string;
|
|
16606
16622
|
icon?: string;
|
|
16607
16623
|
}
|
|
16624
|
+
/**
|
|
16625
|
+
* Interface representing the parameters for {@link Checkout.getTokenInfo}.
|
|
16626
|
+
* @property {Web3Provider | JsonRpcProvider} provider - The provider used to get the balance.
|
|
16627
|
+
* @property {string} tokenAddress - The contract address of the token.
|
|
16628
|
+
*/
|
|
16629
|
+
interface GetTokenInfoParams {
|
|
16630
|
+
provider: Web3Provider | JsonRpcProvider;
|
|
16631
|
+
tokenAddress: string;
|
|
16632
|
+
}
|
|
16608
16633
|
|
|
16609
16634
|
/**
|
|
16610
16635
|
* Interface representing the parameters for {@link Checkout.getBalance}.
|
|
@@ -17433,6 +17458,7 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
|
|
|
17433
17458
|
* @property {AllowedNetworkConfig[]} allowedNetworks
|
|
17434
17459
|
* @property {GasEstimateTokenConfig | undefined} gasEstimateTokens
|
|
17435
17460
|
* @property {ImxAddressConfig | undefined} imxAddressMapping
|
|
17461
|
+
* @property {TelemetryConfig | undefined} telemetry
|
|
17436
17462
|
*/
|
|
17437
17463
|
type RemoteConfiguration = {
|
|
17438
17464
|
/** The config used for the DEX. */
|
|
@@ -17447,6 +17473,8 @@ type RemoteConfiguration = {
|
|
|
17447
17473
|
gasEstimateTokens?: GasEstimateTokenConfig;
|
|
17448
17474
|
/** The IMX address mappings across available networks. */
|
|
17449
17475
|
imxAddressMapping?: ImxAddressConfig;
|
|
17476
|
+
/** Telemetry config. */
|
|
17477
|
+
telemetry?: TelemetryConfig;
|
|
17450
17478
|
};
|
|
17451
17479
|
/**
|
|
17452
17480
|
* A type representing the fee structure for an OnRamp provider
|
|
@@ -17518,6 +17546,13 @@ type AllowedNetworkConfig = {
|
|
|
17518
17546
|
type ImxAddressConfig = {
|
|
17519
17547
|
[chainId: string]: string;
|
|
17520
17548
|
};
|
|
17549
|
+
/**
|
|
17550
|
+
* A type representing the telemetry configurations.
|
|
17551
|
+
* @property {string} segmentPublishableKey
|
|
17552
|
+
*/
|
|
17553
|
+
type TelemetryConfig = {
|
|
17554
|
+
segmentPublishableKey: string;
|
|
17555
|
+
};
|
|
17521
17556
|
/**
|
|
17522
17557
|
* A type representing the required information to estimate gas for a transaction.
|
|
17523
17558
|
* @type {{ [key: string]: { bridgeToL2Addresses?: GasEstimateBridgeToL2TokenConfig, swapAddresses?: GasEstimateSwapTokenConfig } }}
|
|
@@ -18686,6 +18721,13 @@ declare class Checkout {
|
|
|
18686
18721
|
* @returns {Promise<SwitchNetworkResult>} - A promise that resolves to the result of switching the network.
|
|
18687
18722
|
*/
|
|
18688
18723
|
switchNetwork(params: SwitchNetworkParams): Promise<SwitchNetworkResult>;
|
|
18724
|
+
/**
|
|
18725
|
+
* Retrieves the token information given the token address. This function makes RPC calls to
|
|
18726
|
+
* ERC20 contracts to fetch the main contract information (e.g. symbol).
|
|
18727
|
+
* @param {GetTokenInfoParams} params - The parameters for retrieving the token information.
|
|
18728
|
+
* @returns {Promise<TokenInfo>} - A promise that resolves to the token info request.
|
|
18729
|
+
*/
|
|
18730
|
+
getTokenInfo(params: GetTokenInfoParams): Promise<TokenInfo>;
|
|
18689
18731
|
/**
|
|
18690
18732
|
* Retrieves the balance of a wallet address.
|
|
18691
18733
|
* @param {GetBalanceParams} params - The parameters for retrieving the balance.
|
|
@@ -18866,6 +18908,7 @@ declare enum CheckoutErrorType {
|
|
|
18866
18908
|
CONNECT_PROVIDER_ERROR = "CONNECT_PROVIDER_ERROR",
|
|
18867
18909
|
GET_BALANCE_ERROR = "GET_BALANCE_ERROR",
|
|
18868
18910
|
GET_INDEXER_BALANCE_ERROR = "GET_INDEXER_BALANCE_ERROR",
|
|
18911
|
+
GET_ERC20_INFO_ERROR = "GET_ERC20_INFO_ERROR",
|
|
18869
18912
|
GET_ERC20_BALANCE_ERROR = "GET_ERC20_BALANCE_ERROR",
|
|
18870
18913
|
GET_ERC721_BALANCE_ERROR = "GET_ERC721_BALANCE_ERROR",
|
|
18871
18914
|
GET_NETWORK_INFO_ERROR = "GET_NETWORK_INFO_ERROR",
|
|
@@ -18940,6 +18983,8 @@ type checkout_d_ChainId = ChainId;
|
|
|
18940
18983
|
declare const checkout_d_ChainId: typeof ChainId;
|
|
18941
18984
|
type checkout_d_ChainName = ChainName;
|
|
18942
18985
|
declare const checkout_d_ChainName: typeof ChainName;
|
|
18986
|
+
type checkout_d_ChainSlug = ChainSlug;
|
|
18987
|
+
declare const checkout_d_ChainSlug: typeof ChainSlug;
|
|
18943
18988
|
type checkout_d_CheckConnectionParams = CheckConnectionParams;
|
|
18944
18989
|
type checkout_d_CheckConnectionResult = CheckConnectionResult;
|
|
18945
18990
|
type checkout_d_Checkout = Checkout;
|
|
@@ -19003,6 +19048,7 @@ type checkout_d_GetNetworkAllowListResult = GetNetworkAllowListResult;
|
|
|
19003
19048
|
type checkout_d_GetNetworkParams = GetNetworkParams;
|
|
19004
19049
|
type checkout_d_GetTokenAllowListParams = GetTokenAllowListParams;
|
|
19005
19050
|
type checkout_d_GetTokenAllowListResult = GetTokenAllowListResult;
|
|
19051
|
+
type checkout_d_GetTokenInfoParams = GetTokenInfoParams;
|
|
19006
19052
|
type checkout_d_GetWalletAllowListParams = GetWalletAllowListParams;
|
|
19007
19053
|
type checkout_d_GetWalletAllowListResult = GetWalletAllowListResult;
|
|
19008
19054
|
declare const checkout_d_IMMUTABLE_API_BASE_URL: typeof IMMUTABLE_API_BASE_URL;
|
|
@@ -19136,6 +19182,7 @@ declare namespace checkout_d {
|
|
|
19136
19182
|
checkout_d_CancelResultSuccess as CancelResultSuccess,
|
|
19137
19183
|
checkout_d_ChainId as ChainId,
|
|
19138
19184
|
checkout_d_ChainName as ChainName,
|
|
19185
|
+
checkout_d_ChainSlug as ChainSlug,
|
|
19139
19186
|
checkout_d_CheckConnectionParams as CheckConnectionParams,
|
|
19140
19187
|
checkout_d_CheckConnectionResult as CheckConnectionResult,
|
|
19141
19188
|
checkout_d_Checkout as Checkout,
|
|
@@ -19189,6 +19236,7 @@ declare namespace checkout_d {
|
|
|
19189
19236
|
checkout_d_GetNetworkParams as GetNetworkParams,
|
|
19190
19237
|
checkout_d_GetTokenAllowListParams as GetTokenAllowListParams,
|
|
19191
19238
|
checkout_d_GetTokenAllowListResult as GetTokenAllowListResult,
|
|
19239
|
+
checkout_d_GetTokenInfoParams as GetTokenInfoParams,
|
|
19192
19240
|
checkout_d_GetWalletAllowListParams as GetWalletAllowListParams,
|
|
19193
19241
|
checkout_d_GetWalletAllowListResult as GetWalletAllowListResult,
|
|
19194
19242
|
checkout_d_IMMUTABLE_API_BASE_URL as IMMUTABLE_API_BASE_URL,
|