UTXO Overview
Oviato's UTXO surface — PSBT signing for Bitcoin, scoped under utxo.*. Everything else lives at the top level (sendTransfer, signMessage, getBalance).
The utxo namespace is narrow on purpose — most UTXO-chain work is either chain-agnostic (covered at the top level) or a PSBT flow.
import { utxo } from '@oviato/connect';
const r = await utxo.signPsbt({
psbt: '70736274ff...', // PSBT hex
broadcast: true,
});What's in the namespace
| Method | Purpose |
|---|---|
utxo.signPsbt | Sign a Partially-Signed Bitcoin Transaction (PSBT), optionally broadcast after signing. |
That's it for v1. More UTXO-specific surface area arrives with future releases.
What's NOT in the namespace
Most of the UTXO workflow lives at the top level because it's chain-agnostic:
| Task | Use |
|---|---|
| Send BTC to an address | sendTransfer |
| Multi-recipient send | sendTransfer with recipients: [...] |
| Sign a message | signMessage |
| Fetch balance (confirmed + unconfirmed) | rpc.getBalance |
| Switch to Bitcoin | switchNetwork |
Use utxo.* specifically when you have a PSBT — which happens when:
- Coin-selection or output construction runs server-side (your backend builds, frontend signs)
- You're integrating with a protocol that hands you a PSBT to co-sign
- You need explicit control over inputs, outputs, and sighash flags
PSBT — the quick explainer
A PSBT (Partially-Signed Bitcoin Transaction) is Bitcoin's native format for transactions that need external logic or multiple signatures before broadcast.
Key ideas:
- It's data, not code. A PSBT is just a hex string you can pass around.
- It's partial. Inputs can be unsigned, partially signed (multi-sig), or fully signed.
- It's verifiable. Anyone can inspect the inputs + outputs before signing — no hidden state.
- It's broadcastable. Once fully signed, it's serialized into a standard transaction + broadcast.
Oviato's utxo.signPsbt signs the inputs your session owns (leaving others untouched), and optionally broadcasts after signing.
When to reach for PSBTs
- Server-side coin selection. Your backend selects UTXOs and constructs the tx; the frontend just signs.
- Batching with custom outputs.
sendTransfercovers multi-recipient; PSBTs give you more control (change address placement, OP_RETURN content, specific sighash flags). - Pre-built transactions from a third party. A counterparty hands you a PSBT for you to add your signature to.
If you don't need any of the above — just sendTransfer. It's simpler.
Supported UTXO networks
Network.BTCMAINNET('bitcoin')Network.BTCTESTNET('bitcointestnet')
More UTXO chains (Dogecoin, Litecoin) are on the roadmap.
Session scope
A Bitcoin session can't use evm.* methods (they throw). Use switchNetwork(Network.BTCMAINNET) to scope the session to Bitcoin before calling utxo.*.