@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.
- package/dist/browser/checkout.js +2 -0
- package/dist/checkout_sdk.d.ts +986 -0
- package/dist/checkout_sdk.js +734 -0
- package/dist/checkout_widgets.d.ts +15485 -0
- package/dist/checkout_widgets.js +284 -0
- package/dist/immutablex_client.js +2 -2
- package/dist/index.cjs +3943 -24
- package/dist/index.d.ts +17171 -299
- package/dist/index.js +3932 -29
- package/dist/orderbook.d.ts +57 -0
- package/dist/orderbook.js +1833 -0
- package/dist/passport.d.ts +1154 -1
- package/dist/passport.js +18 -13
- package/dist/provider.d.ts +961 -0
- package/dist/provider.js +1143 -0
- package/package.json +28 -2
|
@@ -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 };
|