Review every output before signing a Bitcoin PSBT
A payment request can have several recipients and a change output. Decode the unsigned transaction to compare its actual scripts and amounts with the intended payment.
Extract outputs without signing
Set PSBT to the base64 packet received by the coordinator. Print each output index as well as the script hex. An address representation is optional for some script types.
bitcoin-cli decodepsbt "$PSBT" | jq '.tx.vout[] | {n, value, script: .scriptPubKey.hex, address: .scriptPubKey.address}'
Classify every output
Match each payment amount in BTC against the approved request. Verify any claimed change output using the intended wallet or signing device. Output order is chosen by the transaction builder, so treating the last output as change can conceal a misdirected payment. If an output is unrecognized, resolve its purpose before signing.