Created
August 2, 2022 13:31
-
-
Save dharniel45/602d9f9e0b93701b5d5dddc5ad1803de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { initializeAlchemy, getOwnersForNft } = require('@alch/alchemy-sdk'); | |
const settings = { | |
apiKey: 'API Key', | |
}; | |
const alchemy = initializeAlchemy(settings); | |
const main = async () => { | |
const address = | |
'0x67BcbC1C0E120D0A700Eb38A2d769C20A1DfB8f6' | |
const tokenId = 3 | |
const owner = await getOwnersForNft(alchemy, address, tokenId) | |
console.log(owner) | |
} | |
const runMain = async () => { | |
try { | |
await main(); | |
process.exit(0); | |
} | |
catch (error) { | |
console.log(error); | |
process.exit(1); | |
} | |
}; | |
runMain(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment