@imtbl/orderbook 2.17.2-alpha.2 → 2.17.2-alpha.3
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/index.js +4 -4
- package/dist/node/index.cjs +10 -10
- package/dist/node/index.js +4 -4
- package/dist/types/api-client/api-client.d.ts +5 -2
- package/dist/types/openapi/mapper.d.ts +2 -1
- package/dist/types/openapi/sdk/index.d.ts +3 -0
- package/dist/types/openapi/sdk/models/CreateMetadataBidRequestBody.d.ts +41 -0
- package/dist/types/openapi/sdk/models/ListMetadataBidsResult.d.ts +6 -0
- package/dist/types/openapi/sdk/models/MetadataBidResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/Order.d.ts +6 -1
- package/dist/types/openapi/sdk/services/OrdersService.d.ts +75 -0
- package/dist/types/orderbook.d.ts +29 -1
- package/dist/types/test/helpers/order.d.ts +2 -1
- package/dist/types/test/metadata-bid.e2e.d.ts +1 -0
- package/dist/types/types.d.ts +23 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BidResult, CancelOrdersResult, CollectionBidResult, ListBidsResult, ListCollectionBidsResult, ListingResult, ListListingsResult, ListTradeResult, ListTraitBidsResult, OrdersService, TradeResult, TraitBidResult } from '../openapi/sdk';
|
|
1
|
+
import { BidResult, CancelOrdersResult, CollectionBidResult, ListBidsResult, ListCollectionBidsResult, ListingResult, ListListingsResult, ListMetadataBidsResult, ListTradeResult, ListTraitBidsResult, MetadataBidResult, OrdersService, TradeResult, TraitBidResult } from '../openapi/sdk';
|
|
2
2
|
import { FulfillableOrder } from '../openapi/sdk/models/FulfillableOrder';
|
|
3
3
|
import { FulfillmentDataRequest } from '../openapi/sdk/models/FulfillmentDataRequest';
|
|
4
4
|
import { UnfulfillableOrder } from '../openapi/sdk/models/UnfulfillableOrder';
|
|
5
|
-
import { CreateBidParams, CreateCollectionBidParams, CreateListingParams, CreateTraitBidParams, ListBidsParams, ListCollectionBidsParams, ListListingsParams, ListTraitBidsParams, ListTradesParams } from '../types';
|
|
5
|
+
import { CreateBidParams, CreateCollectionBidParams, CreateListingParams, CreateMetadataBidParams, CreateTraitBidParams, ListBidsParams, ListCollectionBidsParams, ListListingsParams, ListMetadataBidsParams, ListTraitBidsParams, ListTradesParams } from '../types';
|
|
6
6
|
export declare class ImmutableApiClient {
|
|
7
7
|
private readonly orderbookService;
|
|
8
8
|
private readonly chainName;
|
|
@@ -23,10 +23,13 @@ export declare class ImmutableApiClient {
|
|
|
23
23
|
listBids(listOrderParams: ListBidsParams): Promise<ListBidsResult>;
|
|
24
24
|
listCollectionBids(listOrderParams: ListCollectionBidsParams): Promise<ListCollectionBidsResult>;
|
|
25
25
|
listTraitBids(listOrderParams: ListTraitBidsParams): Promise<ListTraitBidsResult>;
|
|
26
|
+
getMetadataBid(metadataBidId: string): Promise<MetadataBidResult>;
|
|
27
|
+
listMetadataBids(listOrderParams: ListMetadataBidsParams): Promise<ListMetadataBidsResult>;
|
|
26
28
|
listTrades(listTradesParams: ListTradesParams): Promise<ListTradeResult>;
|
|
27
29
|
cancelOrders(orderIds: string[], accountAddress: string, signature: string): Promise<CancelOrdersResult>;
|
|
28
30
|
createListing({ orderHash, orderComponents, orderSignature, makerFees, }: CreateListingParams): Promise<ListingResult>;
|
|
29
31
|
createBid({ orderHash, orderComponents, orderSignature, makerFees, }: CreateBidParams): Promise<BidResult>;
|
|
30
32
|
createCollectionBid({ orderHash, orderComponents, orderSignature, makerFees, }: CreateCollectionBidParams): Promise<CollectionBidResult>;
|
|
33
|
+
createMetadataBid({ orderHash, orderComponents, orderSignature, makerFees, metadataId, }: CreateMetadataBidParams): Promise<MetadataBidResult>;
|
|
31
34
|
createTraitBid({ orderHash, orderComponents, orderSignature, makerFees, traitCriteria, }: CreateTraitBidParams): Promise<TraitBidResult>;
|
|
32
35
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bid, CollectionBid, Listing, Order, Page, Trade, TraitBid } from '../types';
|
|
1
|
+
import { Bid, CollectionBid, Listing, MetadataBid, Order, Page, Trade, TraitBid } from '../types';
|
|
2
2
|
import { Order as OpenApiOrder } from './sdk/models/Order';
|
|
3
3
|
import { Page as OpenApiPage } from './sdk/models/Page';
|
|
4
4
|
import { Trade as OpenApiTrade } from './sdk/models/Trade';
|
|
@@ -6,6 +6,7 @@ export declare function mapListingFromOpenApiOrder(order: OpenApiOrder): Listing
|
|
|
6
6
|
export declare function mapBidFromOpenApiOrder(order: OpenApiOrder): Bid;
|
|
7
7
|
export declare function mapCollectionBidFromOpenApiOrder(order: OpenApiOrder): CollectionBid;
|
|
8
8
|
export declare function mapTraitBidFromOpenApiOrder(order: OpenApiOrder): TraitBid;
|
|
9
|
+
export declare function mapMetadataBidFromOpenApiOrder(order: OpenApiOrder): MetadataBid;
|
|
9
10
|
export declare function mapOrderFromOpenApiOrder(order: OpenApiOrder): Order;
|
|
10
11
|
export declare function mapFromOpenApiTrade(trade: OpenApiTrade): Trade;
|
|
11
12
|
export declare function mapFromOpenApiPage(page: OpenApiPage): Page;
|
|
@@ -17,6 +17,7 @@ export type { CollectionBidResult } from './models/CollectionBidResult';
|
|
|
17
17
|
export type { CreateBidRequestBody } from './models/CreateBidRequestBody';
|
|
18
18
|
export type { CreateCollectionBidRequestBody } from './models/CreateCollectionBidRequestBody';
|
|
19
19
|
export type { CreateTraitBidRequestBody } from './models/CreateTraitBidRequestBody';
|
|
20
|
+
export type { CreateMetadataBidRequestBody } from './models/CreateMetadataBidRequestBody';
|
|
20
21
|
export type { CreateListingRequestBody } from './models/CreateListingRequestBody';
|
|
21
22
|
export type { ERC1155CollectionItem } from './models/ERC1155CollectionItem';
|
|
22
23
|
export type { ERC1155Item } from './models/ERC1155Item';
|
|
@@ -36,6 +37,7 @@ export type { Item } from './models/Item';
|
|
|
36
37
|
export type { ListBidsResult } from './models/ListBidsResult';
|
|
37
38
|
export type { ListCollectionBidsResult } from './models/ListCollectionBidsResult';
|
|
38
39
|
export type { ListTraitBidsResult } from './models/ListTraitBidsResult';
|
|
40
|
+
export type { ListMetadataBidsResult } from './models/ListMetadataBidsResult';
|
|
39
41
|
export type { ListingResult } from './models/ListingResult';
|
|
40
42
|
export type { ListListingsResult } from './models/ListListingsResult';
|
|
41
43
|
export type { ListTradeResult } from './models/ListTradeResult';
|
|
@@ -52,6 +54,7 @@ export type { Trade } from './models/Trade';
|
|
|
52
54
|
export type { TradeBlockchainMetadata } from './models/TradeBlockchainMetadata';
|
|
53
55
|
export type { TradeResult } from './models/TradeResult';
|
|
54
56
|
export type { TraitBidResult } from './models/TraitBidResult';
|
|
57
|
+
export type { MetadataBidResult } from './models/MetadataBidResult';
|
|
55
58
|
export type { TraitFilter } from './models/TraitFilter';
|
|
56
59
|
export type { UnfulfillableOrder } from './models/UnfulfillableOrder';
|
|
57
60
|
export { OrdersService } from './services/OrdersService';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AssetCollectionItem } from './AssetCollectionItem';
|
|
2
|
+
import type { ERC20Item } from './ERC20Item';
|
|
3
|
+
import type { Fee } from './Fee';
|
|
4
|
+
import type { ProtocolData } from './ProtocolData';
|
|
5
|
+
export type CreateMetadataBidRequestBody = {
|
|
6
|
+
account_address: string;
|
|
7
|
+
order_hash: string;
|
|
8
|
+
/**
|
|
9
|
+
* Buy item for metadata bid should either be ERC721 or ERC1155 collection item
|
|
10
|
+
*/
|
|
11
|
+
buy: Array<AssetCollectionItem>;
|
|
12
|
+
/**
|
|
13
|
+
* Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible.
|
|
14
|
+
*/
|
|
15
|
+
fees: Array<Fee>;
|
|
16
|
+
/**
|
|
17
|
+
* Time after which the Order is considered expired
|
|
18
|
+
*/
|
|
19
|
+
end_at: string;
|
|
20
|
+
protocol_data: ProtocolData;
|
|
21
|
+
/**
|
|
22
|
+
* A random value added to the create Order request
|
|
23
|
+
*/
|
|
24
|
+
salt: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sell item for metadata bid should be an ERC20 item
|
|
27
|
+
*/
|
|
28
|
+
sell: Array<ERC20Item>;
|
|
29
|
+
/**
|
|
30
|
+
* Digital signature generated by the user for the specific Order
|
|
31
|
+
*/
|
|
32
|
+
signature: string;
|
|
33
|
+
/**
|
|
34
|
+
* Time after which Order is considered active
|
|
35
|
+
*/
|
|
36
|
+
start_at: string;
|
|
37
|
+
/**
|
|
38
|
+
* The metadata_id (stack_id) that NFTs must have to fulfil this bid
|
|
39
|
+
*/
|
|
40
|
+
metadata_id: string;
|
|
41
|
+
};
|
|
@@ -51,6 +51,10 @@ export type Order = {
|
|
|
51
51
|
* Trait criteria for trait bids when returned by the API
|
|
52
52
|
*/
|
|
53
53
|
trait_criteria?: Array<TraitFilter>;
|
|
54
|
+
/**
|
|
55
|
+
* Metadata ID (stack ID) for metadata bids when returned by the API
|
|
56
|
+
*/
|
|
57
|
+
metadata_id?: string;
|
|
54
58
|
};
|
|
55
59
|
export declare namespace Order {
|
|
56
60
|
/**
|
|
@@ -60,6 +64,7 @@ export declare namespace Order {
|
|
|
60
64
|
LISTING = "LISTING",
|
|
61
65
|
BID = "BID",
|
|
62
66
|
COLLECTION_BID = "COLLECTION_BID",
|
|
63
|
-
TRAIT_BID = "TRAIT_BID"
|
|
67
|
+
TRAIT_BID = "TRAIT_BID",
|
|
68
|
+
METADATA_BID = "METADATA_BID"
|
|
64
69
|
}
|
|
65
70
|
}
|
|
@@ -6,12 +6,14 @@ import type { CollectionBidResult } from '../models/CollectionBidResult';
|
|
|
6
6
|
import type { CreateBidRequestBody } from '../models/CreateBidRequestBody';
|
|
7
7
|
import type { CreateCollectionBidRequestBody } from '../models/CreateCollectionBidRequestBody';
|
|
8
8
|
import type { CreateTraitBidRequestBody } from '../models/CreateTraitBidRequestBody';
|
|
9
|
+
import type { CreateMetadataBidRequestBody } from '../models/CreateMetadataBidRequestBody';
|
|
9
10
|
import type { CreateListingRequestBody } from '../models/CreateListingRequestBody';
|
|
10
11
|
import type { FulfillableOrder } from '../models/FulfillableOrder';
|
|
11
12
|
import type { FulfillmentDataRequest } from '../models/FulfillmentDataRequest';
|
|
12
13
|
import type { ListBidsResult } from '../models/ListBidsResult';
|
|
13
14
|
import type { ListCollectionBidsResult } from '../models/ListCollectionBidsResult';
|
|
14
15
|
import type { ListTraitBidsResult } from '../models/ListTraitBidsResult';
|
|
16
|
+
import type { ListMetadataBidsResult } from '../models/ListMetadataBidsResult';
|
|
15
17
|
import type { ListingResult } from '../models/ListingResult';
|
|
16
18
|
import type { ListListingsResult } from '../models/ListListingsResult';
|
|
17
19
|
import type { ListTradeResult } from '../models/ListTradeResult';
|
|
@@ -20,6 +22,7 @@ import type { PageCursor } from '../models/PageCursor';
|
|
|
20
22
|
import type { PageSize } from '../models/PageSize';
|
|
21
23
|
import type { TradeResult } from '../models/TradeResult';
|
|
22
24
|
import type { TraitBidResult } from '../models/TraitBidResult';
|
|
25
|
+
import type { MetadataBidResult } from '../models/MetadataBidResult';
|
|
23
26
|
import type { UnfulfillableOrder } from '../models/UnfulfillableOrder';
|
|
24
27
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
25
28
|
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
@@ -276,6 +279,78 @@ export declare class OrdersService {
|
|
|
276
279
|
chainName: ChainName;
|
|
277
280
|
requestBody: CreateTraitBidRequestBody;
|
|
278
281
|
}): CancelablePromise<TraitBidResult>;
|
|
282
|
+
/**
|
|
283
|
+
* List all metadata bids
|
|
284
|
+
* List all metadata bids
|
|
285
|
+
* @returns ListMetadataBidsResult OK response.
|
|
286
|
+
* @throws ApiError
|
|
287
|
+
*/
|
|
288
|
+
listMetadataBids({ chainName, status, buyItemContractAddress, sellItemContractAddress, accountAddress, metadataId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
|
|
289
|
+
chainName: ChainName;
|
|
290
|
+
/**
|
|
291
|
+
* Order status to filter by
|
|
292
|
+
*/
|
|
293
|
+
status?: OrderStatusName;
|
|
294
|
+
/**
|
|
295
|
+
* Buy item contract address to filter by
|
|
296
|
+
*/
|
|
297
|
+
buyItemContractAddress?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Sell item contract address to filter by
|
|
300
|
+
*/
|
|
301
|
+
sellItemContractAddress?: string;
|
|
302
|
+
/**
|
|
303
|
+
* The account address of the user who created the bid
|
|
304
|
+
*/
|
|
305
|
+
accountAddress?: string;
|
|
306
|
+
/**
|
|
307
|
+
* The metadata_id to filter by
|
|
308
|
+
*/
|
|
309
|
+
metadataId?: string;
|
|
310
|
+
/**
|
|
311
|
+
* From updated at including given date
|
|
312
|
+
*/
|
|
313
|
+
fromUpdatedAt?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Maximum number of orders to return per page
|
|
316
|
+
*/
|
|
317
|
+
pageSize?: PageSize;
|
|
318
|
+
/**
|
|
319
|
+
* Order field to sort by. `sell_item_amount` sorts by per token price, for example if 10eth is offered for 5 ERC1155 items, it's sorted as 2eth for `sell_item_amount`.
|
|
320
|
+
*/
|
|
321
|
+
sortBy?: 'created_at' | 'updated_at' | 'sell_item_amount';
|
|
322
|
+
/**
|
|
323
|
+
* Ascending or descending direction for sort
|
|
324
|
+
*/
|
|
325
|
+
sortDirection?: 'asc' | 'desc';
|
|
326
|
+
/**
|
|
327
|
+
* Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
328
|
+
*/
|
|
329
|
+
pageCursor?: PageCursor;
|
|
330
|
+
}): CancelablePromise<ListMetadataBidsResult>;
|
|
331
|
+
/**
|
|
332
|
+
* Create a metadata bid
|
|
333
|
+
* Create a metadata bid
|
|
334
|
+
* @returns MetadataBidResult Created response.
|
|
335
|
+
* @throws ApiError
|
|
336
|
+
*/
|
|
337
|
+
createMetadataBid({ chainName, requestBody, }: {
|
|
338
|
+
chainName: ChainName;
|
|
339
|
+
requestBody: CreateMetadataBidRequestBody;
|
|
340
|
+
}): CancelablePromise<MetadataBidResult>;
|
|
341
|
+
/**
|
|
342
|
+
* Get a single metadata bid by ID
|
|
343
|
+
* Get a single metadata bid by ID
|
|
344
|
+
* @returns MetadataBidResult OK response.
|
|
345
|
+
* @throws ApiError
|
|
346
|
+
*/
|
|
347
|
+
getMetadataBid({ chainName, metadataBidId, }: {
|
|
348
|
+
chainName: ChainName;
|
|
349
|
+
/**
|
|
350
|
+
* Global Metadata Bid identifier
|
|
351
|
+
*/
|
|
352
|
+
metadataBidId: string;
|
|
353
|
+
}): CancelablePromise<MetadataBidResult>;
|
|
279
354
|
/**
|
|
280
355
|
* Get a single listing by ID
|
|
281
356
|
* Get a single listing by ID
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModuleConfiguration } from '@imtbl/config';
|
|
2
2
|
import { OrderbookModuleConfiguration, OrderbookOverrides } from './config/config';
|
|
3
3
|
import { CancelOrdersResult } from './openapi/sdk';
|
|
4
|
-
import { BidResult, CancelOrdersOnChainResponse, CollectionBidResult, CreateBidParams, CreateCollectionBidParams, CreateTraitBidParams, CreateListingParams, FeeValue, FulfillBulkOrdersResponse, FulfillmentListing, FulfillmentOrder, FulfillOrderResponse, ListBidsParams, ListBidsResult, ListCollectionBidsParams, ListCollectionBidsResult, ListTraitBidsParams, ListTraitBidsResult, ListingResult, ListListingsParams, ListListingsResult, ListTradesParams, ListTradesResult, PrepareBidParams, PrepareBidResponse, PrepareBulkListingsParams, PrepareBulkListingsResponse, PrepareCancelOrdersResponse, PrepareCollectionBidParams, PrepareCollectionBidResponse, PrepareTraitBidParams, PrepareTraitBidResponse, TraitBidResult, PrepareListingParams, PrepareListingResponse, TradeResult } from './types';
|
|
4
|
+
import { BidResult, CancelOrdersOnChainResponse, CollectionBidResult, CreateBidParams, CreateCollectionBidParams, CreateMetadataBidParams, CreateTraitBidParams, CreateListingParams, FeeValue, FulfillBulkOrdersResponse, FulfillmentListing, FulfillmentOrder, FulfillOrderResponse, ListBidsParams, ListBidsResult, ListCollectionBidsParams, ListCollectionBidsResult, ListMetadataBidsParams, ListMetadataBidsResult, ListTraitBidsParams, ListTraitBidsResult, ListingResult, ListListingsParams, ListListingsResult, ListTradesParams, ListTradesResult, PrepareBidParams, PrepareBidResponse, PrepareBulkListingsParams, PrepareBulkListingsResponse, PrepareCancelOrdersResponse, PrepareCollectionBidParams, PrepareCollectionBidResponse, PrepareMetadataBidParams, PrepareMetadataBidResponse, PrepareTraitBidParams, PrepareTraitBidResponse, MetadataBidResult, TraitBidResult, PrepareListingParams, PrepareListingResponse, TradeResult } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* zkEVM orderbook SDK
|
|
7
7
|
* @constructor
|
|
@@ -46,6 +46,12 @@ export declare class Orderbook {
|
|
|
46
46
|
* @return {TraitBidResult} The returned trait bid result.
|
|
47
47
|
*/
|
|
48
48
|
getTraitBid(traitBidId: string): Promise<TraitBidResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Get a metadata bid by ID
|
|
51
|
+
* @param {string} metadataBidId - The metadata bid id to find.
|
|
52
|
+
* @return {MetadataBidResult} The returned metadata bid result.
|
|
53
|
+
*/
|
|
54
|
+
getMetadataBid(metadataBidId: string): Promise<MetadataBidResult>;
|
|
49
55
|
/**
|
|
50
56
|
* Get a trade by ID
|
|
51
57
|
* @param {string} tradeId - The tradeId to find.
|
|
@@ -80,6 +86,13 @@ export declare class Orderbook {
|
|
|
80
86
|
* @return {ListTraitBidsResult} The paged trait bids.
|
|
81
87
|
*/
|
|
82
88
|
listTraitBids(listOrderParams: ListTraitBidsParams): Promise<ListTraitBidsResult>;
|
|
89
|
+
/**
|
|
90
|
+
* List metadata bids. This method is used to get a list of metadata bids filtered
|
|
91
|
+
* by conditions specified in the params object.
|
|
92
|
+
* @param {ListMetadataBidsParams} listOrderParams - Filtering, ordering and page parameters.
|
|
93
|
+
* @return {ListMetadataBidsResult} The paged metadata bids.
|
|
94
|
+
*/
|
|
95
|
+
listMetadataBids(listOrderParams: ListMetadataBidsParams): Promise<ListMetadataBidsResult>;
|
|
83
96
|
/**
|
|
84
97
|
* List trades. This method is used to get a list of trades filtered by conditions specified
|
|
85
98
|
* in the params object
|
|
@@ -168,6 +181,21 @@ export declare class Orderbook {
|
|
|
168
181
|
* @return {TraitBidResult} The created trait bid.
|
|
169
182
|
*/
|
|
170
183
|
createTraitBid(createTraitBidParams: CreateTraitBidParams): Promise<TraitBidResult>;
|
|
184
|
+
/**
|
|
185
|
+
* Get required transactions and messages for signing prior to creating a metadata bid
|
|
186
|
+
* through the {@linkcode createMetadataBid} method. Uses the same Seaport criteria-based
|
|
187
|
+
* order shape as collection bids.
|
|
188
|
+
* @param {PrepareMetadataBidParams} params - Details about the metadata bid to be created.
|
|
189
|
+
* @return {PrepareMetadataBidResponse} Unsigned approval (if any), typed order message, and
|
|
190
|
+
* order components for {@linkcode createMetadataBid}.
|
|
191
|
+
*/
|
|
192
|
+
prepareMetadataBid({ makerAddress, sell, buy, orderStart, orderExpiry, }: PrepareMetadataBidParams): Promise<PrepareMetadataBidResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* Create a metadata bid (collection criteria offer plus metadata ID submitted to the API).
|
|
195
|
+
* @param {CreateMetadataBidParams} createMetadataBidParams - Signed order and metadata ID.
|
|
196
|
+
* @return {MetadataBidResult} The created metadata bid.
|
|
197
|
+
*/
|
|
198
|
+
createMetadataBid(createMetadataBidParams: CreateMetadataBidParams): Promise<MetadataBidResult>;
|
|
171
199
|
/**
|
|
172
200
|
* Get unsigned transactions that can be submitted to fulfil an open order. If the approval
|
|
173
201
|
* transaction exists it must be signed and submitted to the chain before the fulfilment
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Orderbook } from '../../orderbook';
|
|
2
|
-
import { Order, OrderStatusName } from '../../types';
|
|
2
|
+
import { MetadataBid, Order, OrderStatusName } from '../../types';
|
|
3
3
|
export declare function waitForOrderToBeOfStatus(sdk: Orderbook, orderId: string, status: OrderStatusName, attemps?: number): Promise<Order>;
|
|
4
|
+
export declare function waitForMetadataBidToBeOfStatus(sdk: Orderbook, metadataBidId: string, status: OrderStatusName, attempts?: number): Promise<MetadataBid>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface ERC1155CollectionItem {
|
|
|
32
32
|
contractAddress: string;
|
|
33
33
|
amount: string;
|
|
34
34
|
}
|
|
35
|
-
export type Order = Listing | Bid | CollectionBid | TraitBid;
|
|
35
|
+
export type Order = Listing | Bid | CollectionBid | TraitBid | MetadataBid;
|
|
36
36
|
export interface Listing extends OrderFields {
|
|
37
37
|
type: 'LISTING';
|
|
38
38
|
sell: (ERC721Item | ERC1155Item)[];
|
|
@@ -64,6 +64,15 @@ export interface TraitBid extends OrderFields {
|
|
|
64
64
|
*/
|
|
65
65
|
traitCriteria: TraitFilter[];
|
|
66
66
|
}
|
|
67
|
+
export interface MetadataBid extends OrderFields {
|
|
68
|
+
type: 'METADATA_BID';
|
|
69
|
+
sell: ERC20Item[];
|
|
70
|
+
buy: (ERC721CollectionItem | ERC1155CollectionItem)[];
|
|
71
|
+
/**
|
|
72
|
+
* The metadata ID (stack ID) that NFTs must match to fulfil this bid.
|
|
73
|
+
*/
|
|
74
|
+
metadataId: string;
|
|
75
|
+
}
|
|
67
76
|
interface OrderFields {
|
|
68
77
|
id: string;
|
|
69
78
|
chain: {
|
|
@@ -285,6 +294,19 @@ export type PrepareTraitBidResponse = PrepareOrderResponse;
|
|
|
285
294
|
export interface CreateTraitBidParams extends CreateCollectionBidParams {
|
|
286
295
|
traitCriteria: TraitFilter[];
|
|
287
296
|
}
|
|
297
|
+
export type ListMetadataBidsParams = Omit<Parameters<typeof OrdersService.prototype.listMetadataBids>[0], 'chainName'>;
|
|
298
|
+
export interface MetadataBidResult {
|
|
299
|
+
result: MetadataBid;
|
|
300
|
+
}
|
|
301
|
+
export interface ListMetadataBidsResult {
|
|
302
|
+
page: Page;
|
|
303
|
+
result: MetadataBid[];
|
|
304
|
+
}
|
|
305
|
+
export type PrepareMetadataBidParams = PrepareCollectionBidParams;
|
|
306
|
+
export type PrepareMetadataBidResponse = PrepareOrderResponse;
|
|
307
|
+
export interface CreateMetadataBidParams extends CreateCollectionBidParams {
|
|
308
|
+
metadataId: string;
|
|
309
|
+
}
|
|
288
310
|
export interface FulfillmentOrder {
|
|
289
311
|
orderId: string;
|
|
290
312
|
takerFees: FeeValue[];
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/orderbook",
|
|
3
|
-
"version": "2.17.2-alpha.
|
|
3
|
+
"version": "2.17.2-alpha.3",
|
|
4
4
|
"author": "Immutable",
|
|
5
5
|
"bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@imtbl/config": "2.17.2-alpha.
|
|
8
|
-
"@imtbl/metrics": "2.17.2-alpha.
|
|
7
|
+
"@imtbl/config": "2.17.2-alpha.3",
|
|
8
|
+
"@imtbl/metrics": "2.17.2-alpha.3",
|
|
9
9
|
"@opensea/seaport-js": "4.0.3",
|
|
10
10
|
"axios": "^1.6.5",
|
|
11
11
|
"ethers": "^6.13.4",
|