@imtbl/sdk 0.1.7 → 0.1.8-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ import { OrderbookModuleConfiguration } from 'config/config';
2
+ import { OrderResult, ListOrdersResult } from 'openapi/sdk';
3
+ import { ListOrderParams, PrepareListingParams, PrepareListingResponse, CreateOrderParams, FulfilOrderResponse, CancelOrderResponse } from 'types';
4
+
5
+ /**
6
+ * zkEVM orderbook SDK
7
+ * @constructor
8
+ * @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
9
+ */
10
+ declare class Orderbook {
11
+ private config;
12
+ private apiClient;
13
+ private seaport;
14
+ constructor(config: OrderbookModuleConfiguration);
15
+ /**
16
+ * Get an order by ID
17
+ * @param {string} orderId - The orderId to find.
18
+ * @return {OrderResult} The returned order result.
19
+ */
20
+ getOrder(orderId: string): Promise<OrderResult>;
21
+ /**
22
+ * List orders. This method is used to get a list of orders filtered by conditions specified
23
+ * in the params object.
24
+ * @param {ListOrderParams} listOrderParams - Filtering, ordering and page parameters.
25
+ * @return {Orders} The paged orders.
26
+ */
27
+ listOrders(listOrderParams: ListOrderParams): Promise<ListOrdersResult>;
28
+ /**
29
+ * Get required transactions and messages for signing prior to creating a listing
30
+ * through the createOrder method
31
+ * @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
32
+ * @return {PrepareListingResponse} PrepareListingResponse includes
33
+ * the unsigned approval transaction, the typed order message for signing and
34
+ * the order components that can be submitted to `createOrder` with a signature.
35
+ */
36
+ prepareListing({ offerer, listingItem, considerationItem, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
37
+ /**
38
+ * Create an order
39
+ * @param {CreateOrderParams} createOrderParams - create an order with the given params.
40
+ * @return {OrderResult} The result of the order created in the Immutable services.
41
+ */
42
+ createOrder(createOrderParams: CreateOrderParams): Promise<OrderResult>;
43
+ /**
44
+ * Get unsigned transactions that can be submitted to fulfil an open order. If the approval
45
+ * transaction exists it must be signed and submitted to the chain before the fulfilment
46
+ * transaction can be submitted or it will be reverted.
47
+ * @param {string} orderId - The orderId to fulfil.
48
+ * @param {string} fulfillerAddress - The address of the account fulfilling the order.
49
+ * @return {FulfilOrderResponse} Approval and fulfilment transactions.
50
+ */
51
+ fulfillOrder(orderId: string, fulfillerAddress: string): Promise<FulfilOrderResponse>;
52
+ /**
53
+ * Get an unsigned cancel order transaction. Orders can only be cancelled by
54
+ * the account that created them.
55
+ * @param {string} orderId - The orderId to cancel.
56
+ * @param {string} accountAddress - The address of the account cancelling the order.
57
+ * @return {CancelOrderResponse} The unsigned cancel order transaction
58
+ */
59
+ cancelOrder(orderId: string, accountAddress: string): Promise<CancelOrderResponse>;
60
+ }
61
+
62
+ declare const module = "orderbook";
63
+
64
+ export { Orderbook, module };