getUTXOs
Returns Unspent Transaction Outputs (UTXOs) for the given query parameters.
Type
async getUTXOs(q: TXOQuery & { verbosity?: 0 }): Promise<string[]>
async getUTXOs(q: TXOQuery & { verbosity: 1 }): Promise<DbOutput[]>
async getUTXOs(q: TXOQuery): Promise<string[] | TXORecord[]>
Description
The getUTXOs function is syntactic sugar for getTXOs function where isSpent is set to false. It return only unspent outputs that may or may not contain smart objects.
Parameters
It accepts the same parameters as getTXOs, except that isSpent is always fixed to false.
Return Value
An array of either revision strings or rows from the Output table, depending on the verbosity level. It is important to highlight that the returned outputs are UTXOs that can encode smart objects, based on the query parameters provided.
Example
// Return all unspent TXOs for a given address
const utxos = await computer.getUTXOs({ address, verbosity: 1 })