btcs

bitcoin script parser/evaluator/compiler/decompiler
git clone git://jb55.com/btcs
Log | Files | Refs | README | LICENSE

commit 3df3d4c9143608440ea329b21b81988a9c8ae573
parent 5b531b1c26d67d468fcc6c72b3cedc5453221eac
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 22 Oct 2017 01:27:02 -0700

readme

Diffstat:
M.gitignore | 1+
MMakefile | 2+-
AREADME.md | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore @@ -4,3 +4,4 @@ /oplookup.c /lex.yy.c /bcs +/btcs diff --git a/Makefile b/Makefile @@ -6,7 +6,7 @@ FORBIN=script.o parser.tab.c lex.yy.c oplookup.o DEPS=oplookup.h script.h misc.h Makefile PREFIX ?= /usr/local -BIN=bcs +BIN=btcs all: $(BIN) diff --git a/README.md b/README.md @@ -0,0 +1,52 @@ + +# btcs + + bitcoin script toolbox + +## Motivation + + I wanted a better way to hack on Bitcoin scripts + +## TODOs + +- [ ] Script evaluator +- [ ] Script compiler +- [ ] Script decompiler + +## Usage + + Just started this project. You can already tokenize BIP examples though! + +``` +./btcs <<EOS + +IF + <now + 3 months> CHECKLOCKTIMEVERIFY DROP + <Lenny's pubkey> CHECKSIGVERIFY + 1 +ELSE + 2 +ENDIF +<Alice's pubkey> <Bob's pubkey> 2 CHECKMULTISIG + +EOS +``` + +spits out + +``` +IF +ex:<now + 3 months> +CHECKLOCKTIMEVERIFY +DROP +ex:<Lenny's pubkey> +CHECKSIGVERIFY +1 +ELSE +2 +ENDIF +ex:<Alice's pubkey> +ex:<Bob's pubkey> +2 +CHECKMULTISIG +```