query.blockfrost.getunspentoutputswithasset
Home > @blaze-cardano/query > Blockfrost > getUnspentOutputsWithAsset
Blockfrost.getUnspentOutputsWithAsset() method
This method fetches the UTxOs under a given address that hold a particular asset.
Signature:
getUnspentOutputsWithAsset(address: Address | Credential, unit: AssetIdType): Promise<TransactionUnspentOutput[]>;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| address | Address | Credential | Address or Payment Credential. | 
| unit | AssetIdType | The AssetId | 
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.