@imtbl/sdk 0.6.0-alpha → 0.7.0-alpha.1

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.
@@ -684,6 +684,15 @@ interface GetAllBalancesParams {
684
684
  interface GetAllBalancesResult {
685
685
  balances: GetBalanceResult[];
686
686
  }
687
+ /**
688
+ * Interface representing the parameters for {@link Checkout.buy}
689
+ * @property {Web3Provider} provider - The provider to use for the buy.
690
+ * @property {string} orderId - The order ID.
691
+ */
692
+ interface BuyParams {
693
+ provider: Web3Provider;
694
+ orderId: string;
695
+ }
687
696
  interface CheckoutOverrides {
688
697
  }
689
698
  interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverrides> {
@@ -965,7 +974,8 @@ interface SendTransactionResult {
965
974
  * Enum representing the names of different wallet providers.
966
975
  */
967
976
  declare enum WalletProviderName {
968
- METAMASK = "metamask"
977
+ METAMASK = "metamask",
978
+ PASSPORT = "passport"
969
979
  }
970
980
  /**
971
981
  * Interface for the parameters required to create a wallet provider {@link Checkout.createProvider}.
@@ -1064,7 +1074,9 @@ declare enum CheckoutErrorType {
1064
1074
  TRANSACTION_FAILED = "TRANSACTION_FAILED",
1065
1075
  INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
1066
1076
  UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT",
1067
- INVALID_GAS_ESTIMATE_TYPE = "INVALID_GAS_ESTIMATE_TYPE"
1077
+ INVALID_GAS_ESTIMATE_TYPE = "INVALID_GAS_ESTIMATE_TYPE",
1078
+ UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
1079
+ GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR"
1068
1080
  }
1069
1081
  /**
1070
1082
  * Represents an error object with a specific type, optional message, and optional data.
@@ -1090,7 +1102,6 @@ declare class RemoteConfigFetcher {
1090
1102
  }
1091
1103
  declare class CheckoutConfiguration {
1092
1104
  readonly isDevelopment: boolean;
1093
- readonly isLocal: boolean;
1094
1105
  readonly isProduction: boolean;
1095
1106
  readonly remote: RemoteConfigFetcher;
1096
1107
  readonly environment: Environment;
@@ -1171,6 +1182,11 @@ declare class Checkout {
1171
1182
  * @returns {Promise<NetworkInfo>} A promise that resolves to the network information.
1172
1183
  */
1173
1184
  getNetworkInfo(params: GetNetworkParams): Promise<NetworkInfo>;
1185
+ /**
1186
+ * Determines the requirements for performing a buy.
1187
+ * @param {BuyParams} params - The parameters for the buy.
1188
+ */
1189
+ buy(params: BuyParams): Promise<void>;
1174
1190
  /**
1175
1191
  * Checks if the given object is a Web3 provider.
1176
1192
  * @param {Web3Provider} web3Provider - The object to check.
@@ -1185,4 +1201,4 @@ declare class Checkout {
1185
1201
  gasEstimate(params: GasEstimateParams): Promise<GasEstimateSwapResult | GasEstimateBridgeToL2Result>;
1186
1202
  }
1187
1203
 
1188
- export { AllowedNetworkConfig, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, NetworkFilter, NetworkFilterTypes, NetworkInfo, RemoteConfiguration, SendTransactionParams, SendTransactionResult, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
1204
+ export { AllowedNetworkConfig, BuyParams, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, NetworkFilter, NetworkFilterTypes, NetworkInfo, RemoteConfiguration, SendTransactionParams, SendTransactionResult, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };