Monday, December 23, 2024

lightning community – Acquiring steadiness/UTXOs of an handle from Bitcoin Core, blockbook, or another resolution

In my software I want to receive the steadiness and UTXO set of some Bitcoin addresses. I am primarily seeking to obtain this utilizing a full node (Bitcoin Core, RPC), however I’m additionally open to different options. I run my very own node.

Listed below are the options I’ve thought of:

  1. Utilizing scantxoutset RPC command. This works with any handle, returns each UTXOs and whole steadiness. Nevertheless, it’s fairly gradual (for testnet it’s on the order of 1 minute, unsure on mainnet). One other drawback is that it doesn’t present unconfirmed transactions.

  2. Utilizing listunspent RPC command. Sadly this works solely with addresses which can be loaded within the pockets of the node, so not with any addresses.

  3. Utilizing an exterior explorer website/API. This isn’t resolution because of considerations about availability, belief (supply of reality), and entry (permissions, fee limits).

  4. Utilizing blockbook on prime of the BTC node (e.g. api/v2/utxo/<handle>). This appears to be resolution, however it requires an additional piece of software program.

Finally a notification resolution for brand new transactions to a set of addresses can be additionally good, however polling is a workable resolution (e.g. each 10 secs, the set of addresses is usually small).

I might respect another strategies relating to tips on how to obtain this with a full node, or involving another out there software program.

I am additionally curious how Lightning node implementations remedy this, as they in all probability want very related performance (LND, C-lightning, LDK).

I embrace right here for reference:

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles