Skip to main content
Version: Next

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.

Signature:

getUnspentOutputsWithAsset(address: Address | Credential, unit: AssetId): Promise<TransactionUnspentOutput[]>;

Parameters

Parameter

Type

Description

address

Address | Credential

Address or Payment Credential.

unit

AssetId

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.