Namespace NArk.Abstractions.Blockchain
Classes
- BoardingUtxo
On-chain UTXO at a boarding address, returned by GetUtxosAsync(string, CancellationToken).
- TimeHeight
Current chain wall-clock time and block height, used for expiry and CSV-maturity checks.
- TxStatus
On-chain transaction status returned by GetTxStatusAsync(uint256, CancellationToken).
Interfaces
- IBitcoinBlockchain
Unified Bitcoin-blockchain backend: chain-time, address-indexed UTXO lookup, transaction broadcast, tx-status, and fee estimation. Realistically every concrete backend (NBXplorer, Esplora, Bitcoin Core RPC) is going to expose some flavour of all of these, so the SDK takes them as one interface rather than imposing the wiring tax of three split-by-responsibility abstractions.
Not every backend supports every method — Bitcoin Core RPC, for example, has no native address-indexed UTXO API. Implementations should throw NotSupportedException with a clear message for genuinely unsupported operations. See per-impl docs for what each backend covers.
- IFeeWallet
Provides confirmed on-chain UTXOs and signing capability for fee funding. Used by CPFP child transactions during unilateral exit broadcasting.
Host applications implement this to connect to their on-chain wallet:
- BTCPay Server: uses the store's on-chain wallet (signs internally)
- HSM / hardware-wallet integrations: never expose raw keys
- Standalone apps with an in-memory key: see TestFeeWallet for the pattern
The contract is sighash-callback shaped (mirroring Sign(OutputDescriptor, uint256, CancellationToken)) — the SDK never sees the underlying signing material. Implementations can sign with a raw
Key, proxy to a hardware wallet, call out to a remote signer, or delegate to BTCPay's own wallet manager; the choice is opaque to the SDK.