query.blockfrost.getunspentoutputbynft
Home > @blaze-cardano/query > Blockfrost > getUnspentOutputByNFT
Blockfrost.getUnspentOutputByNFT() method
This method fetches the UTxO that holds a particular NFT given as argument.
Signature:
getUnspentOutputByNFT(nft: AssetId): Promise<TransactionUnspentOutput>;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| nft | AssetId | The AssetId for the NFT | 
Returns:
Promise<TransactionUnspentOutput>
A Promise that resolves to TransactionUnspentOutput.
Remarks
The response is parsed into a TransactionUnspentOutput type, which is then returned. If the response is not in the expected format, an error is thrown.