Bitcoin
Last updated
Last updated
This guide will walk you through the process of setting up a Bitcoin regtest network and Fulcrum Electrum server.
the library bitcoin-core.js
uses local bitcoin and electrum node for testing.
Bitcoin Core
Fulcrum (latest version)
Basic knowledge of command-line operations
Learn about (Bitcoin Regtest)[https://developer.bitcoin.org/examples/testing.html]
Download and install Bitcoin Core from the official website: https://bitcoincore.org/en/download/
Create a directory for your regtest data:
Create a configuration file for Bitcoin Core:
Add the following lines to the configuration file:
Save and close the file.
Start Bitcoin Core in regtest mode:
Create a new internal regtest wallet
These are some common commands for the cli:
Download and compile Fulcrum from the official repository: https://github.com/cculianu/Fulcrum
Follow the compilation instructions in the Fulcrum README.
Create a configuration file for Fulcrum:
Add the following lines to the configuration file:
Adjust the paths and credentials as needed.
Start Fulcrum:
Ensure Bitcoin Core is running in regtest mode.
Ensure Fulcrum is running and connected to your Bitcoin Core regtest node.
Use a compatible wallet (e.g., Electrum) to connect to your Fulcrum server (usually at 127.0.0.1:50001).
You should now have a working Bitcoin regtest network with Fulcrum as Electrum server.
Remember to stop both Bitcoin Core and Fulcrum when you're done testing:
This setup allows you to experiment with Bitcoin transactions and smart contracts in a controlled environment without using real Bitcoin or connecting to the main network.