The goal of the NFT Kit is to provide a simple library and web service for NFT-based access management. Therefore the ownership of NFTs, aligned with OCEAN protocols specifications, must be verified.
The library provides a VerificationService which exposed the method dataNftVerification that takes the following parameter:
chain: the EVM-compatible chain name or chain ID
factorycontractAddress: The address of the factory contract
erc721contractAddress: The address of the custom contract
account: The account to be verified
propertyKey: The NFT meta data property key that should exist
propertyValue: The NFT meta data property value that should exist
The verification function is shown in the following screenshot.
A test deployment of the NFT kit and the oceanDao data NFT verification API can be accessed here https://nftkit.walt.id/nftkit/swagger#/NFT%20verification/OceanDaoVerification
In the verification process, the NFT is fetched from the chain per contract and account address, and it is checked if it was created by the particular factory contract and if the properties match. Note the properties might be any key/value pair of the JSON-structure. Either of the main data or of the nested structures (e.g. traits). By implementing the property-based validation in this generic way the NFT kit is future proof for any modifications to the meta data.