@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.
Files changed (119) hide show
  1. package/LICENSE.md +176 -0
  2. package/README.md +71 -0
  3. package/dist/browser/index.js +2 -0
  4. package/dist/node/index.cjs +2 -0
  5. package/dist/node/index.js +2 -0
  6. package/dist/types/api-client/api-client-factory.d.ts +8 -0
  7. package/dist/types/api-client/api-client.d.ts +29 -0
  8. package/dist/types/api-client/api-client.test.d.ts +1 -0
  9. package/dist/types/api-client/index.d.ts +2 -0
  10. package/dist/types/config/config.d.ts +20 -0
  11. package/dist/types/config/index.d.ts +1 -0
  12. package/dist/types/constants.d.ts +3 -0
  13. package/dist/types/erc721/erc721-factory.d.ts +7 -0
  14. package/dist/types/erc721/erc721.d.ts +7 -0
  15. package/dist/types/erc721/erc721.test.d.ts +1 -0
  16. package/dist/types/erc721/index.d.ts +2 -0
  17. package/dist/types/index.d.ts +4 -0
  18. package/dist/types/openapi/mapper.d.ts +10 -0
  19. package/dist/types/openapi/sdk/OrderBookClient.d.ts +10 -0
  20. package/dist/types/openapi/sdk/core/ApiError.d.ts +10 -0
  21. package/dist/types/openapi/sdk/core/ApiRequestOptions.d.ts +13 -0
  22. package/dist/types/openapi/sdk/core/ApiResult.d.ts +7 -0
  23. package/dist/types/openapi/sdk/core/AxiosHttpRequest.d.ts +14 -0
  24. package/dist/types/openapi/sdk/core/BaseHttpRequest.d.ts +8 -0
  25. package/dist/types/openapi/sdk/core/CancelablePromise.d.ts +26 -0
  26. package/dist/types/openapi/sdk/core/OpenAPI.d.ts +16 -0
  27. package/dist/types/openapi/sdk/core/request.d.ts +11 -0
  28. package/dist/types/openapi/sdk/index.d.ts +53 -0
  29. package/dist/types/openapi/sdk/models/ActiveOrderStatus.d.ts +6 -0
  30. package/dist/types/openapi/sdk/models/AssetCollectionItem.d.ts +3 -0
  31. package/dist/types/openapi/sdk/models/BidResult.d.ts +4 -0
  32. package/dist/types/openapi/sdk/models/CancelOrdersRequestBody.d.ts +14 -0
  33. package/dist/types/openapi/sdk/models/CancelOrdersResult.d.ts +4 -0
  34. package/dist/types/openapi/sdk/models/CancelOrdersResultData.d.ts +15 -0
  35. package/dist/types/openapi/sdk/models/CancelledOrderStatus.d.ts +24 -0
  36. package/dist/types/openapi/sdk/models/Chain.d.ts +13 -0
  37. package/dist/types/openapi/sdk/models/ChainName.d.ts +4 -0
  38. package/dist/types/openapi/sdk/models/CollectionBidResult.d.ts +4 -0
  39. package/dist/types/openapi/sdk/models/CreateBidRequestBody.d.ts +37 -0
  40. package/dist/types/openapi/sdk/models/CreateCollectionBidRequestBody.d.ts +37 -0
  41. package/dist/types/openapi/sdk/models/CreateListingRequestBody.d.ts +36 -0
  42. package/dist/types/openapi/sdk/models/ERC1155CollectionItem.d.ts +14 -0
  43. package/dist/types/openapi/sdk/models/ERC1155Item.d.ts +18 -0
  44. package/dist/types/openapi/sdk/models/ERC20Item.d.ts +14 -0
  45. package/dist/types/openapi/sdk/models/ERC721CollectionItem.d.ts +14 -0
  46. package/dist/types/openapi/sdk/models/ERC721Item.d.ts +14 -0
  47. package/dist/types/openapi/sdk/models/Error.d.ts +13 -0
  48. package/dist/types/openapi/sdk/models/ExpiredOrderStatus.d.ts +6 -0
  49. package/dist/types/openapi/sdk/models/FailedOrderCancellation.d.ts +18 -0
  50. package/dist/types/openapi/sdk/models/Fee.d.ts +25 -0
  51. package/dist/types/openapi/sdk/models/FillStatus.d.ts +13 -0
  52. package/dist/types/openapi/sdk/models/FilledOrderStatus.d.ts +6 -0
  53. package/dist/types/openapi/sdk/models/FulfillableOrder.d.ts +9 -0
  54. package/dist/types/openapi/sdk/models/FulfillmentDataRequest.d.ts +13 -0
  55. package/dist/types/openapi/sdk/models/InactiveOrderStatus.d.ts +14 -0
  56. package/dist/types/openapi/sdk/models/Item.d.ts +7 -0
  57. package/dist/types/openapi/sdk/models/ListBidsResult.d.ts +6 -0
  58. package/dist/types/openapi/sdk/models/ListCollectionBidsResult.d.ts +6 -0
  59. package/dist/types/openapi/sdk/models/ListListingsResult.d.ts +6 -0
  60. package/dist/types/openapi/sdk/models/ListTradeResult.d.ts +6 -0
  61. package/dist/types/openapi/sdk/models/ListingResult.d.ts +4 -0
  62. package/dist/types/openapi/sdk/models/NativeItem.d.ts +10 -0
  63. package/dist/types/openapi/sdk/models/Order.d.ts +59 -0
  64. package/dist/types/openapi/sdk/models/OrderStatus.d.ts +10 -0
  65. package/dist/types/openapi/sdk/models/OrderStatusName.d.ts +11 -0
  66. package/dist/types/openapi/sdk/models/Page.d.ts +13 -0
  67. package/dist/types/openapi/sdk/models/PageCursor.d.ts +4 -0
  68. package/dist/types/openapi/sdk/models/PageSize.d.ts +4 -0
  69. package/dist/types/openapi/sdk/models/PendingOrderStatus.d.ts +14 -0
  70. package/dist/types/openapi/sdk/models/ProtocolData.d.ts +31 -0
  71. package/dist/types/openapi/sdk/models/Trade.d.ts +40 -0
  72. package/dist/types/openapi/sdk/models/TradeBlockchainMetadata.d.ts +21 -0
  73. package/dist/types/openapi/sdk/models/TradeResult.d.ts +4 -0
  74. package/dist/types/openapi/sdk/models/UnfulfillableOrder.d.ts +14 -0
  75. package/dist/types/openapi/sdk/services/OrdersService.d.ts +319 -0
  76. package/dist/types/orderbook.d.ts +193 -0
  77. package/dist/types/seaport/components.d.ts +8 -0
  78. package/dist/types/seaport/constants.d.ts +43 -0
  79. package/dist/types/seaport/index.d.ts +2 -0
  80. package/dist/types/seaport/lib/bulk-orders.d.ts +6 -0
  81. package/dist/types/seaport/lib/defaults.d.ts +14 -0
  82. package/dist/types/seaport/lib/merkle.d.ts +33 -0
  83. package/dist/types/seaport/lib/utils.d.ts +10 -0
  84. package/dist/types/seaport/map-to-immutable-order.d.ts +7 -0
  85. package/dist/types/seaport/map-to-seaport-order.d.ts +6 -0
  86. package/dist/types/seaport/seaport-lib-factory.d.ts +10 -0
  87. package/dist/types/seaport/seaport.d.ts +38 -0
  88. package/dist/types/seaport/seaport.test.d.ts +1 -0
  89. package/dist/types/seaport/transaction.d.ts +3 -0
  90. package/dist/types/test/bulk-listings.e2e.d.ts +1 -0
  91. package/dist/types/test/cancel.e2e.d.ts +1 -0
  92. package/dist/types/test/create.e2e.d.ts +1 -0
  93. package/dist/types/test/expiry.demo.d.ts +1 -0
  94. package/dist/types/test/fulfil.e2e.d.ts +1 -0
  95. package/dist/types/test/fulfill.demo.d.ts +1 -0
  96. package/dist/types/test/fulfillBulk.demo.d.ts +1 -0
  97. package/dist/types/test/helpers/actions.d.ts +3 -0
  98. package/dist/types/test/helpers/config.d.ts +2 -0
  99. package/dist/types/test/helpers/erc721.d.ts +6 -0
  100. package/dist/types/test/helpers/gas.d.ts +4 -0
  101. package/dist/types/test/helpers/index.d.ts +8 -0
  102. package/dist/types/test/helpers/order.d.ts +3 -0
  103. package/dist/types/test/helpers/provider.d.ts +2 -0
  104. package/dist/types/test/helpers/sign-and-submit.d.ts +7 -0
  105. package/dist/types/test/helpers/signers.d.ts +3 -0
  106. package/dist/types/test/helpers/test-token/TestERC721Token.d.ts +715 -0
  107. package/dist/types/test/helpers/test-token/TestERC721Token__factory.d.ts +1043 -0
  108. package/dist/types/test/helpers/test-token/common.d.ts +50 -0
  109. package/dist/types/test/helpers/test-token/index.d.ts +2 -0
  110. package/dist/types/test/helpers/token.d.ts +1 -0
  111. package/dist/types/test/list.e2e.d.ts +1 -0
  112. package/dist/types/typechain/types/ImmutableERC721Base.d.ts +486 -0
  113. package/dist/types/typechain/types/common.d.ts +50 -0
  114. package/dist/types/typechain/types/factories/ImmutableERC721Base__factory.d.ts +688 -0
  115. package/dist/types/typechain/types/factories/index.d.ts +1 -0
  116. package/dist/types/typechain/types/index.d.ts +3 -0
  117. package/dist/types/types.d.ts +367 -0
  118. package/dist/types/utils.d.ts +1 -0
  119. package/package.json +73 -0
@@ -0,0 +1,367 @@
1
+ import type { OrderComponents } from '@opensea/seaport-js/lib/types';
2
+ import { PreparedTransactionRequest, TypedDataDomain, TypedDataField } from 'ethers';
3
+ import { OrdersService, OrderStatus } from './openapi/sdk';
4
+ export { OrderStatusName } from './openapi/sdk';
5
+ export interface NativeItem {
6
+ type: 'NATIVE';
7
+ amount: string;
8
+ }
9
+ export interface ERC20Item {
10
+ type: 'ERC20';
11
+ contractAddress: string;
12
+ amount: string;
13
+ }
14
+ export interface ERC721Item {
15
+ type: 'ERC721';
16
+ contractAddress: string;
17
+ tokenId: string;
18
+ }
19
+ export interface ERC1155Item {
20
+ type: 'ERC1155';
21
+ contractAddress: string;
22
+ tokenId: string;
23
+ amount: string;
24
+ }
25
+ export interface ERC721CollectionItem {
26
+ type: 'ERC721_COLLECTION';
27
+ contractAddress: string;
28
+ amount: string;
29
+ }
30
+ export interface ERC1155CollectionItem {
31
+ type: 'ERC1155_COLLECTION';
32
+ contractAddress: string;
33
+ amount: string;
34
+ }
35
+ export type Order = Listing | Bid | CollectionBid;
36
+ export interface Listing extends OrderFields {
37
+ type: 'LISTING';
38
+ sell: (ERC721Item | ERC1155Item)[];
39
+ buy: (NativeItem | ERC20Item)[];
40
+ }
41
+ export interface Bid extends OrderFields {
42
+ type: 'BID';
43
+ sell: ERC20Item[];
44
+ buy: (ERC721Item | ERC1155Item)[];
45
+ }
46
+ export interface CollectionBid extends OrderFields {
47
+ type: 'COLLECTION_BID';
48
+ sell: ERC20Item[];
49
+ buy: (ERC721CollectionItem | ERC1155CollectionItem)[];
50
+ }
51
+ interface OrderFields {
52
+ id: string;
53
+ chain: {
54
+ id: string;
55
+ name: string;
56
+ };
57
+ accountAddress: string;
58
+ fees: Fee[];
59
+ status: OrderStatus;
60
+ fillStatus: {
61
+ numerator: string;
62
+ denominator: string;
63
+ };
64
+ /**
65
+ * Time after which the Order is considered active
66
+ */
67
+ startAt: string;
68
+ /**
69
+ * Time after which the Order is expired
70
+ */
71
+ endAt: string;
72
+ salt: string;
73
+ signature: string;
74
+ orderHash: string;
75
+ protocolData: {
76
+ orderType: 'FULL_RESTRICTED' | 'PARTIAL_RESTRICTED';
77
+ zoneAddress: string;
78
+ counter: string;
79
+ seaportAddress: string;
80
+ seaportVersion: string;
81
+ };
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ }
85
+ export interface Trade {
86
+ id: string;
87
+ orderId: string;
88
+ chain: {
89
+ id: string;
90
+ name: string;
91
+ };
92
+ buy: (NativeItem | ERC20Item | ERC721Item | ERC1155Item)[];
93
+ sell: (ERC20Item | ERC721Item | ERC1155Item)[];
94
+ /**
95
+ * @deprecated Use {@linkcode Fees} instead (taker always pays the fees)
96
+ */
97
+ buyerFees: Fee[];
98
+ /**
99
+ * @deprecated Use {@linkcode makerAddress} or {@linkcode takerAddress} instead
100
+ */
101
+ sellerAddress: string;
102
+ /**
103
+ * @deprecated Use {@linkcode makerAddress} or {@linkcode takerAddress} instead
104
+ */
105
+ buyerAddress: string;
106
+ makerAddress: string;
107
+ takerAddress: string;
108
+ /**
109
+ * Fees paid by the taker of the trade
110
+ */
111
+ fees: Fee[];
112
+ /**
113
+ * Time the on-chain event was indexed by the Immutable order book service
114
+ */
115
+ indexedAt: string;
116
+ blockchainMetadata: {
117
+ /**
118
+ * The transaction hash of the trade
119
+ */
120
+ transactionHash: string;
121
+ /**
122
+ * EVM block number (uint64 as string)
123
+ */
124
+ blockNumber: string;
125
+ /**
126
+ * Transaction index in a block (uint32 as string)
127
+ */
128
+ transactionIndex: string;
129
+ /**
130
+ * The log index of the fulfillment event in a block (uint32 as string)
131
+ */
132
+ logIndex: string;
133
+ };
134
+ }
135
+ export interface Fee extends FeeValue {
136
+ type: FeeType;
137
+ }
138
+ export interface FeeValue {
139
+ recipientAddress: string;
140
+ amount: string;
141
+ }
142
+ export declare enum FeeType {
143
+ MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
144
+ TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
145
+ PROTOCOL = "PROTOCOL",
146
+ ROYALTY = "ROYALTY"
147
+ }
148
+ export interface PrepareOrderResponse {
149
+ actions: Action[];
150
+ orderComponents: OrderComponents;
151
+ orderHash: string;
152
+ }
153
+ export type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
154
+ export interface ListingResult {
155
+ result: Listing;
156
+ }
157
+ export interface ListListingsResult {
158
+ page: Page;
159
+ result: Listing[];
160
+ }
161
+ export interface PrepareListingParams {
162
+ makerAddress: string;
163
+ sell: ERC721Item | ERC1155Item;
164
+ buy: NativeItem | ERC20Item;
165
+ orderStart?: Date;
166
+ orderExpiry?: Date;
167
+ }
168
+ export type PrepareListingResponse = PrepareOrderResponse;
169
+ export interface PrepareBulkListingsParams {
170
+ makerAddress: string;
171
+ listingParams: {
172
+ sell: ERC721Item | ERC1155Item;
173
+ buy: NativeItem | ERC20Item;
174
+ makerFees: FeeValue[];
175
+ orderStart?: Date;
176
+ orderExpiry?: Date;
177
+ }[];
178
+ }
179
+ export interface PrepareBulkListingsResponse {
180
+ actions: Action[];
181
+ completeListings(signatures: string[]): Promise<BulkListingsResult>;
182
+ /**
183
+ * @deprecated Pass a `string[]` to {@linkcode completeListings} instead to enable
184
+ * smart contract wallets
185
+ */
186
+ completeListings(signature: string): Promise<BulkListingsResult>;
187
+ }
188
+ export interface CreateListingParams {
189
+ orderComponents: OrderComponents;
190
+ orderHash: string;
191
+ orderSignature: string;
192
+ makerFees: FeeValue[];
193
+ }
194
+ export interface BulkListingsResult {
195
+ result: {
196
+ success: boolean;
197
+ orderHash: string;
198
+ order?: Listing;
199
+ }[];
200
+ }
201
+ export type ListBidsParams = Omit<Parameters<typeof OrdersService.prototype.listBids>[0], 'chainName'>;
202
+ export interface BidResult {
203
+ result: Bid;
204
+ }
205
+ export interface ListBidsResult {
206
+ page: Page;
207
+ result: Bid[];
208
+ }
209
+ export interface PrepareBidParams {
210
+ makerAddress: string;
211
+ sell: ERC20Item;
212
+ buy: ERC721Item | ERC1155Item;
213
+ orderStart?: Date;
214
+ orderExpiry?: Date;
215
+ }
216
+ export type PrepareBidResponse = PrepareOrderResponse;
217
+ export interface CreateBidParams {
218
+ orderComponents: OrderComponents;
219
+ orderHash: string;
220
+ orderSignature: string;
221
+ makerFees: FeeValue[];
222
+ }
223
+ export interface BulkBidsResult {
224
+ result: {
225
+ success: boolean;
226
+ orderHash: string;
227
+ order?: Bid;
228
+ }[];
229
+ }
230
+ export type ListCollectionBidsParams = Omit<Parameters<typeof OrdersService.prototype.listCollectionBids>[0], 'chainName'>;
231
+ export interface CollectionBidResult {
232
+ result: CollectionBid;
233
+ }
234
+ export interface ListCollectionBidsResult {
235
+ page: Page;
236
+ result: CollectionBid[];
237
+ }
238
+ export interface PrepareCollectionBidParams {
239
+ makerAddress: string;
240
+ sell: ERC20Item;
241
+ buy: ERC721CollectionItem | ERC1155CollectionItem;
242
+ orderStart?: Date;
243
+ orderExpiry?: Date;
244
+ }
245
+ export type PrepareCollectionBidResponse = PrepareOrderResponse;
246
+ export interface CreateCollectionBidParams {
247
+ orderComponents: OrderComponents;
248
+ orderHash: string;
249
+ orderSignature: string;
250
+ makerFees: FeeValue[];
251
+ }
252
+ export interface BulkCollectionBidsResult {
253
+ result: {
254
+ success: boolean;
255
+ orderHash: string;
256
+ order?: CollectionBid;
257
+ }[];
258
+ }
259
+ export interface FulfillmentOrder {
260
+ orderId: string;
261
+ takerFees: FeeValue[];
262
+ amountToFill?: string;
263
+ tokenId?: string;
264
+ }
265
+ /**
266
+ * @deprecated Use {@linkcode FulfillmentOrder} instead
267
+ */
268
+ export interface FulfillmentListing {
269
+ listingId: string;
270
+ takerFees: FeeValue[];
271
+ amountToFill?: string;
272
+ }
273
+ export type FulfillBulkOrdersResponse = FulfillBulkOrdersInsufficientBalanceResponse | FulfillBulkOrdersSufficientBalanceResponse;
274
+ export interface FulfillBulkOrdersSufficientBalanceResponse {
275
+ sufficientBalance: true;
276
+ actions: Action[];
277
+ expiration: string;
278
+ fulfillableOrders: Order[];
279
+ unfulfillableOrders: UnfulfillableOrder[];
280
+ }
281
+ export interface FulfillBulkOrdersInsufficientBalanceResponse {
282
+ sufficientBalance: false;
283
+ fulfillableOrders: Order[];
284
+ unfulfillableOrders: UnfulfillableOrder[];
285
+ }
286
+ export interface FulfillOrderResponse {
287
+ actions: Action[];
288
+ /**
289
+ * User MUST submit the fulfillment transaction before the expiration
290
+ * Submitting after the expiration will result in a on chain revert
291
+ */
292
+ expiration: string;
293
+ order: Order;
294
+ }
295
+ export interface UnfulfillableOrder {
296
+ orderId: string;
297
+ tokenId?: string;
298
+ reason: string;
299
+ }
300
+ export interface PrepareCancelOrdersResponse {
301
+ signableAction: SignableAction;
302
+ }
303
+ export interface CancelOrdersOnChainResponse {
304
+ cancellationAction: TransactionAction;
305
+ }
306
+ export type ListTradesParams = Omit<Parameters<typeof OrdersService.prototype.listTrades>[0], 'chainName'>;
307
+ export interface TradeResult {
308
+ result: Trade;
309
+ }
310
+ export interface ListTradesResult {
311
+ page: Page;
312
+ result: Trade[];
313
+ }
314
+ export type Action = TransactionAction | SignableAction;
315
+ export declare enum ActionType {
316
+ TRANSACTION = "TRANSACTION",
317
+ SIGNABLE = "SIGNABLE"
318
+ }
319
+ export interface TransactionAction {
320
+ type: ActionType.TRANSACTION;
321
+ purpose: TransactionPurpose;
322
+ buildTransaction: TransactionBuilder;
323
+ }
324
+ export declare enum TransactionPurpose {
325
+ APPROVAL = "APPROVAL",
326
+ FULFILL_ORDER = "FULFILL_ORDER",
327
+ CANCEL = "CANCEL"
328
+ }
329
+ export type TransactionBuilder = () => Promise<PreparedTransactionRequest>;
330
+ export interface SignableAction {
331
+ type: ActionType.SIGNABLE;
332
+ purpose: SignablePurpose;
333
+ message: {
334
+ domain: TypedDataDomain;
335
+ types: Record<string, TypedDataField[]>;
336
+ value: Record<string, any>;
337
+ };
338
+ }
339
+ export declare enum SignablePurpose {
340
+ /**
341
+ * @deprecated Use {@linkcode CREATE_ORDER} instead
342
+ */
343
+ CREATE_LISTING = "CREATE_ORDER",
344
+ CREATE_ORDER = "CREATE_ORDER",
345
+ OFF_CHAIN_CANCELLATION = "OFF_CHAIN_CANCELLATION"
346
+ }
347
+ export interface RoyaltyInfo {
348
+ recipient: string;
349
+ amountRequired: string;
350
+ }
351
+ export interface Page {
352
+ /**
353
+ * First item as an encoded string
354
+ */
355
+ previousCursor: string | null;
356
+ /**
357
+ * Last item as an encoded string
358
+ */
359
+ nextCursor: string | null;
360
+ }
361
+ export interface PrepareBulkSeaportOrders {
362
+ actions: Action[];
363
+ preparedOrders: {
364
+ orderComponents: OrderComponents;
365
+ orderHash: string;
366
+ }[];
367
+ }
@@ -0,0 +1 @@
1
+ export declare function exhaustiveSwitch(param: never): never;
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@imtbl/orderbook",
3
+ "version": "2.0.0-alpha.0",
4
+ "author": "Immutable",
5
+ "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
6
+ "dependencies": {
7
+ "@imtbl/config": "2.0.0-alpha.0",
8
+ "@imtbl/metrics": "2.0.0-alpha.0",
9
+ "@opensea/seaport-js": "4.0.3",
10
+ "axios": "^1.6.5",
11
+ "ethers": "^6.13.4",
12
+ "form-data": "^4.0.0",
13
+ "merkletreejs": "^0.3.11"
14
+ },
15
+ "devDependencies": {
16
+ "@swc/core": "^1.3.36",
17
+ "@swc/jest": "^0.2.24",
18
+ "@typechain/ethers-v6": "^0.5.1",
19
+ "@types/jest": "^29.4.3",
20
+ "dotenv": "^16.0.3",
21
+ "eslint": "^8.40.0",
22
+ "jest": "^29.4.3",
23
+ "jest-environment-jsdom": "^29.4.3",
24
+ "ts-mockito": "^2.6.1",
25
+ "tsup": "^8.3.5",
26
+ "typechain": "^8.1.1",
27
+ "typescript": "^5.6.2"
28
+ },
29
+ "exports": {
30
+ "development": {
31
+ "types": "./src/index.ts",
32
+ "browser": "./dist/browser/index.js",
33
+ "require": "./dist/node/index.cjs",
34
+ "default": "./dist/node/index.js"
35
+ },
36
+ "default": {
37
+ "types": "./dist/types/index.d.ts",
38
+ "browser": "./dist/browser/index.js",
39
+ "require": "./dist/node/index.cjs",
40
+ "default": "./dist/node/index.js"
41
+ }
42
+ },
43
+ "files": [
44
+ "dist"
45
+ ],
46
+ "homepage": "https://github.com/immutable/ts-immutable-sdk#readme",
47
+ "license": "Apache-2.0",
48
+ "main": "dist/node/index.cjs",
49
+ "module": "dist/node/index.js",
50
+ "browser": "dist/browser/index.js",
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "repository": "immutable/ts-immutable-sdk.git",
55
+ "type": "module",
56
+ "types": "./dist/types/index.d.ts",
57
+ "scripts": {
58
+ "build": "pnpm transpile && pnpm typegen",
59
+ "transpile": "tsup src/index.ts --config ../../tsup.config.js",
60
+ "typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types",
61
+ "generate-types": "typechain --target=ethers-v6 --out-dir=src/typechain/types 'abi/*.json'",
62
+ "lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
63
+ "lint:fix": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
64
+ "run:demo": "jest --runInBand --testMatch \"**/?(*.)+(demo).[jt]s?(x)\"",
65
+ "run:demo-expiry": "jest --runInBand --testMatch \"**/(expiry.demo).[jt]s?(x)\"",
66
+ "run:demo-fulfill": "jest --runInBand --testMatch \"**/(fulfill.demo).[jt]s?(x)\"",
67
+ "run:demo-fulfill-bulk": "jest --runInBand --testMatch \"**/(fulfillBulk.demo).[jt]s?(x)\"",
68
+ "test": "jest",
69
+ "test:e2e": "jest --runInBand --testMatch \"**/?(*.)+(e2e).[jt]s?(x)\"",
70
+ "test:watch": "jest --watch",
71
+ "typecheck": "tsc --customConditions default --noEmit --jsx preserve"
72
+ }
73
+ }