@net-protocol/bazaar 0.1.4 → 0.1.6
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 +150 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -7
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +61 -4
- package/dist/react.d.ts +61 -4
- package/dist/react.js +258 -8
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +258 -9
- package/dist/react.mjs.map +1 -1
- package/dist/{types-DDHh9yJB.d.mts → types-BwfAmxpu.d.mts} +39 -3
- package/dist/{types-DDHh9yJB.d.ts → types-BwfAmxpu.d.ts} +39 -3
- package/package.json +2 -1
|
@@ -253,8 +253,8 @@ interface GetListingsOptions {
|
|
|
253
253
|
* Options for fetching collection offers
|
|
254
254
|
*/
|
|
255
255
|
interface GetCollectionOffersOptions {
|
|
256
|
-
/** NFT collection address */
|
|
257
|
-
nftAddress
|
|
256
|
+
/** NFT collection address (optional - if omitted, fetches recent offers across all collections) */
|
|
257
|
+
nftAddress?: `0x${string}`;
|
|
258
258
|
/** Exclude offers from this address */
|
|
259
259
|
excludeMaker?: `0x${string}`;
|
|
260
260
|
/** Maximum number of messages to fetch (default: 100) */
|
|
@@ -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 };
|
|
@@ -253,8 +253,8 @@ interface GetListingsOptions {
|
|
|
253
253
|
* Options for fetching collection offers
|
|
254
254
|
*/
|
|
255
255
|
interface GetCollectionOffersOptions {
|
|
256
|
-
/** NFT collection address */
|
|
257
|
-
nftAddress
|
|
256
|
+
/** NFT collection address (optional - if omitted, fetches recent offers across all collections) */
|
|
257
|
+
nftAddress?: `0x${string}`;
|
|
258
258
|
/** Exclude offers from this address */
|
|
259
259
|
excludeMaker?: `0x${string}`;
|
|
260
260
|
/** Maximum number of messages to fetch (default: 100) */
|
|
@@ -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.6",
|
|
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
|
},
|