Skip to content

getUTXOs

getUTXOs(config, address, includeRunes): Promise<UTXO[]>

Gets the UTXOs for an address, optionally including UTXOs with Runes

Import

ts
import { getUTXOs } from "@midl-xyz/midl-js-core";

Example

ts
const utxos = await getUTXOs(config, "bc1q...");
console.log(utxos);

Parameters

NameTypeDescription
configConfigThe configuration object
addressstringThe address to get the UTXOs of
includeRunesboolean = falseIf true, include UTXOs with Runes

Returns

Promise<UTXO[]>

The UTXOs for the address

UTXO

PropertyTypeDescription
txidstringThe transaction ID of the UTXO
voutnumberThe output index of the UTXO
valuenumberThe value of the UTXO
statusobjectThe status of the UTXO
status.confirmedbooleanWhether the UTXO is confirmed
status.block_heightnumberThe block height of the UTXO
status.block_hashstringThe block hash of the UTXO
status.block_timenumberThe block time of the UTXO