Need help with embedding a message in Tapscript spend

0 replies 429 views
coin_2013Member
Posts: 54 · Reputation: 198
#1Feb 7, 2024, 04:33 AM
I've got this script that does a great job creating a taproot address with Javascript. You can check it out here: https://gist.github.com/ChristianOConnor/fa07462990a74606f486f97031783e50. I added the private key and the inscription text right in the code. There's nothing in the wallet, so I'm not worried about security issues. The address generated by the script is tb1pzr0236kw9vnavfl6zjk4xvfsvptfwq2202newug2se5tsg2fmrhsa4hv7z. I've tested the Javascript code thoroughly, including spending an inscription output, and it works just fine. But when I tried to convert that script to C#, it didn't give me the right address. Check out the C# code here: https://gist.github.com/ChristianOConnor/2399a864f38666a2a3305b9ad7d374d1, which has the same private key and inscription string preloaded. Instead of the correct address, it spits out this one: tb1p90cf5jsmvv2cwu7wq2k60pewtpu5xvlfypxwjeag4aq9yhaccgks68fc8j. Can anyone help me fix this C# script so it generates the right address, which is tb1pzr0236kw9vnavfl6zjk4xvfsvptfwq2202newug2se5tsg2fmrhsa4hv7z? I won't be paying for this, but if you help me out, I’ll make the code open source and put it under the MIT license. Also, it’d be great if you could license your fix under MIT as well.
5 Reply Quote Share

Related topics