@imtbl/sdk 0.4.0-alpha.3 → 0.4.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain-data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.d.ts +34 -27
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +16 -16
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +232 -89
- package/dist/index.d.ts +146 -41
- package/dist/index.js +231 -89
- package/dist/orderbook.d.ts +179 -8
- package/dist/passport.d.ts +38 -28
- package/dist/passport.js +229 -87
- package/dist/provider.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { BlockchainDataConfiguration, BlockchainDataModuleConfiguration as BlockchainDataModuleConfiguration$1, ProviderConfiguration as ProviderConfiguration$1, ExchangeContracts } from 'config';
|
|
4
4
|
import { OrderbookOverrides } from 'config/config';
|
|
5
|
-
import { ListingResult, ListListingsResult } from 'openapi/sdk';
|
|
6
|
-
import { ListListingsParams, PrepareListingParams, PrepareListingResponse, CreateListingParams, FulfillOrderResponse, CancelOrderResponse as CancelOrderResponse$
|
|
5
|
+
import { ListingResult, ListListingsResult, OrdersService } from 'openapi/sdk';
|
|
6
|
+
import { ListListingsParams as ListListingsParams$1, PrepareListingParams as PrepareListingParams$1, PrepareListingResponse as PrepareListingResponse$1, CreateListingParams as CreateListingParams$1, FulfillOrderResponse as FulfillOrderResponse$1, CancelOrderResponse as CancelOrderResponse$2 } from 'types';
|
|
7
7
|
|
|
8
8
|
declare enum Environment {
|
|
9
9
|
PRODUCTION = "production",
|
|
@@ -3079,7 +3079,7 @@ interface TokenData {
|
|
|
3079
3079
|
*/
|
|
3080
3080
|
'quantity': string;
|
|
3081
3081
|
/**
|
|
3082
|
-
* Quantity of this asset with the sum of all fees applied to the asset
|
|
3082
|
+
* [DEPRECATED for v3 endpoints] Quantity of this asset with the sum of all fees applied to the asset. Replaced by quantity_with_fees in maker_fees / taker_fees depending on the type of order. Refer https://docs.x.immutable.com/docs/maker-taker-fees/#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell.
|
|
3083
3083
|
* @type {string}
|
|
3084
3084
|
* @memberof TokenData
|
|
3085
3085
|
*/
|
|
@@ -3713,7 +3713,7 @@ interface CancelOrderRequest {
|
|
|
3713
3713
|
* @export
|
|
3714
3714
|
* @interface CancelOrderResponse
|
|
3715
3715
|
*/
|
|
3716
|
-
interface CancelOrderResponse {
|
|
3716
|
+
interface CancelOrderResponse$1 {
|
|
3717
3717
|
/**
|
|
3718
3718
|
* ID of the cancelled order
|
|
3719
3719
|
* @type {number}
|
|
@@ -5942,7 +5942,7 @@ interface GetSignableOrderRequestV3 {
|
|
|
5942
5942
|
*/
|
|
5943
5943
|
'amount_sell': string;
|
|
5944
5944
|
/**
|
|
5945
|
-
* ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
|
|
5945
|
+
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
5946
5946
|
* @type {number}
|
|
5947
5947
|
* @memberof GetSignableOrderRequestV3
|
|
5948
5948
|
*/
|
|
@@ -6041,7 +6041,7 @@ interface GetSignableOrderResponse {
|
|
|
6041
6041
|
*/
|
|
6042
6042
|
'asset_id_sell': string;
|
|
6043
6043
|
/**
|
|
6044
|
-
*
|
|
6044
|
+
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
6045
6045
|
* @type {number}
|
|
6046
6046
|
* @memberof GetSignableOrderResponse
|
|
6047
6047
|
*/
|
|
@@ -6202,7 +6202,7 @@ interface GetSignableRegistrationResponse {
|
|
|
6202
6202
|
*/
|
|
6203
6203
|
interface GetSignableTradeRequest {
|
|
6204
6204
|
/**
|
|
6205
|
-
* ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
|
|
6205
|
+
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
6206
6206
|
* @type {number}
|
|
6207
6207
|
* @memberof GetSignableTradeRequest
|
|
6208
6208
|
*/
|
|
@@ -6289,7 +6289,7 @@ interface GetSignableTradeResponse {
|
|
|
6289
6289
|
*/
|
|
6290
6290
|
'asset_id_sell': string;
|
|
6291
6291
|
/**
|
|
6292
|
-
*
|
|
6292
|
+
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
6293
6293
|
* @type {number}
|
|
6294
6294
|
* @memberof GetSignableTradeResponse
|
|
6295
6295
|
*/
|
|
@@ -7376,7 +7376,7 @@ interface OrderV3 {
|
|
|
7376
7376
|
*/
|
|
7377
7377
|
'expiration_timestamp': string | null;
|
|
7378
7378
|
/**
|
|
7379
|
-
* Fee information for the order
|
|
7379
|
+
* [DEPRECATED] Fee information for the order. Replaced by maker_fees / taker_fees depending on the type of order. Refer https://docs.x.immutable.com/docs/maker-taker-fees/#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell.
|
|
7380
7380
|
* @type {Array<OrderFeeInfo>}
|
|
7381
7381
|
* @memberof OrderV3
|
|
7382
7382
|
*/
|
|
@@ -10930,14 +10930,15 @@ interface OrdersApiListOrdersV3Request {
|
|
|
10930
10930
|
*/
|
|
10931
10931
|
declare class OrdersApi extends BaseAPI {
|
|
10932
10932
|
/**
|
|
10933
|
-
* Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params.
|
|
10933
|
+
* Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
10934
10934
|
* @summary Cancel an order
|
|
10935
10935
|
* @param {OrdersApiCancelOrderRequest} requestParameters Request parameters.
|
|
10936
10936
|
* @param {*} [options] Override http request option.
|
|
10937
|
+
* @deprecated
|
|
10937
10938
|
* @throws {RequiredError}
|
|
10938
10939
|
* @memberof OrdersApi
|
|
10939
10940
|
*/
|
|
10940
|
-
cancelOrder(requestParameters: OrdersApiCancelOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse, any>>;
|
|
10941
|
+
cancelOrder(requestParameters: OrdersApiCancelOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse$1, any>>;
|
|
10941
10942
|
/**
|
|
10942
10943
|
* Cancel an order (V3)
|
|
10943
10944
|
* @summary Cancel an order (V3)
|
|
@@ -10946,12 +10947,13 @@ declare class OrdersApi extends BaseAPI {
|
|
|
10946
10947
|
* @throws {RequiredError}
|
|
10947
10948
|
* @memberof OrdersApi
|
|
10948
10949
|
*/
|
|
10949
|
-
cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse, any>>;
|
|
10950
|
+
cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CancelOrderResponse$1, any>>;
|
|
10950
10951
|
/**
|
|
10951
|
-
* Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params.
|
|
10952
|
+
* Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
10952
10953
|
* @summary Create an order
|
|
10953
10954
|
* @param {OrdersApiCreateOrderRequest} requestParameters Request parameters.
|
|
10954
10955
|
* @param {*} [options] Override http request option.
|
|
10956
|
+
* @deprecated
|
|
10955
10957
|
* @throws {RequiredError}
|
|
10956
10958
|
* @memberof OrdersApi
|
|
10957
10959
|
*/
|
|
@@ -10966,10 +10968,11 @@ declare class OrdersApi extends BaseAPI {
|
|
|
10966
10968
|
*/
|
|
10967
10969
|
createOrderV3(requestParameters: OrdersApiCreateOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateOrderResponse, any>>;
|
|
10968
10970
|
/**
|
|
10969
|
-
* Get an order
|
|
10971
|
+
* Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
10970
10972
|
* @summary Get an order
|
|
10971
10973
|
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
10972
10974
|
* @param {*} [options] Override http request option.
|
|
10975
|
+
* @deprecated
|
|
10973
10976
|
* @throws {RequiredError}
|
|
10974
10977
|
* @memberof OrdersApi
|
|
10975
10978
|
*/
|
|
@@ -10984,17 +10987,18 @@ declare class OrdersApi extends BaseAPI {
|
|
|
10984
10987
|
*/
|
|
10985
10988
|
getOrderV3(requestParameters: OrdersApiGetOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<OrderV3, any>>;
|
|
10986
10989
|
/**
|
|
10987
|
-
*
|
|
10988
|
-
* @summary
|
|
10990
|
+
* Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
10991
|
+
* @summary Sign cancel order message
|
|
10989
10992
|
* @param {OrdersApiGetSignableCancelOrderRequest} requestParameters Request parameters.
|
|
10990
10993
|
* @param {*} [options] Override http request option.
|
|
10994
|
+
* @deprecated
|
|
10991
10995
|
* @throws {RequiredError}
|
|
10992
10996
|
* @memberof OrdersApi
|
|
10993
10997
|
*/
|
|
10994
10998
|
getSignableCancelOrder(requestParameters: OrdersApiGetSignableCancelOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableCancelOrderResponse, any>>;
|
|
10995
10999
|
/**
|
|
10996
|
-
*
|
|
10997
|
-
* @summary
|
|
11000
|
+
* Generate a signable cancel order message (V3)
|
|
11001
|
+
* @summary Generate a signable cancel order message (V3)
|
|
10998
11002
|
* @param {OrdersApiGetSignableCancelOrderV3Request} requestParameters Request parameters.
|
|
10999
11003
|
* @param {*} [options] Override http request option.
|
|
11000
11004
|
* @throws {RequiredError}
|
|
@@ -11002,8 +11006,8 @@ declare class OrdersApi extends BaseAPI {
|
|
|
11002
11006
|
*/
|
|
11003
11007
|
getSignableCancelOrderV3(requestParameters: OrdersApiGetSignableCancelOrderV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableCancelOrderResponse, any>>;
|
|
11004
11008
|
/**
|
|
11005
|
-
*
|
|
11006
|
-
* @summary
|
|
11009
|
+
* Generate a signable order request (V3)
|
|
11010
|
+
* @summary Generate a signable order request (V3)
|
|
11007
11011
|
* @param {OrdersApiGetSignableOrderRequest} requestParameters Request parameters.
|
|
11008
11012
|
* @param {*} [options] Override http request option.
|
|
11009
11013
|
* @throws {RequiredError}
|
|
@@ -11011,10 +11015,11 @@ declare class OrdersApi extends BaseAPI {
|
|
|
11011
11015
|
*/
|
|
11012
11016
|
getSignableOrder(requestParameters: OrdersApiGetSignableOrderRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<GetSignableOrderResponse, any>>;
|
|
11013
11017
|
/**
|
|
11014
|
-
* Get a list of orders
|
|
11015
|
-
* @summary Get a list of orders
|
|
11018
|
+
* Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
11019
|
+
* @summary Get a list of orders.
|
|
11016
11020
|
* @param {OrdersApiListOrdersRequest} requestParameters Request parameters.
|
|
11017
11021
|
* @param {*} [options] Override http request option.
|
|
11022
|
+
* @deprecated
|
|
11018
11023
|
* @throws {RequiredError}
|
|
11019
11024
|
* @memberof OrdersApi
|
|
11020
11025
|
*/
|
|
@@ -11377,10 +11382,10 @@ interface TradesApiListTradesRequest {
|
|
|
11377
11382
|
readonly cursor?: string;
|
|
11378
11383
|
/**
|
|
11379
11384
|
* Property to sort by
|
|
11380
|
-
* @type {'created_at' | '
|
|
11385
|
+
* @type {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'}
|
|
11381
11386
|
* @memberof TradesApiListTrades
|
|
11382
11387
|
*/
|
|
11383
|
-
readonly orderBy?: 'created_at' | '
|
|
11388
|
+
readonly orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity';
|
|
11384
11389
|
/**
|
|
11385
11390
|
* Direction to sort (asc/desc)
|
|
11386
11391
|
* @type {string}
|
|
@@ -11450,10 +11455,10 @@ interface TradesApiListTradesV3Request {
|
|
|
11450
11455
|
readonly cursor?: string;
|
|
11451
11456
|
/**
|
|
11452
11457
|
* Property to sort by
|
|
11453
|
-
* @type {'created_at' | '
|
|
11458
|
+
* @type {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'}
|
|
11454
11459
|
* @memberof TradesApiListTradesV3
|
|
11455
11460
|
*/
|
|
11456
|
-
readonly orderBy?: 'created_at' | '
|
|
11461
|
+
readonly orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp';
|
|
11457
11462
|
/**
|
|
11458
11463
|
* Direction to sort (asc/desc)
|
|
11459
11464
|
* @type {string}
|
|
@@ -11481,10 +11486,11 @@ interface TradesApiListTradesV3Request {
|
|
|
11481
11486
|
*/
|
|
11482
11487
|
declare class TradesApi extends BaseAPI {
|
|
11483
11488
|
/**
|
|
11484
|
-
* Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params.
|
|
11489
|
+
* Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
11485
11490
|
* @summary Create a Trade between two parties
|
|
11486
11491
|
* @param {TradesApiCreateTradeRequest} requestParameters Request parameters.
|
|
11487
11492
|
* @param {*} [options] Override http request option.
|
|
11493
|
+
* @deprecated
|
|
11488
11494
|
* @throws {RequiredError}
|
|
11489
11495
|
* @memberof TradesApi
|
|
11490
11496
|
*/
|
|
@@ -11499,8 +11505,8 @@ declare class TradesApi extends BaseAPI {
|
|
|
11499
11505
|
*/
|
|
11500
11506
|
createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse, any>>;
|
|
11501
11507
|
/**
|
|
11502
|
-
*
|
|
11503
|
-
* @summary
|
|
11508
|
+
* Generate a signable trade message (V3)
|
|
11509
|
+
* @summary Generate a signable trade message (V3)
|
|
11504
11510
|
* @param {TradesApiGetSignableTradeRequest} requestParameters Request parameters.
|
|
11505
11511
|
* @param {*} [options] Override http request option.
|
|
11506
11512
|
* @throws {RequiredError}
|
|
@@ -11517,10 +11523,11 @@ declare class TradesApi extends BaseAPI {
|
|
|
11517
11523
|
*/
|
|
11518
11524
|
getTrade(requestParameters: TradesApiGetTradeRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade, any>>;
|
|
11519
11525
|
/**
|
|
11520
|
-
* Get a list of trades
|
|
11526
|
+
* Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023
|
|
11521
11527
|
* @summary Get a list of trades
|
|
11522
11528
|
* @param {TradesApiListTradesRequest} requestParameters Request parameters.
|
|
11523
11529
|
* @param {*} [options] Override http request option.
|
|
11530
|
+
* @deprecated
|
|
11524
11531
|
* @throws {RequiredError}
|
|
11525
11532
|
* @memberof TradesApi
|
|
11526
11533
|
*/
|
|
@@ -11753,7 +11760,7 @@ interface TransfersApiListTransfersRequest {
|
|
|
11753
11760
|
*/
|
|
11754
11761
|
declare class TransfersApi extends BaseAPI {
|
|
11755
11762
|
/**
|
|
11756
|
-
* Create a new transfer request.
|
|
11763
|
+
* Create a new transfer request. Use https://docs.x.immutable.com/reference#/operations/getSignableTransfer to get request body params.
|
|
11757
11764
|
* @summary Creates a transfer of multiple tokens between two parties
|
|
11758
11765
|
* @param {TransfersApiCreateTransferRequest} requestParameters Request parameters.
|
|
11759
11766
|
* @param {*} [options] Override http request option.
|
|
@@ -11762,7 +11769,7 @@ declare class TransfersApi extends BaseAPI {
|
|
|
11762
11769
|
*/
|
|
11763
11770
|
createTransfer(requestParameters: TransfersApiCreateTransferRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTransferResponse, any>>;
|
|
11764
11771
|
/**
|
|
11765
|
-
* Create a new transfer request.
|
|
11772
|
+
* Create a new transfer request. Use https://docs.x.immutable.com/reference#/operations/getSignableTransferV1 to get request body params.
|
|
11766
11773
|
* @summary Creates a transfer of tokens between two parties
|
|
11767
11774
|
* @param {TransfersApiCreateTransferV1Request} requestParameters Request parameters.
|
|
11768
11775
|
* @param {*} [options] Override http request option.
|
|
@@ -12642,7 +12649,7 @@ interface IMXProvider {
|
|
|
12642
12649
|
* @param {GetSignableCancelOrderRequest} request The signable cancel order request
|
|
12643
12650
|
* @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
|
|
12644
12651
|
*/
|
|
12645
|
-
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
|
|
12652
|
+
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse$1>;
|
|
12646
12653
|
/**
|
|
12647
12654
|
* Create a Trade
|
|
12648
12655
|
*
|
|
@@ -12702,7 +12709,7 @@ declare class GenericIMXProvider implements IMXProvider {
|
|
|
12702
12709
|
getAddress(): Promise<string>;
|
|
12703
12710
|
registerOffchain(): Promise<RegisterUserResponse>;
|
|
12704
12711
|
batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
|
|
12705
|
-
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
|
|
12712
|
+
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse$1>;
|
|
12706
12713
|
completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
|
|
12707
12714
|
createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse>;
|
|
12708
12715
|
createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
|
|
@@ -12794,7 +12801,8 @@ declare enum RpcErrorCode {
|
|
|
12794
12801
|
METHOD_NOT_FOUND = -32601,
|
|
12795
12802
|
INVALID_PARAMS = -32602,
|
|
12796
12803
|
INTERNAL_ERROR = -32603,
|
|
12797
|
-
PARSE_ERROR = -32700
|
|
12804
|
+
PARSE_ERROR = -32700,
|
|
12805
|
+
USER_REJECTED_REQUEST = -32003
|
|
12798
12806
|
}
|
|
12799
12807
|
declare class JsonRpcError extends Error {
|
|
12800
12808
|
readonly message: string;
|
|
@@ -12844,6 +12852,8 @@ declare class Passport {
|
|
|
12844
12852
|
connectImx(): Promise<IMXProvider>;
|
|
12845
12853
|
loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
|
|
12846
12854
|
connectImxDeviceFlow(deviceCode: string, interval: number, timeoutMs?: number): Promise<IMXProvider | null>;
|
|
12855
|
+
getPKCEAuthorizationUrl(): string;
|
|
12856
|
+
connectImxPKCEFlow(authorizationCode: string, state: string): Promise<IMXProvider | null>;
|
|
12847
12857
|
/**
|
|
12848
12858
|
* @returns {boolean} the stored device flow credentials if they exist
|
|
12849
12859
|
*/
|
|
@@ -12886,7 +12896,7 @@ declare class Orderbook {
|
|
|
12886
12896
|
* @param {ListOrderParams} listOrderParams - Filtering, ordering and page parameters.
|
|
12887
12897
|
* @return {Orders} The paged orders.
|
|
12888
12898
|
*/
|
|
12889
|
-
listListings(listOrderParams: ListListingsParams): Promise<ListListingsResult>;
|
|
12899
|
+
listListings(listOrderParams: ListListingsParams$1): Promise<ListListingsResult>;
|
|
12890
12900
|
/**
|
|
12891
12901
|
* Get required transactions and messages for signing prior to creating a listing
|
|
12892
12902
|
* through the createListing method
|
|
@@ -12895,13 +12905,13 @@ declare class Orderbook {
|
|
|
12895
12905
|
* the unsigned approval transaction, the typed order message for signing and
|
|
12896
12906
|
* the order components that can be submitted to `createListing` with a signature.
|
|
12897
12907
|
*/
|
|
12898
|
-
prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
|
|
12908
|
+
prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams$1): Promise<PrepareListingResponse$1>;
|
|
12899
12909
|
/**
|
|
12900
12910
|
* Create an order
|
|
12901
12911
|
* @param {CreateListingParams} createListingParams - create an order with the given params.
|
|
12902
12912
|
* @return {ListingResult} The result of the order created in the Immutable services.
|
|
12903
12913
|
*/
|
|
12904
|
-
createListing(createListingParams: CreateListingParams): Promise<ListingResult>;
|
|
12914
|
+
createListing(createListingParams: CreateListingParams$1): Promise<ListingResult>;
|
|
12905
12915
|
/**
|
|
12906
12916
|
* Get unsigned transactions that can be submitted to fulfil an open order. If the approval
|
|
12907
12917
|
* transaction exists it must be signed and submitted to the chain before the fulfilment
|
|
@@ -12910,7 +12920,7 @@ declare class Orderbook {
|
|
|
12910
12920
|
* @param {string} fulfillerAddress - The address of the account fulfilling the order.
|
|
12911
12921
|
* @return {FulfillOrderResponse} Approval and fulfilment transactions.
|
|
12912
12922
|
*/
|
|
12913
|
-
fulfillOrder(listingId: string, takerAddress: string): Promise<FulfillOrderResponse>;
|
|
12923
|
+
fulfillOrder(listingId: string, takerAddress: string): Promise<FulfillOrderResponse$1>;
|
|
12914
12924
|
/**
|
|
12915
12925
|
* Get an unsigned cancel order transaction. Orders can only be cancelled by
|
|
12916
12926
|
* the account that created them.
|
|
@@ -12918,7 +12928,102 @@ declare class Orderbook {
|
|
|
12918
12928
|
* @param {string} accountAddress - The address of the account cancelling the order.
|
|
12919
12929
|
* @return {CancelOrderResponse} The unsigned cancel order transaction
|
|
12920
12930
|
*/
|
|
12921
|
-
cancelOrder(listingId: string, accountAddress: string): Promise<CancelOrderResponse$
|
|
12931
|
+
cancelOrder(listingId: string, accountAddress: string): Promise<CancelOrderResponse$2>;
|
|
12932
|
+
}
|
|
12933
|
+
|
|
12934
|
+
declare enum OrderType {
|
|
12935
|
+
FULL_OPEN = 0,
|
|
12936
|
+
PARTIAL_OPEN = 1,
|
|
12937
|
+
FULL_RESTRICTED = 2,
|
|
12938
|
+
PARTIAL_RESTRICTED = 3
|
|
12939
|
+
}
|
|
12940
|
+
declare enum ItemType {
|
|
12941
|
+
NATIVE = 0,
|
|
12942
|
+
ERC20 = 1,
|
|
12943
|
+
ERC721 = 2,
|
|
12944
|
+
ERC1155 = 3,
|
|
12945
|
+
ERC721_WITH_CRITERIA = 4,
|
|
12946
|
+
ERC1155_WITH_CRITERIA = 5
|
|
12947
|
+
}
|
|
12948
|
+
|
|
12949
|
+
type OfferItem = {
|
|
12950
|
+
itemType: ItemType;
|
|
12951
|
+
token: string;
|
|
12952
|
+
identifierOrCriteria: string;
|
|
12953
|
+
startAmount: string;
|
|
12954
|
+
endAmount: string;
|
|
12955
|
+
};
|
|
12956
|
+
type ConsiderationItem = {
|
|
12957
|
+
itemType: ItemType;
|
|
12958
|
+
token: string;
|
|
12959
|
+
identifierOrCriteria: string;
|
|
12960
|
+
startAmount: string;
|
|
12961
|
+
endAmount: string;
|
|
12962
|
+
recipient: string;
|
|
12963
|
+
};
|
|
12964
|
+
type OrderParameters = {
|
|
12965
|
+
offerer: string;
|
|
12966
|
+
zone: string;
|
|
12967
|
+
orderType: OrderType;
|
|
12968
|
+
startTime: BigNumberish;
|
|
12969
|
+
endTime: BigNumberish;
|
|
12970
|
+
zoneHash: string;
|
|
12971
|
+
salt: string;
|
|
12972
|
+
offer: OfferItem[];
|
|
12973
|
+
consideration: ConsiderationItem[];
|
|
12974
|
+
totalOriginalConsiderationItems: BigNumberish;
|
|
12975
|
+
conduitKey: string;
|
|
12976
|
+
};
|
|
12977
|
+
type OrderComponents = OrderParameters & {
|
|
12978
|
+
counter: BigNumberish;
|
|
12979
|
+
};
|
|
12980
|
+
|
|
12981
|
+
interface ERC721Item {
|
|
12982
|
+
type: 'ERC721';
|
|
12983
|
+
contractAddress: string;
|
|
12984
|
+
tokenId: string;
|
|
12985
|
+
}
|
|
12986
|
+
interface ERC20Item {
|
|
12987
|
+
type: 'ERC20';
|
|
12988
|
+
contractAddress: string;
|
|
12989
|
+
amount: string;
|
|
12990
|
+
}
|
|
12991
|
+
interface NativeItem {
|
|
12992
|
+
type: 'NATIVE';
|
|
12993
|
+
amount: string;
|
|
12994
|
+
}
|
|
12995
|
+
interface RoyaltyInfo {
|
|
12996
|
+
recipient: string;
|
|
12997
|
+
amountRequired: string;
|
|
12998
|
+
}
|
|
12999
|
+
interface PrepareListingParams {
|
|
13000
|
+
makerAddress: string;
|
|
13001
|
+
sell: ERC721Item;
|
|
13002
|
+
buy: ERC20Item | NativeItem;
|
|
13003
|
+
orderExpiry?: Date;
|
|
13004
|
+
}
|
|
13005
|
+
interface PrepareListingResponse {
|
|
13006
|
+
unsignedApprovalTransaction?: PopulatedTransaction;
|
|
13007
|
+
typedOrderMessageForSigning: {
|
|
13008
|
+
domain: TypedDataDomain;
|
|
13009
|
+
types: Record<string, TypedDataField[]>;
|
|
13010
|
+
value: Record<string, any>;
|
|
13011
|
+
};
|
|
13012
|
+
orderComponents: OrderComponents;
|
|
13013
|
+
orderHash: string;
|
|
13014
|
+
}
|
|
13015
|
+
interface CreateListingParams {
|
|
13016
|
+
orderComponents: OrderComponents;
|
|
13017
|
+
orderHash: string;
|
|
13018
|
+
orderSignature: string;
|
|
13019
|
+
}
|
|
13020
|
+
type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
|
|
13021
|
+
interface FulfillOrderResponse {
|
|
13022
|
+
unsignedApprovalTransaction?: PopulatedTransaction;
|
|
13023
|
+
unsignedFulfillmentTransaction: PopulatedTransaction;
|
|
13024
|
+
}
|
|
13025
|
+
interface CancelOrderResponse {
|
|
13026
|
+
unsignedCancelOrderTransaction: PopulatedTransaction;
|
|
12922
13027
|
}
|
|
12923
13028
|
|
|
12924
13029
|
declare const module = "orderbook";
|
|
@@ -28597,4 +28702,4 @@ declare class ERC721PermissionedMintable {
|
|
|
28597
28702
|
}): Promise<PopulatedTransaction>;
|
|
28598
28703
|
}
|
|
28599
28704
|
|
|
28600
|
-
export { APIError, AccountsChangedEvent, ActivityType, AllowedNetworkConfig, BlockchainData, BlockchainDataModuleConfiguration, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectReact, ConnectResult, ConnectionFailed, ConnectionSuccess, DeviceConnectResponse, DeviceTokenResponse, DexConfig, ERC20, ERC721PermissionedMintable, Environment, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GenericIMXProvider, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IMXProvider, ImmutableConfiguration, ImmutableXClient, ImtblBridgeProps, ImtblConnectProps, ImtblSwapProps, ImtblWalletProps, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, JsonRpcError, JsonRpcRequestCallback, JsonRpcRequestPayload, JsonRpcResponsePayload, MetaMaskIMXProvider, ModuleConfiguration, NetworkFilter, NetworkFilterTypes, NetworkInfo, Networks, OrchestrationEventType, Orderbook, Passport, PassportError, PassportModuleConfiguration, PassportOverrides, Provider, ProviderConfiguration, ProviderErrorCode, ProviderEvent, RemoteConfiguration, RequestArguments, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RpcErrorCode, SemanticVersion, SendTransactionParams, SendTransactionResult, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapRejected, SwapSuccess, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, UpdateConfig, UserProfile, WalletDisconnectWalletEvent, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitchEvent, WalletProviderName, WalletReact, WalletReactProps, WidgetEvent, WidgetTheme, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey, module };
|
|
28705
|
+
export { APIError, AccountsChangedEvent, ActivityType, AllowedNetworkConfig, BlockchainData, BlockchainDataModuleConfiguration, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, CHECKOUT_API_BASE_URL, CancelOrderResponse, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectReact, ConnectResult, ConnectionFailed, ConnectionSuccess, CreateListingParams, DeviceConnectResponse, DeviceTokenResponse, DexConfig, ERC20, ERC20Item, ERC721Item, ERC721PermissionedMintable, Environment, ErrorType, FulfillOrderResponse, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GenericIMXProvider, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IMXProvider, ImmutableConfiguration, ImmutableXClient, ImtblBridgeProps, ImtblConnectProps, ImtblSwapProps, ImtblWalletProps, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, JsonRpcError, JsonRpcRequestCallback, JsonRpcRequestPayload, JsonRpcResponsePayload, ListListingsParams, MetaMaskIMXProvider, ModuleConfiguration, NativeItem, NetworkFilter, NetworkFilterTypes, NetworkInfo, Networks, OrchestrationEventType, Orderbook, Passport, PassportError, PassportModuleConfiguration, PassportOverrides, PrepareListingParams, PrepareListingResponse, Provider, ProviderConfiguration, ProviderErrorCode, ProviderEvent, RemoteConfiguration, RequestArguments, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoyaltyInfo, RpcErrorCode, SemanticVersion, SendTransactionParams, SendTransactionResult, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapRejected, SwapSuccess, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, UpdateConfig, UserProfile, WalletDisconnectWalletEvent, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitchEvent, WalletProviderName, WalletReact, WalletReactProps, WidgetEvent, WidgetTheme, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey, module };
|