This is based on a blog post written by my good friend Kendrick Tan.
The original post used Haskell (which I am a fan of), but I am nevertheless most comfortable with Javascript. A lot of blog posts about tiny blockchains in Javascript used ES2015 classes and I wanted to see if we could simply use Flow types instead.
- Clone the repo.
- Run
yarn
(ornpm install
) to install dependencies. - Build the project (to strip the types) using
yarn build
ornpm run build
. - Require the library inside the generated
lib/lib.js
.