Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Need Help with PSBT Decoding Error in bitcoin-cli

I'm generating a PSBT using `bitcoinjs-lib` with a pseudo-signature for testing, but when I try to decode it using `bitcoin-cli decodepsbt`, I get this error:

```
error code: -22
error message:
TX decode failed Outputs provided does not match the number of outputs in transaction.: iostream error
```

Steps I Took:

1. Created a raw transaction with:
- Txid:
- Vout: 0
- Outputs: Two outputs with specified addresses and amounts.
2. Constructed the PSBT with `bitcoinjs-lib` and added a pseudo-signature.

Issue: PSBT seems fine but fails to decode in `bitcoin-cli`.

Looking For:

- Advice on where the PSBT creation might be wrong.
- Anyone who has faced a similar issue and resolved it.
- Tips on debugging or properly formatting the PSBT.

Additional Info:

- I have the public key and am working on the Bitcoin mainnet.

Thanks in advance!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by CryptoWareDec 30, 2025 05:03 PM 4 226 Dec 30, 2025 05:03 PM
Last Post: XveroX
by keiwn2Aug 31, 2024 03:15 PM 4 144 Aug 31, 2024 03:15 PM
Last Post: keiwn2
by keiwn2Aug 31, 2024 10:01 AM 0 96 Aug 31, 2024 10:01 AM
Last Post: keiwn2