What can a read-only PSBT inspector trust when it prints the fee from witnessUtxo?
I am adding a read-only sign command to an open-source, signet/testnet-only self-custody toolkit ( btcguardianshq ). This step only decodes a base64 PSBT and prints inputs, outputs and the fee. It does not load keys and it does not sign. Signing is planned as a later step. The inspector currently: refuses --network mainnet / bitcoin requires the file to start with cHNidP8 requires every input to have witnessUtxo and takes the amount from there computes fee = sum(inputs) - sum(outputs) , rejects a negative fee, and warns if the fee is over 50,000 sats The amount check looks like this (from vault/psbt-sign.js on main): if (!inp.witnessUtxo) throw new Error(`Input ${i} has no witnessUtxo; cannot check amount.`); const v = BigInt(inp.witnessUtxo.value); inTotal += v; // ... const fee = inTotal - outTotal; if (fee < 0n) throw new Error('Outputs exceed inputs: invalid PSBT.'); if (fee > 50000n) console.log('WARNING: fee is over 50,000 sats. Check c...