@imtbl/sdk 1.19.2-alpha → 1.19.2-alpha.2

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.
Files changed (40) hide show
  1. package/dist/blockchain_data.js +2 -2
  2. package/dist/browser/checkout/{BridgeWidget-24521d11.js → BridgeWidget-e20aae24.js} +1 -1
  3. package/dist/browser/checkout/{HorizontalMenu-actual-6612c0c3.js → HorizontalMenu-actual-575774d2.js} +1 -1
  4. package/dist/browser/checkout/{OnRampWidget-d264f707.js → OnRampWidget-66f6516f.js} +1 -1
  5. package/dist/browser/checkout/SaleWidget-661a9733.js +2 -0
  6. package/dist/browser/checkout/{SpendingCapHero-0db6d7ed.js → SpendingCapHero-ef4695ef.js} +1 -1
  7. package/dist/browser/checkout/{SwapWidget-2c06420c.js → SwapWidget-6f35a346.js} +1 -1
  8. package/dist/browser/checkout/{TopUpView-d9658bbd.js → TopUpView-4c41c2ba.js} +1 -1
  9. package/dist/browser/checkout/{WalletWidget-43fb112d.js → WalletWidget-a098915f.js} +1 -1
  10. package/dist/browser/checkout/{auto-track-a398bcd2.js → auto-track-2347c952.js} +1 -1
  11. package/dist/browser/checkout/{balance-124a9c3c.js → balance-8eece366.js} +1 -1
  12. package/dist/browser/checkout/{index-384fe7dd.js → index-291e03a6.js} +1 -1
  13. package/dist/browser/checkout/{index-e22be227.js → index-36e30a03.js} +1 -1
  14. package/dist/browser/checkout/index-454df514.js +1 -0
  15. package/dist/browser/checkout/{index-6e2b798d.js → index-670cc439.js} +1 -1
  16. package/dist/browser/checkout/{index-dcf79a29.js → index-68b39d4d.js} +1 -1
  17. package/dist/browser/checkout/{index-5327f330.js → index-9a484e52.js} +1 -1
  18. package/dist/browser/checkout/{index-bc84abbd.js → index-a55bea1a.js} +1 -1
  19. package/dist/browser/checkout/{index-80d8482d.js → index-c9bcb679.js} +2 -2
  20. package/dist/browser/checkout/{index.umd-4fe7c784.js → index.umd-d7a104a3.js} +1 -1
  21. package/dist/browser/checkout/{retry-21d3107e.js → retry-90e79a4a.js} +1 -1
  22. package/dist/browser/checkout/sdk.js +4 -4
  23. package/dist/browser/checkout/widgets-esm.js +1 -1
  24. package/dist/browser/checkout/widgets.js +4 -4
  25. package/dist/checkout.d.ts +213 -573
  26. package/dist/checkout.js +4 -4
  27. package/dist/config.js +1 -1
  28. package/dist/index.browser.js +13 -13
  29. package/dist/index.browser.js.map +1 -1
  30. package/dist/index.cjs +51 -61
  31. package/dist/index.d.ts +1158 -1712
  32. package/dist/index.js +52 -62
  33. package/dist/orderbook.js +1 -1
  34. package/dist/passport.d.ts +478 -838
  35. package/dist/passport.js +4 -4
  36. package/dist/x.d.ts +103 -657
  37. package/dist/x.js +47 -58
  38. package/package.json +1 -1
  39. package/dist/browser/checkout/SaleWidget-82dbc082.js +0 -2
  40. package/dist/browser/checkout/index-9ed7d230.js +0 -1
package/dist/index.d.ts CHANGED
@@ -441,7 +441,7 @@ interface GenericFormData {
441
441
  * https://openapi-generator.tech
442
442
  * Do not edit the class manually.
443
443
  */
444
- interface ConfigurationParameters$2 {
444
+ interface ConfigurationParameters$1 {
445
445
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
446
446
  username?: string;
447
447
  password?: string;
@@ -450,7 +450,7 @@ interface ConfigurationParameters$2 {
450
450
  baseOptions?: any;
451
451
  formDataCtor?: new () => any;
452
452
  }
453
- declare class Configuration$2 {
453
+ declare class Configuration$1 {
454
454
  /**
455
455
  * parameter for apiKey security
456
456
  * @param name security name
@@ -500,7 +500,7 @@ declare class Configuration$2 {
500
500
  * @type {new () => FormData}
501
501
  */
502
502
  formDataCtor?: new () => any;
503
- constructor(param?: ConfigurationParameters$2);
503
+ constructor(param?: ConfigurationParameters$1);
504
504
  /**
505
505
  * Check if the given MIME is a JSON MIME.
506
506
  * JSON MIME examples:
@@ -534,8 +534,8 @@ declare class Configuration$2 {
534
534
  declare class BaseAPI {
535
535
  protected basePath: string;
536
536
  protected axios: AxiosInstance;
537
- protected configuration: Configuration$2 | undefined;
538
- constructor(configuration?: Configuration$2, basePath?: string, axios?: AxiosInstance);
537
+ protected configuration: Configuration$1 | undefined;
538
+ constructor(configuration?: Configuration$1, basePath?: string, axios?: AxiosInstance);
539
539
  }
540
540
 
541
541
  /**
@@ -2279,7 +2279,7 @@ interface CancelOrderRequest {
2279
2279
  * @export
2280
2280
  * @interface CancelOrderResponse
2281
2281
  */
2282
- interface CancelOrderResponse$2 {
2282
+ interface CancelOrderResponse$1 {
2283
2283
  /**
2284
2284
  * ID of the cancelled order
2285
2285
  * @type {number}
@@ -2680,7 +2680,7 @@ interface CreateMetadataRefreshResponse {
2680
2680
  * @export
2681
2681
  * @interface FeeEntry
2682
2682
  */
2683
- interface FeeEntry$1 {
2683
+ interface FeeEntry {
2684
2684
  /**
2685
2685
  *
2686
2686
  * @type {string}
@@ -2748,7 +2748,7 @@ interface CreateOrderRequestV3 {
2748
2748
  * @type {Array<FeeEntry>}
2749
2749
  * @memberof CreateOrderRequestV3
2750
2750
  */
2751
- 'fees'?: Array<FeeEntry$1>;
2751
+ 'fees'?: Array<FeeEntry>;
2752
2752
  /**
2753
2753
  * [DEPRECATED] Whether to include fees in order
2754
2754
  * @type {boolean}
@@ -2803,7 +2803,7 @@ interface CreateOrderRequestV3 {
2803
2803
  * @export
2804
2804
  * @interface CreateOrderResponse
2805
2805
  */
2806
- interface CreateOrderResponse$2 {
2806
+ interface CreateOrderResponse$1 {
2807
2807
  /**
2808
2808
  * ID of the created order
2809
2809
  * @type {number}
@@ -3584,7 +3584,7 @@ interface FeeInfo {
3584
3584
  * @export
3585
3585
  * @interface CreateTradeResponse
3586
3586
  */
3587
- interface CreateTradeResponse$2 {
3587
+ interface CreateTradeResponse$1 {
3588
3588
  /**
3589
3589
  * Request ID as a reference for an asynchronous trade creation request
3590
3590
  * @type {string}
@@ -3777,6 +3777,31 @@ interface CreateTransferRequestV1 {
3777
3777
  'stark_signature': string;
3778
3778
  }
3779
3779
 
3780
+ /**
3781
+ * Immutable X API
3782
+ * Immutable X API
3783
+ *
3784
+ * The version of the OpenAPI document: 3.0.0
3785
+ * Contact: support@immutable.com
3786
+ *
3787
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3788
+ * https://openapi-generator.tech
3789
+ * Do not edit the class manually.
3790
+ */
3791
+ /**
3792
+ *
3793
+ * @export
3794
+ * @interface CreateTransferResponse
3795
+ */
3796
+ interface CreateTransferResponse {
3797
+ /**
3798
+ * List of transfer IDs
3799
+ * @type {Array<number>}
3800
+ * @memberof CreateTransferResponse
3801
+ */
3802
+ 'transfer_ids': Array<number>;
3803
+ }
3804
+
3780
3805
  /**
3781
3806
  * Immutable X API
3782
3807
  * Immutable X API
@@ -3793,7 +3818,7 @@ interface CreateTransferRequestV1 {
3793
3818
  * @export
3794
3819
  * @interface CreateTransferResponseV1
3795
3820
  */
3796
- interface CreateTransferResponseV1$2 {
3821
+ interface CreateTransferResponseV1$1 {
3797
3822
  /**
3798
3823
  * [deprecated] Sent signature
3799
3824
  * @type {string}
@@ -3989,7 +4014,7 @@ interface CreateWithdrawalRequestV2 {
3989
4014
  * @export
3990
4015
  * @interface CreateWithdrawalResponse
3991
4016
  */
3992
- interface CreateWithdrawalResponse$1 {
4017
+ interface CreateWithdrawalResponse {
3993
4018
  /**
3994
4019
  * Status of the withdrawal
3995
4020
  * @type {string}
@@ -5081,7 +5106,7 @@ interface Project {
5081
5106
  * @export
5082
5107
  * @interface GetSignableCancelOrderRequest
5083
5108
  */
5084
- interface GetSignableCancelOrderRequest$2 {
5109
+ interface GetSignableCancelOrderRequest$1 {
5085
5110
  /**
5086
5111
  * ID of the order to be cancelled
5087
5112
  * @type {number}
@@ -5355,7 +5380,7 @@ interface GetSignableOrderRequest$1 {
5355
5380
  * @type {Array<FeeEntry>}
5356
5381
  * @memberof GetSignableOrderRequest
5357
5382
  */
5358
- 'fees'?: Array<FeeEntry$1>;
5383
+ 'fees'?: Array<FeeEntry>;
5359
5384
  /**
5360
5385
  * SplitFees dictates whether fees will be split between maker & taker, set split_fees to true when submitting signing to v3 endpoints and vice versa for v1
5361
5386
  * @type {boolean}
@@ -5461,7 +5486,7 @@ interface GetSignableOrderRequestV3 {
5461
5486
  * @type {Array<FeeEntry>}
5462
5487
  * @memberof GetSignableOrderRequestV3
5463
5488
  */
5464
- 'fees'?: Array<FeeEntry$1>;
5489
+ 'fees'?: Array<FeeEntry>;
5465
5490
  /**
5466
5491
  * SplitFees is a deprecated field. It\'s value is ignored.
5467
5492
  * @type {boolean}
@@ -5745,7 +5770,7 @@ interface GetSignableRegistrationResponse {
5745
5770
  * @export
5746
5771
  * @interface GetSignableTradeRequest
5747
5772
  */
5748
- interface GetSignableTradeRequest$2 {
5773
+ interface GetSignableTradeRequest$1 {
5749
5774
  /**
5750
5775
  * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
5751
5776
  * @type {number}
@@ -5757,7 +5782,7 @@ interface GetSignableTradeRequest$2 {
5757
5782
  * @type {Array<FeeEntry>}
5758
5783
  * @memberof GetSignableTradeRequest
5759
5784
  */
5760
- 'fees'?: Array<FeeEntry$1>;
5785
+ 'fees'?: Array<FeeEntry>;
5761
5786
  /**
5762
5787
  * The ID of the maker order involved
5763
5788
  * @type {number}
@@ -8400,7 +8425,7 @@ interface RegisterUserRequest {
8400
8425
  * @export
8401
8426
  * @interface RegisterUserResponse
8402
8427
  */
8403
- interface RegisterUserResponse$1 {
8428
+ interface RegisterUserResponse {
8404
8429
  /**
8405
8430
  * Immutable signature authorising registration
8406
8431
  * @type {string}
@@ -9374,7 +9399,7 @@ interface TradesCreateTradeRequest {
9374
9399
  * @type {Array<FeeEntry>}
9375
9400
  * @memberof TradesCreateTradeRequest
9376
9401
  */
9377
- 'fees'?: Array<FeeEntry$1>;
9402
+ 'fees'?: Array<FeeEntry>;
9378
9403
  /**
9379
9404
  * [deprecated] All orders include fees since the introduction of protocol fees
9380
9405
  * @type {boolean}
@@ -10300,7 +10325,7 @@ declare class ExchangesApi$1 extends BaseAPI {
10300
10325
  * @throws {RequiredError}
10301
10326
  * @memberof ExchangesApi
10302
10327
  */
10303
- createExchangeTransfer(requestParameters: ExchangesApiCreateExchangeTransferRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponseV1$2, any>>;
10328
+ createExchangeTransfer(requestParameters: ExchangesApiCreateExchangeTransferRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponseV1$1, any>>;
10304
10329
  /**
10305
10330
  * Get an exchange by ID
10306
10331
  * @summary Get an exchange by ID
@@ -11118,7 +11143,7 @@ interface OrdersApiGetSignableCancelOrderV3Request {
11118
11143
  * @type {GetSignableCancelOrderRequest}
11119
11144
  * @memberof OrdersApiGetSignableCancelOrderV3
11120
11145
  */
11121
- readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest$2;
11146
+ readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest$1;
11122
11147
  }
11123
11148
  /**
11124
11149
  * Request parameters for getSignableOrder operation in OrdersApi.
@@ -11329,7 +11354,7 @@ declare class OrdersApi$1 extends BaseAPI {
11329
11354
  * @throws {RequiredError}
11330
11355
  * @memberof OrdersApi
11331
11356
  */
11332
- cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse$2, any>>;
11357
+ cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse$1, any>>;
11333
11358
  /**
11334
11359
  * Create an order using the v3 orderbook.
11335
11360
  * @summary Create an order (V3)
@@ -11338,7 +11363,7 @@ declare class OrdersApi$1 extends BaseAPI {
11338
11363
  * @throws {RequiredError}
11339
11364
  * @memberof OrdersApi
11340
11365
  */
11341
- createOrderV3(requestParameters: OrdersApiCreateOrderV3Request$1, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateOrderResponse$2, any>>;
11366
+ createOrderV3(requestParameters: OrdersApiCreateOrderV3Request$1, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateOrderResponse$1, any>>;
11342
11367
  /**
11343
11368
  * Get an order (V3)
11344
11369
  * @summary Get an order (V3)
@@ -11708,7 +11733,7 @@ interface TradesApiGetSignableTradeRequest {
11708
11733
  * @type {GetSignableTradeRequest}
11709
11734
  * @memberof TradesApiGetSignableTrade
11710
11735
  */
11711
- readonly getSignableTradeRequest: GetSignableTradeRequest$2;
11736
+ readonly getSignableTradeRequest: GetSignableTradeRequest$1;
11712
11737
  }
11713
11738
  /**
11714
11739
  * Request parameters for getTradeV3 operation in TradesApi.
@@ -11811,7 +11836,7 @@ declare class TradesApi$1 extends BaseAPI {
11811
11836
  * @throws {RequiredError}
11812
11837
  * @memberof TradesApi
11813
11838
  */
11814
- createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse$2, any>>;
11839
+ createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse$1, any>>;
11815
11840
  /**
11816
11841
  * Generate a signable trade message (V3)
11817
11842
  * @summary Generate a signable trade message (V3)
@@ -12075,7 +12100,7 @@ declare class TransfersApi$1 extends BaseAPI {
12075
12100
  * @throws {RequiredError}
12076
12101
  * @memberof TransfersApi
12077
12102
  */
12078
- createTransferV1(requestParameters: TransfersApiCreateTransferV1Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponseV1$2, any>>;
12103
+ createTransferV1(requestParameters: TransfersApiCreateTransferV1Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponseV1$1, any>>;
12079
12104
  /**
12080
12105
  * Gets bulk details of a signable transfer
12081
12106
  * @summary Gets bulk details of a signable transfer
@@ -12264,7 +12289,7 @@ declare class UsersApi$1 extends BaseAPI {
12264
12289
  * @throws {RequiredError}
12265
12290
  * @memberof UsersApi
12266
12291
  */
12267
- registerUser(requestParameters: UsersApiRegisterUserRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<RegisterUserResponse$1, any>>;
12292
+ registerUser(requestParameters: UsersApiRegisterUserRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<RegisterUserResponse, any>>;
12268
12293
  }
12269
12294
 
12270
12295
  /**
@@ -12486,7 +12511,7 @@ declare class WithdrawalsApi$1 extends BaseAPI {
12486
12511
  * @throws {RequiredError}
12487
12512
  * @memberof WithdrawalsApi
12488
12513
  */
12489
- createWithdrawal(requestParameters: WithdrawalsApiCreateWithdrawalRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateWithdrawalResponse$1, any>>;
12514
+ createWithdrawal(requestParameters: WithdrawalsApiCreateWithdrawalRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateWithdrawalResponse, any>>;
12490
12515
  /**
12491
12516
  * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params.
12492
12517
  * @summary Creates a withdrawal of a token for starkex contracts that are higher than v3
@@ -12495,7 +12520,7 @@ declare class WithdrawalsApi$1 extends BaseAPI {
12495
12520
  * @throws {RequiredError}
12496
12521
  * @memberof WithdrawalsApi
12497
12522
  */
12498
- createWithdrawalV2(requestParameters: WithdrawalsApiCreateWithdrawalV2Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateWithdrawalResponse$1, any>>;
12523
+ createWithdrawalV2(requestParameters: WithdrawalsApiCreateWithdrawalV2Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateWithdrawalResponse, any>>;
12499
12524
  /**
12500
12525
  * Gets details of a signable withdrawal
12501
12526
  * @summary Gets details of a signable withdrawal
@@ -12545,7 +12570,7 @@ declare class WithdrawalsApi$1 extends BaseAPI {
12545
12570
  * https://openapi-generator.tech
12546
12571
  * Do not edit the class manually.
12547
12572
  */
12548
- interface ConfigurationParameters$1 {
12573
+ interface ConfigurationParameters {
12549
12574
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
12550
12575
  username?: string;
12551
12576
  password?: string;
@@ -12554,7 +12579,7 @@ interface ConfigurationParameters$1 {
12554
12579
  baseOptions?: any;
12555
12580
  formDataCtor?: new () => any;
12556
12581
  }
12557
- declare class Configuration$1 {
12582
+ declare class Configuration {
12558
12583
  /**
12559
12584
  * parameter for apiKey security
12560
12585
  * @param name security name
@@ -12604,7 +12629,7 @@ declare class Configuration$1 {
12604
12629
  * @type {new () => FormData}
12605
12630
  */
12606
12631
  formDataCtor?: new () => any;
12607
- constructor(param?: ConfigurationParameters$1);
12632
+ constructor(param?: ConfigurationParameters);
12608
12633
  /**
12609
12634
  * Check if the given MIME is a JSON MIME.
12610
12635
  * JSON MIME examples:
@@ -19966,7 +19991,7 @@ declare namespace index_d {
19966
19991
  /**
19967
19992
  * Configuration for generated clients
19968
19993
  */
19969
- type ImmutableAPIConfiguration = Configuration$2;
19994
+ type ImmutableAPIConfiguration = Configuration$1;
19970
19995
 
19971
19996
  declare class ImxApiClients {
19972
19997
  config: ImmutableAPIConfiguration;
@@ -20018,7 +20043,7 @@ interface APIConfigurationParams {
20018
20043
  interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfigurationParams> {
20019
20044
  }
20020
20045
  declare class BlockchainDataConfiguration {
20021
- readonly apiConfig: Configuration$1;
20046
+ readonly apiConfig: Configuration;
20022
20047
  readonly baseConfig: ImmutableConfiguration;
20023
20048
  constructor({ baseConfig, overrides }: BlockchainDataModuleConfiguration);
20024
20049
  }
@@ -20253,6 +20278,74 @@ declare class PassportError extends Error {
20253
20278
  constructor(message: string, type: PassportErrorType);
20254
20279
  }
20255
20280
 
20281
+ declare class ApiConfiguration extends Configuration$1 {
20282
+ }
20283
+ interface ImmutableXConfigurationParams {
20284
+ basePath: string;
20285
+ chainID: number;
20286
+ coreContractAddress: string;
20287
+ registrationContractAddress: string;
20288
+ baseConfig?: ImmutableConfiguration;
20289
+ }
20290
+ interface EthConfiguration {
20291
+ coreContractAddress: string;
20292
+ registrationContractAddress: string;
20293
+ chainID: number;
20294
+ }
20295
+ interface ImxEnvironment extends EthConfiguration {
20296
+ basePath: string;
20297
+ headers?: Record<string, string>;
20298
+ sdkVersion?: string;
20299
+ baseConfig?: ImmutableConfiguration;
20300
+ }
20301
+ interface ImmutableXConfiguration {
20302
+ /**
20303
+ * The configuration for the API client
20304
+ */
20305
+ apiConfiguration: ApiConfiguration;
20306
+ /**
20307
+ * The configuration for the Ethereum network
20308
+ */
20309
+ ethConfiguration: EthConfiguration;
20310
+ }
20311
+ /**
20312
+ * @dev use createImmutableXConfiguration instead
20313
+ */
20314
+ declare const createConfig: ({ coreContractAddress, registrationContractAddress, chainID, basePath, headers, sdkVersion, baseConfig, }: ImxEnvironment) => ImmutableXConfiguration;
20315
+ /**
20316
+ * createImmutableXConfiguration to create a custom ImmutableXConfiguration
20317
+ * other than the production and sandbox defined below.
20318
+ */
20319
+ declare const createImmutableXConfiguration: ({ basePath, chainID, coreContractAddress, registrationContractAddress, baseConfig, }: ImmutableXConfigurationParams) => ImmutableXConfiguration;
20320
+ interface ImxOverrides {
20321
+ immutableXConfig: ImmutableXConfiguration;
20322
+ }
20323
+ interface ImxModuleConfiguration extends ModuleConfiguration<ImxOverrides> {
20324
+ }
20325
+ declare class ImxConfiguration {
20326
+ readonly immutableXConfig: ImmutableXConfiguration;
20327
+ readonly baseConfig: ImmutableConfiguration;
20328
+ constructor({ baseConfig, overrides }: ImxModuleConfiguration);
20329
+ }
20330
+ interface ConfigOptions {
20331
+ environment: Environment;
20332
+ apiKey?: string;
20333
+ publishableKey?: string;
20334
+ rateLimitingKey?: string;
20335
+ }
20336
+ /**
20337
+ * @name imxClientConfig
20338
+ * @description Helper method to create a standard ImxModuleConfiguration
20339
+ * object for the IMXClient class. If you need to override the default
20340
+ * configuration, manually construct the ImxModuleConfiguration object.
20341
+ * @param configOptions {ConfigOptions} The configuration options
20342
+ * @param configOptions.environment {Environment} The environment to connect to
20343
+ * @param configOptions.apkKey {string} The API key from Immutable Hub
20344
+ * @param configOptions.publishableKey {string} The publishable key from Immutable Hub
20345
+ * @returns {ImxModuleConfiguration}
20346
+ */
20347
+ declare const imxClientConfig: (configOptions: ConfigOptions) => ImxModuleConfiguration;
20348
+
20256
20349
  declare type Bytes = ArrayLike<number>;
20257
20350
  declare type BytesLike = Bytes | string;
20258
20351
  interface Hexable {
@@ -20295,289 +20388,66 @@ declare class BigNumber implements Hexable {
20295
20388
  static isBigNumber(value: any): value is BigNumber;
20296
20389
  }
20297
20390
 
20298
- interface JsonFragmentType {
20299
- readonly name?: string;
20300
- readonly indexed?: boolean;
20301
- readonly type?: string;
20302
- readonly internalType?: any;
20303
- readonly components?: ReadonlyArray<JsonFragmentType>;
20304
- }
20305
- interface JsonFragment {
20306
- readonly name?: string;
20307
- readonly type?: string;
20308
- readonly anonymous?: boolean;
20309
- readonly payable?: boolean;
20310
- readonly constant?: boolean;
20311
- readonly stateMutability?: string;
20312
- readonly inputs?: ReadonlyArray<JsonFragmentType>;
20313
- readonly outputs?: ReadonlyArray<JsonFragmentType>;
20314
- readonly gas?: string;
20315
- }
20316
- declare class ParamType {
20317
- readonly name: string;
20318
- readonly type: string;
20319
- readonly baseType: string;
20320
- readonly indexed: boolean;
20321
- readonly components: Array<ParamType>;
20322
- readonly arrayLength: number;
20323
- readonly arrayChildren: ParamType;
20324
- readonly _isParamType: boolean;
20325
- constructor(constructorGuard: any, params: any);
20326
- format(format?: string): string;
20327
- static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType;
20328
- static fromObject(value: JsonFragmentType | ParamType): ParamType;
20329
- static fromString(value: string, allowIndexed?: boolean): ParamType;
20330
- static isParamType(value: any): value is ParamType;
20331
- }
20332
- declare abstract class Fragment {
20333
- readonly type: string;
20334
- readonly name: string;
20335
- readonly inputs: Array<ParamType>;
20336
- readonly _isFragment: boolean;
20337
- constructor(constructorGuard: any, params: any);
20338
- abstract format(format?: string): string;
20339
- static from(value: Fragment | JsonFragment | string): Fragment;
20340
- static fromObject(value: Fragment | JsonFragment): Fragment;
20341
- static fromString(value: string): Fragment;
20342
- static isFragment(value: any): value is Fragment;
20343
- }
20344
- declare class EventFragment extends Fragment {
20345
- readonly anonymous: boolean;
20346
- format(format?: string): string;
20347
- static from(value: EventFragment | JsonFragment | string): EventFragment;
20348
- static fromObject(value: JsonFragment | EventFragment): EventFragment;
20349
- static fromString(value: string): EventFragment;
20350
- static isEventFragment(value: any): value is EventFragment;
20351
- }
20352
- declare class ConstructorFragment extends Fragment {
20353
- stateMutability: string;
20354
- payable: boolean;
20355
- gas?: BigNumber;
20356
- format(format?: string): string;
20357
- static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment;
20358
- static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment;
20359
- static fromString(value: string): ConstructorFragment;
20360
- static isConstructorFragment(value: any): value is ConstructorFragment;
20361
- }
20362
- declare class FunctionFragment extends ConstructorFragment {
20363
- constant: boolean;
20364
- outputs?: Array<ParamType>;
20365
- format(format?: string): string;
20366
- static from(value: FunctionFragment | JsonFragment | string): FunctionFragment;
20367
- static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment;
20368
- static fromString(value: string): FunctionFragment;
20369
- static isFunctionFragment(value: any): value is FunctionFragment;
20391
+ declare type Network = {
20392
+ name: string;
20393
+ chainId: number;
20394
+ ensAddress?: string;
20395
+ _defaultProvider?: (providers: any, options?: any) => any;
20396
+ };
20397
+ declare type Networkish = Network | string | number;
20398
+
20399
+ declare type Deferrable<T> = {
20400
+ [K in keyof T]: T[K] | Promise<T[K]>;
20401
+ };
20402
+ declare class Description<T = any> {
20403
+ constructor(info: {
20404
+ [K in keyof T]: T[K];
20405
+ });
20370
20406
  }
20371
- declare class ErrorFragment extends Fragment {
20372
- format(format?: string): string;
20373
- static from(value: ErrorFragment | JsonFragment | string): ErrorFragment;
20374
- static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment;
20375
- static fromString(value: string): ErrorFragment;
20376
- static isErrorFragment(value: any): value is ErrorFragment;
20407
+
20408
+ declare type AccessList = Array<{
20409
+ address: string;
20410
+ storageKeys: Array<string>;
20411
+ }>;
20412
+ declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
20413
+ interface Transaction {
20414
+ hash?: string;
20415
+ to?: string;
20416
+ from?: string;
20417
+ nonce: number;
20418
+ gasLimit: BigNumber;
20419
+ gasPrice?: BigNumber;
20420
+ data: string;
20421
+ value: BigNumber;
20422
+ chainId: number;
20423
+ r?: string;
20424
+ s?: string;
20425
+ v?: number;
20426
+ type?: number | null;
20427
+ accessList?: AccessList;
20428
+ maxPriorityFeePerGas?: BigNumber;
20429
+ maxFeePerGas?: BigNumber;
20377
20430
  }
20378
20431
 
20379
- interface Result extends ReadonlyArray<any> {
20380
- readonly [key: string]: any;
20381
- }
20382
- declare type CoerceFunc$1 = (type: string, value: any) => any;
20383
- declare abstract class Coder {
20384
- readonly name: string;
20385
- readonly type: string;
20386
- readonly localName: string;
20387
- readonly dynamic: boolean;
20388
- constructor(name: string, type: string, localName: string, dynamic: boolean);
20389
- _throwError(message: string, value: any): void;
20390
- abstract encode(writer: Writer, value: any): number;
20391
- abstract decode(reader: Reader): any;
20392
- abstract defaultValue(): any;
20393
- }
20394
- declare class Writer {
20395
- readonly wordSize: number;
20396
- _data: Array<Uint8Array>;
20397
- _dataLength: number;
20398
- _padding: Uint8Array;
20399
- constructor(wordSize?: number);
20400
- get data(): string;
20401
- get length(): number;
20402
- _writeData(data: Uint8Array): number;
20403
- appendWriter(writer: Writer): number;
20404
- writeBytes(value: BytesLike): number;
20405
- _getValue(value: BigNumberish): Uint8Array;
20406
- writeValue(value: BigNumberish): number;
20407
- writeUpdatableValue(): (value: BigNumberish) => void;
20408
- }
20409
- declare class Reader {
20410
- readonly wordSize: number;
20411
- readonly allowLoose: boolean;
20412
- readonly _data: Uint8Array;
20413
- readonly _coerceFunc: CoerceFunc$1;
20414
- _offset: number;
20415
- constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc$1, allowLoose?: boolean);
20416
- get data(): string;
20417
- get consumed(): number;
20418
- static coerce(name: string, value: any): any;
20419
- coerce(name: string, value: any): any;
20420
- _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array;
20421
- subReader(offset: number): Reader;
20422
- readBytes(length: number, loose?: boolean): Uint8Array;
20423
- readValue(): BigNumber;
20424
- }
20425
-
20426
- declare type CoerceFunc = (type: string, value: any) => any;
20427
- declare class AbiCoder {
20428
- readonly coerceFunc: CoerceFunc;
20429
- constructor(coerceFunc?: CoerceFunc);
20430
- _getCoder(param: ParamType): Coder;
20431
- _getWordSize(): number;
20432
- _getReader(data: Uint8Array, allowLoose?: boolean): Reader;
20433
- _getWriter(): Writer;
20434
- getDefaultValue(types: ReadonlyArray<string | ParamType>): Result;
20435
- encode(types: ReadonlyArray<string | ParamType>, values: ReadonlyArray<any>): string;
20436
- decode(types: ReadonlyArray<string | ParamType>, data: BytesLike, loose?: boolean): Result;
20437
- }
20438
-
20439
- declare type Deferrable<T> = {
20440
- [K in keyof T]: T[K] | Promise<T[K]>;
20441
- };
20442
- declare class Description<T = any> {
20443
- constructor(info: {
20444
- [K in keyof T]: T[K];
20445
- });
20446
- }
20447
-
20448
- declare class LogDescription extends Description<LogDescription> {
20449
- readonly eventFragment: EventFragment;
20450
- readonly name: string;
20451
- readonly signature: string;
20452
- readonly topic: string;
20453
- readonly args: Result;
20454
- }
20455
- declare class TransactionDescription extends Description<TransactionDescription> {
20456
- readonly functionFragment: FunctionFragment;
20457
- readonly name: string;
20458
- readonly args: Result;
20459
- readonly signature: string;
20460
- readonly sighash: string;
20461
- readonly value: BigNumber;
20462
- }
20463
- declare class ErrorDescription extends Description<ErrorDescription> {
20464
- readonly errorFragment: ErrorFragment;
20465
- readonly name: string;
20466
- readonly args: Result;
20467
- readonly signature: string;
20468
- readonly sighash: string;
20469
- }
20470
- declare class Indexed extends Description<Indexed> {
20471
- readonly hash: string;
20472
- readonly _isIndexed: boolean;
20473
- static isIndexed(value: any): value is Indexed;
20474
- }
20475
- declare class Interface {
20476
- readonly fragments: ReadonlyArray<Fragment>;
20477
- readonly errors: {
20478
- [name: string]: ErrorFragment;
20479
- };
20480
- readonly events: {
20481
- [name: string]: EventFragment;
20482
- };
20483
- readonly functions: {
20484
- [name: string]: FunctionFragment;
20485
- };
20486
- readonly structs: {
20487
- [name: string]: any;
20488
- };
20489
- readonly deploy: ConstructorFragment;
20490
- readonly _abiCoder: AbiCoder;
20491
- readonly _isInterface: boolean;
20492
- constructor(fragments: string | ReadonlyArray<Fragment | JsonFragment | string>);
20493
- format(format?: string): string | Array<string>;
20494
- static getAbiCoder(): AbiCoder;
20495
- static getAddress(address: string): string;
20496
- static getSighash(fragment: ErrorFragment | FunctionFragment): string;
20497
- static getEventTopic(eventFragment: EventFragment): string;
20498
- getFunction(nameOrSignatureOrSighash: string): FunctionFragment;
20499
- getEvent(nameOrSignatureOrTopic: string): EventFragment;
20500
- getError(nameOrSignatureOrSighash: string): ErrorFragment;
20501
- getSighash(fragment: ErrorFragment | FunctionFragment | string): string;
20502
- getEventTopic(eventFragment: EventFragment | string): string;
20503
- _decodeParams(params: ReadonlyArray<ParamType>, data: BytesLike): Result;
20504
- _encodeParams(params: ReadonlyArray<ParamType>, values: ReadonlyArray<any>): string;
20505
- encodeDeploy(values?: ReadonlyArray<any>): string;
20506
- decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result;
20507
- encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray<any>): string;
20508
- decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result;
20509
- encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
20510
- decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result;
20511
- encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
20512
- encodeFilterTopics(eventFragment: EventFragment | string, values: ReadonlyArray<any>): Array<string | Array<string>>;
20513
- encodeEventLog(eventFragment: EventFragment | string, values: ReadonlyArray<any>): {
20514
- data: string;
20515
- topics: Array<string>;
20516
- };
20517
- decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray<string>): Result;
20518
- parseTransaction(tx: {
20519
- data: string;
20520
- value?: BigNumberish;
20521
- }): TransactionDescription;
20522
- parseLog(log: {
20523
- topics: Array<string>;
20524
- data: string;
20525
- }): LogDescription;
20526
- parseError(data: BytesLike): ErrorDescription;
20527
- static isInterface(value: any): value is Interface;
20528
- }
20529
-
20530
- declare type Network = {
20531
- name: string;
20532
- chainId: number;
20533
- ensAddress?: string;
20534
- _defaultProvider?: (providers: any, options?: any) => any;
20535
- };
20536
- declare type Networkish = Network | string | number;
20537
-
20538
- declare type AccessList = Array<{
20539
- address: string;
20540
- storageKeys: Array<string>;
20541
- }>;
20542
- declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
20543
- interface Transaction {
20544
- hash?: string;
20545
- to?: string;
20546
- from?: string;
20547
- nonce: number;
20548
- gasLimit: BigNumber;
20549
- gasPrice?: BigNumber;
20550
- data: string;
20551
- value: BigNumber;
20552
- chainId: number;
20553
- r?: string;
20554
- s?: string;
20555
- v?: number;
20556
- type?: number | null;
20557
- accessList?: AccessList;
20558
- maxPriorityFeePerGas?: BigNumber;
20559
- maxFeePerGas?: BigNumber;
20560
- }
20561
-
20562
- declare type ConnectionInfo = {
20563
- url: string;
20564
- headers?: {
20565
- [key: string]: string | number;
20566
- };
20567
- user?: string;
20568
- password?: string;
20569
- allowInsecureAuthentication?: boolean;
20570
- allowGzip?: boolean;
20571
- throttleLimit?: number;
20572
- throttleSlotInterval?: number;
20573
- throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
20574
- skipFetchSetup?: boolean;
20575
- fetchOptions?: Record<string, string>;
20576
- errorPassThrough?: boolean;
20577
- timeout?: number;
20578
- };
20579
- interface OnceBlockable {
20580
- once(eventName: "block", handler: () => void): void;
20432
+ declare type ConnectionInfo = {
20433
+ url: string;
20434
+ headers?: {
20435
+ [key: string]: string | number;
20436
+ };
20437
+ user?: string;
20438
+ password?: string;
20439
+ allowInsecureAuthentication?: boolean;
20440
+ allowGzip?: boolean;
20441
+ throttleLimit?: number;
20442
+ throttleSlotInterval?: number;
20443
+ throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
20444
+ skipFetchSetup?: boolean;
20445
+ fetchOptions?: Record<string, string>;
20446
+ errorPassThrough?: boolean;
20447
+ timeout?: number;
20448
+ };
20449
+ interface OnceBlockable {
20450
+ once(eventName: "block", handler: () => void): void;
20581
20451
  }
20582
20452
 
20583
20453
  declare type TransactionRequest = {
@@ -20752,1453 +20622,257 @@ declare abstract class Signer {
20752
20622
  static isSigner(value: any): value is Signer;
20753
20623
  }
20754
20624
 
20755
- interface Overrides {
20756
- gasLimit?: BigNumberish | Promise<BigNumberish>;
20757
- gasPrice?: BigNumberish | Promise<BigNumberish>;
20758
- maxFeePerGas?: BigNumberish | Promise<BigNumberish>;
20759
- maxPriorityFeePerGas?: BigNumberish | Promise<BigNumberish>;
20760
- nonce?: BigNumberish | Promise<BigNumberish>;
20761
- type?: number;
20762
- accessList?: AccessListish;
20763
- customData?: Record<string, any>;
20764
- ccipReadEnabled?: boolean;
20625
+ /**
20626
+ * An abstraction of a Stark account, which can be used to sign messages and transactions on StarkEx to execute state changing operations
20627
+ */
20628
+ interface StarkSigner {
20629
+ /**
20630
+ * Signs the prefixed-message
20631
+ * @params message - this must be a UTF8-message
20632
+ * @example "0x1234"
20633
+ * @returns the signed prefixed-message
20634
+ */
20635
+ signMessage(message: string): Promise<string>;
20636
+ /**
20637
+ * Get the Signer address
20638
+ * @returns the Signer's checksum address
20639
+ */
20640
+ getAddress(): string | Promise<string>;
20765
20641
  }
20766
- interface PayableOverrides extends Overrides {
20767
- value?: BigNumberish | Promise<BigNumberish>;
20642
+ /**
20643
+ * A pair of Signers
20644
+ */
20645
+ interface WalletConnection {
20646
+ /**
20647
+ * The L1 signer
20648
+ */
20649
+ ethSigner: Signer;
20650
+ /**
20651
+ * The L2 signer
20652
+ */
20653
+ starkSigner: StarkSigner;
20768
20654
  }
20769
- interface CallOverrides extends PayableOverrides {
20770
- blockTag?: BlockTag | Promise<BlockTag>;
20771
- from?: string | Promise<string>;
20655
+
20656
+ /**
20657
+ * An ERC20 token
20658
+ */
20659
+ interface ERC20Token {
20660
+ type: 'ERC20';
20661
+ tokenAddress: string;
20772
20662
  }
20773
- interface PopulatedTransaction {
20774
- to?: string;
20775
- from?: string;
20776
- nonce?: number;
20777
- gasLimit?: BigNumber;
20778
- gasPrice?: BigNumber;
20779
- data?: string;
20780
- value?: BigNumber;
20781
- chainId?: number;
20782
- type?: number;
20783
- accessList?: AccessList;
20784
- maxFeePerGas?: BigNumber;
20785
- maxPriorityFeePerGas?: BigNumber;
20786
- customData?: Record<string, any>;
20787
- ccipReadEnabled?: boolean;
20788
- }
20789
- declare type EventFilter = {
20790
- address?: string;
20791
- topics?: Array<string | Array<string>>;
20792
- };
20793
- declare type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
20794
- interface Event$1 extends Log {
20795
- event?: string;
20796
- eventSignature?: string;
20797
- args?: Result;
20798
- decodeError?: Error;
20799
- decode?: (data: string, topics?: Array<string>) => any;
20800
- removeListener: () => void;
20801
- getBlock: () => Promise<Block>;
20802
- getTransaction: () => Promise<TransactionResponse>;
20803
- getTransactionReceipt: () => Promise<TransactionReceipt>;
20804
- }
20805
- interface ContractReceipt extends TransactionReceipt {
20806
- events?: Array<Event$1>;
20807
- }
20808
- interface ContractTransaction extends TransactionResponse {
20809
- wait(confirmations?: number): Promise<ContractReceipt>;
20810
- }
20811
- declare class RunningEvent {
20812
- readonly tag: string;
20813
- readonly filter: EventFilter;
20814
- private _listeners;
20815
- constructor(tag: string, filter: EventFilter);
20816
- addListener(listener: Listener, once: boolean): void;
20817
- removeListener(listener: Listener): void;
20818
- removeAllListeners(): void;
20819
- listeners(): Array<Listener>;
20820
- listenerCount(): number;
20821
- run(args: Array<any>): number;
20822
- prepareEvent(event: Event$1): void;
20823
- getEmit(event: Event$1): Array<any>;
20663
+ /**
20664
+ * An ERC721 token
20665
+ */
20666
+ interface ERC721Token {
20667
+ type: 'ERC721';
20668
+ tokenId: string;
20669
+ tokenAddress: string;
20824
20670
  }
20825
- declare type ContractInterface = string | ReadonlyArray<Fragment | JsonFragment | string> | Interface;
20826
- declare class BaseContract {
20827
- readonly address: string;
20828
- readonly interface: Interface;
20829
- readonly signer: Signer;
20830
- readonly provider: Provider$1;
20831
- readonly functions: {
20832
- [name: string]: ContractFunction;
20833
- };
20834
- readonly callStatic: {
20835
- [name: string]: ContractFunction;
20836
- };
20837
- readonly estimateGas: {
20838
- [name: string]: ContractFunction<BigNumber>;
20839
- };
20840
- readonly populateTransaction: {
20841
- [name: string]: ContractFunction<PopulatedTransaction>;
20842
- };
20843
- readonly filters: {
20844
- [name: string]: (...args: Array<any>) => EventFilter;
20845
- };
20846
- readonly resolvedAddress: Promise<string>;
20847
- readonly deployTransaction: TransactionResponse;
20848
- _deployedPromise: Promise<Contract>;
20849
- _runningEvents: {
20850
- [eventTag: string]: RunningEvent;
20851
- };
20852
- _wrappedEmits: {
20853
- [eventTag: string]: (...args: Array<any>) => void;
20854
- };
20855
- constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider$1);
20856
- static getContractAddress(transaction: {
20857
- from: string;
20858
- nonce: BigNumberish;
20859
- }): string;
20860
- static getInterface(contractInterface: ContractInterface): Interface;
20861
- deployed(): Promise<Contract>;
20862
- _deployed(blockTag?: BlockTag): Promise<Contract>;
20863
- fallback(overrides?: TransactionRequest): Promise<TransactionResponse>;
20864
- connect(signerOrProvider: Signer | Provider$1 | string): Contract;
20865
- attach(addressOrName: string): Contract;
20866
- static isIndexed(value: any): value is Indexed;
20867
- private _normalizeRunningEvent;
20868
- private _getRunningEvent;
20869
- _checkRunningEvents(runningEvent: RunningEvent): void;
20870
- _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event$1;
20871
- private _addEventListener;
20872
- queryFilter(event: EventFilter | string, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise<Array<Event$1>>;
20873
- on(event: EventFilter | string, listener: Listener): this;
20874
- once(event: EventFilter | string, listener: Listener): this;
20875
- emit(eventName: EventFilter | string, ...args: Array<any>): boolean;
20876
- listenerCount(eventName?: EventFilter | string): number;
20877
- listeners(eventName?: EventFilter | string): Array<Listener>;
20878
- removeAllListeners(eventName?: EventFilter | string): this;
20879
- off(eventName: EventFilter | string, listener: Listener): this;
20880
- removeListener(eventName: EventFilter | string, listener: Listener): this;
20671
+ /**
20672
+ * An ETH token
20673
+ */
20674
+ interface ETHToken {
20675
+ type: 'ETH';
20881
20676
  }
20882
- declare class Contract extends BaseContract {
20883
- readonly [key: string]: ContractFunction | any;
20677
+ /**
20678
+ * An amount of ETH token of unit Wei
20679
+ */
20680
+ interface ETHAmount extends ETHToken {
20681
+ /**
20682
+ * An amount in unit Wei
20683
+ */
20684
+ amount: string;
20884
20685
  }
20885
- declare class ContractFactory {
20886
- readonly interface: Interface;
20887
- readonly bytecode: string;
20888
- readonly signer: Signer;
20889
- constructor(contractInterface: ContractInterface, bytecode: BytesLike | {
20890
- object: string;
20891
- }, signer?: Signer);
20892
- getDeployTransaction(...args: Array<any>): TransactionRequest;
20893
- deploy(...args: Array<any>): Promise<Contract>;
20894
- attach(address: string): Contract;
20895
- connect(signer: Signer): ContractFactory;
20896
- static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory;
20897
- static getInterface(contractInterface: ContractInterface): Interface;
20898
- static getContractAddress(tx: {
20899
- from: string;
20900
- nonce: BytesLike | BigNumber | number;
20901
- }): string;
20902
- static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract;
20686
+ /**
20687
+ * The token details and amount of ERC20 token units
20688
+ */
20689
+ interface ERC20Amount extends ERC20Token {
20690
+ /**
20691
+ * An amount in units for the given ERC20 token
20692
+ */
20693
+ amount: string;
20903
20694
  }
20695
+ /**
20696
+ * Union type that represents all token types
20697
+ */
20698
+ type AnyToken = ETHToken | ERC721Token | ERC20Token;
20699
+ /**
20700
+ * Union type that represents all token type amounts
20701
+ */
20702
+ type TokenAmount = ETHAmount | ERC20Amount | ERC721Token;
20703
+ /**
20704
+ * Union type that represents exchange token type amounts
20705
+ */
20706
+ type ExchangeTokenAmount = ETHAmount | ERC20Amount;
20904
20707
 
20905
- declare type FormatFunc = (value: any) => any;
20906
- declare type FormatFuncs = {
20907
- [key: string]: FormatFunc;
20708
+ /**
20709
+ * Parameter required to create an Order
20710
+ */
20711
+ interface UnsignedOrderRequest {
20712
+ /**
20713
+ * The amount of tokens that will be bought for this order
20714
+ */
20715
+ buy: TokenAmount;
20716
+ /**
20717
+ * The amount of tokens that will be sold for this order
20718
+ */
20719
+ sell: TokenAmount;
20720
+ /**
20721
+ * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
20722
+ */
20723
+ expiration_timestamp?: number;
20724
+ /**
20725
+ * Inclusion of either maker or taker fees
20726
+ */
20727
+ fees?: Array<FeeEntry>;
20728
+ }
20729
+ /**
20730
+ * Parameter required to create a Transfer
20731
+ */
20732
+ type UnsignedTransferRequest = TokenAmount & {
20733
+ /**
20734
+ * Ethereum address of the receiving user
20735
+ */
20736
+ receiver: string;
20908
20737
  };
20909
- declare type Formats = {
20910
- transaction: FormatFuncs;
20911
- transactionRequest: FormatFuncs;
20912
- receipt: FormatFuncs;
20913
- receiptLog: FormatFuncs;
20914
- block: FormatFuncs;
20915
- blockWithTransactions: FormatFuncs;
20916
- filter: FormatFuncs;
20917
- filterLog: FormatFuncs;
20738
+ /**
20739
+ * Parameter required to Mint tokens
20740
+ */
20741
+ type UnsignedMintRequest = Omit<MintRequest$1, 'auth_signature'>;
20742
+ /**
20743
+ * Parameter required to create a Transfer
20744
+ */
20745
+ type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
20746
+ /**
20747
+ * Ethereum address of the receiving user
20748
+ */
20749
+ receiver: string;
20750
+ /**
20751
+ * Exchange transaction ID
20752
+ */
20753
+ transactionID: string;
20918
20754
  };
20919
- declare class Formatter {
20920
- readonly formats: Formats;
20921
- constructor();
20922
- getDefaultFormats(): Formats;
20923
- accessList(accessList: Array<any>): AccessList;
20924
- number(number: any): number;
20925
- type(number: any): number;
20926
- bigNumber(value: any): BigNumber;
20927
- boolean(value: any): boolean;
20928
- hex(value: any, strict?: boolean): string;
20929
- data(value: any, strict?: boolean): string;
20930
- address(value: any): string;
20931
- callAddress(value: any): string;
20932
- contractAddress(value: any): string;
20933
- blockTag(blockTag: any): string;
20934
- hash(value: any, strict?: boolean): string;
20935
- difficulty(value: any): number;
20936
- uint256(value: any): string;
20937
- _block(value: any, format: any): Block;
20938
- block(value: any): Block;
20939
- blockWithTransactions(value: any): Block;
20940
- transactionRequest(value: any): any;
20941
- transactionResponse(transaction: any): TransactionResponse;
20942
- transaction(value: any): any;
20943
- receiptLog(value: any): any;
20944
- receipt(value: any): TransactionReceipt;
20945
- topics(value: any): any;
20946
- filter(value: any): any;
20947
- filterLog(value: any): any;
20948
- static check(format: {
20949
- [name: string]: FormatFunc;
20950
- }, object: any): any;
20951
- static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
20952
- static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
20953
- static arrayOf(format: FormatFunc): FormatFunc;
20954
- }
20955
-
20956
- declare class Event {
20957
- readonly listener: Listener;
20958
- readonly once: boolean;
20959
- readonly tag: string;
20960
- _lastBlockNumber: number;
20961
- _inflight: boolean;
20962
- constructor(tag: string, listener: Listener, once: boolean);
20963
- get event(): EventType;
20964
- get type(): string;
20965
- get hash(): string;
20966
- get filter(): Filter;
20967
- pollable(): boolean;
20968
- }
20969
- interface EnsResolver {
20970
- readonly name: string;
20971
- readonly address: string;
20972
- getAddress(coinType?: 60): Promise<null | string>;
20973
- getContentHash(): Promise<null | string>;
20974
- getText(key: string): Promise<null | string>;
20975
- }
20976
- interface EnsProvider {
20977
- resolveName(name: string): Promise<null | string>;
20978
- lookupAddress(address: string): Promise<null | string>;
20979
- getResolver(name: string): Promise<null | EnsResolver>;
20980
- }
20981
- interface Avatar {
20982
- url: string;
20983
- linkage: Array<{
20984
- type: string;
20985
- content: string;
20986
- }>;
20987
- }
20988
- declare class Resolver$1 implements EnsResolver {
20989
- readonly provider: BaseProvider;
20990
- readonly name: string;
20991
- readonly address: string;
20992
- readonly _resolvedAddress: null | string;
20993
- _supportsEip2544: null | Promise<boolean>;
20994
- constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
20995
- supportsWildcard(): Promise<boolean>;
20996
- _fetch(selector: string, parameters?: string): Promise<null | string>;
20997
- _fetchBytes(selector: string, parameters?: string): Promise<null | string>;
20998
- _getAddress(coinType: number, hexBytes: string): string;
20999
- getAddress(coinType?: number): Promise<string>;
21000
- getAvatar(): Promise<null | Avatar>;
21001
- getContentHash(): Promise<string>;
21002
- getText(key: string): Promise<string>;
21003
- }
21004
- declare class BaseProvider extends Provider$1 implements EnsProvider {
21005
- _networkPromise: Promise<Network>;
21006
- _network: Network;
21007
- _events: Array<Event>;
21008
- formatter: Formatter;
21009
- _emitted: {
21010
- [eventName: string]: number | "pending";
21011
- };
21012
- _pollingInterval: number;
21013
- _poller: NodeJS.Timer;
21014
- _bootstrapPoll: NodeJS.Timer;
21015
- _lastBlockNumber: number;
21016
- _maxFilterBlockRange: number;
21017
- _fastBlockNumber: number;
21018
- _fastBlockNumberPromise: Promise<number>;
21019
- _fastQueryDate: number;
21020
- _maxInternalBlockNumber: number;
21021
- _internalBlockNumber: Promise<{
21022
- blockNumber: number;
21023
- reqTime: number;
21024
- respTime: number;
21025
- }>;
21026
- readonly anyNetwork: boolean;
21027
- disableCcipRead: boolean;
21028
- /**
21029
- * ready
21030
- *
21031
- * A Promise<Network> that resolves only once the provider is ready.
21032
- *
21033
- * Sub-classes that call the super with a network without a chainId
21034
- * MUST set this. Standard named networks have a known chainId.
21035
- *
21036
- */
21037
- constructor(network: Networkish | Promise<Network>);
21038
- _ready(): Promise<Network>;
21039
- get ready(): Promise<Network>;
21040
- static getFormatter(): Formatter;
21041
- static getNetwork(network: Networkish): Network;
21042
- ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
21043
- _getInternalBlockNumber(maxAge: number): Promise<number>;
21044
- poll(): Promise<void>;
21045
- resetEventsBlock(blockNumber: number): void;
21046
- get network(): Network;
21047
- detectNetwork(): Promise<Network>;
21048
- getNetwork(): Promise<Network>;
21049
- get blockNumber(): number;
21050
- get polling(): boolean;
21051
- set polling(value: boolean);
21052
- get pollingInterval(): number;
21053
- set pollingInterval(value: number);
21054
- _getFastBlockNumber(): Promise<number>;
21055
- _setFastBlockNumber(blockNumber: number): void;
21056
- waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
21057
- _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
21058
- data: string;
21059
- from: string;
21060
- nonce: number;
21061
- to: string;
21062
- value: BigNumber;
21063
- startBlock: number;
21064
- }): Promise<TransactionReceipt>;
21065
- getBlockNumber(): Promise<number>;
21066
- getGasPrice(): Promise<BigNumber>;
21067
- getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
21068
- getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
21069
- getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21070
- getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21071
- _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
21072
- sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
21073
- _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
21074
- _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
21075
- _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
21076
- call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21077
- estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
21078
- _getAddress(addressOrName: string | Promise<string>): Promise<string>;
21079
- _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
21080
- getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
21081
- getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
21082
- getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
21083
- getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
21084
- getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
21085
- getEtherPrice(): Promise<number>;
21086
- _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
21087
- getResolver(name: string): Promise<null | Resolver$1>;
21088
- _getResolver(name: string, operation?: string): Promise<string>;
21089
- resolveName(name: string | Promise<string>): Promise<null | string>;
21090
- lookupAddress(address: string | Promise<string>): Promise<null | string>;
21091
- getAvatar(nameOrAddress: string): Promise<null | string>;
21092
- perform(method: string, params: any): Promise<any>;
21093
- _startEvent(event: Event): void;
21094
- _stopEvent(event: Event): void;
21095
- _addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
21096
- on(eventName: EventType, listener: Listener): this;
21097
- once(eventName: EventType, listener: Listener): this;
21098
- emit(eventName: EventType, ...args: Array<any>): boolean;
21099
- listenerCount(eventName?: EventType): number;
21100
- listeners(eventName?: EventType): Array<Listener>;
21101
- off(eventName: EventType, listener?: Listener): this;
21102
- removeAllListeners(eventName?: EventType): this;
21103
- }
21104
-
21105
- declare class JsonRpcSigner extends Signer implements TypedDataSigner {
21106
- readonly provider: JsonRpcProvider;
21107
- _index: number;
21108
- _address: string;
21109
- constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
21110
- connect(provider: Provider$1): JsonRpcSigner;
21111
- connectUnchecked(): JsonRpcSigner;
21112
- getAddress(): Promise<string>;
21113
- sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
21114
- signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
21115
- sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
21116
- signMessage(message: Bytes | string): Promise<string>;
21117
- _legacySignMessage(message: Bytes | string): Promise<string>;
21118
- _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
21119
- unlock(password: string): Promise<boolean>;
21120
- }
21121
- declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
21122
- sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
21123
- }
21124
- declare class JsonRpcProvider extends BaseProvider {
21125
- readonly connection: ConnectionInfo;
21126
- _pendingFilter: Promise<number>;
21127
- _nextId: number;
21128
- _eventLoopCache: Record<string, Promise<any>>;
21129
- get _cache(): Record<string, Promise<any>>;
21130
- constructor(url?: ConnectionInfo | string, network?: Networkish);
21131
- static defaultUrl(): string;
21132
- detectNetwork(): Promise<Network>;
21133
- _uncachedDetectNetwork(): Promise<Network>;
21134
- getSigner(addressOrIndex?: string | number): JsonRpcSigner;
21135
- getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
21136
- listAccounts(): Promise<Array<string>>;
21137
- send(method: string, params: Array<any>): Promise<any>;
21138
- prepareRequest(method: string, params: any): [string, Array<any>];
21139
- perform(method: string, params: any): Promise<any>;
21140
- _startEvent(event: Event): void;
21141
- _startPending(): void;
21142
- _stopEvent(event: Event): void;
21143
- static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
21144
- [key: string]: boolean;
21145
- }): {
21146
- [key: string]: string | AccessList;
21147
- };
21148
- }
21149
-
21150
- declare type ExternalProvider = {
21151
- isMetaMask?: boolean;
21152
- isStatus?: boolean;
21153
- host?: string;
21154
- path?: string;
21155
- sendAsync?: (request: {
21156
- method: string;
21157
- params?: Array<any>;
21158
- }, callback: (error: any, response: any) => void) => void;
21159
- send?: (request: {
21160
- method: string;
21161
- params?: Array<any>;
21162
- }, callback: (error: any, response: any) => void) => void;
21163
- request?: (request: {
21164
- method: string;
21165
- params?: Array<any>;
21166
- }) => Promise<any>;
21167
- };
21168
- declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
21169
- declare class Web3Provider extends JsonRpcProvider {
21170
- readonly provider: ExternalProvider;
21171
- readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
21172
- constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
21173
- send(method: string, params: Array<any>): Promise<any>;
20755
+ interface StarkExContractVersion {
20756
+ version: string;
20757
+ message: string;
21174
20758
  }
21175
20759
 
21176
20760
  /**
21177
- * An abstraction of a Stark account, which can be used to sign messages and transactions on StarkEx to execute state changing operations
20761
+ * Parameter required to create a batchNftTransfer
21178
20762
  */
21179
- interface StarkSigner$1 {
20763
+ interface NftTransferDetails {
21180
20764
  /**
21181
- * Signs the prefixed-message
21182
- * @params message - this must be a UTF8-message
21183
- * @example "0x1234"
21184
- * @returns the signed prefixed-message
20765
+ * Ethereum address of the receiving user
21185
20766
  */
21186
- signMessage(message: string): Promise<string>;
20767
+ receiver: string;
21187
20768
  /**
21188
- * Get the Signer address
21189
- * @returns the Signer's checksum address
20769
+ * The token ID
21190
20770
  */
21191
- getAddress(): string | Promise<string>;
20771
+ tokenId: string;
20772
+ /**
20773
+ * The token contract address
20774
+ */
20775
+ tokenAddress: string;
21192
20776
  }
21193
20777
 
21194
20778
  /**
21195
- * An ERC20 token
20779
+ * Custom Error class that is returned from the API when a request fails
21196
20780
  */
21197
- interface ERC20Token$1 {
21198
- type: 'ERC20';
21199
- tokenAddress: string;
20781
+ declare class IMXError extends Error {
20782
+ readonly code: string;
20783
+ readonly details?: string;
20784
+ constructor({ code, details, message }: APIError$2);
21200
20785
  }
20786
+
21201
20787
  /**
21202
- * An ERC721 token
20788
+ * Need to specifically export the classes and interfaces from the generated
20789
+ * clients imx object for rollup to bundle them correctly.
21203
20790
  */
21204
- interface ERC721Token$1 {
21205
- type: 'ERC721';
21206
- tokenId: string;
21207
- tokenAddress: string;
20791
+ declare class AssetsApi extends AssetsApi$1 {
21208
20792
  }
21209
- /**
21210
- * An ETH token
21211
- */
21212
- interface ETHToken$1 {
21213
- type: 'ETH';
20793
+ declare class BalancesApi extends BalancesApi$1 {
21214
20794
  }
21215
- /**
21216
- * An amount of ETH token of unit Wei
21217
- */
21218
- interface ETHAmount$1 extends ETHToken$1 {
21219
- /**
21220
- * An amount in unit Wei
21221
- */
21222
- amount: string;
20795
+ declare class CollectionsApi extends CollectionsApi$1 {
21223
20796
  }
21224
- /**
21225
- * The token details and amount of ERC20 token units
21226
- */
21227
- interface ERC20Amount$1 extends ERC20Token$1 {
21228
- /**
21229
- * An amount in units for the given ERC20 token
21230
- */
21231
- amount: string;
20797
+ declare class DepositsApi extends DepositsApi$1 {
21232
20798
  }
21233
- /**
21234
- * Union type that represents all token types
21235
- */
21236
- declare type AnyToken$1 = ETHToken$1 | ERC721Token$1 | ERC20Token$1;
21237
- /**
21238
- * Union type that represents all token type amounts
21239
- */
21240
- declare type TokenAmount$1 = ETHAmount$1 | ERC20Amount$1 | ERC721Token$1;
21241
- /**
21242
- * Union type that represents exchange token type amounts
21243
- */
21244
- declare type ExchangeTokenAmount$1 = ETHAmount$1 | ERC20Amount$1;
21245
-
21246
- /**
21247
- * Immutable X API
21248
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21249
- *
21250
- * The version of the OpenAPI document: 3.0
21251
- * Contact: support@immutable.com
21252
- *
21253
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21254
- * https://openapi-generator.tech
21255
- * Do not edit the class manually.
21256
- */
21257
- interface ConfigurationParameters {
21258
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
21259
- username?: string;
21260
- password?: string;
21261
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
21262
- basePath?: string;
21263
- baseOptions?: any;
21264
- formDataCtor?: new () => any;
20799
+ declare class EncodingApi extends EncodingApi$1 {
21265
20800
  }
21266
- declare class Configuration {
21267
- /**
21268
- * parameter for apiKey security
21269
- * @param name security name
21270
- * @memberof Configuration
21271
- */
21272
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
21273
- /**
21274
- * parameter for basic security
21275
- *
21276
- * @type {string}
21277
- * @memberof Configuration
21278
- */
21279
- username?: string;
21280
- /**
21281
- * parameter for basic security
21282
- *
21283
- * @type {string}
21284
- * @memberof Configuration
21285
- */
21286
- password?: string;
21287
- /**
21288
- * parameter for oauth2 security
21289
- * @param name security name
21290
- * @param scopes oauth2 scope
21291
- * @memberof Configuration
21292
- */
21293
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
21294
- /**
21295
- * override base path
21296
- *
21297
- * @type {string}
21298
- * @memberof Configuration
21299
- */
21300
- basePath?: string;
21301
- /**
21302
- * base options for axios calls
21303
- *
21304
- * @type {any}
21305
- * @memberof Configuration
21306
- */
21307
- baseOptions?: any;
21308
- /**
21309
- * The FormData constructor that will be used to create multipart form data
21310
- * requests. You can inject this here so that execution environments that
21311
- * do not support the FormData class can still run the generated client.
21312
- *
21313
- * @type {new () => FormData}
21314
- */
21315
- formDataCtor?: new () => any;
21316
- constructor(param?: ConfigurationParameters);
21317
- /**
21318
- * Check if the given MIME is a JSON MIME.
21319
- * JSON MIME examples:
21320
- * application/json
21321
- * application/json; charset=UTF8
21322
- * APPLICATION/JSON
21323
- * application/vnd.company+json
21324
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
21325
- * @return True if the given MIME is JSON, false otherwise.
21326
- */
21327
- isJsonMime(mime: string): boolean;
20801
+ declare class ExchangesApi extends ExchangesApi$1 {
21328
20802
  }
21329
-
21330
- /**
21331
- * Immutable X API
21332
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21333
- *
21334
- * The version of the OpenAPI document: 3.0
21335
- * Contact: support@immutable.com
21336
- *
21337
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21338
- * https://openapi-generator.tech
21339
- * Do not edit the class manually.
21340
- */
21341
- /**
21342
- *
21343
- * @export
21344
- * @interface CancelOrderResponse
21345
- */
21346
- interface CancelOrderResponse$1 {
21347
- /**
21348
- * ID of the cancelled order
21349
- * @type {number}
21350
- * @memberof CancelOrderResponse
21351
- */
21352
- 'order_id': number;
21353
- /**
21354
- * New status of the order
21355
- * @type {string}
21356
- * @memberof CancelOrderResponse
21357
- */
21358
- 'status': string;
20803
+ declare class MintsApi extends MintsApi$1 {
21359
20804
  }
21360
-
21361
- /**
21362
- * Immutable X API
21363
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21364
- *
21365
- * The version of the OpenAPI document: 3.0
21366
- * Contact: support@immutable.com
21367
- *
21368
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21369
- * https://openapi-generator.tech
21370
- * Do not edit the class manually.
21371
- */
21372
- /**
21373
- *
21374
- * @export
21375
- * @interface FeeEntry
21376
- */
21377
- interface FeeEntry {
21378
- /**
21379
- *
21380
- * @type {string}
21381
- * @memberof FeeEntry
21382
- */
21383
- 'address'?: string;
21384
- /**
21385
- *
21386
- * @type {number}
21387
- * @memberof FeeEntry
21388
- */
21389
- 'fee_percentage'?: number;
20805
+ declare class MetadataApi extends MetadataApi$1 {
21390
20806
  }
21391
-
21392
- /**
21393
- * Immutable X API
21394
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21395
- *
21396
- * The version of the OpenAPI document: 3.0
21397
- * Contact: support@immutable.com
21398
- *
21399
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21400
- * https://openapi-generator.tech
21401
- * Do not edit the class manually.
21402
- */
21403
- /**
21404
- *
21405
- * @export
21406
- * @interface CreateOrderResponse
21407
- */
21408
- interface CreateOrderResponse$1 {
21409
- /**
21410
- * ID of the created order
21411
- * @type {number}
21412
- * @memberof CreateOrderResponse
21413
- */
21414
- 'order_id': number;
21415
- /**
21416
- * Request ID as a reference for an asynchronous order creation request
21417
- * @type {string}
21418
- * @memberof CreateOrderResponse
21419
- */
21420
- 'request_id'?: string;
21421
- /**
21422
- * Status of the created order
21423
- * @type {string}
21424
- * @memberof CreateOrderResponse
21425
- */
21426
- 'status': string;
21427
- /**
21428
- * Timestamp of the created order
21429
- * @type {number}
21430
- * @memberof CreateOrderResponse
21431
- */
21432
- 'time': number;
20807
+ declare class MetadataRefreshesApi extends MetadataRefreshesApi$1 {
21433
20808
  }
21434
-
21435
- /**
21436
- * Immutable X API
21437
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21438
- *
21439
- * The version of the OpenAPI document: 3.0
21440
- * Contact: support@immutable.com
21441
- *
21442
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21443
- * https://openapi-generator.tech
21444
- * Do not edit the class manually.
21445
- */
21446
- /**
21447
- *
21448
- * @export
21449
- * @interface CreateTradeResponse
21450
- */
21451
- interface CreateTradeResponse$1 {
21452
- /**
21453
- * Request ID as a reference for an asynchronous trade creation request
21454
- * @type {string}
21455
- * @memberof CreateTradeResponse
21456
- */
21457
- 'request_id'?: string;
21458
- /**
21459
- * Current status of trade
21460
- * @type {string}
21461
- * @memberof CreateTradeResponse
21462
- */
21463
- 'status': string;
21464
- /**
21465
- * ID of trade within Immutable X
21466
- * @type {number}
21467
- * @memberof CreateTradeResponse
21468
- */
21469
- 'trade_id': number;
20809
+ declare class NftCheckoutPrimaryApi extends NftCheckoutPrimaryApi$1 {
21470
20810
  }
21471
-
21472
- /**
21473
- * Immutable X API
21474
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21475
- *
21476
- * The version of the OpenAPI document: 3.0
21477
- * Contact: support@immutable.com
21478
- *
21479
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21480
- * https://openapi-generator.tech
21481
- * Do not edit the class manually.
21482
- */
21483
- /**
21484
- *
21485
- * @export
21486
- * @interface CreateTransferResponse
21487
- */
21488
- interface CreateTransferResponse {
21489
- /**
21490
- * List of transfer IDs
21491
- * @type {Array<number>}
21492
- * @memberof CreateTransferResponse
21493
- */
21494
- 'transfer_ids': Array<number>;
20811
+ declare class OrdersApi extends OrdersApi$1 {
21495
20812
  }
21496
-
21497
- /**
21498
- * Immutable X API
21499
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21500
- *
21501
- * The version of the OpenAPI document: 3.0
21502
- * Contact: support@immutable.com
21503
- *
21504
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21505
- * https://openapi-generator.tech
21506
- * Do not edit the class manually.
21507
- */
21508
- /**
21509
- *
21510
- * @export
21511
- * @interface CreateTransferResponseV1
21512
- */
21513
- interface CreateTransferResponseV1$1 {
21514
- /**
21515
- * [deprecated] Sent signature
21516
- * @type {string}
21517
- * @memberof CreateTransferResponseV1
21518
- */
21519
- 'sent_signature': string;
21520
- /**
21521
- * [deprecated] The status of transfer
21522
- * @type {string}
21523
- * @memberof CreateTransferResponseV1
21524
- */
21525
- 'status': string;
21526
- /**
21527
- * [deprecated] Time of the transfer
21528
- * @type {number}
21529
- * @memberof CreateTransferResponseV1
21530
- */
21531
- 'time': number;
21532
- /**
21533
- * ID of the transfer
21534
- * @type {number}
21535
- * @memberof CreateTransferResponseV1
21536
- */
21537
- 'transfer_id': number;
20813
+ declare class PrimarySalesApi extends PrimarySalesApi$1 {
21538
20814
  }
21539
-
21540
- /**
21541
- * Immutable X API
21542
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21543
- *
21544
- * The version of the OpenAPI document: 3.0
21545
- * Contact: support@immutable.com
21546
- *
21547
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21548
- * https://openapi-generator.tech
21549
- * Do not edit the class manually.
21550
- */
21551
- /**
21552
- *
21553
- * @export
21554
- * @interface CreateWithdrawalResponse
21555
- */
21556
- interface CreateWithdrawalResponse {
21557
- /**
21558
- * Status of the withdrawal
21559
- * @type {string}
21560
- * @memberof CreateWithdrawalResponse
21561
- */
21562
- 'status': string;
21563
- /**
21564
- * Time of the withdrawal
21565
- * @type {number}
21566
- * @memberof CreateWithdrawalResponse
21567
- */
21568
- 'time': number;
21569
- /**
21570
- * ID of the withdrawal
21571
- * @type {number}
21572
- * @memberof CreateWithdrawalResponse
21573
- */
21574
- 'withdrawal_id': number;
20815
+ declare class ProjectsApi extends ProjectsApi$1 {
21575
20816
  }
21576
-
21577
- /**
21578
- * Immutable X API
21579
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21580
- *
21581
- * The version of the OpenAPI document: 3.0
21582
- * Contact: support@immutable.com
21583
- *
21584
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21585
- * https://openapi-generator.tech
21586
- * Do not edit the class manually.
21587
- */
21588
- /**
21589
- *
21590
- * @export
21591
- * @interface GetSignableCancelOrderRequest
21592
- */
21593
- interface GetSignableCancelOrderRequest$1 {
21594
- /**
21595
- * ID of the order to be cancelled
21596
- * @type {number}
21597
- * @memberof GetSignableCancelOrderRequest
21598
- */
21599
- 'order_id': number;
20817
+ declare class TokensApi extends TokensApi$1 {
21600
20818
  }
21601
-
21602
- /**
21603
- * Immutable X API
21604
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21605
- *
21606
- * The version of the OpenAPI document: 3.0
21607
- * Contact: support@immutable.com
21608
- *
21609
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21610
- * https://openapi-generator.tech
21611
- * Do not edit the class manually.
21612
- */
21613
-
21614
- /**
21615
- *
21616
- * @export
21617
- * @interface GetSignableTradeRequest
21618
- */
21619
- interface GetSignableTradeRequest$1 {
21620
- /**
21621
- * ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
21622
- * @type {number}
21623
- * @memberof GetSignableTradeRequest
21624
- */
21625
- 'expiration_timestamp'?: number;
21626
- /**
21627
- * Inclusion of either maker or taker fees
21628
- * @type {Array<FeeEntry>}
21629
- * @memberof GetSignableTradeRequest
21630
- */
21631
- 'fees'?: Array<FeeEntry>;
21632
- /**
21633
- * The ID of the maker order involved
21634
- * @type {number}
21635
- * @memberof GetSignableTradeRequest
21636
- */
21637
- 'order_id': number;
21638
- /**
21639
- * Ethereum address of the submitting user
21640
- * @type {string}
21641
- * @memberof GetSignableTradeRequest
21642
- */
21643
- 'user': string;
20819
+ declare class TradesApi extends TradesApi$1 {
21644
20820
  }
21645
-
21646
- /**
21647
- * Immutable X API
21648
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21649
- *
21650
- * The version of the OpenAPI document: 3.0
21651
- * Contact: support@immutable.com
21652
- *
21653
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21654
- * https://openapi-generator.tech
21655
- * Do not edit the class manually.
21656
- */
21657
- /**
21658
- *
21659
- * @export
21660
- * @interface RegisterUserResponse
21661
- */
21662
- interface RegisterUserResponse {
21663
- /**
21664
- * Immutable signature authorising registration
21665
- * @type {string}
21666
- * @memberof RegisterUserResponse
21667
- */
21668
- 'tx_hash': string;
20821
+ declare class TransfersApi extends TransfersApi$1 {
21669
20822
  }
21670
-
21671
- /**
21672
- * Parameter required to create an Order
21673
- */
21674
- interface UnsignedOrderRequest$1 {
21675
- /**
21676
- * The amount of tokens that will be bought for this order
21677
- */
21678
- buy: TokenAmount$1;
21679
- /**
21680
- * The amount of tokens that will be sold for this order
21681
- */
21682
- sell: TokenAmount$1;
21683
- /**
21684
- * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
21685
- */
21686
- expiration_timestamp?: number;
21687
- /**
21688
- * Inclusion of either maker or taker fees
21689
- */
21690
- fees?: Array<FeeEntry>;
20823
+ declare class UsersApi extends UsersApi$1 {
21691
20824
  }
21692
- /**
21693
- * Parameter required to create a Transfer
21694
- */
21695
- declare type UnsignedTransferRequest$1 = TokenAmount$1 & {
21696
- /**
21697
- * Ethereum address of the receiving user
21698
- */
21699
- receiver: string;
21700
- };
21701
- /**
21702
- * Parameter required to create a Transfer
21703
- */
21704
- declare type UnsignedExchangeTransferRequest$1 = ExchangeTokenAmount$1 & {
21705
- /**
21706
- * Ethereum address of the receiving user
21707
- */
21708
- receiver: string;
21709
- /**
21710
- * Exchange transaction ID
21711
- */
21712
- transactionID: string;
21713
- };
21714
-
21715
- /**
21716
- * Parameter required to create a batchNftTransfer
21717
- */
21718
- interface NftTransferDetails$1 {
21719
- /**
21720
- * Ethereum address of the receiving user
21721
- */
21722
- receiver: string;
21723
- /**
21724
- * The token ID
21725
- */
21726
- tokenId: string;
21727
- /**
21728
- * The token contract address
21729
- */
21730
- tokenAddress: string;
20825
+ declare class WithdrawalsApi extends WithdrawalsApi$1 {
21731
20826
  }
21732
-
21733
- /**
21734
- * The configuration for the Ethereum network
21735
- */
21736
- interface EthConfiguration$1 {
21737
- coreContractAddress: string;
21738
- registrationContractAddress: string;
21739
- chainID: number;
20827
+ interface APIError extends APIError$2 {
21740
20828
  }
21741
- /**
21742
- * The configuration for the ImmutableX client
21743
- */
21744
- interface ImmutableXConfiguration$1 {
21745
- /**
21746
- * The configuration for the API client
21747
- */
21748
- apiConfiguration: Configuration;
21749
- /**
21750
- * The configuration for the Ethereum network
21751
- */
21752
- ethConfiguration: EthConfiguration$1;
20829
+ interface AcceptPrimarySaleBadRequestBody extends AcceptPrimarySaleBadRequestBody$1 {
21753
20830
  }
21754
-
21755
- interface IMXProvider {
21756
- /**
21757
- * Get the Signer address
21758
- *
21759
- * @return {Promise<string>} Returns a promise that resolves with the signer's address
21760
- */
21761
- getAddress(): Promise<string>;
21762
- /**
21763
- * Register a User to Immutable X if they are not already registered
21764
- *
21765
- * @return {Promise<RegisterUserResponse>} Returns a promise that resolves with the user registration response
21766
- */
21767
- registerOffchain(): Promise<RegisterUserResponse>;
21768
- /**
21769
- * Checks if a User is registered off-chain
21770
- *
21771
- * @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
21772
- */
21773
- isRegisteredOffchain(): Promise<boolean>;
21774
- /**
21775
- * Checks if a User is registered on-chain
21776
- *
21777
- * @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered, false otherwise
21778
- */
21779
- isRegisteredOnchain(): Promise<boolean>;
21780
- /**
21781
- * Create an Order
21782
- *
21783
- * @param {UnsignedOrderRequest} request The unsigned order request to create an order
21784
- * @return {Promise<CreateOrderResponse>} Returns a promise that resolves with the created Order
21785
- */
21786
- createOrder(request: UnsignedOrderRequest$1): Promise<CreateOrderResponse$1>;
21787
- /**
21788
- * Cancel an Order
21789
- *
21790
- * @param {GetSignableCancelOrderRequest} request The signable cancel order request
21791
- * @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
21792
- */
21793
- cancelOrder(request: GetSignableCancelOrderRequest$1): Promise<CancelOrderResponse$1>;
21794
- /**
21795
- * Create a Trade
21796
- *
21797
- * @param {GetSignableTradeRequest} request The signable trade request
21798
- * @return {Promise<CreateTradeResponse>} Returns a promise that resolves with the created Trade
21799
- */
21800
- createTrade(request: GetSignableTradeRequest$1): Promise<CreateTradeResponse$1>;
21801
- /**
21802
- * Create a new Transfer request
21803
- *
21804
- * @param {UnsignedTransferRequest} request The unsigned transfer request
21805
- * @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Transfer
21806
- */
21807
- transfer(request: UnsignedTransferRequest$1): Promise<CreateTransferResponseV1$1>;
21808
- /**
21809
- * Create a batch of NFT transfer requests
21810
- *
21811
- * @param {Array<NftTransferDetails>} request An array of NFT transfer details
21812
- * @return {Promise<CreateTransferResponse>} Resolves a promise that resolves with the list of Transfer IDs
21813
- */
21814
- batchNftTransfer(request: Array<NftTransferDetails$1>): Promise<CreateTransferResponse>;
21815
- /**
21816
- * Create a new Exchange transaction
21817
- *
21818
- * @param {UnsignedExchangeTransferRequest} request The unsigned exchange transfer request
21819
- * @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Exchange Transaction
21820
- */
21821
- exchangeTransfer(request: UnsignedExchangeTransferRequest$1): Promise<CreateTransferResponseV1$1>;
21822
- /**
21823
- * Deposit either ETH, ERC20 or ERC721 tokens
21824
- *
21825
- * @param {TokenAmount} request The token type amount in its corresponding unit
21826
- * @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
21827
- */
21828
- deposit(deposit: TokenAmount$1): Promise<TransactionResponse>;
21829
- /**
21830
- * Create a Withdrawal
21831
- *
21832
- * @param {TokenAmount} request The token type amount in its corresponding unit
21833
- * @return {Promise<CreateWithdrawalResponse>} Returns a promise that resolves with the created Withdrawal
21834
- */
21835
- prepareWithdrawal(request: TokenAmount$1): Promise<CreateWithdrawalResponse>;
21836
- /**
21837
- * Completes a Withdrawal
21838
- *
21839
- * @param {string} starkPublicKey The stark public key
21840
- * @param {AnyToken} token The token to withdraw
21841
- * @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
21842
- */
21843
- completeWithdrawal(starkPublicKey: string, token: AnyToken$1): Promise<TransactionResponse>;
20831
+ interface AcceptPrimarySaleForbiddenBody extends AcceptPrimarySaleForbiddenBody$1 {
21844
20832
  }
21845
-
21846
- interface ProviderOverrides {
21847
- immutableXConfig: ImmutableXConfiguration$1;
20833
+ interface AcceptPrimarySaleNotFoundBody extends AcceptPrimarySaleNotFoundBody$1 {
21848
20834
  }
21849
- interface ProviderModuleConfiguration extends ModuleConfiguration<ProviderOverrides> {
20835
+ interface AcceptPrimarySaleOKBody extends AcceptPrimarySaleOKBody$1 {
21850
20836
  }
21851
- declare class ProviderConfiguration {
21852
- readonly immutableXConfig: ImmutableXConfiguration$1;
21853
- readonly baseConfig: ImmutableConfiguration;
21854
- constructor({ baseConfig, overrides }: ProviderModuleConfiguration);
20837
+ interface AcceptPrimarySaleUnauthorizedBody extends AcceptPrimarySaleUnauthorizedBody$1 {
21855
20838
  }
21856
-
21857
- declare class GenericIMXProvider implements IMXProvider {
21858
- private readonly config;
21859
- private readonly signers;
21860
- constructor(config: ProviderConfiguration, ethSigner: Signer, starkSigner: StarkSigner$1);
21861
- getAddress(): Promise<string>;
21862
- isRegisteredOffchain(): Promise<boolean>;
21863
- registerOffchain(): Promise<RegisterUserResponse>;
21864
- batchNftTransfer(request: Array<NftTransferDetails$1>): Promise<CreateTransferResponse>;
21865
- cancelOrder(request: GetSignableCancelOrderRequest$1): Promise<CancelOrderResponse$1>;
21866
- completeWithdrawal(starkPublicKey: string, token: AnyToken$1): Promise<TransactionResponse>;
21867
- createOrder(request: UnsignedOrderRequest$1): Promise<CreateOrderResponse$1>;
21868
- createTrade(request: GetSignableTradeRequest$1): Promise<CreateTradeResponse$1>;
21869
- deposit(tokenAmount: TokenAmount$1): Promise<TransactionResponse>;
21870
- exchangeTransfer(request: UnsignedExchangeTransferRequest$1): Promise<CreateTransferResponseV1$1>;
21871
- isRegisteredOnchain(): Promise<boolean>;
21872
- prepareWithdrawal(request: TokenAmount$1): Promise<CreateWithdrawalResponse>;
21873
- transfer(request: UnsignedTransferRequest$1): Promise<CreateTransferResponseV1$1>;
20839
+ interface AddMetadataSchemaToCollectionRequest extends AddMetadataSchemaToCollectionRequest$1 {
21874
20840
  }
21875
-
21876
- declare class MetaMaskIMXProvider extends GenericIMXProvider {
21877
- private static imxSigner;
21878
- static connect(config: ProviderConfiguration): Promise<MetaMaskIMXProvider>;
21879
- static disconnect(): Promise<void>;
21880
- static signMessage(message: string): Promise<string>;
20841
+ interface AssetsApiGetAssetRequest extends AssetsApiGetAssetRequest$1 {
21881
20842
  }
21882
-
21883
- declare class ApiConfiguration extends Configuration$2 {
20843
+ interface AssetsApiListAssetsRequest extends AssetsApiListAssetsRequest$1 {
21884
20844
  }
21885
- interface ImmutableXConfigurationParams {
21886
- basePath: string;
21887
- chainID: number;
21888
- coreContractAddress: string;
21889
- registrationContractAddress: string;
21890
- baseConfig?: ImmutableConfiguration;
20845
+ interface BalancesApiGetBalanceRequest extends BalancesApiGetBalanceRequest$1 {
21891
20846
  }
21892
- interface EthConfiguration {
21893
- coreContractAddress: string;
21894
- registrationContractAddress: string;
21895
- chainID: number;
20847
+ interface BalancesApiListBalancesRequest extends BalancesApiListBalancesRequest$1 {
21896
20848
  }
21897
- interface ImxEnvironment extends EthConfiguration {
21898
- basePath: string;
21899
- headers?: Record<string, string>;
21900
- sdkVersion?: string;
21901
- baseConfig?: ImmutableConfiguration;
20849
+ interface CancelOrderResponse extends CancelOrderResponse$1 {
21902
20850
  }
21903
- interface ImmutableXConfiguration {
21904
- /**
21905
- * The configuration for the API client
21906
- */
21907
- apiConfiguration: ApiConfiguration;
21908
- /**
21909
- * The configuration for the Ethereum network
21910
- */
21911
- ethConfiguration: EthConfiguration;
20851
+ interface CollectionsApiGetCollectionRequest extends CollectionsApiGetCollectionRequest$2 {
21912
20852
  }
21913
- /**
21914
- * @dev use createImmutableXConfiguration instead
21915
- */
21916
- declare const createConfig: ({ coreContractAddress, registrationContractAddress, chainID, basePath, headers, sdkVersion, baseConfig, }: ImxEnvironment) => ImmutableXConfiguration;
21917
- /**
21918
- * createImmutableXConfiguration to create a custom ImmutableXConfiguration
21919
- * other than the production and sandbox defined below.
21920
- */
21921
- declare const createImmutableXConfiguration: ({ basePath, chainID, coreContractAddress, registrationContractAddress, baseConfig, }: ImmutableXConfigurationParams) => ImmutableXConfiguration;
21922
- interface ImxOverrides {
21923
- immutableXConfig: ImmutableXConfiguration;
20853
+ interface CollectionsApiListCollectionFiltersRequest extends CollectionsApiListCollectionFiltersRequest$1 {
21924
20854
  }
21925
- interface ImxModuleConfiguration extends ModuleConfiguration<ImxOverrides> {
20855
+ interface CollectionsApiListCollectionsRequest extends CollectionsApiListCollectionsRequest$2 {
21926
20856
  }
21927
- declare class ImxConfiguration {
21928
- readonly immutableXConfig: ImmutableXConfiguration;
21929
- readonly baseConfig: ImmutableConfiguration;
21930
- constructor({ baseConfig, overrides }: ImxModuleConfiguration);
20857
+ interface CreateCollectionRequest extends CreateCollectionRequest$1 {
21931
20858
  }
21932
- interface ConfigOptions {
21933
- environment: Environment;
21934
- apiKey?: string;
21935
- publishableKey?: string;
21936
- rateLimitingKey?: string;
20859
+ interface CreateMetadataRefreshRequest extends CreateMetadataRefreshRequest$1 {
21937
20860
  }
21938
- /**
21939
- * @name imxClientConfig
21940
- * @description Helper method to create a standard ImxModuleConfiguration
21941
- * object for the IMXClient class. If you need to override the default
21942
- * configuration, manually construct the ImxModuleConfiguration object.
21943
- * @param configOptions {ConfigOptions} The configuration options
21944
- * @param configOptions.environment {Environment} The environment to connect to
21945
- * @param configOptions.apkKey {string} The API key from Immutable Hub
21946
- * @param configOptions.publishableKey {string} The publishable key from Immutable Hub
21947
- * @returns {ImxModuleConfiguration}
21948
- */
21949
- declare const imxClientConfig: (configOptions: ConfigOptions) => ImxModuleConfiguration;
21950
-
21951
- /**
21952
- * An abstraction of a Stark account, which can be used to sign messages and transactions on StarkEx to execute state changing operations
21953
- */
21954
- interface StarkSigner {
21955
- /**
21956
- * Signs the prefixed-message
21957
- * @params message - this must be a UTF8-message
21958
- * @example "0x1234"
21959
- * @returns the signed prefixed-message
21960
- */
21961
- signMessage(message: string): Promise<string>;
21962
- /**
21963
- * Get the Signer address
21964
- * @returns the Signer's checksum address
21965
- */
21966
- getAddress(): string | Promise<string>;
20861
+ interface CreateOrderResponse extends CreateOrderResponse$1 {
21967
20862
  }
21968
- /**
21969
- * A pair of Signers
21970
- */
21971
- interface WalletConnection {
21972
- /**
21973
- * The L1 signer
21974
- */
21975
- ethSigner: Signer;
21976
- /**
21977
- * The L2 signer
21978
- */
21979
- starkSigner: StarkSigner;
20863
+ interface CreatePrimarySaleBadRequestBody extends CreatePrimarySaleBadRequestBody$1 {
21980
20864
  }
21981
-
21982
- /**
21983
- * An ERC20 token
21984
- */
21985
- interface ERC20Token {
21986
- type: 'ERC20';
21987
- tokenAddress: string;
20865
+ interface CreatePrimarySaleCreatedBody extends CreatePrimarySaleCreatedBody$1 {
21988
20866
  }
21989
- /**
21990
- * An ERC721 token
21991
- */
21992
- interface ERC721Token {
21993
- type: 'ERC721';
21994
- tokenId: string;
21995
- tokenAddress: string;
20867
+ interface CreatePrimarySaleForbiddenBody extends CreatePrimarySaleForbiddenBody$1 {
21996
20868
  }
21997
- /**
21998
- * An ETH token
21999
- */
22000
- interface ETHToken {
22001
- type: 'ETH';
20869
+ interface CreatePrimarySaleNotFoundBody extends CreatePrimarySaleNotFoundBody$1 {
22002
20870
  }
22003
- /**
22004
- * An amount of ETH token of unit Wei
22005
- */
22006
- interface ETHAmount extends ETHToken {
22007
- /**
22008
- * An amount in unit Wei
22009
- */
22010
- amount: string;
20871
+ interface CreatePrimarySaleUnauthorizedBody extends CreatePrimarySaleUnauthorizedBody$1 {
22011
20872
  }
22012
- /**
22013
- * The token details and amount of ERC20 token units
22014
- */
22015
- interface ERC20Amount extends ERC20Token {
22016
- /**
22017
- * An amount in units for the given ERC20 token
22018
- */
22019
- amount: string;
20873
+ interface CreateTradeResponse extends CreateTradeResponse$1 {
22020
20874
  }
22021
- /**
22022
- * Union type that represents all token types
22023
- */
22024
- type AnyToken = ETHToken | ERC721Token | ERC20Token;
22025
- /**
22026
- * Union type that represents all token type amounts
22027
- */
22028
- type TokenAmount = ETHAmount | ERC20Amount | ERC721Token;
22029
- /**
22030
- * Union type that represents exchange token type amounts
22031
- */
22032
- type ExchangeTokenAmount = ETHAmount | ERC20Amount;
22033
-
22034
- /**
22035
- * Parameter required to create an Order
22036
- */
22037
- interface UnsignedOrderRequest {
22038
- /**
22039
- * The amount of tokens that will be bought for this order
22040
- */
22041
- buy: TokenAmount;
22042
- /**
22043
- * The amount of tokens that will be sold for this order
22044
- */
22045
- sell: TokenAmount;
22046
- /**
22047
- * ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
22048
- */
22049
- expiration_timestamp?: number;
22050
- /**
22051
- * Inclusion of either maker or taker fees
22052
- */
22053
- fees?: Array<FeeEntry$1>;
22054
- }
22055
- /**
22056
- * Parameter required to create a Transfer
22057
- */
22058
- type UnsignedTransferRequest = TokenAmount & {
22059
- /**
22060
- * Ethereum address of the receiving user
22061
- */
22062
- receiver: string;
22063
- };
22064
- /**
22065
- * Parameter required to Mint tokens
22066
- */
22067
- type UnsignedMintRequest = Omit<MintRequest$1, 'auth_signature'>;
22068
- /**
22069
- * Parameter required to create a Transfer
22070
- */
22071
- type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
22072
- /**
22073
- * Ethereum address of the receiving user
22074
- */
22075
- receiver: string;
22076
- /**
22077
- * Exchange transaction ID
22078
- */
22079
- transactionID: string;
22080
- };
22081
- interface StarkExContractVersion {
22082
- version: string;
22083
- message: string;
22084
- }
22085
-
22086
- /**
22087
- * Parameter required to create a batchNftTransfer
22088
- */
22089
- interface NftTransferDetails {
22090
- /**
22091
- * Ethereum address of the receiving user
22092
- */
22093
- receiver: string;
22094
- /**
22095
- * The token ID
22096
- */
22097
- tokenId: string;
22098
- /**
22099
- * The token contract address
22100
- */
22101
- tokenAddress: string;
22102
- }
22103
-
22104
- /**
22105
- * Custom Error class that is returned from the API when a request fails
22106
- */
22107
- declare class IMXError extends Error {
22108
- readonly code: string;
22109
- readonly details?: string;
22110
- constructor({ code, details, message }: APIError$2);
22111
- }
22112
-
22113
- /**
22114
- * Need to specifically export the classes and interfaces from the generated
22115
- * clients imx object for rollup to bundle them correctly.
22116
- */
22117
- declare class AssetsApi extends AssetsApi$1 {
22118
- }
22119
- declare class BalancesApi extends BalancesApi$1 {
22120
- }
22121
- declare class CollectionsApi extends CollectionsApi$1 {
22122
- }
22123
- declare class DepositsApi extends DepositsApi$1 {
22124
- }
22125
- declare class EncodingApi extends EncodingApi$1 {
22126
- }
22127
- declare class ExchangesApi extends ExchangesApi$1 {
22128
- }
22129
- declare class MintsApi extends MintsApi$1 {
22130
- }
22131
- declare class MetadataApi extends MetadataApi$1 {
22132
- }
22133
- declare class MetadataRefreshesApi extends MetadataRefreshesApi$1 {
22134
- }
22135
- declare class NftCheckoutPrimaryApi extends NftCheckoutPrimaryApi$1 {
22136
- }
22137
- declare class OrdersApi extends OrdersApi$1 {
22138
- }
22139
- declare class PrimarySalesApi extends PrimarySalesApi$1 {
22140
- }
22141
- declare class ProjectsApi extends ProjectsApi$1 {
22142
- }
22143
- declare class TokensApi extends TokensApi$1 {
22144
- }
22145
- declare class TradesApi extends TradesApi$1 {
22146
- }
22147
- declare class TransfersApi extends TransfersApi$1 {
22148
- }
22149
- declare class UsersApi extends UsersApi$1 {
22150
- }
22151
- declare class WithdrawalsApi extends WithdrawalsApi$1 {
22152
- }
22153
- interface APIError extends APIError$2 {
22154
- }
22155
- interface AcceptPrimarySaleBadRequestBody extends AcceptPrimarySaleBadRequestBody$1 {
22156
- }
22157
- interface AcceptPrimarySaleForbiddenBody extends AcceptPrimarySaleForbiddenBody$1 {
22158
- }
22159
- interface AcceptPrimarySaleNotFoundBody extends AcceptPrimarySaleNotFoundBody$1 {
22160
- }
22161
- interface AcceptPrimarySaleOKBody extends AcceptPrimarySaleOKBody$1 {
22162
- }
22163
- interface AcceptPrimarySaleUnauthorizedBody extends AcceptPrimarySaleUnauthorizedBody$1 {
22164
- }
22165
- interface AddMetadataSchemaToCollectionRequest extends AddMetadataSchemaToCollectionRequest$1 {
22166
- }
22167
- interface AssetsApiGetAssetRequest extends AssetsApiGetAssetRequest$1 {
22168
- }
22169
- interface AssetsApiListAssetsRequest extends AssetsApiListAssetsRequest$1 {
22170
- }
22171
- interface BalancesApiGetBalanceRequest extends BalancesApiGetBalanceRequest$1 {
22172
- }
22173
- interface BalancesApiListBalancesRequest extends BalancesApiListBalancesRequest$1 {
22174
- }
22175
- interface CancelOrderResponse extends CancelOrderResponse$2 {
22176
- }
22177
- interface CollectionsApiGetCollectionRequest extends CollectionsApiGetCollectionRequest$2 {
22178
- }
22179
- interface CollectionsApiListCollectionFiltersRequest extends CollectionsApiListCollectionFiltersRequest$1 {
22180
- }
22181
- interface CollectionsApiListCollectionsRequest extends CollectionsApiListCollectionsRequest$2 {
22182
- }
22183
- interface CreateCollectionRequest extends CreateCollectionRequest$1 {
22184
- }
22185
- interface CreateMetadataRefreshRequest extends CreateMetadataRefreshRequest$1 {
22186
- }
22187
- interface CreateOrderResponse extends CreateOrderResponse$2 {
22188
- }
22189
- interface CreatePrimarySaleBadRequestBody extends CreatePrimarySaleBadRequestBody$1 {
22190
- }
22191
- interface CreatePrimarySaleCreatedBody extends CreatePrimarySaleCreatedBody$1 {
22192
- }
22193
- interface CreatePrimarySaleForbiddenBody extends CreatePrimarySaleForbiddenBody$1 {
22194
- }
22195
- interface CreatePrimarySaleNotFoundBody extends CreatePrimarySaleNotFoundBody$1 {
22196
- }
22197
- interface CreatePrimarySaleUnauthorizedBody extends CreatePrimarySaleUnauthorizedBody$1 {
22198
- }
22199
- interface CreateTradeResponse extends CreateTradeResponse$2 {
22200
- }
22201
- interface CreateTransferResponseV1 extends CreateTransferResponseV1$2 {
20875
+ interface CreateTransferResponseV1 extends CreateTransferResponseV1$1 {
22202
20876
  }
22203
20877
  interface DepositsApiGetDepositRequest extends DepositsApiGetDepositRequest$1 {
22204
20878
  }
@@ -22210,11 +20884,11 @@ interface ExchangesApiGetExchangeRequest extends ExchangesApiGetExchangeRequest$
22210
20884
  }
22211
20885
  interface ExchangesApiGetExchangesRequest extends ExchangesApiGetExchangesRequest$1 {
22212
20886
  }
22213
- interface GetSignableCancelOrderRequest extends GetSignableCancelOrderRequest$2 {
20887
+ interface GetSignableCancelOrderRequest extends GetSignableCancelOrderRequest$1 {
22214
20888
  }
22215
20889
  interface GetSignableOrderRequest extends GetSignableOrderRequest$1 {
22216
20890
  }
22217
- interface GetSignableTradeRequest extends GetSignableTradeRequest$2 {
20891
+ interface GetSignableTradeRequest extends GetSignableTradeRequest$1 {
22218
20892
  }
22219
20893
  interface MetadataApiGetMetadataSchemaRequest extends MetadataApiGetMetadataSchemaRequest$1 {
22220
20894
  }
@@ -22678,23 +21352,667 @@ declare class IMXClient {
22678
21352
  declare class ImmutableX extends IMXClient {
22679
21353
  }
22680
21354
 
22681
- /**
22682
- * Generates a new Stark private key
22683
- * @returns the private key as a hex string
22684
- */
22685
- declare function generateStarkPrivateKey(): string;
22686
- /**
22687
- * Generates a deterministic Stark private key from the provided signer.
22688
- * @returns the private key as a hex string
22689
- */
22690
- declare function generateLegacyStarkPrivateKey(signer: Signer): Promise<string>;
21355
+ /**
21356
+ * Generates a new Stark private key
21357
+ * @returns the private key as a hex string
21358
+ */
21359
+ declare function generateStarkPrivateKey(): string;
21360
+ /**
21361
+ * Generates a deterministic Stark private key from the provided signer.
21362
+ * @returns the private key as a hex string
21363
+ */
21364
+ declare function generateLegacyStarkPrivateKey(signer: Signer): Promise<string>;
21365
+
21366
+ /**
21367
+ * Creates a new Stark Signer
21368
+ * @params starkPrivateKey - the private key as a hex string
21369
+ * @returns a StarkSigner
21370
+ */
21371
+ declare function createStarkSigner(starkPrivateKey: string): StarkSigner;
21372
+
21373
+ interface JsonFragmentType {
21374
+ readonly name?: string;
21375
+ readonly indexed?: boolean;
21376
+ readonly type?: string;
21377
+ readonly internalType?: any;
21378
+ readonly components?: ReadonlyArray<JsonFragmentType>;
21379
+ }
21380
+ interface JsonFragment {
21381
+ readonly name?: string;
21382
+ readonly type?: string;
21383
+ readonly anonymous?: boolean;
21384
+ readonly payable?: boolean;
21385
+ readonly constant?: boolean;
21386
+ readonly stateMutability?: string;
21387
+ readonly inputs?: ReadonlyArray<JsonFragmentType>;
21388
+ readonly outputs?: ReadonlyArray<JsonFragmentType>;
21389
+ readonly gas?: string;
21390
+ }
21391
+ declare class ParamType {
21392
+ readonly name: string;
21393
+ readonly type: string;
21394
+ readonly baseType: string;
21395
+ readonly indexed: boolean;
21396
+ readonly components: Array<ParamType>;
21397
+ readonly arrayLength: number;
21398
+ readonly arrayChildren: ParamType;
21399
+ readonly _isParamType: boolean;
21400
+ constructor(constructorGuard: any, params: any);
21401
+ format(format?: string): string;
21402
+ static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType;
21403
+ static fromObject(value: JsonFragmentType | ParamType): ParamType;
21404
+ static fromString(value: string, allowIndexed?: boolean): ParamType;
21405
+ static isParamType(value: any): value is ParamType;
21406
+ }
21407
+ declare abstract class Fragment {
21408
+ readonly type: string;
21409
+ readonly name: string;
21410
+ readonly inputs: Array<ParamType>;
21411
+ readonly _isFragment: boolean;
21412
+ constructor(constructorGuard: any, params: any);
21413
+ abstract format(format?: string): string;
21414
+ static from(value: Fragment | JsonFragment | string): Fragment;
21415
+ static fromObject(value: Fragment | JsonFragment): Fragment;
21416
+ static fromString(value: string): Fragment;
21417
+ static isFragment(value: any): value is Fragment;
21418
+ }
21419
+ declare class EventFragment extends Fragment {
21420
+ readonly anonymous: boolean;
21421
+ format(format?: string): string;
21422
+ static from(value: EventFragment | JsonFragment | string): EventFragment;
21423
+ static fromObject(value: JsonFragment | EventFragment): EventFragment;
21424
+ static fromString(value: string): EventFragment;
21425
+ static isEventFragment(value: any): value is EventFragment;
21426
+ }
21427
+ declare class ConstructorFragment extends Fragment {
21428
+ stateMutability: string;
21429
+ payable: boolean;
21430
+ gas?: BigNumber;
21431
+ format(format?: string): string;
21432
+ static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment;
21433
+ static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment;
21434
+ static fromString(value: string): ConstructorFragment;
21435
+ static isConstructorFragment(value: any): value is ConstructorFragment;
21436
+ }
21437
+ declare class FunctionFragment extends ConstructorFragment {
21438
+ constant: boolean;
21439
+ outputs?: Array<ParamType>;
21440
+ format(format?: string): string;
21441
+ static from(value: FunctionFragment | JsonFragment | string): FunctionFragment;
21442
+ static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment;
21443
+ static fromString(value: string): FunctionFragment;
21444
+ static isFunctionFragment(value: any): value is FunctionFragment;
21445
+ }
21446
+ declare class ErrorFragment extends Fragment {
21447
+ format(format?: string): string;
21448
+ static from(value: ErrorFragment | JsonFragment | string): ErrorFragment;
21449
+ static fromObject(value: ErrorFragment | JsonFragment): ErrorFragment;
21450
+ static fromString(value: string): ErrorFragment;
21451
+ static isErrorFragment(value: any): value is ErrorFragment;
21452
+ }
21453
+
21454
+ interface Result extends ReadonlyArray<any> {
21455
+ readonly [key: string]: any;
21456
+ }
21457
+ declare type CoerceFunc$1 = (type: string, value: any) => any;
21458
+ declare abstract class Coder {
21459
+ readonly name: string;
21460
+ readonly type: string;
21461
+ readonly localName: string;
21462
+ readonly dynamic: boolean;
21463
+ constructor(name: string, type: string, localName: string, dynamic: boolean);
21464
+ _throwError(message: string, value: any): void;
21465
+ abstract encode(writer: Writer, value: any): number;
21466
+ abstract decode(reader: Reader): any;
21467
+ abstract defaultValue(): any;
21468
+ }
21469
+ declare class Writer {
21470
+ readonly wordSize: number;
21471
+ _data: Array<Uint8Array>;
21472
+ _dataLength: number;
21473
+ _padding: Uint8Array;
21474
+ constructor(wordSize?: number);
21475
+ get data(): string;
21476
+ get length(): number;
21477
+ _writeData(data: Uint8Array): number;
21478
+ appendWriter(writer: Writer): number;
21479
+ writeBytes(value: BytesLike): number;
21480
+ _getValue(value: BigNumberish): Uint8Array;
21481
+ writeValue(value: BigNumberish): number;
21482
+ writeUpdatableValue(): (value: BigNumberish) => void;
21483
+ }
21484
+ declare class Reader {
21485
+ readonly wordSize: number;
21486
+ readonly allowLoose: boolean;
21487
+ readonly _data: Uint8Array;
21488
+ readonly _coerceFunc: CoerceFunc$1;
21489
+ _offset: number;
21490
+ constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc$1, allowLoose?: boolean);
21491
+ get data(): string;
21492
+ get consumed(): number;
21493
+ static coerce(name: string, value: any): any;
21494
+ coerce(name: string, value: any): any;
21495
+ _peekBytes(offset: number, length: number, loose?: boolean): Uint8Array;
21496
+ subReader(offset: number): Reader;
21497
+ readBytes(length: number, loose?: boolean): Uint8Array;
21498
+ readValue(): BigNumber;
21499
+ }
21500
+
21501
+ declare type CoerceFunc = (type: string, value: any) => any;
21502
+ declare class AbiCoder {
21503
+ readonly coerceFunc: CoerceFunc;
21504
+ constructor(coerceFunc?: CoerceFunc);
21505
+ _getCoder(param: ParamType): Coder;
21506
+ _getWordSize(): number;
21507
+ _getReader(data: Uint8Array, allowLoose?: boolean): Reader;
21508
+ _getWriter(): Writer;
21509
+ getDefaultValue(types: ReadonlyArray<string | ParamType>): Result;
21510
+ encode(types: ReadonlyArray<string | ParamType>, values: ReadonlyArray<any>): string;
21511
+ decode(types: ReadonlyArray<string | ParamType>, data: BytesLike, loose?: boolean): Result;
21512
+ }
21513
+
21514
+ declare class LogDescription extends Description<LogDescription> {
21515
+ readonly eventFragment: EventFragment;
21516
+ readonly name: string;
21517
+ readonly signature: string;
21518
+ readonly topic: string;
21519
+ readonly args: Result;
21520
+ }
21521
+ declare class TransactionDescription extends Description<TransactionDescription> {
21522
+ readonly functionFragment: FunctionFragment;
21523
+ readonly name: string;
21524
+ readonly args: Result;
21525
+ readonly signature: string;
21526
+ readonly sighash: string;
21527
+ readonly value: BigNumber;
21528
+ }
21529
+ declare class ErrorDescription extends Description<ErrorDescription> {
21530
+ readonly errorFragment: ErrorFragment;
21531
+ readonly name: string;
21532
+ readonly args: Result;
21533
+ readonly signature: string;
21534
+ readonly sighash: string;
21535
+ }
21536
+ declare class Indexed extends Description<Indexed> {
21537
+ readonly hash: string;
21538
+ readonly _isIndexed: boolean;
21539
+ static isIndexed(value: any): value is Indexed;
21540
+ }
21541
+ declare class Interface {
21542
+ readonly fragments: ReadonlyArray<Fragment>;
21543
+ readonly errors: {
21544
+ [name: string]: ErrorFragment;
21545
+ };
21546
+ readonly events: {
21547
+ [name: string]: EventFragment;
21548
+ };
21549
+ readonly functions: {
21550
+ [name: string]: FunctionFragment;
21551
+ };
21552
+ readonly structs: {
21553
+ [name: string]: any;
21554
+ };
21555
+ readonly deploy: ConstructorFragment;
21556
+ readonly _abiCoder: AbiCoder;
21557
+ readonly _isInterface: boolean;
21558
+ constructor(fragments: string | ReadonlyArray<Fragment | JsonFragment | string>);
21559
+ format(format?: string): string | Array<string>;
21560
+ static getAbiCoder(): AbiCoder;
21561
+ static getAddress(address: string): string;
21562
+ static getSighash(fragment: ErrorFragment | FunctionFragment): string;
21563
+ static getEventTopic(eventFragment: EventFragment): string;
21564
+ getFunction(nameOrSignatureOrSighash: string): FunctionFragment;
21565
+ getEvent(nameOrSignatureOrTopic: string): EventFragment;
21566
+ getError(nameOrSignatureOrSighash: string): ErrorFragment;
21567
+ getSighash(fragment: ErrorFragment | FunctionFragment | string): string;
21568
+ getEventTopic(eventFragment: EventFragment | string): string;
21569
+ _decodeParams(params: ReadonlyArray<ParamType>, data: BytesLike): Result;
21570
+ _encodeParams(params: ReadonlyArray<ParamType>, values: ReadonlyArray<any>): string;
21571
+ encodeDeploy(values?: ReadonlyArray<any>): string;
21572
+ decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result;
21573
+ encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray<any>): string;
21574
+ decodeFunctionData(functionFragment: FunctionFragment | string, data: BytesLike): Result;
21575
+ encodeFunctionData(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
21576
+ decodeFunctionResult(functionFragment: FunctionFragment | string, data: BytesLike): Result;
21577
+ encodeFunctionResult(functionFragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
21578
+ encodeFilterTopics(eventFragment: EventFragment | string, values: ReadonlyArray<any>): Array<string | Array<string>>;
21579
+ encodeEventLog(eventFragment: EventFragment | string, values: ReadonlyArray<any>): {
21580
+ data: string;
21581
+ topics: Array<string>;
21582
+ };
21583
+ decodeEventLog(eventFragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray<string>): Result;
21584
+ parseTransaction(tx: {
21585
+ data: string;
21586
+ value?: BigNumberish;
21587
+ }): TransactionDescription;
21588
+ parseLog(log: {
21589
+ topics: Array<string>;
21590
+ data: string;
21591
+ }): LogDescription;
21592
+ parseError(data: BytesLike): ErrorDescription;
21593
+ static isInterface(value: any): value is Interface;
21594
+ }
21595
+
21596
+ interface Overrides {
21597
+ gasLimit?: BigNumberish | Promise<BigNumberish>;
21598
+ gasPrice?: BigNumberish | Promise<BigNumberish>;
21599
+ maxFeePerGas?: BigNumberish | Promise<BigNumberish>;
21600
+ maxPriorityFeePerGas?: BigNumberish | Promise<BigNumberish>;
21601
+ nonce?: BigNumberish | Promise<BigNumberish>;
21602
+ type?: number;
21603
+ accessList?: AccessListish;
21604
+ customData?: Record<string, any>;
21605
+ ccipReadEnabled?: boolean;
21606
+ }
21607
+ interface PayableOverrides extends Overrides {
21608
+ value?: BigNumberish | Promise<BigNumberish>;
21609
+ }
21610
+ interface CallOverrides extends PayableOverrides {
21611
+ blockTag?: BlockTag | Promise<BlockTag>;
21612
+ from?: string | Promise<string>;
21613
+ }
21614
+ interface PopulatedTransaction {
21615
+ to?: string;
21616
+ from?: string;
21617
+ nonce?: number;
21618
+ gasLimit?: BigNumber;
21619
+ gasPrice?: BigNumber;
21620
+ data?: string;
21621
+ value?: BigNumber;
21622
+ chainId?: number;
21623
+ type?: number;
21624
+ accessList?: AccessList;
21625
+ maxFeePerGas?: BigNumber;
21626
+ maxPriorityFeePerGas?: BigNumber;
21627
+ customData?: Record<string, any>;
21628
+ ccipReadEnabled?: boolean;
21629
+ }
21630
+ declare type EventFilter = {
21631
+ address?: string;
21632
+ topics?: Array<string | Array<string>>;
21633
+ };
21634
+ declare type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
21635
+ interface Event$1 extends Log {
21636
+ event?: string;
21637
+ eventSignature?: string;
21638
+ args?: Result;
21639
+ decodeError?: Error;
21640
+ decode?: (data: string, topics?: Array<string>) => any;
21641
+ removeListener: () => void;
21642
+ getBlock: () => Promise<Block>;
21643
+ getTransaction: () => Promise<TransactionResponse>;
21644
+ getTransactionReceipt: () => Promise<TransactionReceipt>;
21645
+ }
21646
+ interface ContractReceipt extends TransactionReceipt {
21647
+ events?: Array<Event$1>;
21648
+ }
21649
+ interface ContractTransaction extends TransactionResponse {
21650
+ wait(confirmations?: number): Promise<ContractReceipt>;
21651
+ }
21652
+ declare class RunningEvent {
21653
+ readonly tag: string;
21654
+ readonly filter: EventFilter;
21655
+ private _listeners;
21656
+ constructor(tag: string, filter: EventFilter);
21657
+ addListener(listener: Listener, once: boolean): void;
21658
+ removeListener(listener: Listener): void;
21659
+ removeAllListeners(): void;
21660
+ listeners(): Array<Listener>;
21661
+ listenerCount(): number;
21662
+ run(args: Array<any>): number;
21663
+ prepareEvent(event: Event$1): void;
21664
+ getEmit(event: Event$1): Array<any>;
21665
+ }
21666
+ declare type ContractInterface = string | ReadonlyArray<Fragment | JsonFragment | string> | Interface;
21667
+ declare class BaseContract {
21668
+ readonly address: string;
21669
+ readonly interface: Interface;
21670
+ readonly signer: Signer;
21671
+ readonly provider: Provider$1;
21672
+ readonly functions: {
21673
+ [name: string]: ContractFunction;
21674
+ };
21675
+ readonly callStatic: {
21676
+ [name: string]: ContractFunction;
21677
+ };
21678
+ readonly estimateGas: {
21679
+ [name: string]: ContractFunction<BigNumber>;
21680
+ };
21681
+ readonly populateTransaction: {
21682
+ [name: string]: ContractFunction<PopulatedTransaction>;
21683
+ };
21684
+ readonly filters: {
21685
+ [name: string]: (...args: Array<any>) => EventFilter;
21686
+ };
21687
+ readonly resolvedAddress: Promise<string>;
21688
+ readonly deployTransaction: TransactionResponse;
21689
+ _deployedPromise: Promise<Contract>;
21690
+ _runningEvents: {
21691
+ [eventTag: string]: RunningEvent;
21692
+ };
21693
+ _wrappedEmits: {
21694
+ [eventTag: string]: (...args: Array<any>) => void;
21695
+ };
21696
+ constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider?: Signer | Provider$1);
21697
+ static getContractAddress(transaction: {
21698
+ from: string;
21699
+ nonce: BigNumberish;
21700
+ }): string;
21701
+ static getInterface(contractInterface: ContractInterface): Interface;
21702
+ deployed(): Promise<Contract>;
21703
+ _deployed(blockTag?: BlockTag): Promise<Contract>;
21704
+ fallback(overrides?: TransactionRequest): Promise<TransactionResponse>;
21705
+ connect(signerOrProvider: Signer | Provider$1 | string): Contract;
21706
+ attach(addressOrName: string): Contract;
21707
+ static isIndexed(value: any): value is Indexed;
21708
+ private _normalizeRunningEvent;
21709
+ private _getRunningEvent;
21710
+ _checkRunningEvents(runningEvent: RunningEvent): void;
21711
+ _wrapEvent(runningEvent: RunningEvent, log: Log, listener: Listener): Event$1;
21712
+ private _addEventListener;
21713
+ queryFilter(event: EventFilter | string, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise<Array<Event$1>>;
21714
+ on(event: EventFilter | string, listener: Listener): this;
21715
+ once(event: EventFilter | string, listener: Listener): this;
21716
+ emit(eventName: EventFilter | string, ...args: Array<any>): boolean;
21717
+ listenerCount(eventName?: EventFilter | string): number;
21718
+ listeners(eventName?: EventFilter | string): Array<Listener>;
21719
+ removeAllListeners(eventName?: EventFilter | string): this;
21720
+ off(eventName: EventFilter | string, listener: Listener): this;
21721
+ removeListener(eventName: EventFilter | string, listener: Listener): this;
21722
+ }
21723
+ declare class Contract extends BaseContract {
21724
+ readonly [key: string]: ContractFunction | any;
21725
+ }
21726
+ declare class ContractFactory {
21727
+ readonly interface: Interface;
21728
+ readonly bytecode: string;
21729
+ readonly signer: Signer;
21730
+ constructor(contractInterface: ContractInterface, bytecode: BytesLike | {
21731
+ object: string;
21732
+ }, signer?: Signer);
21733
+ getDeployTransaction(...args: Array<any>): TransactionRequest;
21734
+ deploy(...args: Array<any>): Promise<Contract>;
21735
+ attach(address: string): Contract;
21736
+ connect(signer: Signer): ContractFactory;
21737
+ static fromSolidity(compilerOutput: any, signer?: Signer): ContractFactory;
21738
+ static getInterface(contractInterface: ContractInterface): Interface;
21739
+ static getContractAddress(tx: {
21740
+ from: string;
21741
+ nonce: BytesLike | BigNumber | number;
21742
+ }): string;
21743
+ static getContract(address: string, contractInterface: ContractInterface, signer?: Signer): Contract;
21744
+ }
21745
+
21746
+ declare type FormatFunc = (value: any) => any;
21747
+ declare type FormatFuncs = {
21748
+ [key: string]: FormatFunc;
21749
+ };
21750
+ declare type Formats = {
21751
+ transaction: FormatFuncs;
21752
+ transactionRequest: FormatFuncs;
21753
+ receipt: FormatFuncs;
21754
+ receiptLog: FormatFuncs;
21755
+ block: FormatFuncs;
21756
+ blockWithTransactions: FormatFuncs;
21757
+ filter: FormatFuncs;
21758
+ filterLog: FormatFuncs;
21759
+ };
21760
+ declare class Formatter {
21761
+ readonly formats: Formats;
21762
+ constructor();
21763
+ getDefaultFormats(): Formats;
21764
+ accessList(accessList: Array<any>): AccessList;
21765
+ number(number: any): number;
21766
+ type(number: any): number;
21767
+ bigNumber(value: any): BigNumber;
21768
+ boolean(value: any): boolean;
21769
+ hex(value: any, strict?: boolean): string;
21770
+ data(value: any, strict?: boolean): string;
21771
+ address(value: any): string;
21772
+ callAddress(value: any): string;
21773
+ contractAddress(value: any): string;
21774
+ blockTag(blockTag: any): string;
21775
+ hash(value: any, strict?: boolean): string;
21776
+ difficulty(value: any): number;
21777
+ uint256(value: any): string;
21778
+ _block(value: any, format: any): Block;
21779
+ block(value: any): Block;
21780
+ blockWithTransactions(value: any): Block;
21781
+ transactionRequest(value: any): any;
21782
+ transactionResponse(transaction: any): TransactionResponse;
21783
+ transaction(value: any): any;
21784
+ receiptLog(value: any): any;
21785
+ receipt(value: any): TransactionReceipt;
21786
+ topics(value: any): any;
21787
+ filter(value: any): any;
21788
+ filterLog(value: any): any;
21789
+ static check(format: {
21790
+ [name: string]: FormatFunc;
21791
+ }, object: any): any;
21792
+ static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
21793
+ static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
21794
+ static arrayOf(format: FormatFunc): FormatFunc;
21795
+ }
21796
+
21797
+ declare class Event {
21798
+ readonly listener: Listener;
21799
+ readonly once: boolean;
21800
+ readonly tag: string;
21801
+ _lastBlockNumber: number;
21802
+ _inflight: boolean;
21803
+ constructor(tag: string, listener: Listener, once: boolean);
21804
+ get event(): EventType;
21805
+ get type(): string;
21806
+ get hash(): string;
21807
+ get filter(): Filter;
21808
+ pollable(): boolean;
21809
+ }
21810
+ interface EnsResolver {
21811
+ readonly name: string;
21812
+ readonly address: string;
21813
+ getAddress(coinType?: 60): Promise<null | string>;
21814
+ getContentHash(): Promise<null | string>;
21815
+ getText(key: string): Promise<null | string>;
21816
+ }
21817
+ interface EnsProvider {
21818
+ resolveName(name: string): Promise<null | string>;
21819
+ lookupAddress(address: string): Promise<null | string>;
21820
+ getResolver(name: string): Promise<null | EnsResolver>;
21821
+ }
21822
+ interface Avatar {
21823
+ url: string;
21824
+ linkage: Array<{
21825
+ type: string;
21826
+ content: string;
21827
+ }>;
21828
+ }
21829
+ declare class Resolver$1 implements EnsResolver {
21830
+ readonly provider: BaseProvider;
21831
+ readonly name: string;
21832
+ readonly address: string;
21833
+ readonly _resolvedAddress: null | string;
21834
+ _supportsEip2544: null | Promise<boolean>;
21835
+ constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
21836
+ supportsWildcard(): Promise<boolean>;
21837
+ _fetch(selector: string, parameters?: string): Promise<null | string>;
21838
+ _fetchBytes(selector: string, parameters?: string): Promise<null | string>;
21839
+ _getAddress(coinType: number, hexBytes: string): string;
21840
+ getAddress(coinType?: number): Promise<string>;
21841
+ getAvatar(): Promise<null | Avatar>;
21842
+ getContentHash(): Promise<string>;
21843
+ getText(key: string): Promise<string>;
21844
+ }
21845
+ declare class BaseProvider extends Provider$1 implements EnsProvider {
21846
+ _networkPromise: Promise<Network>;
21847
+ _network: Network;
21848
+ _events: Array<Event>;
21849
+ formatter: Formatter;
21850
+ _emitted: {
21851
+ [eventName: string]: number | "pending";
21852
+ };
21853
+ _pollingInterval: number;
21854
+ _poller: NodeJS.Timer;
21855
+ _bootstrapPoll: NodeJS.Timer;
21856
+ _lastBlockNumber: number;
21857
+ _maxFilterBlockRange: number;
21858
+ _fastBlockNumber: number;
21859
+ _fastBlockNumberPromise: Promise<number>;
21860
+ _fastQueryDate: number;
21861
+ _maxInternalBlockNumber: number;
21862
+ _internalBlockNumber: Promise<{
21863
+ blockNumber: number;
21864
+ reqTime: number;
21865
+ respTime: number;
21866
+ }>;
21867
+ readonly anyNetwork: boolean;
21868
+ disableCcipRead: boolean;
21869
+ /**
21870
+ * ready
21871
+ *
21872
+ * A Promise<Network> that resolves only once the provider is ready.
21873
+ *
21874
+ * Sub-classes that call the super with a network without a chainId
21875
+ * MUST set this. Standard named networks have a known chainId.
21876
+ *
21877
+ */
21878
+ constructor(network: Networkish | Promise<Network>);
21879
+ _ready(): Promise<Network>;
21880
+ get ready(): Promise<Network>;
21881
+ static getFormatter(): Formatter;
21882
+ static getNetwork(network: Networkish): Network;
21883
+ ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
21884
+ _getInternalBlockNumber(maxAge: number): Promise<number>;
21885
+ poll(): Promise<void>;
21886
+ resetEventsBlock(blockNumber: number): void;
21887
+ get network(): Network;
21888
+ detectNetwork(): Promise<Network>;
21889
+ getNetwork(): Promise<Network>;
21890
+ get blockNumber(): number;
21891
+ get polling(): boolean;
21892
+ set polling(value: boolean);
21893
+ get pollingInterval(): number;
21894
+ set pollingInterval(value: number);
21895
+ _getFastBlockNumber(): Promise<number>;
21896
+ _setFastBlockNumber(blockNumber: number): void;
21897
+ waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
21898
+ _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
21899
+ data: string;
21900
+ from: string;
21901
+ nonce: number;
21902
+ to: string;
21903
+ value: BigNumber;
21904
+ startBlock: number;
21905
+ }): Promise<TransactionReceipt>;
21906
+ getBlockNumber(): Promise<number>;
21907
+ getGasPrice(): Promise<BigNumber>;
21908
+ getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
21909
+ getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
21910
+ getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21911
+ getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21912
+ _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
21913
+ sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
21914
+ _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
21915
+ _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
21916
+ _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
21917
+ call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
21918
+ estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
21919
+ _getAddress(addressOrName: string | Promise<string>): Promise<string>;
21920
+ _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
21921
+ getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
21922
+ getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
21923
+ getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
21924
+ getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
21925
+ getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
21926
+ getEtherPrice(): Promise<number>;
21927
+ _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
21928
+ getResolver(name: string): Promise<null | Resolver$1>;
21929
+ _getResolver(name: string, operation?: string): Promise<string>;
21930
+ resolveName(name: string | Promise<string>): Promise<null | string>;
21931
+ lookupAddress(address: string | Promise<string>): Promise<null | string>;
21932
+ getAvatar(nameOrAddress: string): Promise<null | string>;
21933
+ perform(method: string, params: any): Promise<any>;
21934
+ _startEvent(event: Event): void;
21935
+ _stopEvent(event: Event): void;
21936
+ _addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
21937
+ on(eventName: EventType, listener: Listener): this;
21938
+ once(eventName: EventType, listener: Listener): this;
21939
+ emit(eventName: EventType, ...args: Array<any>): boolean;
21940
+ listenerCount(eventName?: EventType): number;
21941
+ listeners(eventName?: EventType): Array<Listener>;
21942
+ off(eventName: EventType, listener?: Listener): this;
21943
+ removeAllListeners(eventName?: EventType): this;
21944
+ }
21945
+
21946
+ declare class JsonRpcSigner extends Signer implements TypedDataSigner {
21947
+ readonly provider: JsonRpcProvider;
21948
+ _index: number;
21949
+ _address: string;
21950
+ constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
21951
+ connect(provider: Provider$1): JsonRpcSigner;
21952
+ connectUnchecked(): JsonRpcSigner;
21953
+ getAddress(): Promise<string>;
21954
+ sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
21955
+ signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
21956
+ sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
21957
+ signMessage(message: Bytes | string): Promise<string>;
21958
+ _legacySignMessage(message: Bytes | string): Promise<string>;
21959
+ _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
21960
+ unlock(password: string): Promise<boolean>;
21961
+ }
21962
+ declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
21963
+ sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
21964
+ }
21965
+ declare class JsonRpcProvider extends BaseProvider {
21966
+ readonly connection: ConnectionInfo;
21967
+ _pendingFilter: Promise<number>;
21968
+ _nextId: number;
21969
+ _eventLoopCache: Record<string, Promise<any>>;
21970
+ get _cache(): Record<string, Promise<any>>;
21971
+ constructor(url?: ConnectionInfo | string, network?: Networkish);
21972
+ static defaultUrl(): string;
21973
+ detectNetwork(): Promise<Network>;
21974
+ _uncachedDetectNetwork(): Promise<Network>;
21975
+ getSigner(addressOrIndex?: string | number): JsonRpcSigner;
21976
+ getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
21977
+ listAccounts(): Promise<Array<string>>;
21978
+ send(method: string, params: Array<any>): Promise<any>;
21979
+ prepareRequest(method: string, params: any): [string, Array<any>];
21980
+ perform(method: string, params: any): Promise<any>;
21981
+ _startEvent(event: Event): void;
21982
+ _startPending(): void;
21983
+ _stopEvent(event: Event): void;
21984
+ static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
21985
+ [key: string]: boolean;
21986
+ }): {
21987
+ [key: string]: string | AccessList;
21988
+ };
21989
+ }
22691
21990
 
22692
- /**
22693
- * Creates a new Stark Signer
22694
- * @params starkPrivateKey - the private key as a hex string
22695
- * @returns a StarkSigner
22696
- */
22697
- declare function createStarkSigner(starkPrivateKey: string): StarkSigner;
21991
+ declare type ExternalProvider = {
21992
+ isMetaMask?: boolean;
21993
+ isStatus?: boolean;
21994
+ host?: string;
21995
+ path?: string;
21996
+ sendAsync?: (request: {
21997
+ method: string;
21998
+ params?: Array<any>;
21999
+ }, callback: (error: any, response: any) => void) => void;
22000
+ send?: (request: {
22001
+ method: string;
22002
+ params?: Array<any>;
22003
+ }, callback: (error: any, response: any) => void) => void;
22004
+ request?: (request: {
22005
+ method: string;
22006
+ params?: Array<any>;
22007
+ }) => Promise<any>;
22008
+ };
22009
+ declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
22010
+ declare class Web3Provider extends JsonRpcProvider {
22011
+ readonly provider: ExternalProvider;
22012
+ readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
22013
+ constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
22014
+ send(method: string, params: Array<any>): Promise<any>;
22015
+ }
22698
22016
 
22699
22017
  interface TypedEvent<TArgsArray extends Array<any> = any, TArgsObject = any> extends Event$1 {
22700
22018
  args: TArgsArray & TArgsObject;
@@ -24558,6 +23876,134 @@ declare namespace exportContracts_d {
24558
23876
  };
24559
23877
  }
24560
23878
 
23879
+ interface IMXProvider {
23880
+ /**
23881
+ * Get the Signer address
23882
+ *
23883
+ * @return {Promise<string>} Returns a promise that resolves with the signer's address
23884
+ */
23885
+ getAddress(): Promise<string>;
23886
+ /**
23887
+ * Register a User to Immutable X if they are not already registered
23888
+ *
23889
+ * @return {Promise<imx.RegisterUserResponse>} Returns a promise that resolves with the user registration response
23890
+ */
23891
+ registerOffchain(): Promise<RegisterUserResponse>;
23892
+ /**
23893
+ * Checks if a User is registered off-chain
23894
+ *
23895
+ * @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
23896
+ */
23897
+ isRegisteredOffchain(): Promise<boolean>;
23898
+ /**
23899
+ * Checks if a User is registered on-chain
23900
+ *
23901
+ * @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered, false otherwise
23902
+ */
23903
+ isRegisteredOnchain(): Promise<boolean>;
23904
+ /**
23905
+ * Create an Order
23906
+ *
23907
+ * @param {UnsignedOrderRequest} request The unsigned order request to create an order
23908
+ * @return {Promise<CreateOrderResponse>} Returns a promise that resolves with the created Order
23909
+ */
23910
+ createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse$1>;
23911
+ /**
23912
+ * Cancel an Order
23913
+ *
23914
+ * @param {GetSignableCancelOrderRequest} request The signable cancel order request
23915
+ * @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
23916
+ */
23917
+ cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse$1>;
23918
+ /**
23919
+ * Create a Trade
23920
+ *
23921
+ * @param {GetSignableTradeRequest} request The signable trade request
23922
+ * @return {Promise<CreateTradeResponse>} Returns a promise that resolves with the created Trade
23923
+ */
23924
+ createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
23925
+ /**
23926
+ * Create a new Transfer request
23927
+ *
23928
+ * @param {UnsignedTransferRequest} request The unsigned transfer request
23929
+ * @return {Promise<imx.CreateTransferResponseV1>} Returns a promise that resolves with the created Transfer
23930
+ */
23931
+ transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1$1>;
23932
+ /**
23933
+ * Create a batch of NFT transfer requests
23934
+ *
23935
+ * @param {Array<NftTransferDetails>} request An array of NFT transfer details
23936
+ * @return {Promise<CreateTransferResponse>} Resolves a promise that resolves with the list of Transfer IDs
23937
+ */
23938
+ batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
23939
+ /**
23940
+ * Create a new Exchange transaction
23941
+ *
23942
+ * @param {UnsignedExchangeTransferRequest} request The unsigned exchange transfer request
23943
+ * @return {Promise<imx.CreateTransferResponseV1>} Returns a promise that resolves with the created Exchange Transaction
23944
+ */
23945
+ exchangeTransfer(request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1$1>;
23946
+ /**
23947
+ * Deposit either ETH, ERC20 or ERC721 tokens
23948
+ *
23949
+ * @param {TokenAmount} request The token type amount in its corresponding unit
23950
+ * @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
23951
+ */
23952
+ deposit(deposit: TokenAmount): Promise<TransactionResponse>;
23953
+ /**
23954
+ * Create a Withdrawal
23955
+ *
23956
+ * @param {TokenAmount} request The token type amount in its corresponding unit
23957
+ * @return {Promise<CreateWithdrawalResponse>} Returns a promise that resolves with the created Withdrawal
23958
+ */
23959
+ prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse>;
23960
+ /**
23961
+ * Completes a Withdrawal
23962
+ *
23963
+ * @param {string} starkPublicKey The stark public key
23964
+ * @param {AnyToken} token The token to withdraw
23965
+ * @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
23966
+ */
23967
+ completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
23968
+ }
23969
+
23970
+ interface ProviderOverrides {
23971
+ immutableXConfig: ImmutableXConfiguration;
23972
+ }
23973
+ interface ProviderModuleConfiguration extends ModuleConfiguration<ProviderOverrides> {
23974
+ }
23975
+ declare class ProviderConfiguration {
23976
+ readonly immutableXConfig: ImmutableXConfiguration;
23977
+ readonly baseConfig: ImmutableConfiguration;
23978
+ constructor({ baseConfig, overrides }: ProviderModuleConfiguration);
23979
+ }
23980
+
23981
+ declare class GenericIMXProvider implements IMXProvider {
23982
+ private readonly config;
23983
+ private readonly signers;
23984
+ constructor(config: ProviderConfiguration, ethSigner: Signer, starkSigner: StarkSigner);
23985
+ getAddress(): Promise<string>;
23986
+ isRegisteredOffchain(): Promise<boolean>;
23987
+ registerOffchain(): Promise<RegisterUserResponse>;
23988
+ batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
23989
+ cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse$1>;
23990
+ completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
23991
+ createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse$1>;
23992
+ createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
23993
+ deposit(tokenAmount: TokenAmount): Promise<TransactionResponse>;
23994
+ exchangeTransfer(request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1$1>;
23995
+ isRegisteredOnchain(): Promise<boolean>;
23996
+ prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse>;
23997
+ transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1$1>;
23998
+ }
23999
+
24000
+ declare class MetaMaskIMXProvider extends GenericIMXProvider {
24001
+ private static imxSigner;
24002
+ static connect(config: ProviderConfiguration): Promise<MetaMaskIMXProvider>;
24003
+ static disconnect(): Promise<void>;
24004
+ static signMessage(message: string): Promise<string>;
24005
+ }
24006
+
24561
24007
  type UserProfile = {
24562
24008
  email?: string;
24563
24009
  nickname?: string;