NFT | Ownership Verification
NFT ownership verification
You can use this API to verify if an account is the real owner of an NFT existed in Tezos blockchain.
API Doc
Swagger Doc | ReDoc
Curl call example
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/{{chain}}/contract/{{contract}}/verifyNftOwnership?account={{account}}&tokenId={{tokenId}}"
-H "accept: application/json"
Path parameters:
chain
: [string] chain to work with. Either TEZOS
or GHOSTNET
.
contract
: [string] smart contract address.
Query parameters:
account
: [string] owner of the NFT.
tokenId
: [string] token id of the NFT
Example:
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/GHOSTNET/contract/KT1RCzrLhBpdKXkyasKGpDTCcdbBTipUk77x/verifyNftOwnership?account=tz1fXH6Tt2Qgvp7pjVpyNcZmunEbgRaHKcoQ&tokenId=0"
-H "accept: application/json"
val chain= Chain.GHOSTNET
val smartContractAddress= "KT1Ennr99qgqzKEUCEqypXEexH4wWzVL5a9m"
val account= "tz1LeScZyZqmg8ZXYoN3mE8vA9GFrPm4HXkx"
val tokenId= "0"
val result = VerificationService.verifyNftOwnership(chain, smartContractAddress, account, tokenId)
println("Result: ${result}")
NFT ownership verification within a collection
We use this API to verify that an account has a NFT within a particular collection.
API Doc
Swagger Doc | ReDoc
Curl call example
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/{{chain}}/contract/{{contract}}/verifyNftOwnershipWithinCollection?account={{account}}"
-H "accept: application/json"
Path parameters:
chain
: [string] chain to work with. Either TEZOS
or GHOSTNET
.
contract
: [string] smart contract address.
Query parameters:
account
: [string] owner of the NFT.
Example:
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/GHOSTNET/contract/KT1RCzrLhBpdKXkyasKGpDTCcdbBTipUk77x/verifyNftOwnershipWithinCollection?account=tz1fXH6Tt2Qgvp7pjVpyNcZmunEbgRaHKcoQ"
-H "accept: application/json"
val chain= Chain.GHOSTNET
val smartContractAddress= "KT1Ennr99qgqzKEUCEqypXEexH4wWzVL5a9m"
val account= "tz1LeScZyZqmg8ZXYoN3mE8vA9GFrPm4HXkx"
val result = VerificationService.verifyNftOwnershipWithinCollection(chain, smartContractAddress, account!!)
println("Result: ${result}")
NFT ownership verification with traits
You can use this API to verify if an account is the real owner of an NFT existed in Tezos blockchain with NFT property verification.
API Doc
Swagger Doc | ReDoc
Curl call example
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/{{chain}}/contract/{{contract}}/verifyNftOwnershipWithTraits?account={{account}}&tokenId={{tokenId}}&traitType={{traitType}}&traitValue={{traitValue}}"
-H "accept: application/json"
Path parameters:
chain
: [string] chain to work with. Either TEZOS
or GHOSTNET
.
contract
: [string] smart contract address.
Query parameters:
account
: [string] owner of the NFT.
tokenId
: [string] token id of the NFT
traitType
: [string] name of the property you want to verify
tokenId
: [string] value of the property you want to verify
Example:
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/TEZOS/contract/KT1RCzrLhBpdKXkyasKGpDTCcdbBTipUk77x/verifyNftOwnershipWithTraits?account=tz1fXH6Tt2Qgvp7pjVpyNcZmunEbgRaHKcoQ&tokenId=0&traitType=trait&traitValue=value"
-H "accept: application/json"
val chain= Chain.GHOSTNET
val smartContractAddress= "KT1Ennr99qgqzKEUCEqypXEexH4wWzVL5a9m"
val account= "tz1LeScZyZqmg8ZXYoN3mE8vA9GFrPm4HXkx"
val tokenId= "0"
val traitType = "Backgrounds"
val traitValue = "Green"
val result = VerificationService.verifyNftOwnershipWithTraits(chain, smartContractAddress, account, tokenId, traitType,traitValue)
println("Result: ${result}")