- (optional) Install NVM:
https://nvm.sh
- Install Node 18.19.0 (use
nvm install 18.19.0
if usingnvm
)
- Meet the prerequisites (above)
- Install Fabric Core:
npm i -g @fabric/core
- Run
fabric setup
- Run
fabric chat
Note: for development releases, use npm i -g FabricLabs/fabric#develop
instead.
Create the file scripts/quickstart.js
using the following code:
const Bitcoin = require('@fabric/core/services/bitcoin');
async function main () {
const bitcoin = new Bitcoin({
verbosity: 3
});
await bitcoin.start();
}
main().catch((exception) => {
console.error('[QUICKSTART]', 'Quick Start failed:', exception);
});
Finally, run the program:
> node scripts/quickstart.js
[AUDIT] Generating new HD key for wallet...
[AUDIT] Wallet account: {
id: 'WLTTtuqaMtxMRiP33gLf1BN2js5HESWxHEhE',
wid: 1,
name: 'default',
network: 'main',
initialized: true,
witness: false,
watchOnly: false,
type: 'pubkeyhash',
m: 1,
n: 1,
accountIndex: 0,
receiveDepth: 1,
changeDepth: 1,
nestedDepth: 0,
lookahead: 10,
receiveAddress: '1CxaBhXMiyNPGZ2K2gNprxY6BnCnKVoEgW',
changeAddress: '1L3LYaPmHfUhLDtsjzw77bsqhzC5esx9qf',
nestedAddress: null,
accountKey: 'xpub6Cn1n6iWaPYRqoD4Ss9Sx4i2FLmdZ4ZSwb5NULg6DGCNXMVikaoRk3KFRihqRqLSPiNTDmVHgj7Ff1LMLidcveMf8kPHSX51CjBtZtCqiDU',
keys: []
}
For testing purposes, we recommend running bitcoin-qt
using the bash command with scripts/bitcoin-playnet.sh
. Follow these steps to get setup:
- Download the bitcoin-core client to your system.
- (Recommended) Download SHA256SUMS.sig and SHA256SUMS to verify hashes match, using these commands in the terminal:
$ cat SHA256SUMS # view the sha-256 file hashes $ sha256sum downloaded_file.name # compute hash of downloaded file
- (Recommended) Verify hashes with a Bitcoin Core Release Signing Key, keys to respective versions can be found here.
$ gpg --verify SHA256SUMS.sig SHA256SUMS # verify file is signed
- Continue with the bitcoin-core installation to your system.
- Check installation in terminal by running
bitcoind --version
orbitcoin-qt --version
. If the terminal outputs something likeBitcoin Core version vXX.X.X
then you are ready to run the scripts - Navigate your terminal window to the fabric directory and create a new directory named "bitcoin-playnet" inside "stores"
There should now be a directory path
$ cd stores && mkdir bitcoin-playnet
/fabric/stores/bitcoin-playnet
. Return to the parent directory of the repocd ..
, now you are ready to run the script - Run the playnet bash script with
A bitcoin client should now pop up
$ ./scripts/bitcoin-playnet.sh
- Create or restore a dev wallet (not to be used with real funds)
- (optional) view the debug log with this command in a new terminal window
$ tail -f stores/bitcoin-playnet/regtest/debug.log
You are now ready for playnet!