Bitcoin Forum
May 04, 2024, 10:48:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Learn how to build you Bitcoin script interpreter in Javascript  (Read 2975 times)
mriou (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
August 12, 2014, 09:48:49 PM
 #1

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
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Saitteld
Newbie
*
Offline Offline

Activity: 36
Merit: 0


View Profile
August 13, 2014, 09:24:54 AM
 #2

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
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
August 14, 2014, 06:23:42 AM
 #3

Bitcore library (also in Javascript) also has an existing ScriptInterpreter.
Jags2ooo
Member
**
Offline Offline

Activity: 98
Merit: 10


View Profile
August 14, 2014, 11:43:32 AM
 #4

Good work though, thank you for sharing.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!