Skip to content

Verify NFT ownership of ERC-721 and ERC-1155 tokens on Ethereum blockchain

License

Notifications You must be signed in to change notification settings

rafael-castelo/eth-nft-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eth-nft-verification

Verify NFT ownership of ERC-721 and ERC-1155 tokens on Ethereum blockchain

Usage:

var ethNftAuth = require('eth-nft-verification')

/*NOTE: PLEASE EDIT THIS VALUES ACCORDING TO YOUR USE CASE*/

const ethProvider = "https://cloudflare-eth.com" //Your eth provider
const standard = 'ERC-721' //The token standard, inputs allowed are: '721', '1155', 'ERC-721', 'ERC-1155'
const contractAddress = '0xa3AEe8BcE55BEeA1951EF834b99f3Ac60d1ABeeB' //The contract address of the NFT

//Get the ownership verification function
const { isOwner } = ethNftAuth.nftAuth(ethProvider, standard, contractAddress)

const tokenId = '7005' //The id of the token to be verified
const ethAddress = '0x062146f4fabe3e136ef17d17b7d9cf9c0f8c0069' //The address of the eth account

var ownership = await isOwner(tokenId, ethAddress) //Returns a boolean value indicating ownership(true) or not(false)

About

Verify NFT ownership of ERC-721 and ERC-1155 tokens on Ethereum blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published