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.
The following example shows an OCEAN Data NFT minted by a contract from our own deployed contract factory on MUMBAI.
Visit the
Unlike typical ERC 721 tokens where a Smart Contract allows the creation of multiple tokens, Smart Contracts of data NFTs allow just one token per contract. Therefore, a Factory Contract serves as creator of a number of custom contracts which may have each one token minted at max. This architecture allowed the custom contracts to have individual rules, which provides a lot of flexibility compared to the traditional architecture.
The following graphic illustrates the Factory Contract, which serves as creator for several custom contracts (need to be registered first) that are bound to a data NFT.
A further notable difference to classical NFTs is that data NFTs don't make use of external storage solutions like IPFS. Data NFTs use on-chain meta-data, which has the advantage that meta-data remains persistent due to the nature of the blockchain. Nevertheless, it comes with the disadvantage that on-chain storage space is limited and costly.
You will learn how you can use the NFT Kit to verify the ownership and properties of Ocean protocol's (V4) ERC721 data NFT.
Ocean protocol V4 data NFTs have a specialized Smart Contract architecture to handle data or intellectual property related use cases. Therefore, the NFT Kit was extended with special interfaces to deploy contracts, mint tokens and most importantly to verify the ownership of data NFTs. Learn more in detail how things were implemented in the .
Deep dive
- How to use the NFT-Kit
- How to verify NFT ownership and properties in the metadata
- View NFTs via a Web-Wallet
- See how the Ocean Protocol was integrated into the NFT-Kit
Learn how to use Ocean Protocols Data NFTs in your solutions
Do you want to build using our APIs or add the NFT-Kits functionalities as a direct dependency in a Kotlin/Java application
Make sure you have Docker or a JDK 16 build environment including Gradle installed on your machine
Clone the project
2. Change the folder
3. Configure your project
4. Building the docker container
5. Running the container
Clone the project
2. Change the folder
3. Configure your project
4. Build the project
5. Run the executable
In build/distributions/
you have two archives, a .tar, and a .zip.
Extract the one that is built for your system and run it.
NFT | Verification - How to verify NFT ownership and properties in the metadata
NFT | Wallet - View NFTs via a Web-Wallet
Architecture - See how the Ocean Protocol was integrated into the NFT-Kit
Gradle
Maven
Required Maven repos:
NFT | Verification - How to verify NFT ownership and properties in the metadata
NFT | Wallet - View NFTs via a Web-Wallet
Architecture - See how the Ocean Protocol was integrated into the NFT-Kit
API
Get started building with our API endpoints
Kotlin/Java SDK
Add the NFT-Kits functionality as a direct dependency