The Bitcoin.JS wrapper project for
coinblesk-frontend
The Bitcoin.JS library does currently (v3.1.1) not fully support the Bitcoin BIP-65 OP_CHECKLOCKTIMEVERIFY
. To approach that and to separate the building process of the Bitcoin.JS library from the actual Coinblesk project, this Bitcoin.JS wrapper was created.
To support updates in an easy manner, there are two scripts provided.
There are two folders available: /src
and /dist
. The source folder contains two complete Bitcoin.JS scripts. One should be the original script (src/bitcoinjs.original.js
and the other one is a copy of it, which was then modified to approach BIP-65. This allows for an easy comparison between the files. When there is an update, you can easily move the necessary code.
-
Update the Bitcoin.JS version in the
package.json
and runyarn install
-
Run the following script:
bash script.load-and-combine.sh
-
This script replaces both the
bitcoinjs.original.js
and thebitcoinjs.modified.js
files in/src
with the newest version of Bitcoin.JS -
Modify the
bitcoinjs.modified.js
to approach the changes of BIP-65. -
Run the following script:
bash script.release.sh
-
This script creates a minified version of the
bitcoinjs.modified.js
in the/dist
folder. -
Push those changes to GitHub
-
Make sure, that
coinblesk-frontend
takes the newest version of this dependency (there are no versions, but only a link to GitHub). It's probably the easiest to just delete this folder in thenode_modules
ofcoinblesk-frontend
– or maybe even the fullnode_modules
folder. A simpleyarn install
won't be enough.