No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The code for the first chapter of the book : Blockchain by Example. this script creates an op_return output using bitcoinJs-lib as presented in the book.

instructions :

Firstly : send some bitcoins from a faucet website to n3CKupfRCJ6Bnmr78mw9eyeszUSkfyHcPy
Secondly : run node hello.js

P2SH or P2PKH :

you can use to determine online whether the transaction output is a P2SH or P2PKH

or by using

"outputs": [
      "value": 1253185750,
      "script": "76a914b9172e192d2805ea52fa975847eea0657e38fef888ac",
      "spent_by": "7f3773696c100f75637f2130713ed5b4e5a747f00fb2250e0334a89bafaa5284",
      "addresses": [
      "script_type": "pay-to-pubkey-hash"
      "value": 110000000,
      "script": "76a914edcce89f510bf95606ec6a79cb28a745c039e22088ac",
      "spent_by": "d3e300c2f2eedf673ab544f4c2b09063353e618ab8a0c9444e931d0145e43ded",
      "addresses": [
      "script_type": "pay-to-pubkey-hash"