- REST Api - Use the functionality of the NFT Kit via an REST api.
- Maven/Gradle Dependency - Use the functions of the NFT Kit in a Kotlin/Java project.
Checkout the Official Documentation, to find out more.
A Kotlin library for managing NFTs
- Deployment and Access Management of NFT smart contracts on multiple chains
- Base functionalities like minting NFTs, managing NFT metadata and much more
- Verification of NFT ownership and token traits
- Smart Contract extensions to add for example token transfer control
- Deployment of ERC721 smart contract
- Minting of a new token
- Fetching of NFT metadata
fun main() {
// Deploy new ERC721 smart contract instance on polygon network
val deploymentOptions = DeploymentOptions(AccessControl.OWNABLE, TokenStandard.ERC721)
val deploymentParameter = DeploymentParameter("Metaverse", "MTV",DeploymentParameter.Options(true, true))
val result = NftService.deploySmartContractToken(Chain.POLYGON, deploymentParameter, deploymentOptions)
// Mint new NFT
val attribute1 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type1", value = "value1")
val attribute2 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type2", value = "value2")
val attributes = mutableListOf(attribute1, attribute2)
val nftMetadata : NftMetadata = NftMetadata(name = "name", description = "description", image = "", attributes = attributes)
val mintingParameter = MintingParameter("", "0xaf87c5Ce7a1fb6BD5aaDB6dd9C0b8EF51EF1BC31",nftMetadata)
val mintingOptions = MintingOptions(MetadataStorageType.ON_CHAIN)
val result = NftService.mintToken(Chain.POLYGON,"0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", mintingParameter, mintingOptions)
// Fetch NFT Metadata URI
val result = NftService.getNftMetadataUri(Chain.POLYGON, "0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", BigInteger.valueOf(26))
// Fetch NFT Metadata
val result = NftService.getNftMetadata(Chain.POLYGON, "0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", BigInteger.valueOf(26))
}
- Connect and get the latest updates: Discord | Newsletter | YouTube | Twitter
- Get help, request features and report bugs: GitHub Discussions
Licensed under the Apache License, Version 2.0