AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 34 Bitcoin

psbt: return an error if fetching output_amount when not present

Public commit record

What the developer wrote

Authored by Jon Griffiths

50/100 · Thin
psbt: return an error if fetching output_amount when not present

Note this is an ABI change.
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit changes a library function so that it returns an error when asked for an output amount that is not actually present, instead of silently returning zero. This prevents callers from accidentally treating a missing amount as a real zero-value output, which could lead to incorrect transaction handling in Bitcoin/Elements PSBT workflows.

Recommended action

Treat this as a hardening/bug-fix change. Downstream projects using wally_psbt_get_output_amount should update call sites to handle WALLY_EINVAL when the amount may be absent (e.g., blinded PSET outputs), and should not assume zero is a valid amount. Review any code that previously relied on the zero-default behavior.

Security signals we found

01

API now distinguishes 'missing amount' from 'amount is zero' via explicit error code

02

Presence check (has_amount) is enforced before returning sensitive numeric value

03

Test updated to assert exception when fetching amount on blinded output

04

ABI break explicitly noted by commit author

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.