Deploy NFT Contract

On Near Protocol , NFTs are not stored in the user's wallet, instead, each NFT lives in a NFT contract. The NFT contract works as a bookkeeper, this is: it is in charge of handling the creation, storage and transfers of NFTs.

In order for a contract to be considered a NFT-contract it has to follow the NEP-171 and NEP-177 standards. The NEP-171 & NEP-177 standards explain the minimum interface required to be implemented, as well as the expected functionality.

Smart contract deployment with default metadata

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/contract/account/{account_id}/deploy/default"
-H  "Content-Type: application/json" 

Path parameters:

  • chain : [string] chain to work with. Either testnet or mainnet .

  • account_id :[string] your account.

Example:

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/testnet/contract/account/nft.waltid.testnet/deploy/default"
-H  "Content-Type: application/json" 

Smart contract deployment with custom metadata

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/account/{account_id}/deploy"
-H  "Content-Type: application/json" 
-d "{"spec": "string","name": "string","symbol": "string","icon": "string","base_uri": "string","reference": "string","reference_hash": "string","owner_id": "string"}"

Path parameters:

  • chain : [string] chain to work with. Either testnet or mainnet .

  • account_id :[string] your account.

Body Details:

{
  "spec": "string",
  "name": "string",
  "symbol": "string",
  "icon": "string",
  "base_uri": "string",
  "reference": "string",
  "reference_hash": "string",
  "owner_id": "string"
}

Body parameters:

  • spec : a string that MUST be formatted nft-n.n.n where "n.n.n" is replaced with the implemented version of this Metadata spec.

  • name : the human-readable name of the contract.

  • symbol : the abbreviated symbol of the contract.

  • icon : a small image associated with this contract. Encouraged to be a data URL.

  • base_uri : Centralized gateway known to have reliable access to decentralized storage assets referenced by reference or media URLs. Can be used by other frontends for initial retrieval of assets, even if these frontends then replicate the data to their own decentralized nodes, which they are encouraged to do.

Last updated