@net-protocol/bazaar 0.1.5 → 0.1.7
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/index.d.mts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +198 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +197 -16
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +63 -5
- package/dist/react.d.ts +63 -5
- package/dist/react.js +306 -17
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +306 -18
- package/dist/react.mjs.map +1 -1
- package/dist/{types-CfGfQTJL.d.mts → types-5kMf461x.d.mts} +39 -3
- package/dist/{types-CfGfQTJL.d.ts → types-5kMf461x.d.ts} +39 -3
- package/package.json +2 -1
|
@@ -234,8 +234,8 @@ interface CreateCollectionOfferParams {
|
|
|
234
234
|
* Options for fetching listings
|
|
235
235
|
*/
|
|
236
236
|
interface GetListingsOptions {
|
|
237
|
-
/** NFT collection address */
|
|
238
|
-
nftAddress
|
|
237
|
+
/** NFT collection address (optional - if omitted, fetches recent listings across all collections) */
|
|
238
|
+
nftAddress?: `0x${string}`;
|
|
239
239
|
/** Exclude listings from this address */
|
|
240
240
|
excludeMaker?: `0x${string}`;
|
|
241
241
|
/** Only include listings from this address */
|
|
@@ -288,6 +288,42 @@ interface GetErc20ListingsOptions {
|
|
|
288
288
|
/** Override end index for message range */
|
|
289
289
|
endIndex?: number;
|
|
290
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Sale information (parsed from zone storage)
|
|
293
|
+
*/
|
|
294
|
+
interface Sale {
|
|
295
|
+
/** Seller's address (offerer) */
|
|
296
|
+
seller: `0x${string}`;
|
|
297
|
+
/** Buyer's address (fulfiller) */
|
|
298
|
+
buyer: `0x${string}`;
|
|
299
|
+
/** NFT/token contract address */
|
|
300
|
+
tokenAddress: `0x${string}`;
|
|
301
|
+
/** Token ID */
|
|
302
|
+
tokenId: string;
|
|
303
|
+
/** Amount of tokens sold */
|
|
304
|
+
amount: bigint;
|
|
305
|
+
/** Item type (ERC20, ERC721, etc.) */
|
|
306
|
+
itemType: ItemType;
|
|
307
|
+
/** Total price in wei */
|
|
308
|
+
priceWei: bigint;
|
|
309
|
+
/** Total price in native currency (formatted) */
|
|
310
|
+
price: number;
|
|
311
|
+
/** Currency symbol (e.g., "eth", "degen") */
|
|
312
|
+
currency: string;
|
|
313
|
+
/** Sale timestamp in seconds */
|
|
314
|
+
timestamp: number;
|
|
315
|
+
/** Seaport order hash */
|
|
316
|
+
orderHash: string;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Options for fetching sales
|
|
320
|
+
*/
|
|
321
|
+
interface GetSalesOptions {
|
|
322
|
+
/** NFT collection address */
|
|
323
|
+
nftAddress: `0x${string}`;
|
|
324
|
+
/** Maximum number of messages to fetch (default: 100) */
|
|
325
|
+
maxMessages?: number;
|
|
326
|
+
}
|
|
291
327
|
/**
|
|
292
328
|
* Transaction configuration for write operations
|
|
293
329
|
*/
|
|
@@ -302,4 +338,4 @@ interface WriteTransactionConfig {
|
|
|
302
338
|
abi: readonly unknown[];
|
|
303
339
|
}
|
|
304
340
|
|
|
305
|
-
export { type CollectionOffer as C, type Erc20Offer as E, type GetListingsOptions as G, ItemType as I, type Listing as L, OrderType as O, type
|
|
341
|
+
export { type CollectionOffer as C, type Erc20Offer as E, type GetListingsOptions as G, ItemType as I, type Listing as L, OrderType as O, type Sale as S, type WriteTransactionConfig as W, type GetCollectionOffersOptions as a, type GetErc20OffersOptions as b, type GetErc20ListingsOptions as c, type Erc20Listing as d, type GetSalesOptions as e, type SeaportOrderComponents as f, type SeaportSubmission as g, type SeaportOrderParameters as h, type SeaportOrderStatusInfo as i, SeaportOrderStatus as j, type OfferItem as k, type ConsiderationItem as l, type CreateListingParams as m, type CreateCollectionOfferParams as n };
|
|
@@ -234,8 +234,8 @@ interface CreateCollectionOfferParams {
|
|
|
234
234
|
* Options for fetching listings
|
|
235
235
|
*/
|
|
236
236
|
interface GetListingsOptions {
|
|
237
|
-
/** NFT collection address */
|
|
238
|
-
nftAddress
|
|
237
|
+
/** NFT collection address (optional - if omitted, fetches recent listings across all collections) */
|
|
238
|
+
nftAddress?: `0x${string}`;
|
|
239
239
|
/** Exclude listings from this address */
|
|
240
240
|
excludeMaker?: `0x${string}`;
|
|
241
241
|
/** Only include listings from this address */
|
|
@@ -288,6 +288,42 @@ interface GetErc20ListingsOptions {
|
|
|
288
288
|
/** Override end index for message range */
|
|
289
289
|
endIndex?: number;
|
|
290
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Sale information (parsed from zone storage)
|
|
293
|
+
*/
|
|
294
|
+
interface Sale {
|
|
295
|
+
/** Seller's address (offerer) */
|
|
296
|
+
seller: `0x${string}`;
|
|
297
|
+
/** Buyer's address (fulfiller) */
|
|
298
|
+
buyer: `0x${string}`;
|
|
299
|
+
/** NFT/token contract address */
|
|
300
|
+
tokenAddress: `0x${string}`;
|
|
301
|
+
/** Token ID */
|
|
302
|
+
tokenId: string;
|
|
303
|
+
/** Amount of tokens sold */
|
|
304
|
+
amount: bigint;
|
|
305
|
+
/** Item type (ERC20, ERC721, etc.) */
|
|
306
|
+
itemType: ItemType;
|
|
307
|
+
/** Total price in wei */
|
|
308
|
+
priceWei: bigint;
|
|
309
|
+
/** Total price in native currency (formatted) */
|
|
310
|
+
price: number;
|
|
311
|
+
/** Currency symbol (e.g., "eth", "degen") */
|
|
312
|
+
currency: string;
|
|
313
|
+
/** Sale timestamp in seconds */
|
|
314
|
+
timestamp: number;
|
|
315
|
+
/** Seaport order hash */
|
|
316
|
+
orderHash: string;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Options for fetching sales
|
|
320
|
+
*/
|
|
321
|
+
interface GetSalesOptions {
|
|
322
|
+
/** NFT collection address */
|
|
323
|
+
nftAddress: `0x${string}`;
|
|
324
|
+
/** Maximum number of messages to fetch (default: 100) */
|
|
325
|
+
maxMessages?: number;
|
|
326
|
+
}
|
|
291
327
|
/**
|
|
292
328
|
* Transaction configuration for write operations
|
|
293
329
|
*/
|
|
@@ -302,4 +338,4 @@ interface WriteTransactionConfig {
|
|
|
302
338
|
abi: readonly unknown[];
|
|
303
339
|
}
|
|
304
340
|
|
|
305
|
-
export { type CollectionOffer as C, type Erc20Offer as E, type GetListingsOptions as G, ItemType as I, type Listing as L, OrderType as O, type
|
|
341
|
+
export { type CollectionOffer as C, type Erc20Offer as E, type GetListingsOptions as G, ItemType as I, type Listing as L, OrderType as O, type Sale as S, type WriteTransactionConfig as W, type GetCollectionOffersOptions as a, type GetErc20OffersOptions as b, type GetErc20ListingsOptions as c, type Erc20Listing as d, type GetSalesOptions as e, type SeaportOrderComponents as f, type SeaportSubmission as g, type SeaportOrderParameters as h, type SeaportOrderStatusInfo as i, SeaportOrderStatus as j, type OfferItem as k, type ConsiderationItem as l, type CreateListingParams as m, type CreateCollectionOfferParams as n };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-protocol/bazaar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "SDK for Net Bazaar - a decentralized bazaar storing all orders onchain via Seaport",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@net-protocol/core": "^0.1.7",
|
|
46
|
+
"@net-protocol/storage": "^0.1.11",
|
|
46
47
|
"@opensea/seaport-js": "^4.0.4",
|
|
47
48
|
"viem": "^2.31.4"
|
|
48
49
|
},
|