@imtbl/sdk 0.11.0-alpha → 0.12.0-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/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  import { BlockchainDataConfiguration, BlockchainDataModuleConfiguration as BlockchainDataModuleConfiguration$1, ProviderConfiguration as ProviderConfiguration$1, ExchangeContracts } from 'config';
4
4
  import { OrderbookOverrides, OrderbookModuleConfiguration } from 'config/config';
5
- import { ListingResult, ListListingsResult, OrdersService } from 'openapi/sdk';
5
+ import { ListingResult, ListListingsResult, Fee as Fee$1, OrdersService } from 'openapi/sdk';
6
6
  import { ListListingsParams as ListListingsParams$1, PrepareListingParams as PrepareListingParams$1, PrepareListingResponse as PrepareListingResponse$1, CreateListingParams as CreateListingParams$1, FulfillOrderResponse as FulfillOrderResponse$1, CancelOrderResponse as CancelOrderResponse$2 } from 'types';
7
7
 
8
8
  declare enum Environment {
@@ -12882,13 +12882,17 @@ interface PassportOverrides {
12882
12882
  imxPublicApiDomain: string;
12883
12883
  immutableXClient: ImmutableXClient;
12884
12884
  zkEvmRpcUrl: string;
12885
- zkEvmChainId: string;
12886
12885
  relayerUrl: string;
12887
12886
  indexerMrBasePath: string;
12888
12887
  orderBookMrBasePath: string;
12889
12888
  passportMrBasePath: string;
12890
12889
  }
12891
12890
  interface PassportModuleConfiguration extends ModuleConfiguration<PassportOverrides>, OidcConfiguration {
12891
+ /**
12892
+ * This flag indicates that Passport is being used in a cross-sdk bridge scenario
12893
+ * and not directly on the web.
12894
+ */
12895
+ crossSdkBridgeEnabled?: boolean;
12892
12896
  }
12893
12897
  type DeviceConnectResponse = {
12894
12898
  code: string;
@@ -12906,6 +12910,8 @@ type DeviceTokenResponse = {
12906
12910
 
12907
12911
  /**
12908
12912
  * ProviderErrors should take priority over RpcErrorCodes
12913
+ * https://eips.ethereum.org/EIPS/eip-1193#provider-errors
12914
+ * https://eips.ethereum.org/EIPS/eip-1474#error-codes
12909
12915
  */
12910
12916
  declare enum ProviderErrorCode {
12911
12917
  USER_REJECTED_REQUEST = 4001,
@@ -12920,7 +12926,7 @@ declare enum RpcErrorCode {
12920
12926
  INVALID_PARAMS = -32602,
12921
12927
  INTERNAL_ERROR = -32603,
12922
12928
  PARSE_ERROR = -32700,
12923
- USER_REJECTED_REQUEST = -32003
12929
+ TRANSACTION_REJECTED = -32003
12924
12930
  }
12925
12931
  declare class JsonRpcError extends Error {
12926
12932
  readonly message: string;
@@ -12964,8 +12970,9 @@ declare class Passport {
12964
12970
  private readonly confirmationScreen;
12965
12971
  private readonly immutableXClient;
12966
12972
  private readonly magicAdapter;
12967
- private readonly passportImxProviderFactory;
12968
12973
  private readonly multiRollupApiClients;
12974
+ private readonly passportImxProviderFactory;
12975
+ private readonly passportEventEmitter;
12969
12976
  constructor(passportModuleConfiguration: PassportModuleConfiguration);
12970
12977
  connectImxSilent(): Promise<IMXProvider | null>;
12971
12978
  connectImx(): Promise<IMXProvider>;
@@ -13065,8 +13072,8 @@ declare class Orderbook {
13065
13072
  /**
13066
13073
  * List orders. This method is used to get a list of orders filtered by conditions specified
13067
13074
  * in the params object.
13068
- * @param {ListOrderParams} listOrderParams - Filtering, ordering and page parameters.
13069
- * @return {Orders} The paged orders.
13075
+ * @param {ListListingsParams} listOrderParams - Filtering, ordering and page parameters.
13076
+ * @return {ListListingsResult} The paged orders.
13070
13077
  */
13071
13078
  listListings(listOrderParams: ListListingsParams$1): Promise<ListListingsResult>;
13072
13079
  /**
@@ -13092,7 +13099,7 @@ declare class Orderbook {
13092
13099
  * @param {string} fulfillerAddress - The address of the account fulfilling the order.
13093
13100
  * @return {FulfillOrderResponse} Approval and fulfilment transactions.
13094
13101
  */
13095
- fulfillOrder(listingId: string, takerAddress: string): Promise<FulfillOrderResponse$1>;
13102
+ fulfillOrder(listingId: string, takerAddress: string, takerFee?: Fee$1): Promise<FulfillOrderResponse$1>;
13096
13103
  /**
13097
13104
  * Get an unsigned cancel order transaction. Orders can only be cancelled by
13098
13105
  * the account that created them.
@@ -13187,6 +13194,7 @@ interface CreateListingParams {
13187
13194
  orderComponents: OrderComponents;
13188
13195
  orderHash: string;
13189
13196
  orderSignature: string;
13197
+ makerFee?: Fee$1;
13190
13198
  }
13191
13199
  type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
13192
13200
  declare enum TransactionPurpose {
@@ -13922,7 +13930,8 @@ declare enum CheckoutErrorType {
13922
13930
  INVALID_GAS_ESTIMATE_TYPE = "INVALID_GAS_ESTIMATE_TYPE",
13923
13931
  UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
13924
13932
  GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR",
13925
- SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED"
13933
+ SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED",
13934
+ GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR"
13926
13935
  }
13927
13936
  /**
13928
13937
  * Represents an error object with a specific type, optional message, and optional data.