Extending BIP174 for HTLCs



Summary:

A proposal to add fields to the Partially Signed Bitcoin Transactions (PSBT) format tag for Bitcoin Improvement Proposal 174 to support Hash Time-Locked Contracts (HTLCs) was discussed on the bitcoin-dev mailing list. One approach suggested is to add two fields to PSBT: a preimage request field and a revealed preimage field. The workflow would involve an updater recognizing an output/script that requires a preimage and adding a preimage request field to the input, followed by a signer who knows the preimage adding a preimage field after verifying the secret. Finally, a compatible finalizer combines all signatures and preimages into a final scriptSig/witness stack. However, dealing with multiple possible satisfactions may complicate things, especially when the number of combinations is intractable. Another approach suggests using an easily-parsable subset of script, which includes and/or/threshold/pubkey/locktimes/hashlocks, instead of changing PSBT. The author hopes to publish more information soon.


Updated on: 2023-05-20T17:42:00.560682+00:00