4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

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

6 upvotes $0.02

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: