LogoLogo
ProductsCommunityGitHubShare Feedback
NFT Kit
NFT Kit
  • What is the NFT KIT?
    • Introduction
    • Non-Fungible Tokens (NFTs)
      • NFT | Basics
      • Technologies & Concepts
    • NFT Kit
      • NFT Kit | Basics
        • Overview
        • Functionality
      • NFT Flavors & Ecosystems
      • Architecture
        • Low-Level Service Abstraction
        • Ecosystem Abstraction
        • High-Level Interfaces / APIs
      • Use Cases
  • Getting started
    • Quick Start
  • Ecosystems
    • Ethereum | Polygon | Shimmer
      • Setup
      • NFT | Creation & Management
        • Smart Contract Deployment
        • Minting NFTs
        • Get NFT Metadata
        • Get Account Balance
        • Get Token Owner
        • Get Collection Info
        • Get NFTs by Account
      • NFT | Ownership Verification
        • Ownership Verification
        • Ownership Verification With Traits
      • Smart Contract | Extensions
        • Pausable
        • Burnable
      • Smart Contract | Access Control
        • Ownership
        • Role-Based Access Control
    • Ocean Protocol
      • Setup
      • NFT | Verification
      • NFT | Wallet
      • Architecture
    • Tezos
      • Architecture
      • NFT | Creation & Management
        • Smart Contract
        • Add Minter
        • NFT Minting
        • Fetch NFT metadata
        • Get account NFTs
        • Get contract metadata
      • NFT | Ownership Verification
        • NFT Ownership Verification
        • NFT Ownership Verification Within A Collection
        • NFT Ownership Verification With Traits
      • NFT | Wallet
      • Tutorials
        • Minting NFTs on Tezos
          • Setup
          • New Collection
          • First NFT
          • Verification
          • Wallet
    • Near Protocol
      • Architecture
        • Smart Contract
        • Blockchain NFTs operations
        • NFTs Queries
      • NFT | Creation & Management
        • NEAR Sub-Account
        • Deploy NFT Contract
        • NFT | Minting
      • Querying NFT information controller
        • Get NFTs for account
        • Get NFT By Token Id
        • Get NFT contract metadata
      • NFT | Wallet
      • Tutorials
        • Minting NFT on Near Protocol
          • Near Wallet Creation
          • Setup NFT-Kit
          • Create Sub-account
          • Smart Contract ( Collection )
          • Minting your first NFT
        • NFT Ownership Verification
        • Wallet
    • Polkadot
      • Architecture
      • Query NFTs
        • Unique network
          • Fetching Token id & Collection id
          • Fetching NFT metadata
        • Parachain Networks
          • Fetching Tokens by subscan
          • Fetching EVM ERC721 Collectibles by subscan
      • NFT | Ownership Verification
        • NFT ownership verification
        • NFT ownership verification within a collection
        • NFT ownership verification with traits
      • NFT | Wallet
        • Polkadot parachains
        • Polkadot EVM compatible parachains
    • Flow
      • Architecture
        • Cadence Scripts
        • NFT Operations (FCL)
      • Querying NFT information Controller
        • Get NFTs for an account
        • Get NFTs in Collection
        • Get NFT by Token Id
      • NFT | Ownership Verification
        • NFT ownership verification on Flow
        • NFT ownership verification in collection on Flow
      • NFT | Wallet
        • Flow Blockchain
    • Algorand
      • Architecture
        • Algorand Standard Assets (ASAs)
      • NFT | Creation & Management
        • Account Creation
        • NFT Creation (ARC3)
      • Querying Asset information
        • Get Assets for account
        • Get Asset Details
        • Get NFT Metadata by asset id
        • Get NFT by Asset id
      • NFT | Ownership Verification
        • NFT ownership verification
        • NFT ownership verification with traits
        • NFT ownership verification Based on Creator
        • NFT Metadata verification against a dynamic policy
      • NFT | Wallet
        • Algorand Blockchain
    • IPFS
  • Concepts
    • Soulbound Tokens (SBTs)
    • NFT verification with OPA
  • Configurations
    • Configuration Files
    • Gas Provider
  • Community
    • Discord
    • Twitter
    • Newsletter
    • GitHub Discussions
  • DEVELOPER RELATIONS
    • Roadmap
    • Contribute
    • Share Feedback
    • Contact
  • Product Editions
    • Open Source | Always Free
    • Enterprise | Self-Managed
    • Cloud Platform | Managed
Powered by GitBook
On this page
  • API Docs
  • Smart Contracts
  • Mint an NFT
  • Revoke NFT
  • NFT metadata
  • Get Account balance
  • Get Token owner
  • Get collection info
  • Get NFTs by account

Was this helpful?

Export as PDF
  1. Ecosystems
  2. Ethereum | Polygon | Shimmer

NFT | Creation & Management

Description of the main functions to manage NFTs: smart contract deployment, minting tokens, etc.

PreviousSetupNextNFT | Ownership Verification

Last updated 1 year ago

Was this helpful?

API Docs

|

Smart Contracts

The NFT-Kit supports the ERC-721 standard with the option to be deployed as regular contract for NFTs or modified for Soulbound Tokens.

Do you want to modify your contract further? Have a look at our Smart Contract Extension Sections:

  1. - Pause token minting and burning.

  2. Enable role-based access control

NFT Contract Deployment | ERC-721

Ensure that the is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to smart contract deployment, to ensure successful transactions.

curl -X POST http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/deploy \
-H  "Content-Type: application/json" \
-d '{"name":"Ticket","symbol":"TK","tokenStandard":"ERC721","accessControl":"OWNABLE","options":{"transferable":true,"burnable":true}}'
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

After you have successflully deployed the contract, you can start minting NFTs to your users.

{
  "name": "string",
  "symbol": "string",
  "tokenStandard": "ERC721",
  "accessControl": "OWNABLE|ROLE_BASED_ACCESS_CONTROL",
  "options": {
    "transferable": true,
    "burnable": true
  }
}

  • name: [string] the human-readable name of the contract.

  • symbol: [string] the abbreviated symbol of the contract.

  • tokenStandard: [string] NFTs smart contract standard. Supported values: ERC721.

  • accessControl: [string] access control approach for the smart contract. Supported values: OWNABLE, ROLE_BASED_ACCESS_CONTROL. For more details about approaches.

  • transferable: [boolean] activate/deactivate token transfer.

  • burnable: [boolean] activate/deactivate token burn.

val deploymentOptions = DeploymentOptions(AccessControl.OWNABLE, TokenStandard.ERC721)
val deploymentParameter = DeploymentParameter("Metaverse", "MTV",DeploymentParameter.Options(true, true))
val result = NftService.deploySmartContractToken(Chain.POLYGON, deploymentParameter, deploymentOptions)

Soulbound Token Contract Deployment | ERC-721 with extension

curl -X POST http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/deploy \
-H  "Content-Type: application/json" \
-d '{"name":"Ticket","symbol":"TK","tokenStandard":"ERC721","accessControl":"OWNABLE","options":{"transferable":false,"burnable":true}}'
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

After you have successflully deployed the contract, you can start minting NFTs to your users.

{
  "name": "string",
  "symbol": "string",
  "tokenStandard": "ERC721",
  "accessControl": "OWNABLE|ROLE_BASED_ACCESS_CONTROL",
  "options": {
    "transferable": false,
    "burnable": true
  }
}

  • name: [string] the human-readable name of the contract.

  • symbol: [string] the abbreviated symbol of the contract.

  • tokenStandard: [string] NFTs smart contract standard. Supported values: ERC721.

  • transferable: [boolean] in order to make sure a soulbound token contract is created we need to set this option to false otherwise it will create a regular NFT contract as shown in the section above.

  • burnable: [boolean] activate/deactivate token burn.

val deploymentOptions = DeploymentOptions(AccessControl.OWNABLE, TokenStandard.ERC721)
val deploymentParameter = DeploymentParameter("Metaverse", "MTV",DeploymentParameter.Options(false, true))
val result = NftService.deploySmartContractToken(Chain.POLYGON, deploymentParameter, deploymentOptions)

Mint an NFT

It is a rich API to mint a new NFT token. It manages NFT metadata in multiple ways. You can generate token URI by yourself or let the NFT KIT generate it.

curl -X POST "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277be034881ee38a9b270e5b6c5c6f333af2517/token/mint" \
-H  "Content-Type: application/json" \
-d '{"metadataUri":"","metadata":{"description":"Ticket #1 Description","name":"Ticket #1","image":"ipfs://bafkreibpc3wpdg4mq3bbkesqrxtoho25s3shnfhyotd6rymsag3bcfpeni","attributes":[{"trait_type":"Trait 1","value":"Value 1"}]},"recipientAddress":"0x2555e3a97c4ac9705D70b9e5B9b6cc6Fe2977A74","metadataStorageType":"ON_CHAIN"}'
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

{
  "metadataUri": "string",
  "metadata": {
    "description": "string",
    "name": "string",
    "image": "string",
    "image_data": "string",
    "external_url": "string",
    "attributes": [
      {
        "trait_type": "string",
        "value": "string"
      }
    ]
  },
  "recipientAddress": "string",
  "metadataStorageType": "ON_CHAIN|OFF_CHAIN"
}

  • metadataUri: [string] metadata URI of the new token.If you want to generate metadata URI using NFT KIT, set the "metadataUri "value as an empty string.

  • description: [string] a description of the token

  • name: [string] the name of this specific token

  • image: [string] this is the URL to the image of the item. Can be just about any type of image and can be IPFS URLs or paths.

  • image_data: [string] Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.

  • external_url: [string] This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.

  • attributes: [string] To give your items a little more pizazz, we also allow you to add custom "attributes" to your metadata that will show up underneath each of your assets.

  • trait_type: [string] the name of the trait

  • value: [string] the value of the trait

  • recipientAddress: [string] the account address who will receive the NFT

  • metadataStorageType: [string] when you let the NFT KIT to generate metadata URI, you need to specify how the metadata will be stored. Supported values: ON_CHAIN, OFF_CHAIN. You can use ON_CHAIN if you want to store NFT metadata on the chain. You can use OFF_CHAIN if you want store NFT metadata off chain using IPFS.

val attribute1 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type1", value = JsonPrimitive("value1"))
val attribute2 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type2", value = JsonPrimitive("value1"))
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)

Revoke NFT

Owner of a soul bound NFT smart contract , can revoke a minted Token.

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/SHIMMEREVM/contract/0x3A4D948a123824Fc34FDDA0654D3C8D0D29c2FA9/token/1/revokeToken"
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

token: token ID

val result = NftService.revokeToken(Chain.SHIMMEREVM, "0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", BigInteger.valueOf(26))

NFT metadata

Find out more information about your NFTs with the following actions.

Fetch NFT metadata URI

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1/metadataUri"
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

token: token ID

val result = NftService.getNftMetadataUri(Chain.POLYGON, "0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", BigInteger.valueOf(26))

Fetch NFT metadata

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1/metadata" 
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

token: token ID

val result = NftService.getNftMetadata(Chain.POLYGON, "0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", BigInteger.valueOf(26))

Update NFTs metadata trait

curl -X POST "http://0.0.0.0:7000/nftkit/nft/chain/ETHEREUM/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1/metadata" \
-H  "Content-Type: application/json" \
-d '{"key":"key1","value":"value1"}'

  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

token: token ID

{
  "key": "string",
  "value": "string"
}

  • key: [string] the name of the metadata attribute that you want to update.

  • value: [string] the new value of the attribute

Get Account balance

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/owner/0x2555e3a97c4ac9705d70b9e5b9b6cc6fe2977a74/balance" 
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

owner: account address

Get Token owner

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1/owner" 
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

token: token ID

Get collection info

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/info" 
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

contract: smart contract address

Get NFTs by account

It will return a list of all NFTs which are associated with the provided account address.

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/owner/0x2555e3a97c4ac9705d70b9e5b9b6cc6fe2977a74" 
  • Path parameter:

chain: chain to work with.

Main chains: ETHEREUM, POLYGON

Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM

owner: account address

Ensure that the is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to smart contract deployment, to ensure successful transactions. In the contract deployment call we set the transferable option to false, which deploys a soulbound token contract. This contract prevents any token transfers after the initial mint.

accessControl: [string] access control approach for the smart contract. Supported values: OWNABLE, ROLE_BASED_ACCESS_CONTROL. For more details about approaches.

Ensure that the is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to minting, to ensure successful transactions.

metadata: NFT KIT will use values inside metadata to generate metadata URI of the new token. It confirms the structure defined by ERC721 and ERC1155 standards. For more details about .

Managing a required us to update the NFT metadata

Swagger Doc
ReDoc
Smart Contract Extensions
Smart Contract Access Control -
GasProvider
access control
GasProvider
access control
GasProvider
NFT metadata standard
dynamic NFT