kefkius avatar

Compiler for Bitcoin Transaction Scripts

kefkius

Published: 25 May 2016 › Updated: 25 May 2016Compiler for Bitcoin Transaction Scripts

Compiler for Bitcoin Transaction Scripts

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. :)

Leave Compiler for Bitcoin Transaction Scripts to:

Written by

Developer in cryptocurrency. Also in college, which really puts a damper on my coding.

Read more # posts


Best Posts From kefkius

We have not curated any of kefkius's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From kefkius