This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Description
Describe the enhancement
payjoin requires sending a psbt as a string between sender and receiver to build up the payjoin tx.
Currently bdk-wasm does not have a way to extract the psbt as a string or as json, but those functions do exist in bdk-ffi
Use case
payjoin
chain inspection
Additional context
I'm currently building wasm bindings for payjoin and need this functionality. I will add it to my local bdk-wasm and make a PR for this soon
serde is base64, that's what payjoin needs (that's what bitcoin core uses), but it wouldn't hurt to also add json
bitcoin crate exposes Psbt.to_string which is base64, and I believe bdkPsbt should aswell