Skip to content

getRuneUTXO ​

getRuneUTXO(config, address, runeId): Promise<RuneUTXO[]>

Retrieves the UTXOs associated with a specific rune for a given address. This is useful for obtaining the necessary UTXOs to create a PSBT for that rune.

Import ​

ts
import { getRuneUTXO } from "@midl/core";

Example ​

ts
const utxos = await getRuneUTXO(config, "bc1q...", "1:1");
console.log(utxos);

Parameters ​

NameTypeDescription
configConfigThe configuration object
addressstringThe address to get the UTXOs of
runeIdstringThe rune ID to get the UTXOs of

Returns ​

Promise<RuneUTXO[]>

The UTXOs for the rune for the address

RuneUTXO ​

NameTypeDescription
addressstringThe address of the UTXO
heightnumberThe height of the UTXO
runesobject[]The runes in the UTXO
satoshisnumberThe amount of satoshis
scriptPkstringThe scriptPubKey
txidstringThe txid of the UTXO
voutnumberThe vout of the UTXO

Released under the MIT License