NFT | Creation & Management

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

API Docs

Swagger Doc | ReDoc

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. Smart Contract Extensions - Pause token minting and burning.

  2. Smart Contract Access Control - Enable role-based access control

NFT Contract Deployment | ERC-721

Ensure that the GasProvider 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.

Soulbound Token Contract Deployment | ERC-721 with extension

Ensure that the GasProvider 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.

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.

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.

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

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

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

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

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

Update NFTs metadata trait

Managing a dynamic NFT required us to update the NFT metadata

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

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

Last updated