NFT | Creation & Management

Financial Application 2 (FA2) token standard

Create and mint NFTs via the FA2 (Financial Application 2) unified token standard on Tezos, offering the following token types:

  • fungible (equals ERC-20 on Ethereum)

  • non-fungible (equals ERC-721 on Ethereum)

  • non-transferable (equals ERC-1238 on Ethereum)

  • multi-asset contracts (equals ERC-1155 on Ethereum)

FA2 implementations

The FA2 standard has multiple implementations. We support the following:

Single

With this implementation, you can only have one collection. It is like the ERC-721 style. Only owner minter can mint new NFTs.

Multiple

With this implementation, you can have multiple collections. In each collection, you can define the number of copies of each NFT. It is somehow like the ERC-1155 style.

Smart contract deployment

We offer a set of default FA2 based smart contract templates, providing the main functionality needed for NFT projects.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/tezos/chain/{{chain}}/contract/deploy" 
-H  "Content-Type: application/json" 
-d "{"owner":"string","type":"string"}"

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

Body parameters

{
  "owner": "tz1YiZtFfeu6qmr2G6PnyisJNjxDyaEWXs9J",
  "type": "SINGLE"
}
  • owner: [string] the owner(Admin) of the smart contract.

  • type: [string] the FA2 smart contract implementation. Either SINGLE or MULTIPLE. For more explanation, you can click here.

Example:

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/tezos/chain/GHOSTNET/contract/deploy" 
-H  "Content-Type: application/json" 
-d "{"owner":"tz1YiZtFfeu6qmr2G6PnyisJNjxDyaEWXs9J","type":"SINGLE"}"

Add minter

The FA2 smart contract implementation allows minting NFTs from different accounts. The owner of the smart contract is allowed to add new minters.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/tezos/chain/{{chain}}/contract/{{contract}}/minter" 
-H  "Content-Type: application/json" 
-d "{"minterAddress":"string"}"

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

  • contract: [string] smart contract address.

Body parameters:

{
  "minterAddress": "string"
}
  • minterAddress: [string] an account address that will be able to mint new NFTs.

Example:

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/TEZOS/chain/GHOSTNET/contract/KT1QDuCUqmgotFqRtCK757J7xu47Bc7Ajp6q/minter" 
-H  "Content-Type: application/json" 
-d "{"minterAddress":"tz1YiZtFfeu6qmr2G6PnyisJNjxDyaEWXs9J"}"

NFT Minting

With this API, you can mint a new NFT. It have multiple options to manages NFT minting. You can generate NFT URI metadata by yourself or let the NFT KIT generate it.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/tezos/chain/{{chain}}/contract/{{contract}}/mint" 
-H  "Content-Type: application/json" 
-d "{"metadataUri":"string","tokenId":"string","amount":"string","recipientAddress":"string","metadata":{"name":"string","description":"string","symbol":"string","image":"string","creators":["string"],"decimals":"string","displayUri":"string","artifactUri":"string","thumbnailUri":"string","isTransferable":true,"isBooleanAmount":true,"shouldPreferSymbol":false,"attributes":[{"trait_type":"string","value":"string"},{"trait_type":"string","value":"string"},{"trait_type":"string","value":"string"}],"tags":["string"],"category":"string","collectionName":"string","creatorName":"string","keywords":"string"}}"

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

  • contract: [string] smart contract address

Body parameters:

{
  "metadataUri": "string",
  "tokenId": "string",
  "amount": "string",
  "recipientAddress": "string",
  "metadata": {
    "name": "string",
    "description": "string",
    "symbol": "string",
    "image": "string",
    "creators": [
      "string"
    ],
    "decimals": "string",
    "displayUri": "string",
    "artifactUri": "string",
    "thumbnailUri": "string",
    "isTransferable": true,
    "isBooleanAmount": true,
    "shouldPreferSymbol": true,
    "attributes": [
      {
        "trait_type": "string",
        "value": "string"
      }
    ],
    "tags": [
      "string"
    ],
    "category": "string",
    "collectionName": "string",
    "creatorName": "string",
    "keywords": "string"
  }
}

  • 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.

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

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

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

  • 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 NFT metadata standard.

  • 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

Example:

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/tezos/chain/TEZOS/contract/KT1QDuCUqmgotFqRtCK757J7xu47Bc7Ajp6q/mint" 
-H  "Content-Type: application/json" 
-d "{"metadataUri":"","tokenId":"0","amount":"","recipientAddress":"tz1fXH6Tt2Qgvp7pjVpyNcZmunEbgRaHKcoQ","metadata":{"name":"NFT #0","description":"Rocket Monsters 10k Bear Battalion","symbol":"RM10KBB","image":"","creators":["tz1YiZtFfeu6qmr2G6PnyisJNjxDyaEWXs9J"],"decimals":"0","displayUri":"ipfs://QmZ6tRBw9cxDrc6dzy74JgNLSRYSbQAp3GHEbFqg2EQ8og","artifactUri":"ipfs://QmZ6tRBw9cxDrc6dzy74JgNLSRYSbQAp3GHEbFqg2EQ8og","thumbnailUri":"ipfs://QmZ6tRBw9cxDrc6dzy74JgNLSRYSbQAp3GHEbFqg2EQ8og","isTransferable":true,"isBooleanAmount":true,"shouldPreferSymbol":false,"attributes":[{"trait_type":"Backgrounds","value":"Green"},{"trait_type":"Fur","value":"Yellow"},{"trait_type":"Belly","value":"Blue_Steel"}],"tags":["string"],"category":"gaming","collectionName":"Rocket Monsters","creatorName":"rocketmonsters","keywords":"gaming,collectible,rocket,monster,bear,battalion"}}"

Fetch NFT metadata

You can get the NFT metadata based on the NFT smart contract address and the NFT token ID.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X GET "http://0.0.0.0:7000/nftkit/nft/tezos/chain/{{chain}}/contract/{{contract}}/token/{{tokenId}}/metadata"

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

  • contract: [string] smart contract address

  • tokenId: [string] token id of the NFT

Example:

curl -X GET "http://0.0.0.0:7000/nftkit/nft/tezos/chain/TEZOS/contract/KT1Ennr99qgqzKEUCEqypXEexH4wWzVL5a9m/token/0/metadata"

Get account NFTs

You get the NFTs list of an account on the specified network.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/{{chain}}/owner/{{owner}}" 

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

  • owner: [string] owner address

Example:

curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/TEZOS/owner/tz1fXH6Tt2Qgvp7pjVpyNcZmunEbgRaHKcoQ" 

Get contract metadata

This API allows fetching contract metadata.

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X GET "https://0.0.0.0:7000/nftkit/nft/tezos/chain/{{chain}}/contract/{{contract}}/metadata"

Path parameters:

  • chain: [string] chain to work with. Either TEZOS or GHOSTNET.

  • contract: [string] smart contract address

Example:

curl -X GET "https://0.0.0.0:7000/nftkit/nft/tezos/chain/TEZOS/contract/KT1WGDVRnff4rmGzJUbdCRAJBmYt12BrPzdD/metadata" -H  "accept: */*"

Last updated