@imtbl/sdk 0.1.6 → 0.1.7-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.
@@ -0,0 +1,57 @@
1
+ import { OrderbookModuleConfiguration } from 'config/config';
2
+ import { Order } from 'openapi/sdk';
3
+ import { 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 {Order} The returned order.
19
+ */
20
+ getOrder(orderId: string): Promise<Order>;
21
+ /**
22
+ * Get required transactions and messages for signing prior to creating a listing
23
+ * through the createOrder method
24
+ * @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
25
+ * @return {PrepareListingResponse} PrepareListingResponse includes
26
+ * the unsigned approval transaction, the typed order message for signing and
27
+ * the order components that can be submitted to `createOrder` with a signature.
28
+ */
29
+ prepareListing({ offerer, listingItem, considerationItem, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
30
+ /**
31
+ * Create an order
32
+ * @param {CreateOrderParams} createOrderParams - create an order with the given params.
33
+ * @return {Order} The order created in the Immutable services.
34
+ */
35
+ createOrder(createOrderParams: CreateOrderParams): Promise<Order>;
36
+ /**
37
+ * Get unsigned transactions that can be submitted to fulfil an open order. If the approval
38
+ * transaction exists it must be signed and submitted to the chain before the fulfilment
39
+ * transaction can be submitted or it will be reverted.
40
+ * @param {string} orderId - The orderId to fulfil.
41
+ * @param {string} fulfillerAddress - The address of the account fulfilling the order.
42
+ * @return {FulfilOrderResponse} Approval and fulfilment transactions.
43
+ */
44
+ fulfillOrder(orderId: string, fulfillerAddress: string): Promise<FulfilOrderResponse>;
45
+ /**
46
+ * Get an unsigned cancel order transaction. Orders can only be cancelled by
47
+ * the account that created them.
48
+ * @param {string} orderId - The orderId to cancel.
49
+ * @param {string} accountAddress - The address of the account cancelling the order.
50
+ * @return {CancelOrderResponse} The unsigned cancel order transaction
51
+ */
52
+ cancelOrder(orderId: string, accountAddress: string): Promise<CancelOrderResponse>;
53
+ }
54
+
55
+ declare const module = "orderbook";
56
+
57
+ export { Orderbook, module };