Btw, I know that creating Bitcoin inscriptions or anything that could be considered similar to an ordinal or BRC-20 is somewhat controversial but that's not the goal here. I want to create an inscription to build an app that requires a TINY AMOUNT of "hard" storage stored in the form of an inscription. It's SUPER TINY (literally the size of a sha-256 hash) and not going to clog up Bitcoin but I just can't find anyone that can help me fix the bug in my script. Does anyone know how to make by C# script work like my Javascript script does?
Since you only want to include output of SHA-256 hash (which have size 256-bit or 32-byte), you better use OP_RETURN. I didn't do any research, but i expect there should be C# library which let you create Bitcoin TX with OP_RETURN support since OP_RETURN has been around for 10+ years.
I already know about OP_RETURN, but unfortunately I can't use it for this project. The app requires the string to be read with the ordinal envelope aka:
OP_FALSE
OP_IF
OP_PUSH "ord"
OP_PUSH 1
OP_PUSH "text/plain;charset=utf-8"
OP_PUSH 0
OP_PUSH "Hello, world!"
OP_ENDIF
But obviously instead of "Hello world!", it will be the SHA256 hash. I'm taking advantage of an ordinal block explorer to by giving the envelope the ordinal identifier "ord" so the SHA256 hash is picked up on the ordinal block explorer where my app can read the hash.
Even though I am using the ordinal envelope and using an ordinal block explorer to read the data, this is not an ordinal in a traditional sense. Every user on my app will write 1 ordinal as a registering function for my app. It will not clog up the bitcoin blockchain and will not spam the bitcoin network. Gas fees will not go up because of my app, don't worry.
So does anybody know how to fix my C# script so it works like my Javascript script does?