post https://api.uniblock.dev/uni/v1/json-rpc#54
Retrieve all UTXOs (unspent transaction outputs) that reference a given address.
Description
Gets the UTXOs that reference a given address.
Signature:
avax.getUTXOs(
{
addresses: string,
limit: int, //optional
startIndex: { //optional
address: string,
utxo: string
},
sourceChain: string,
encoding: string, //optional
},
) ->
{
numFetched: int,
utxos: \[]string,
endIndex: {
address: string,
utxo: string
}
}
utxos
is a list of UTXOs such that each UTXO references at least one address in addresses.- At most
limit
UTXOs are returned. Iflimit
is omitted or greater than 1024, it is set to 1024. - This method supports pagination.
endIndex
denotes the last UTXO returned. To get the next set of UTXOs, use the value ofendIndex
asstartIndex
in the next call. - If
startIndex
is omitted, will fetch all UTXOs up tolimit
. - When using pagination (that is when
startIndex
is provided), UTXOs are not guaranteed to be unique across multiple calls. That is, a UTXO may appear in the result of the first call, and then again in the second call. - When using pagination, consistency is not guaranteed across multiple calls. That is, the UTXO set of the addresses may have changed between calls.
encoding
sets the format for the returned UTXOs. Can only be hex when a value is provided.