@imtbl/sdk 0.1.10-alpha.4 → 0.2.1-alpha
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.js +2 -2
- package/dist/checkout_sdk.js +76 -74
- package/dist/checkout_widgets.d.ts +4 -4
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.cjs +308 -134
- package/dist/index.d.ts +30 -8
- package/dist/index.js +308 -134
- package/dist/orderbook.d.ts +3 -3
- package/dist/orderbook.js +16 -54
- package/dist/passport.d.ts +23 -1
- package/dist/passport.js +215 -4
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="global.d.ts" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { BlockchainDataConfiguration, BlockchainDataModuleConfiguration as BlockchainDataModuleConfiguration$1, ProviderConfiguration as ProviderConfiguration$1, ExchangeContracts } from 'config';
|
|
4
|
-
import { OrderbookOverrides } from 'config/config';
|
|
4
|
+
import { OrderbookOverrides, OrderbookModuleConfiguration } from 'config/config';
|
|
5
5
|
import { ListingResult, ListListingsResult } from 'openapi/sdk';
|
|
6
6
|
import { ListListingsParams, PrepareListingParams, PrepareListingResponse, CreateListingParams, FulfillOrderResponse, CancelOrderResponse as CancelOrderResponse$1 } from 'types';
|
|
7
7
|
|
|
@@ -12758,6 +12758,19 @@ interface PassportOverrides {
|
|
|
12758
12758
|
}
|
|
12759
12759
|
interface PassportModuleConfiguration extends ModuleConfiguration<PassportOverrides>, OidcConfiguration {
|
|
12760
12760
|
}
|
|
12761
|
+
type DeviceConnectResponse = {
|
|
12762
|
+
code: string;
|
|
12763
|
+
deviceCode: string;
|
|
12764
|
+
url: string;
|
|
12765
|
+
interval: number;
|
|
12766
|
+
};
|
|
12767
|
+
type DeviceTokenResponse = {
|
|
12768
|
+
access_token: string;
|
|
12769
|
+
refresh_token?: string;
|
|
12770
|
+
id_token: string;
|
|
12771
|
+
token_type: string;
|
|
12772
|
+
expires_in: number;
|
|
12773
|
+
};
|
|
12761
12774
|
|
|
12762
12775
|
declare class Passport {
|
|
12763
12776
|
private readonly authManager;
|
|
@@ -12769,9 +12782,18 @@ declare class Passport {
|
|
|
12769
12782
|
constructor(passportModuleConfiguration: PassportModuleConfiguration);
|
|
12770
12783
|
connectImxSilent(): Promise<IMXProvider | null>;
|
|
12771
12784
|
connectImx(): Promise<IMXProvider>;
|
|
12785
|
+
loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
|
|
12786
|
+
connectImxDeviceFlow(deviceCode: string, interval: number, timeoutMs?: number): Promise<IMXProvider | null>;
|
|
12787
|
+
/**
|
|
12788
|
+
* @returns {boolean} the stored device flow credentials if they exist
|
|
12789
|
+
*/
|
|
12790
|
+
checkStoredDeviceFlowCredentials(): DeviceTokenResponse | null;
|
|
12791
|
+
connectImxWithCredentials(tokenResponse: DeviceTokenResponse): Promise<IMXProvider | null>;
|
|
12772
12792
|
loginCallback(): Promise<void>;
|
|
12773
12793
|
logout(): Promise<void>;
|
|
12794
|
+
logoutDeviceFlow(): Promise<void>;
|
|
12774
12795
|
getUserInfo(): Promise<UserProfile | undefined>;
|
|
12796
|
+
getUserInfoDeviceFlow(): Promise<UserProfile | undefined>;
|
|
12775
12797
|
getIdToken(): Promise<string | undefined>;
|
|
12776
12798
|
getAccessToken(): Promise<string | undefined>;
|
|
12777
12799
|
}
|
|
@@ -12782,10 +12804,10 @@ declare class Passport {
|
|
|
12782
12804
|
* @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
|
|
12783
12805
|
*/
|
|
12784
12806
|
declare class Orderbook {
|
|
12785
|
-
private config;
|
|
12786
12807
|
private apiClient;
|
|
12787
12808
|
private seaport;
|
|
12788
|
-
|
|
12809
|
+
private orderbookConfig;
|
|
12810
|
+
constructor(config: ModuleConfiguration<OrderbookOverrides>, localConfig?: OrderbookModuleConfiguration);
|
|
12789
12811
|
/**
|
|
12790
12812
|
* Get an order by ID
|
|
12791
12813
|
* @param {string} listingId - The listingId to find.
|
|
@@ -28181,8 +28203,8 @@ interface ImtblWalletProps extends React.DetailedHTMLProps<React.HTMLAttributes<
|
|
|
28181
28203
|
* @property {string | undefined} walletProvider - The preferred wallet provider to connect to.
|
|
28182
28204
|
* @property {string | undefined} widgetConfig - The configuration for the swap widget.
|
|
28183
28205
|
* @property {string | undefined} amount - The amount to swap.
|
|
28184
|
-
* @property {string | undefined} fromContractAddress - The contract address of the source token.
|
|
28185
|
-
* @property {string | undefined} toContractAddress - The contract address of the destination token.
|
|
28206
|
+
* @property {string | undefined} fromContractAddress - The contract address of the source token. If the string is 'NATIVE' then the native token will be used.
|
|
28207
|
+
* @property {string | undefined} toContractAddress - The contract address of the destination token. If the string is 'NATIVE' then the native token will be used.
|
|
28186
28208
|
*/
|
|
28187
28209
|
interface ImtblSwapProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
28188
28210
|
walletProvider?: string;
|
|
@@ -28237,9 +28259,9 @@ declare function ConnectReact(): JSX.Element;
|
|
|
28237
28259
|
* @interface SwapReactProps
|
|
28238
28260
|
* @property {WalletProviderName | undefined} walletProvider - The name of the wallet provider.
|
|
28239
28261
|
* @property {Web3Provider | undefined} provider - The Web3 provider.
|
|
28240
|
-
* @property {string | undefined} fromContractAddress - The address of the contract swapping from.
|
|
28262
|
+
* @property {string | undefined} fromContractAddress - The address of the contract swapping from. If the string is 'NATIVE' then the native token is used.
|
|
28241
28263
|
* @property {string | undefined} amount - The amount.
|
|
28242
|
-
* @property {string | undefined} toContractAddress - The address of the contract swapping to.
|
|
28264
|
+
* @property {string | undefined} toContractAddress - The address of the contract swapping to. If the string is 'NATIVE' then the native token is used.
|
|
28243
28265
|
*/
|
|
28244
28266
|
interface SwapReactProps {
|
|
28245
28267
|
walletProvider?: WalletProviderName;
|
|
@@ -28494,4 +28516,4 @@ declare class ERC721PermissionedMintable {
|
|
|
28494
28516
|
}): Promise<PopulatedTransaction>;
|
|
28495
28517
|
}
|
|
28496
28518
|
|
|
28497
|
-
export { APIError, ActivityType, AllowedNetworkConfig, BlockchainData, BlockchainDataModuleConfiguration, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectReact, ConnectResult, ConnectionFailed, ConnectionSuccess, DexConfig, ERC20, ERC721PermissionedMintable, Environment, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GenericIMXProvider, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IMXProvider, ImmutableConfiguration, ImmutableXClient, ImtblBridgeProps, ImtblConnectProps, ImtblSwapProps, ImtblWalletProps, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, MetaMaskIMXProvider, ModuleConfiguration, NetworkFilter, NetworkFilterTypes, NetworkInfo, Networks, OrchestrationEventType, Orderbook, Passport, PassportError, PassportModuleConfiguration, PassportOverrides, ProviderConfiguration, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, SemanticVersion, SendTransactionParams, SendTransactionResult, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapRejected, SwapSuccess, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, UpdateConfig, UserProfile, WalletDisconnectWalletEvent, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitchEvent, WalletProviderName, WalletReact, WalletReactProps, WidgetEvent, WidgetTheme, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey, module };
|
|
28519
|
+
export { APIError, ActivityType, AllowedNetworkConfig, BlockchainData, BlockchainDataModuleConfiguration, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectReact, ConnectResult, ConnectionFailed, ConnectionSuccess, DeviceConnectResponse, DeviceTokenResponse, DexConfig, ERC20, ERC721PermissionedMintable, Environment, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GenericIMXProvider, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IMXProvider, ImmutableConfiguration, ImmutableXClient, ImtblBridgeProps, ImtblConnectProps, ImtblSwapProps, ImtblWalletProps, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, MetaMaskIMXProvider, ModuleConfiguration, NetworkFilter, NetworkFilterTypes, NetworkInfo, Networks, OrchestrationEventType, Orderbook, Passport, PassportError, PassportModuleConfiguration, PassportOverrides, ProviderConfiguration, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, SemanticVersion, SendTransactionParams, SendTransactionResult, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapRejected, SwapSuccess, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, UpdateConfig, UserProfile, WalletDisconnectWalletEvent, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitchEvent, WalletProviderName, WalletReact, WalletReactProps, WidgetEvent, WidgetTheme, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey, module };
|