-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
backportBitcoin BackportsBitcoin BackportsenhancementNew feature or requestNew feature or requestuiUI feature or changeUI feature or change
Milestone
Description
Feature Request
Describe the Feature Request
Introduce comprehensive BIP 174 Partially Signed Bitcoin Transaction (PSBT) support in Avian Core so hardware wallets, multisig coordinators, and offline signers can interoperate reliably with AVN. Today Avian lacks full PSBT creation, updating, signing, analysis, and GUI inspection, making workflows like watch-only wallets + external signers impossible.
Describe Preferred Solution
- Core/Serialization: Port or implement PartiallySignedTransaction structures, serialization/deserialization (magic bytes, key-value maps), and helper methods (AddInput/AddOutput, Merge, Finalize, Analyze) aligned with BIP 174. Ensure Avian-specific transaction flags (assets, scripts) are preserved.
- Wallet/RPC: Expose PSBT creator/updater RPCs (
createpsbt,walletcreatefundedpsbt,converttopsbt,utxoupdatepsbt,walletprocesspsbt,combine/joinpsbt,analyzepsbt,finalizepsbt). Wallet code should fill UTXO data, HD paths, and produce ready-to-sign PSBTs; RPC inputs/outputs should accept native JSON arrays/objects. - GUI: Add PSBT dialogs in Qt (creator, analyzer, signer) so non-CLI users can load/save PSBT files, inspect inputs/outputs, and copy/paste base64.
- Interop/Testing: Include round-trip unit and functional tests covering PSBT creation, funding, signing, and finalization (both AVN and asset transactions). Document workflows in
doc/psbt.md. - Future-proofing: Provide hooks for proprietary Avian extensions (asset metadata, verifier strings) without breaking BIP 174 compliance.
Describe Alternatives
- Keep relying on raw transaction hex and manual signing (limits hardware wallet support, error-prone).
- Implement only a subset (e.g., creator without updater/signer), but that still blocks multisig/hardware flows and doesn’t align with upstream best practices.
Related Code
Key touch points: src/psbt.h/.cpp (PSBT structs), wallet helpers (src/wallet/psbtwallet.cpp), RPC layer (src/rpc/psbt.cpp), Qt dialogs (src/qt/), and docs/tests (doc/psbt.md, test/psbt_tests.cpp, functional tests under test/functional/).
Additional Context
- BIP 174 spec: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki
- Upstream Bitcoin Core provides reference behavior for all RPCs/UI elements; Avian should mirror that while adding asset-specific extensions.
- This feature unlocks safer signing with hardware wallets, watch-only wallets, air-gapped workflows, and lays groundwork for advanced asset support later.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backportBitcoin BackportsBitcoin BackportsenhancementNew feature or requestNew feature or requestuiUI feature or changeUI feature or change