sdk.blockfrost.getunspentoutputs
Home > @blaze-cardano/sdk > Blockfrost > getUnspentOutputs
Blockfrost.getUnspentOutputs() method
This method fetches the UTxOs under a given address.
Signature:
getUnspentOutputs(address: Address | Credential, filter?: (utxo: BlockfrostUTxO) => boolean): Promise<TransactionUnspentOutput[]>;
Parameters
Parameter |
Type |
Description |
---|---|---|
address |
The Address or Payment Credential | |
filter |
(utxo: BlockfrostUTxO) => boolean |
(Optional) |
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.