Psbt flows

From claude-dev-suite/claude-dev-suite · View interactive version

Psbt flows is an AI agent skill from the GitHub repository claude-dev-suite/claude-dev-suite. PSBT signing flow patterns across HW vendors: USB direct, microSD airgap, QR airgap, NFC, multi-device coordination, silent-payment PSBT fields (BIP375/BIP376). USE WHEN: designing HW signing UX, debugging cross-device PSBT flow, supporting multi-vendor multisig or silent payments.

How to use this skill

Skill file

PSBT Signing Flow Patterns

A summary of how PSBTs flow through different hardware wallet

transports.

Flow types

USB direct (online signer)

Host wallet ──── PSBT ────► HW (via USB)
            ◄── signed PSBT

Wallets: Trezor, Ledger, BitBox02, Coldcard via USB, Jade USB,

Keystone (charging only).

Pro: fastest. Con: USB connectivity = potentially compromised host.

microSD airgap (true offline)

Host wallet → save PSBT to SD → eject → insert into HW → sign on
HW → eject → insert into Host

Wallets: Coldcard, Passport Core, Jade (with SD), Keystone.

Pro: no USB connection; truly airgapped. Con: SD card handling

overhead.

QR airgap (animated QR / BCUR)

Host wallet displays animated QR → HW reads via camera
→ HW signs → HW displays animated QR → Host reads

Wallets: Passport Core, Coldcard Q, Jade, Keystone, SeedSigner,

Krux. Passport Prime scans QR too, but its USB-C data port, NFC and

Bluetooth are all live (as of September 2026), so QR on Prime is a

transport, not an airgap.

Pro: no physical connection. Con: scan time for big PSBTs.

BCUR (Blockchain Commons UR Format) is the standard encoding for

multi-frame QR. Compatible wallets must understand BCUR.

NFC tap

Host (phone) → NFC tap to HW → HW signs → NFC tap back

Wallets: Coldcard Mk4 / Q, some others. Not Passport: Core has no

radios at all (power-only USB-C, QR + microSD), and Prime's NFC

carries only its Shamir backup KeyCards, not PSBTs (as of September

2026).

Pro: convenient with Android. Con: iOS NFC limited; PSBT size

limits.

Coordinator role

For multisig, a coordinator wallet handles:

  1. Build PSBT.
  2. Send to signer 1, get partial sig.
  3. Send to signer 2, get partial sig.
  4. Combine + finalize.
  5. Broadcast.

Coordinators:

maintenance-only wind-down in August 2026 (no new features, no new

devices, repo to be archived once a drop-in replacement is ready),

so weigh it before building on it: hwi/SKILL.md.

PSBT versions

September 2026.

has parsed v2 since firmware 5.2.0 (October 2023); Sparrow made v2

its internal PSBT representation in 2.4.0 (February 2026).

For multi-device multisig, all signers must agree on PSBT version

or coordinator transcodes between them.

Silent payments (BIP352) on hardware

Three BIPs carry silent payments into the hardware signing path. All

of their new fields are PSBTv2-only — BIP375 and BIP376 both mark

them as requiring exclusion from v0.

Sending: BIP375

BIP375 ("Sending Silent Payments with PSBTs", number assigned January

2025) lets a PSBT name a recipient by silent-payment code rather than

by script, because the output script cannot be computed until every

input is known.

PSBT_OUT_SCRIPT becomes optional when this is present.

that a silent-payment output is its own change.

— a*B_scan for one input, or for the sum over all eligible inputs.

BIP374 discrete-log-equality proof for the matching ECDH share.

The DLEQ proof is what makes this safe on a device: a signer that does

not hold every input key can still verify the other signers' shares

before it computes and commits to PSBT_OUT_SCRIPT. Extra signer

rules that trip devices:

position of the codes, which NONE/SINGLE would let move.

PSBT_OUT_SCRIPT; whoever fills those in must clear the Inputs

Modifiable and Outputs Modifiable flags.

Spending: BIP376

BIP376 ("Spending Silent Payment outputs with PSBTs", assigned

February 2026, merged to the BIPs repo April 2026) covers the other

direction:

scanning.

the 33-byte spend key. It cannot reuse

PSBT_IN_TAP_BIP32_DERIVATION, whose keydata is a 32-byte x-only

key.

The signer derives d = (b_spend + tweak) mod n, negates d if d*G

has an odd y-coordinate, and **must fail if x(d*G) does not equal

the output key P** in the witness UTXO — the tweak comes from the

Updater, and signing on an unverified one produces a valid signature

for a key the device does not control. Finalizers strip

PSBT_IN_SP_TWEAK and PSBT_IN_SP_SPEND_BIP32_DERIVATION once

PSBT_IN_FINAL_SCRIPTWITNESS is built.

Why an airgapped signer can sign but cannot scan

The BIP376 tweak is handed to the device. Recovering it means

scanning the chain with the scan private key, which an offline signer

cannot do. BIP392 (sp() output descriptors, merged March 2026)

encodes the split directly: its spscan key expression holds the scan

private key plus the spend public key — exactly a watch-only

coordinator — while spspend holds both private keys. So the

coordinator scans and supplies tweaks; the hardware signer only ever

sees a spend-key derivation and a 32-byte tweak that it re-verifies.

Shipping support (as of September 2026)

addresses. The device returns a 33-byte ECDH share plus a 64-byte

DLEQ proof over its own USB protocol so the host can re-derive and

check the generated output; the same construction BIP375 later

standardised as PSBT fields.

addresses; 2.4.0 (February 2026) — BIP375 PSBT fields and DLEQ

proof verification for hardware-wallet sends; 2.5.0 (May 2026) —

silent-payment receiving wallets, including airgapped hardware

signers.

BIP374, BIP375, BIP376 and BIP392 are all still Draft status as of

September 2026.

Cross-vendor multisig

Best practice: use descriptors with key origins:

wsh(sortedmulti(2,
  [fp1/48'/0'/0'/2']xpub1.../<0;1>/*,
  [fp2/48'/0'/0'/2']xpub2.../<0;1>/*,
  [fp3/48'/0'/0'/2']xpub3.../<0;1>/*
))#chk

Each signer's device must:

with HMAC).

Common pitfalls

tap_internal_key missing for the input type.

derivation.

explicit wallet-policy + HMAC registration before multisig signing.

reconcile.

are v2-only, so a coordinator that transcodes down silently drops

the ECDH shares, DLEQ proofs and tweaks.

abandon.

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.