Author

Topic: Learn how to build you Bitcoin script interpreter in Javascript (Read 2993 times)

member
Activity: 98
Merit: 10
Good work though, thank you for sharing.
full member
Activity: 157
Merit: 100
Bitcore library (also in Javascript) also has an existing ScriptInterpreter.
newbie
Activity: 36
Merit: 0
Interesting! Maybe you could add the standard output script to one of your examples? https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29

There is a similar description of script in JavaScript here https://curiosity-driven.org/low-level-bitcoin#script and a simple interpreter here: https://curiosity-driven.org/bitcoin-contracts
newbie
Activity: 26
Merit: 0
I wrote this as a way to explain how Bitcoin scripts are evaluated. Javascript was chosen for as a language the interpreter as a lot of people can read it pretty easily. Thought it'd be useful for others here:

http://www.blockcypher.com/#!Build-a-Bitcoin-Script-Interpreter-in-Javascript/cw46/C1457639-6C3B-4625-942E-C5D93E3AF602
Jump to: