Hey folks, I posted about this a bit ago and thought it’d be easy... but boy was I wrong. Trying to make a Bitcoin inscription in C#. The libraries out there do it for Javascript and some others, but I can't find any for C#. I’ve got a script that’s close, but I keep hitting a signature error.
And yeah, I get it, inscriptions are kinda controversial, but I'm just trying to build an app with this.
Issues with Bitcoin Inscription Using C#
6 replies 227 views
Since you just need to include a SHA-256 hash, you should use OP_RETURN. I haven't checked, but you’d think there’s a C# library for creating Bitcoin TX with OP_RETURN by now. It’s been around long enough.
I know about OP_RETURN, but it won't work for my project. My app needs the string to be read with an ordinal envelope. Instead of "Hello world!", I'll use the SHA256 hash. I’m using an ordinal block explorer and giving the envelope an identifier "ord" so the hash shows up there for my app to read.
But this isn’t an ordinal in the usual sense, just FYI.
Look, the Bitcoin blockchain isn’t a data storage solution. It’s a payment system, and stuffing it with data is kinda abusive. Even if it’s just a tiny bit of info. You really should just use OP_RETURN or consider altcoins made for storing data.
Have you checked if your functions for creating transactions work with other types? Like, is it just the TapScript code messing things up?
Yeah, I actually have a more complex version for the script. It creates the inscription address, I send some BTC to it, then the script uses that UTXO. The JS script works great, but the C# one throws a signature error when I try to spend from the newly created address path.
Spending along the address keypath works in C#, but not along the script keypath. Comparing the outputs from both scripts, something's off.
And a regular block explorer can show OP_RETURN data.
If your app gets popular, it might affect Bitcoin users. I’m also curious why you didn’t just go with an email or phone number if your app’s centralized.