NFT | Ownership Verification NFT ownership verification on Flow
You can use this API to verify if an account is the real owner of an NFT existed in Flow blockchain.
REST API
API Doc
Swagger Doc | ReDoc
Curl call example
Copy curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/{chain}/contract/{contractAddress}/verifyNftOwnership/Flow"
-H "accept: application/json"
Path parameters:
chain
: [string] chain to work with. Either TESTNET
or MAINNET
.
contractAddress
: [string] smart contract address.
Query parameters:
account
: [string] owner of the NFT.
tokenId
: [string] token id of the NFT.
collectionPath:
[string] Collection storage/public/private path.
Example:
Copy curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/TESTNET/contract/0xa9ccb9756a0ee7eb/verifyNftOwnership/Flow?account=0xe8e83eb775b67bc2&tokenId=1&collectionPath=%2Fpublic%2FexampleNFTCollection"
-H "accept: application/json"
Kotlin
Copy val chain = Flow.TESTNET
val smartContractAddress = "0xa9ccb9756a0ee7eb"
val account = "0xe8e83eb775b67bc2"
val tokenId = "1"
val collectionPath = "/public/exampleNFTCollection"
val result = VerificationService.verifyNftOwnershipOnFlow(chain, smartContractAddress, account, tokenId , collectionPath)
println ( "Result: ${ result } " )
NFT ownership verification in collection on Flow
We use this API to verify that an account has a NFT within a particular collection.
REST API
API Doc
Swagger Doc | ReDoc
Curl call example
Copy curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/{chain}/contract/{contractAddress}/verifyNftOwnershipWithinCollection/Flow"
-H "accept: application/json"
Path parameters:
chain
: [string] chain to work with. Either TESTNET
or MAINNET
.
contractAddress
: [string] smart contract address.
Query parameters:
account
: [string] owner of the NFT.
collectionPath:
[string] Collection storage/public/private path.
Example:
Copy curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/verifier/chain/TESTNET/contract/0xa9ccb9756a0ee7eb/verifyNftOwnershipWithinCollection/Flow?account=0xe8e83eb775b67bc2&collectionPath=%2Fpublic%2FexampleNFTCollection"
-H "accept: application/json"
Kotlin
Copy val chain = Flow.TESTNET
val smartContractAddress = "0xa9ccb9756a0ee7eb"
val account = "0xe8e83eb775b67bc2"
val collectionPath = "/public/exampleNFTCollection"
val result = VerificationService.verifyNftOwnershipWithinCollectionOnFlow(chain, smartContractAddress, account,collectionPath)
println ( "Result: ${ result } " )