@net-protocol/bazaar 0.1.3 → 0.1.5
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/README.md +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +4 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +4 -4
- package/dist/react.mjs.map +1 -1
- package/dist/{types-DDHh9yJB.d.mts → types-CfGfQTJL.d.mts} +2 -2
- package/dist/{types-DDHh9yJB.d.ts → types-CfGfQTJL.d.ts} +2 -2
- package/package.json +3 -3
package/dist/react.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicClient } from 'viem';
|
|
2
|
-
import { L as Listing, C as CollectionOffer, E as Erc20Offer, d as Erc20Listing } from './types-
|
|
2
|
+
import { L as Listing, C as CollectionOffer, E as Erc20Offer, d as Erc20Listing } from './types-CfGfQTJL.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* React hook for fetching NFT listings from Bazaar
|
|
@@ -78,8 +78,8 @@ declare function useBazaarListings({ chainId, nftAddress, excludeMaker, maker, m
|
|
|
78
78
|
interface UseBazaarCollectionOffersOptions {
|
|
79
79
|
/** Chain ID to query */
|
|
80
80
|
chainId: number;
|
|
81
|
-
/** NFT collection address */
|
|
82
|
-
nftAddress
|
|
81
|
+
/** NFT collection address (optional - if omitted, fetches recent offers across all collections) */
|
|
82
|
+
nftAddress?: `0x${string}`;
|
|
83
83
|
/** Exclude offers from this address */
|
|
84
84
|
excludeMaker?: `0x${string}`;
|
|
85
85
|
/** Maximum number of messages to fetch (default: 100) */
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicClient } from 'viem';
|
|
2
|
-
import { L as Listing, C as CollectionOffer, E as Erc20Offer, d as Erc20Listing } from './types-
|
|
2
|
+
import { L as Listing, C as CollectionOffer, E as Erc20Offer, d as Erc20Listing } from './types-CfGfQTJL.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* React hook for fetching NFT listings from Bazaar
|
|
@@ -78,8 +78,8 @@ declare function useBazaarListings({ chainId, nftAddress, excludeMaker, maker, m
|
|
|
78
78
|
interface UseBazaarCollectionOffersOptions {
|
|
79
79
|
/** Chain ID to query */
|
|
80
80
|
chainId: number;
|
|
81
|
-
/** NFT collection address */
|
|
82
|
-
nftAddress
|
|
81
|
+
/** NFT collection address (optional - if omitted, fetches recent offers across all collections) */
|
|
82
|
+
nftAddress?: `0x${string}`;
|
|
83
83
|
/** Exclude offers from this address */
|
|
84
84
|
excludeMaker?: `0x${string}`;
|
|
85
85
|
/** Maximum number of messages to fetch (default: 100) */
|
package/dist/react.js
CHANGED
|
@@ -972,7 +972,7 @@ var BazaarClient = class {
|
|
|
972
972
|
const count = await this.netClient.getMessageCount({
|
|
973
973
|
filter: {
|
|
974
974
|
appAddress: collectionOffersAddress,
|
|
975
|
-
topic: nftAddress
|
|
975
|
+
topic: nftAddress?.toLowerCase()
|
|
976
976
|
}
|
|
977
977
|
});
|
|
978
978
|
if (count === 0) {
|
|
@@ -982,7 +982,7 @@ var BazaarClient = class {
|
|
|
982
982
|
const messages = await this.netClient.getMessages({
|
|
983
983
|
filter: {
|
|
984
984
|
appAddress: collectionOffersAddress,
|
|
985
|
-
topic: nftAddress
|
|
985
|
+
topic: nftAddress?.toLowerCase()
|
|
986
986
|
},
|
|
987
987
|
startIndex,
|
|
988
988
|
endIndex: count
|
|
@@ -1537,7 +1537,7 @@ function useBazaarCollectionOffers({
|
|
|
1537
1537
|
const filter = react.useMemo(
|
|
1538
1538
|
() => ({
|
|
1539
1539
|
appAddress: collectionOffersAddress,
|
|
1540
|
-
topic: nftAddress
|
|
1540
|
+
topic: nftAddress?.toLowerCase()
|
|
1541
1541
|
}),
|
|
1542
1542
|
[collectionOffersAddress, nftAddress]
|
|
1543
1543
|
);
|
|
@@ -1562,7 +1562,7 @@ function useBazaarCollectionOffers({
|
|
|
1562
1562
|
endIndex: totalCount,
|
|
1563
1563
|
enabled: enabled && isSupported && totalCount > 0
|
|
1564
1564
|
});
|
|
1565
|
-
const TAG = `[useBazaarCollectionOffers chain=${chainId} nft=${nftAddress.slice(0, 10)}]`;
|
|
1565
|
+
const TAG = `[useBazaarCollectionOffers chain=${chainId}${nftAddress ? ` nft=${nftAddress.slice(0, 10)}` : ""}]`;
|
|
1566
1566
|
react.useEffect(() => {
|
|
1567
1567
|
console.log(TAG, {
|
|
1568
1568
|
enabled,
|