@imtbl/sdk 0.3.3 → 0.4.0-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.d.ts +1893 -0
- package/dist/blockchain-data.js +5666 -0
- package/dist/browser/checkout.js +2 -0
- package/dist/checkout_sdk.d.ts +1199 -0
- package/dist/checkout_sdk.js +13809 -0
- package/dist/checkout_widgets.d.ts +15382 -0
- package/dist/checkout_widgets.js +276 -0
- package/dist/erc20.d.ts +296 -0
- package/dist/erc20.js +371 -0
- package/dist/erc721-permissioned-mintable.d.ts +435 -0
- package/dist/erc721-permissioned-mintable.js +1165 -0
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +61 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +25854 -7103
- package/dist/index.d.ts +24616 -6664
- package/dist/index.js +25849 -7112
- package/dist/orderbook.d.ts +81 -0
- package/dist/orderbook.js +1983 -0
- package/dist/passport.js +2 -2
- package/package.json +25 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { OrderbookOverrides } from 'config/config';
|
|
2
|
+
import { ListingResult, ListListingsResult } from 'openapi/sdk';
|
|
3
|
+
import { ListListingsParams, PrepareListingParams, PrepareListingResponse, CreateListingParams, FulfillOrderResponse, CancelOrderResponse } from 'types';
|
|
4
|
+
|
|
5
|
+
declare enum Environment {
|
|
6
|
+
PRODUCTION = "production",
|
|
7
|
+
SANDBOX = "sandbox"
|
|
8
|
+
}
|
|
9
|
+
declare class ImmutableConfiguration {
|
|
10
|
+
readonly environment: Environment;
|
|
11
|
+
readonly apiKey?: string;
|
|
12
|
+
constructor(options: {
|
|
13
|
+
environment: Environment;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
interface ModuleConfiguration<T> {
|
|
18
|
+
baseConfig: ImmutableConfiguration;
|
|
19
|
+
overrides?: T;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* zkEVM orderbook SDK
|
|
24
|
+
* @constructor
|
|
25
|
+
* @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
|
|
26
|
+
*/
|
|
27
|
+
declare class Orderbook {
|
|
28
|
+
private apiClient;
|
|
29
|
+
private seaport;
|
|
30
|
+
private orderbookConfig;
|
|
31
|
+
constructor(config: ModuleConfiguration<OrderbookOverrides>);
|
|
32
|
+
/**
|
|
33
|
+
* Get an order by ID
|
|
34
|
+
* @param {string} listingId - The listingId to find.
|
|
35
|
+
* @return {ListingResult} The returned order result.
|
|
36
|
+
*/
|
|
37
|
+
getListing(listingId: string): Promise<ListingResult>;
|
|
38
|
+
/**
|
|
39
|
+
* List orders. This method is used to get a list of orders filtered by conditions specified
|
|
40
|
+
* in the params object.
|
|
41
|
+
* @param {ListOrderParams} listOrderParams - Filtering, ordering and page parameters.
|
|
42
|
+
* @return {Orders} The paged orders.
|
|
43
|
+
*/
|
|
44
|
+
listListings(listOrderParams: ListListingsParams): Promise<ListListingsResult>;
|
|
45
|
+
/**
|
|
46
|
+
* Get required transactions and messages for signing prior to creating a listing
|
|
47
|
+
* through the createListing method
|
|
48
|
+
* @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
|
|
49
|
+
* @return {PrepareListingResponse} PrepareListingResponse includes
|
|
50
|
+
* the unsigned approval transaction, the typed order message for signing and
|
|
51
|
+
* the order components that can be submitted to `createListing` with a signature.
|
|
52
|
+
*/
|
|
53
|
+
prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Create an order
|
|
56
|
+
* @param {CreateListingParams} createListingParams - create an order with the given params.
|
|
57
|
+
* @return {ListingResult} The result of the order created in the Immutable services.
|
|
58
|
+
*/
|
|
59
|
+
createListing(createListingParams: CreateListingParams): Promise<ListingResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Get unsigned transactions that can be submitted to fulfil an open order. If the approval
|
|
62
|
+
* transaction exists it must be signed and submitted to the chain before the fulfilment
|
|
63
|
+
* transaction can be submitted or it will be reverted.
|
|
64
|
+
* @param {string} listingId - The listingId to fulfil.
|
|
65
|
+
* @param {string} fulfillerAddress - The address of the account fulfilling the order.
|
|
66
|
+
* @return {FulfillOrderResponse} Approval and fulfilment transactions.
|
|
67
|
+
*/
|
|
68
|
+
fulfillOrder(listingId: string, takerAddress: string): Promise<FulfillOrderResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Get an unsigned cancel order transaction. Orders can only be cancelled by
|
|
71
|
+
* the account that created them.
|
|
72
|
+
* @param {string} listingId - The listingId to cancel.
|
|
73
|
+
* @param {string} accountAddress - The address of the account cancelling the order.
|
|
74
|
+
* @return {CancelOrderResponse} The unsigned cancel order transaction
|
|
75
|
+
*/
|
|
76
|
+
cancelOrder(listingId: string, accountAddress: string): Promise<CancelOrderResponse>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare const module = "orderbook";
|
|
80
|
+
|
|
81
|
+
export { Orderbook, module };
|