Prerequisite
https://read.cash/@leiden/setup-local-bchslp-infrastructure-in-3-command-572fae58
Getting start
1. Clone the example repository
git clone https://github.com/ActorForth/bch-js-example.git && cd bch-js-example
npm install
This repository is necessary for regtest address compatibility.
2. Created wallet
cd applications
node ./slp/create-wallet/create-wallet.js
You will get 2 files call wallet-info-regtest-pat.json
wallet-info-regtest-pat.txt
3. Funding
cd bch-toolkit
Generate Bitcoin cash from mining 100 blocks. Coinbase will be in the node generated wallet.
./bitcoin-cli generate 100
Send coin from node generated wallet to the wallet you just created (you can find the address in wallet-info-regtest-pat.json
)
./bitcoin-cli sendtoaddress bchreg:qpupt7sp5lurvuzp5dlygth3fx7pqpq05c5kz5s7x5 100
Mine another 100 blocks to mature the coin base (https://coinguides.org/immature-confirmed-cleared/)
./bitcoin-cli generate 100
Now you have a funded wallet ready to develop a decentralized financial application.
What's next?
Waiting for the next post
Resource
Demo video:
Repository: https://github.com/ActorForth/bch-js-example
Get help: https://gitter.im/ActorForth/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link
I'm cold and hungry.
bitcoincash:qz9uty8gnwce4hwz5vtlpasd4k5hc99q8c4lrd9dc3