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