Skip to content

Instantly share code, notes, and snippets.

@dharniel45
Created August 2, 2022 13:31
Show Gist options
  • Save dharniel45/602d9f9e0b93701b5d5dddc5ad1803de to your computer and use it in GitHub Desktop.
Save dharniel45/602d9f9e0b93701b5d5dddc5ad1803de to your computer and use it in GitHub Desktop.
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