@imtbl/orderbook 2.0.0-alpha.0
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/LICENSE.md +176 -0
- package/README.md +71 -0
- package/dist/browser/index.js +2 -0
- package/dist/node/index.cjs +2 -0
- package/dist/node/index.js +2 -0
- package/dist/types/api-client/api-client-factory.d.ts +8 -0
- package/dist/types/api-client/api-client.d.ts +29 -0
- package/dist/types/api-client/api-client.test.d.ts +1 -0
- package/dist/types/api-client/index.d.ts +2 -0
- package/dist/types/config/config.d.ts +20 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/erc721/erc721-factory.d.ts +7 -0
- package/dist/types/erc721/erc721.d.ts +7 -0
- package/dist/types/erc721/erc721.test.d.ts +1 -0
- package/dist/types/erc721/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/openapi/mapper.d.ts +10 -0
- package/dist/types/openapi/sdk/OrderBookClient.d.ts +10 -0
- package/dist/types/openapi/sdk/core/ApiError.d.ts +10 -0
- package/dist/types/openapi/sdk/core/ApiRequestOptions.d.ts +13 -0
- package/dist/types/openapi/sdk/core/ApiResult.d.ts +7 -0
- package/dist/types/openapi/sdk/core/AxiosHttpRequest.d.ts +14 -0
- package/dist/types/openapi/sdk/core/BaseHttpRequest.d.ts +8 -0
- package/dist/types/openapi/sdk/core/CancelablePromise.d.ts +26 -0
- package/dist/types/openapi/sdk/core/OpenAPI.d.ts +16 -0
- package/dist/types/openapi/sdk/core/request.d.ts +11 -0
- package/dist/types/openapi/sdk/index.d.ts +53 -0
- package/dist/types/openapi/sdk/models/ActiveOrderStatus.d.ts +6 -0
- package/dist/types/openapi/sdk/models/AssetCollectionItem.d.ts +3 -0
- package/dist/types/openapi/sdk/models/BidResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/CancelOrdersRequestBody.d.ts +14 -0
- package/dist/types/openapi/sdk/models/CancelOrdersResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/CancelOrdersResultData.d.ts +15 -0
- package/dist/types/openapi/sdk/models/CancelledOrderStatus.d.ts +24 -0
- package/dist/types/openapi/sdk/models/Chain.d.ts +13 -0
- package/dist/types/openapi/sdk/models/ChainName.d.ts +4 -0
- package/dist/types/openapi/sdk/models/CollectionBidResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/CreateBidRequestBody.d.ts +37 -0
- package/dist/types/openapi/sdk/models/CreateCollectionBidRequestBody.d.ts +37 -0
- package/dist/types/openapi/sdk/models/CreateListingRequestBody.d.ts +36 -0
- package/dist/types/openapi/sdk/models/ERC1155CollectionItem.d.ts +14 -0
- package/dist/types/openapi/sdk/models/ERC1155Item.d.ts +18 -0
- package/dist/types/openapi/sdk/models/ERC20Item.d.ts +14 -0
- package/dist/types/openapi/sdk/models/ERC721CollectionItem.d.ts +14 -0
- package/dist/types/openapi/sdk/models/ERC721Item.d.ts +14 -0
- package/dist/types/openapi/sdk/models/Error.d.ts +13 -0
- package/dist/types/openapi/sdk/models/ExpiredOrderStatus.d.ts +6 -0
- package/dist/types/openapi/sdk/models/FailedOrderCancellation.d.ts +18 -0
- package/dist/types/openapi/sdk/models/Fee.d.ts +25 -0
- package/dist/types/openapi/sdk/models/FillStatus.d.ts +13 -0
- package/dist/types/openapi/sdk/models/FilledOrderStatus.d.ts +6 -0
- package/dist/types/openapi/sdk/models/FulfillableOrder.d.ts +9 -0
- package/dist/types/openapi/sdk/models/FulfillmentDataRequest.d.ts +13 -0
- package/dist/types/openapi/sdk/models/InactiveOrderStatus.d.ts +14 -0
- package/dist/types/openapi/sdk/models/Item.d.ts +7 -0
- package/dist/types/openapi/sdk/models/ListBidsResult.d.ts +6 -0
- package/dist/types/openapi/sdk/models/ListCollectionBidsResult.d.ts +6 -0
- package/dist/types/openapi/sdk/models/ListListingsResult.d.ts +6 -0
- package/dist/types/openapi/sdk/models/ListTradeResult.d.ts +6 -0
- package/dist/types/openapi/sdk/models/ListingResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/NativeItem.d.ts +10 -0
- package/dist/types/openapi/sdk/models/Order.d.ts +59 -0
- package/dist/types/openapi/sdk/models/OrderStatus.d.ts +10 -0
- package/dist/types/openapi/sdk/models/OrderStatusName.d.ts +11 -0
- package/dist/types/openapi/sdk/models/Page.d.ts +13 -0
- package/dist/types/openapi/sdk/models/PageCursor.d.ts +4 -0
- package/dist/types/openapi/sdk/models/PageSize.d.ts +4 -0
- package/dist/types/openapi/sdk/models/PendingOrderStatus.d.ts +14 -0
- package/dist/types/openapi/sdk/models/ProtocolData.d.ts +31 -0
- package/dist/types/openapi/sdk/models/Trade.d.ts +40 -0
- package/dist/types/openapi/sdk/models/TradeBlockchainMetadata.d.ts +21 -0
- package/dist/types/openapi/sdk/models/TradeResult.d.ts +4 -0
- package/dist/types/openapi/sdk/models/UnfulfillableOrder.d.ts +14 -0
- package/dist/types/openapi/sdk/services/OrdersService.d.ts +319 -0
- package/dist/types/orderbook.d.ts +193 -0
- package/dist/types/seaport/components.d.ts +8 -0
- package/dist/types/seaport/constants.d.ts +43 -0
- package/dist/types/seaport/index.d.ts +2 -0
- package/dist/types/seaport/lib/bulk-orders.d.ts +6 -0
- package/dist/types/seaport/lib/defaults.d.ts +14 -0
- package/dist/types/seaport/lib/merkle.d.ts +33 -0
- package/dist/types/seaport/lib/utils.d.ts +10 -0
- package/dist/types/seaport/map-to-immutable-order.d.ts +7 -0
- package/dist/types/seaport/map-to-seaport-order.d.ts +6 -0
- package/dist/types/seaport/seaport-lib-factory.d.ts +10 -0
- package/dist/types/seaport/seaport.d.ts +38 -0
- package/dist/types/seaport/seaport.test.d.ts +1 -0
- package/dist/types/seaport/transaction.d.ts +3 -0
- package/dist/types/test/bulk-listings.e2e.d.ts +1 -0
- package/dist/types/test/cancel.e2e.d.ts +1 -0
- package/dist/types/test/create.e2e.d.ts +1 -0
- package/dist/types/test/expiry.demo.d.ts +1 -0
- package/dist/types/test/fulfil.e2e.d.ts +1 -0
- package/dist/types/test/fulfill.demo.d.ts +1 -0
- package/dist/types/test/fulfillBulk.demo.d.ts +1 -0
- package/dist/types/test/helpers/actions.d.ts +3 -0
- package/dist/types/test/helpers/config.d.ts +2 -0
- package/dist/types/test/helpers/erc721.d.ts +6 -0
- package/dist/types/test/helpers/gas.d.ts +4 -0
- package/dist/types/test/helpers/index.d.ts +8 -0
- package/dist/types/test/helpers/order.d.ts +3 -0
- package/dist/types/test/helpers/provider.d.ts +2 -0
- package/dist/types/test/helpers/sign-and-submit.d.ts +7 -0
- package/dist/types/test/helpers/signers.d.ts +3 -0
- package/dist/types/test/helpers/test-token/TestERC721Token.d.ts +715 -0
- package/dist/types/test/helpers/test-token/TestERC721Token__factory.d.ts +1043 -0
- package/dist/types/test/helpers/test-token/common.d.ts +50 -0
- package/dist/types/test/helpers/test-token/index.d.ts +2 -0
- package/dist/types/test/helpers/token.d.ts +1 -0
- package/dist/types/test/list.e2e.d.ts +1 -0
- package/dist/types/typechain/types/ImmutableERC721Base.d.ts +486 -0
- package/dist/types/typechain/types/common.d.ts +50 -0
- package/dist/types/typechain/types/factories/ImmutableERC721Base__factory.d.ts +688 -0
- package/dist/types/typechain/types/factories/index.d.ts +1 -0
- package/dist/types/typechain/types/index.d.ts +3 -0
- package/dist/types/types.d.ts +367 -0
- package/dist/types/utils.d.ts +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Fee } from './Fee';
|
|
2
|
+
import type { Item } from './Item';
|
|
3
|
+
import type { ProtocolData } from './ProtocolData';
|
|
4
|
+
export type CreateListingRequestBody = {
|
|
5
|
+
account_address: string;
|
|
6
|
+
order_hash: string;
|
|
7
|
+
/**
|
|
8
|
+
* Buy item for listing should either be NATIVE or ERC20 item
|
|
9
|
+
*/
|
|
10
|
+
buy: Array<Item>;
|
|
11
|
+
/**
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
fees: Array<Fee>;
|
|
15
|
+
/**
|
|
16
|
+
* Time after which the Order is considered expired
|
|
17
|
+
*/
|
|
18
|
+
end_at: string;
|
|
19
|
+
protocol_data: ProtocolData;
|
|
20
|
+
/**
|
|
21
|
+
* A random value added to the create Order request
|
|
22
|
+
*/
|
|
23
|
+
salt: string;
|
|
24
|
+
/**
|
|
25
|
+
* Sell item for listing should be an ERC721 item
|
|
26
|
+
*/
|
|
27
|
+
sell: Array<Item>;
|
|
28
|
+
/**
|
|
29
|
+
* Digital signature generated by the user for the specific Order
|
|
30
|
+
*/
|
|
31
|
+
signature: string;
|
|
32
|
+
/**
|
|
33
|
+
* Time after which Order is considered active
|
|
34
|
+
*/
|
|
35
|
+
start_at: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ERC1155CollectionItem = {
|
|
2
|
+
/**
|
|
3
|
+
* Token type user is offering, which in this case is ERC1155
|
|
4
|
+
*/
|
|
5
|
+
type: 'ERC1155_COLLECTION';
|
|
6
|
+
/**
|
|
7
|
+
* Address of ERC1155 collection
|
|
8
|
+
*/
|
|
9
|
+
contract_address: string;
|
|
10
|
+
/**
|
|
11
|
+
* A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
12
|
+
*/
|
|
13
|
+
amount: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ERC1155Item = {
|
|
2
|
+
/**
|
|
3
|
+
* Token type user is offering, which in this case is ERC1155
|
|
4
|
+
*/
|
|
5
|
+
type: 'ERC1155';
|
|
6
|
+
/**
|
|
7
|
+
* Address of ERC1155 token
|
|
8
|
+
*/
|
|
9
|
+
contract_address: string;
|
|
10
|
+
/**
|
|
11
|
+
* ID of ERC1155 token
|
|
12
|
+
*/
|
|
13
|
+
token_id: string;
|
|
14
|
+
/**
|
|
15
|
+
* A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
16
|
+
*/
|
|
17
|
+
amount: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ERC20Item = {
|
|
2
|
+
/**
|
|
3
|
+
* Token type user is offering, which in this case is ERC20
|
|
4
|
+
*/
|
|
5
|
+
type: 'ERC20';
|
|
6
|
+
/**
|
|
7
|
+
* Address of ERC20 token
|
|
8
|
+
*/
|
|
9
|
+
contract_address: string;
|
|
10
|
+
/**
|
|
11
|
+
* A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
12
|
+
*/
|
|
13
|
+
amount: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ERC721CollectionItem = {
|
|
2
|
+
/**
|
|
3
|
+
* Token type user is offering, which in this case is ERC721
|
|
4
|
+
*/
|
|
5
|
+
type: 'ERC721_COLLECTION';
|
|
6
|
+
/**
|
|
7
|
+
* Address of ERC721 collection
|
|
8
|
+
*/
|
|
9
|
+
contract_address: string;
|
|
10
|
+
/**
|
|
11
|
+
* A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
12
|
+
*/
|
|
13
|
+
amount: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type FailedOrderCancellation = {
|
|
2
|
+
/**
|
|
3
|
+
* ID of the order which failed to be cancelled
|
|
4
|
+
*/
|
|
5
|
+
order: string;
|
|
6
|
+
/**
|
|
7
|
+
* Reason code indicating why the order failed to be cancelled
|
|
8
|
+
*/
|
|
9
|
+
reason_code: FailedOrderCancellation.reason_code;
|
|
10
|
+
};
|
|
11
|
+
export declare namespace FailedOrderCancellation {
|
|
12
|
+
/**
|
|
13
|
+
* Reason code indicating why the order failed to be cancelled
|
|
14
|
+
*/
|
|
15
|
+
enum reason_code {
|
|
16
|
+
FILLED = "FILLED"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type Fee = {
|
|
2
|
+
/**
|
|
3
|
+
* Fee payable to recipient upon settlement
|
|
4
|
+
*/
|
|
5
|
+
amount: string;
|
|
6
|
+
/**
|
|
7
|
+
* Fee type
|
|
8
|
+
*/
|
|
9
|
+
type: Fee.type;
|
|
10
|
+
/**
|
|
11
|
+
* Wallet address of fee recipient
|
|
12
|
+
*/
|
|
13
|
+
recipient_address: string;
|
|
14
|
+
};
|
|
15
|
+
export declare namespace Fee {
|
|
16
|
+
/**
|
|
17
|
+
* Fee type
|
|
18
|
+
*/
|
|
19
|
+
enum type {
|
|
20
|
+
ROYALTY = "ROYALTY",
|
|
21
|
+
MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
|
|
22
|
+
TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
|
|
23
|
+
PROTOCOL = "PROTOCOL"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ratio of the order that has been filled, an order that has been fully filled will have the same numerator and denominator values.
|
|
3
|
+
*/
|
|
4
|
+
export type FillStatus = {
|
|
5
|
+
/**
|
|
6
|
+
* The numerator of the fill status
|
|
7
|
+
*/
|
|
8
|
+
numerator: string;
|
|
9
|
+
/**
|
|
10
|
+
* The denominator of the fill status
|
|
11
|
+
*/
|
|
12
|
+
denominator: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Fee } from './Fee';
|
|
2
|
+
export type FulfillmentDataRequest = {
|
|
3
|
+
order_id: string;
|
|
4
|
+
/**
|
|
5
|
+
* Address of the intended account fulfilling the order
|
|
6
|
+
*/
|
|
7
|
+
taker_address: string;
|
|
8
|
+
fees: Array<Fee>;
|
|
9
|
+
/**
|
|
10
|
+
* Token ID for the ERC721 or ERC1155 token when fulfilling a collection order
|
|
11
|
+
*/
|
|
12
|
+
token_id?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type InactiveOrderStatus = {
|
|
2
|
+
/**
|
|
3
|
+
* The order status that indicates an order cannot be fulfilled.
|
|
4
|
+
*/
|
|
5
|
+
name: 'INACTIVE';
|
|
6
|
+
/**
|
|
7
|
+
* Whether the order offerer has sufficient approvals
|
|
8
|
+
*/
|
|
9
|
+
sufficient_approvals: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the order offerer still has sufficient balance to complete the order
|
|
12
|
+
*/
|
|
13
|
+
sufficient_balances: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ERC1155CollectionItem } from './ERC1155CollectionItem';
|
|
2
|
+
import type { ERC1155Item } from './ERC1155Item';
|
|
3
|
+
import type { ERC20Item } from './ERC20Item';
|
|
4
|
+
import type { ERC721CollectionItem } from './ERC721CollectionItem';
|
|
5
|
+
import type { ERC721Item } from './ERC721Item';
|
|
6
|
+
import type { NativeItem } from './NativeItem';
|
|
7
|
+
export type Item = (NativeItem | ERC20Item | ERC721Item | ERC1155Item | ERC721CollectionItem | ERC1155CollectionItem);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type NativeItem = {
|
|
2
|
+
/**
|
|
3
|
+
* Token type user is offering, which in this case is the native IMX token
|
|
4
|
+
*/
|
|
5
|
+
type: 'NATIVE';
|
|
6
|
+
/**
|
|
7
|
+
* A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
8
|
+
*/
|
|
9
|
+
amount: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Chain } from './Chain';
|
|
2
|
+
import type { Fee } from './Fee';
|
|
3
|
+
import type { FillStatus } from './FillStatus';
|
|
4
|
+
import type { Item } from './Item';
|
|
5
|
+
import type { OrderStatus } from './OrderStatus';
|
|
6
|
+
import type { ProtocolData } from './ProtocolData';
|
|
7
|
+
export type Order = {
|
|
8
|
+
account_address: string;
|
|
9
|
+
buy: Array<Item>;
|
|
10
|
+
fees: Array<Fee>;
|
|
11
|
+
chain: Chain;
|
|
12
|
+
/**
|
|
13
|
+
* Time the Order is created
|
|
14
|
+
*/
|
|
15
|
+
created_at: string;
|
|
16
|
+
/**
|
|
17
|
+
* Time after which the Order is considered expired
|
|
18
|
+
*/
|
|
19
|
+
end_at: string;
|
|
20
|
+
/**
|
|
21
|
+
* Global Order identifier
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
order_hash: string;
|
|
25
|
+
protocol_data: ProtocolData;
|
|
26
|
+
/**
|
|
27
|
+
* A random value added to the create Order request
|
|
28
|
+
*/
|
|
29
|
+
salt: string;
|
|
30
|
+
sell: Array<Item>;
|
|
31
|
+
/**
|
|
32
|
+
* Digital signature generated by the user for the specific Order
|
|
33
|
+
*/
|
|
34
|
+
signature: string;
|
|
35
|
+
/**
|
|
36
|
+
* Time after which Order is considered active
|
|
37
|
+
*/
|
|
38
|
+
start_at: string;
|
|
39
|
+
status: OrderStatus;
|
|
40
|
+
/**
|
|
41
|
+
* Order type
|
|
42
|
+
*/
|
|
43
|
+
type: Order.type;
|
|
44
|
+
/**
|
|
45
|
+
* Time the Order is last updated
|
|
46
|
+
*/
|
|
47
|
+
updated_at: string;
|
|
48
|
+
fill_status: FillStatus;
|
|
49
|
+
};
|
|
50
|
+
export declare namespace Order {
|
|
51
|
+
/**
|
|
52
|
+
* Order type
|
|
53
|
+
*/
|
|
54
|
+
enum type {
|
|
55
|
+
LISTING = "LISTING",
|
|
56
|
+
BID = "BID",
|
|
57
|
+
COLLECTION_BID = "COLLECTION_BID"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActiveOrderStatus } from './ActiveOrderStatus';
|
|
2
|
+
import type { CancelledOrderStatus } from './CancelledOrderStatus';
|
|
3
|
+
import type { ExpiredOrderStatus } from './ExpiredOrderStatus';
|
|
4
|
+
import type { FilledOrderStatus } from './FilledOrderStatus';
|
|
5
|
+
import type { InactiveOrderStatus } from './InactiveOrderStatus';
|
|
6
|
+
import type { PendingOrderStatus } from './PendingOrderStatus';
|
|
7
|
+
/**
|
|
8
|
+
* The Order status
|
|
9
|
+
*/
|
|
10
|
+
export type OrderStatus = (CancelledOrderStatus | PendingOrderStatus | ActiveOrderStatus | InactiveOrderStatus | FilledOrderStatus | ExpiredOrderStatus);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PendingOrderStatus = {
|
|
2
|
+
/**
|
|
3
|
+
* The order status that indicates the order is yet to be active due to various reasons.
|
|
4
|
+
*/
|
|
5
|
+
name: 'PENDING';
|
|
6
|
+
/**
|
|
7
|
+
* Whether the order has been evaluated after its creation
|
|
8
|
+
*/
|
|
9
|
+
evaluated: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the order has reached its specified start time
|
|
12
|
+
*/
|
|
13
|
+
started: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type ProtocolData = {
|
|
2
|
+
/**
|
|
3
|
+
* Seaport order type. Orders containing ERC721 tokens will need to pass in the order type as FULL_RESTRICTED while orders with ERC1155 tokens will need to pass in the order_type as PARTIAL_RESTRICTED
|
|
4
|
+
*/
|
|
5
|
+
order_type: ProtocolData.order_type;
|
|
6
|
+
/**
|
|
7
|
+
* big.Int or uint256 string for order counter
|
|
8
|
+
*/
|
|
9
|
+
counter: string;
|
|
10
|
+
/**
|
|
11
|
+
* Immutable zone address
|
|
12
|
+
*/
|
|
13
|
+
zone_address: string;
|
|
14
|
+
/**
|
|
15
|
+
* Immutable Seaport contract address
|
|
16
|
+
*/
|
|
17
|
+
seaport_address: string;
|
|
18
|
+
/**
|
|
19
|
+
* Immutable Seaport contract version
|
|
20
|
+
*/
|
|
21
|
+
seaport_version: string;
|
|
22
|
+
};
|
|
23
|
+
export declare namespace ProtocolData {
|
|
24
|
+
/**
|
|
25
|
+
* Seaport order type. Orders containing ERC721 tokens will need to pass in the order type as FULL_RESTRICTED while orders with ERC1155 tokens will need to pass in the order_type as PARTIAL_RESTRICTED
|
|
26
|
+
*/
|
|
27
|
+
enum order_type {
|
|
28
|
+
FULL_RESTRICTED = "FULL_RESTRICTED",
|
|
29
|
+
PARTIAL_RESTRICTED = "PARTIAL_RESTRICTED"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Chain } from './Chain';
|
|
2
|
+
import type { Fee } from './Fee';
|
|
3
|
+
import type { Item } from './Item';
|
|
4
|
+
import type { TradeBlockchainMetadata } from './TradeBlockchainMetadata';
|
|
5
|
+
export type Trade = {
|
|
6
|
+
/**
|
|
7
|
+
* Buy items are transferred from the taker to the maker.
|
|
8
|
+
*/
|
|
9
|
+
buy: Array<Item>;
|
|
10
|
+
/**
|
|
11
|
+
* Deprecated. Use maker and taker addresses instead of buyer and seller addresses.
|
|
12
|
+
*/
|
|
13
|
+
buyer_address: string;
|
|
14
|
+
/**
|
|
15
|
+
* Deprecated. Use fees instead. The taker always pays the fees.
|
|
16
|
+
*/
|
|
17
|
+
buyer_fees: Array<Fee>;
|
|
18
|
+
fees: Array<Fee>;
|
|
19
|
+
chain: Chain;
|
|
20
|
+
order_id: string;
|
|
21
|
+
blockchain_metadata: TradeBlockchainMetadata;
|
|
22
|
+
/**
|
|
23
|
+
* Time the on-chain trade event is indexed by the order book system
|
|
24
|
+
*/
|
|
25
|
+
indexed_at: string;
|
|
26
|
+
/**
|
|
27
|
+
* Global Trade identifier
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* Sell items are transferred from the maker to the taker.
|
|
32
|
+
*/
|
|
33
|
+
sell: Array<Item>;
|
|
34
|
+
/**
|
|
35
|
+
* Deprecated. Use maker and taker addresses instead of buyer and seller addresses.
|
|
36
|
+
*/
|
|
37
|
+
seller_address: string;
|
|
38
|
+
maker_address: string;
|
|
39
|
+
taker_address: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The metadata related to the transaction in which the activity occurred
|
|
3
|
+
*/
|
|
4
|
+
export type TradeBlockchainMetadata = {
|
|
5
|
+
/**
|
|
6
|
+
* The transaction hash of the trade
|
|
7
|
+
*/
|
|
8
|
+
transaction_hash: string;
|
|
9
|
+
/**
|
|
10
|
+
* EVM block number (uint64 as string)
|
|
11
|
+
*/
|
|
12
|
+
block_number: string;
|
|
13
|
+
/**
|
|
14
|
+
* Transaction index in a block (uint32 as string)
|
|
15
|
+
*/
|
|
16
|
+
transaction_index: string;
|
|
17
|
+
/**
|
|
18
|
+
* The log index of the fulfillment event in a block (uint32 as string)
|
|
19
|
+
*/
|
|
20
|
+
log_index: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type UnfulfillableOrder = {
|
|
2
|
+
/**
|
|
3
|
+
* OrderID for the requested but unfulfillable order
|
|
4
|
+
*/
|
|
5
|
+
order_id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Token ID for the ERC721 or ERC1155 token when fulfilling a collection order
|
|
8
|
+
*/
|
|
9
|
+
token_id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Nullable string containing error reason if the signing is unsuccessful for the order
|
|
12
|
+
*/
|
|
13
|
+
reason: string;
|
|
14
|
+
};
|