delvingbitcoin

BIP352: PSBT support

BIP352: PSBT support

Original Postby Sosthene

Posted on: May 19, 2024 17:32 UTC

The email discusses the implementation and challenges of a basic PSBT (Partially Signed Bitcoin Transaction) workflow developed for a donation wallet, which has been incorporated into WebAssembly experiments by the sender.

This initial setup, described as hacky with limitations, is highlighted as a foundation for future enhancements. The process for spending from silent payment (sp) outputs involves a proprietary method where the spend private key is tweaked with a shared_secret_tweak during the signing phase. This technique is essential for modifying the spend private key to derive the signing key, a critical step in the transaction signing process, detailed further with code references on GitHub (sp-client).

For transactions directed towards sp addresses, the approach becomes more intricate. It employs the output proprietary field for storing the recipient's sp address and includes a placeholder scriptpubkey in the unsigned transaction. This strategy facilitates accurate fee calculation while allowing modifications to the PSBT until the actual output keys need to be finalized based on the transaction's current state. Additional insights are shared through a GitHub link (sp-client details), emphasizing this method's effectiveness despite potential for optimization.

The communication also touches on the challenges of handling inputs in silent payment taproot scripts, particularly distinguishing between eligible and non-eligible prevouts—a task simplified in this context by assuming ownership of all prevouts. The possibility of enhancing coinjoin wallets with silent payment features is mentioned, alongside concerns about the security of such implementations, suggesting a dialogue with experts in the secp256k1 cryptography standard might be beneficial to address these issues comprehensively.