Skip to content

Commit 73276ae

Browse files
authored
Merge pull request #34 from Feyynt/patch-2
Update fix-commitment-tx.md
2 parents cb42bd1 + 91c7b18 commit 73276ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/fix-commitment-tx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Your funds may still be recovered following these steps:
116116

117117
10. **Variant A:** we assume your key is key A (in this example: "02948634a3000bd6b92c757f296928bfc5f26d8fc5eb9bd2d037b0c5e815cf43dd"). So we click on the "Add Unknown" button in PSBT-Toolkit (middle column under Input Functions), insert key A in the field Data, Input Index 0 and “cc” in the field Key (which is a custom key for `chantools` so it knows what key to look for).
118118
11. Now we add the public key and the signature of B. So click on “Add signature” in PSBT-Toolkit, insert Input Index 0, Public Key of B (in this example: "038a0fbe274e9fbeb9f091c37c008dfc372c51150c4af3b109a72b6d26e644784d") and signature of B (in this example: "3044022052aaf4d85600198e567cea40dacc248dc700ab9f0ef17235c71a534fb9202a37022045749ae4918ca89c0969a9cf7738f28286ef6c1386fb33105dab11e2b58ab3f501")
119-
12. PSBT-Toolkit currently has a little bug, we just need to fix the script. It's marked as "redeem script" (0x04) in the PSBT but we actually want a "witness script" (0x05). So we just convert the obtained string from Base64 to Hex, look for the "04" in the string (2 bytes before the actual script starts, so you can just need to search for the witness script we obtained in line three of step 5) and change it to "05". Then convert everything back to Hex.
119+
12. PSBT-Toolkit currently has a little bug, we just need to fix the script. It's marked as "redeem script" (0x04) in the PSBT but we actually want a "witness script" (0x05). So we just convert the obtained string from Base64 to Hex, look for the "04" in the string (2 bytes before the actual script starts, so you can just search for the witness script we obtained in line three of step 5) and change it to "05". Then convert everything back to Base64.
120120
There are a lot of free tools online for string conversion. Otherwise you can use the following simple commands.
121121
For Base64 to Hex:
122122
`echo "<base64>" | base64 -d | xxd -p -c999`.

0 commit comments

Comments
 (0)