@imtbl/sdk 0.15.1-alpha → 0.16.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.
@@ -10925,6 +10925,7 @@ declare class Passport {
10925
10925
  getUserInfoDeviceFlow(): Promise<UserProfile | undefined>;
10926
10926
  getIdToken(): Promise<string | undefined>;
10927
10927
  getAccessToken(): Promise<string | undefined>;
10928
+ getLinkedAddresses(): Promise<string[]>;
10928
10929
  }
10929
10930
 
10930
10931
  /**
@@ -11213,6 +11214,15 @@ type GasEstimateSwapTokenConfig = {
11213
11214
  inAddress: string;
11214
11215
  outAddress: string;
11215
11216
  };
11217
+ /**
11218
+ * A type representing all the feature flags available.
11219
+ * @property {TokenInfo[] | undefined} allowed - List of allowed tokens for a given chain.
11220
+ * @property {boolean | undefined} blockscout - Feature flag to enable/disable blockscout integration.
11221
+ */
11222
+ type ChainTokensConfig = {
11223
+ allowed?: TokenInfo[];
11224
+ blockscout?: boolean;
11225
+ };
11216
11226
  /**
11217
11227
  * Represents information about a network.
11218
11228
  * @interface NetworkInfo
@@ -11523,6 +11533,7 @@ declare enum CheckoutErrorType {
11523
11533
  DEFAULT_PROVIDER_ERROR = "DEFAULT_PROVIDER_ERROR",
11524
11534
  CONNECT_PROVIDER_ERROR = "CONNECT_PROVIDER_ERROR",
11525
11535
  GET_BALANCE_ERROR = "GET_BALANCE_ERROR",
11536
+ GET_INDEXER_BALANCE_ERROR = "GET_INDEXER_BALANCE_ERROR",
11526
11537
  GET_ERC20_BALANCE_ERROR = "GET_ERC20_BALANCE_ERROR",
11527
11538
  GET_ERC721_BALANCE_ERROR = "GET_ERC721_BALANCE_ERROR",
11528
11539
  GET_NETWORK_INFO_ERROR = "GET_NETWORK_INFO_ERROR",
@@ -11538,6 +11549,7 @@ declare enum CheckoutErrorType {
11538
11549
  UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
11539
11550
  UNSUPPORTED_BALANCE_REQUIREMENT_ERROR = "UNSUPPORTED_BALANCE_REQUIREMENT_ERROR",
11540
11551
  GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR",
11552
+ PREPARE_ORDER_LISTING_ERROR = "PREPARE_ORDER_LISTING_ERROR",
11541
11553
  SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED",
11542
11554
  GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR",
11543
11555
  GET_ERC721_ALLOWANCE_ERROR = "GET_ERC721_ALLOWANCE_ERROR"
@@ -11562,7 +11574,7 @@ type RemoteConfigParams = {
11562
11574
  declare class RemoteConfigFetcher {
11563
11575
  constructor(params: RemoteConfigParams);
11564
11576
  getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;
11565
- getTokens(chainId: ChainId): Promise<TokenInfo[]>;
11577
+ getTokensConfig(chainId: ChainId): Promise<ChainTokensConfig>;
11566
11578
  }
11567
11579
  declare class CheckoutConfiguration {
11568
11580
  readonly isDevelopment: boolean;
@@ -11572,6 +11584,44 @@ declare class CheckoutConfiguration {
11572
11584
  readonly networkMap: NetworkMap;
11573
11585
  constructor(config: CheckoutModuleConfiguration);
11574
11586
  }
11587
+ /**
11588
+ * Interface representing the parameters for {@link Checkout.sell}
11589
+ * @property {Web3Provider} provider - The provider to use for the sell.
11590
+ * @property {string} id - The ERC721 ID.
11591
+ * @property {string} collectionAddress - The contract address of the ERC721s collection.
11592
+ * @property {BuyToken} buyToken - The token to buy the item with.
11593
+ */
11594
+ interface SellParams {
11595
+ provider: Web3Provider;
11596
+ id: string;
11597
+ collectionAddress: string;
11598
+ buyToken: BuyToken;
11599
+ }
11600
+ /**
11601
+ * Represents the token that the item can be bought with once listed for sale.
11602
+ * NativeBuyToken or ERC20BuyToken {@link Checkout.smartCheckout}.
11603
+ */
11604
+ type BuyToken = NativeBuyToken | ERC20BuyToken;
11605
+ /**
11606
+ * Represents a native buy token
11607
+ * @property {ItemType} type - The type indicate this is a native token.
11608
+ * @property {BigNumber} amount - The amount of native token.
11609
+ */
11610
+ type NativeBuyToken = {
11611
+ type: ItemType.NATIVE;
11612
+ amount: BigNumber;
11613
+ };
11614
+ /**
11615
+ * Represents a ERC20 buy token
11616
+ * @property {ItemType} type - The type indicate this is a ERC20 token.
11617
+ * @property {BigNumber} amount - The amount of native token.
11618
+ * @property {string} contractAddress - The contract address of the ERC20.
11619
+ */
11620
+ type ERC20BuyToken = {
11621
+ type: ItemType.ERC20;
11622
+ amount: BigNumber;
11623
+ contractAddress: string;
11624
+ };
11575
11625
  declare class Checkout {
11576
11626
  readonly config: CheckoutConfiguration;
11577
11627
  /**
@@ -11651,6 +11701,11 @@ declare class Checkout {
11651
11701
  * @param {BuyParams} params - The parameters for the buy.
11652
11702
  */
11653
11703
  buy(params: BuyParams): Promise<void>;
11704
+ /**
11705
+ * Determines the requirements for performing a sell.
11706
+ * @param {SellParams} params - The parameters for the sell.
11707
+ */
11708
+ sell(params: SellParams): Promise<void>;
11654
11709
  /**
11655
11710
  * Determines the transaction requirements to complete a purchase.
11656
11711
  * @params {SmartCheckoutParams} params - The parameters for smart checkout.