Closed sebastianst closed 3 years ago
We should add means to the client to query nft metadata. OpenSea has docs on metadata standards.
The interfaces could look like
interface NFTMetadata { name: string; description: string; image: string; // image URL attributes?: []Attribute; background_color?: string; // six-char hex // ... more optional fields? } interface Attribute { // please complete with OpenSea metadata standards fields } interface NFTMetadataProvider { getNftMetadata(token: Address, id: bigint): Promise<NFTMetadata>; }
For generic NFTs that exist on-chain, the implementation should
tokenURI
In the meantime, we should adapt the backend server to conform to this standard (https://github.com/perun-network/nerd-marketplace/issues/100) so we can use the generic implementation also for our PerunArt example contract.
The frontend should then use this functionality from the SDK to display any NFT.
We should add means to the client to query nft metadata. OpenSea has docs on metadata standards.
The interfaces could look like
For generic NFTs that exist on-chain, the implementation should
tokenURI
on-chain (and cache it for future requests)In the meantime, we should adapt the backend server to conform to this standard (https://github.com/perun-network/nerd-marketplace/issues/100) so we can use the generic implementation also for our PerunArt example contract.
The frontend should then use this functionality from the SDK to display any NFT.