Experimental
Experimental
Fetch profiles who own a specific NFT collection.
Request object for the query
Profiles wrapped in PaginatedResult This function is not stable and may be removed in a future release
const result = await client.nfts.collectionOwners({
for: collection.contract.address,
chainId: collection.contract.chainId,
});
Experimental
Fetch NFT collections.
Request object for the query
NFT collections wrapped in PaginatedResult This function is not stable and may be removed in a future release
const result = await client.nfts.collections();
Experimental
Create a new NFT gallery.
⚠️ Requires authenticated LensClient.
If you are using development
enviroment you can only query chainIds 5 and 80002.
If you are using production
enviroment you can only query chainIds 1 and 137.
Request object for the mutation
PromiseResult with the id of the new gallery This function is not stable and may be removed in a future release
const result = await client.nfts.createGallery({
name: 'My favorite NFTs',
items: [
{
contract: {
address: '0x1234123412341234123412341234123412341234', // an NFT that wallet owns
chainId: 5,
},
tokenId: '1',
}
]
});
Experimental
Delete a NFT gallery.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void This function is not stable and may be removed in a future release
const result = await client.nfts.deleteGallery({
galleryId: '9aeb66b2-0d8f-4c33-951c-feedbb171148'
});
Experimental
Fetch NFTs for authenticated profile or for provided request params.
If you are using development
enviroment you can only query chainIds 5 and 80002.
If you are using production
enviroment you can only query chainIds 1 and 137.
Request object for the query
NFTs wrapped in PaginatedResult This function is not stable and may be removed in a future release
When authenticated
const result = await client.nfts.fetch();
Without authentication
const result = await client.nfts.fetch({
where {
profileId: '0x01',
}
});
Experimental
Fetch NFT galleries of a profile.
Request object for the query
Array of NFT galleries wrapped in PaginatedResult This function is not stable and may be removed in a future release
const result = await client.nfts.fetchGalleries({
for: '0x01',
});
Experimental
Fetch mutual NFT collections between two profiles.
Request object for the query
NFT collections wrapped in PaginatedResult This function is not stable and may be removed in a future release
const result = await client.nfts.mutualCollections({
observer: '0x01',
viewing: '0x02',
});
Experimental
Fetch popular NFT collections together with total number of owners.
Request object for the query
NFT collections with total owners wrapped in PaginatedResult This function is not stable and may be removed in a future release
const result = await client.nfts.popularCollections();
Experimental
Update an NFT gallery.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void This function is not stable and may be removed in a future release
const result = await client.nfts.updateGalleryInfo({
galleryId: '9aeb66b2-0d8f-4c33-951c-feedbb171148',
name: 'New name',
});
Experimental
Update a NFT gallery items.
⚠️ Requires authenticated LensClient.
If you are using development
enviroment you can only query chainIds 5 and 80002.
If you are using production
enviroment you can only query chainIds 1 and 137.
Request object for the mutation
PromiseResult with void This function is not stable and may be removed in a future release
const result = await client.nfts.updateGalleryItems({
galleryId: '9aeb66b2-0d8f-4c33-951c-feedbb171148',
toAdd: [
{
contract: {
address: '0x1234123412341234123412341234123412341234', // an NFT that wallet owns
chainId: 5,
},
tokenId: '1',
},
],
toRemove: [
{
contract: {
address: '0x1234123412341234123412341234123412341234', // an NFT that wallet owns
chainId: 5,
},
tokenId: '2',
},
],
});
Experimental
Update a NFT gallery items order.
⚠️ Requires authenticated LensClient.
If you are using development
enviroment you can only query chainIds 5 and 80002.
If you are using production
enviroment you can only query chainIds 1 and 137.
Request object for the mutation
PromiseResult with void This function is not stable and may be removed in a future release
const result = await client.nfts.updateGalleryOrder({
galleryId: '9aeb66b2-0d8f-4c33-951c-feedbb171148',
updates: [
{
contract: {
address: '0x1234123412341234123412341234123412341234', // an NFT that wallet owns
chainId: 5,
},
tokenId: '1',
newOrder: 1,
},
],
});
Query owned NFTs. Create and manage NFT galleries.
This module is not stable and may be removed in a future release