Compiler for Bitcoin Transaction Scripts

in #cryptocurrency8 years ago

txsc is a young project with the goal of making it easier to write Bitcoin transaction scripts.

Rather recently I started working on txsc (transaction script compiler). With it, you can write the scripts that are present in Bitcoin (and other cryptocurrency) transactions without manually writing opcodes.

What?

It's easiest to understand with an example. Here is a script in the language that Bitcoin nodes understand:

2 3 OP_ADD

Here is the equivalent script in the language created for txsc:

2 + 3;

Not very impressive, right? It gets better as you go for more complex stuff. A common script in Bitcoin transactions is the Pay-to-Public-Key-Hash script, which I've made an example for here.

Features

See the documentation on TxScript, the language I'm making for txsc. In addition to that, here is some stuff I have working (mostly) on my machine but haven't pushed to Github:

  • Support for defining functions.
  • Conditional statements.

I'm not sure how many developers in the cryptocurrency field have arrived here. But I haven't really talked in depth about txsc publicly until now, so I figure it's fine material for my first post. :)