This project demonstrates how to interact with Bitcoin Core using RPC to create, analyze, and broadcast transactions between legacy (P2PKH) addresses. The scripts cover the complete workflow of creating transactions, examining their structure, and understanding Bitcoin's locking and unlocking mechanisms.
- Bitcoin Core installed and configured
- Python 3.6+
python-bitcoinrpclibrary
Regtest mode allows you to create a local Bitcoin blockchain for testing:
bitcoind -regtest -daemon -fallbackfee=0.0002Create a new wallet or use an existing one:
bitcoin-cli -regtest createwallet "mywallet"If already created wallet or use an existing one:
bitcoin-cli -regtest loadwallet "mywallet"Ensure your RPC credentials are set in the ~/.bitcoin/bitcoin.conf file.
Set
BITCOIN_CLI = "/home/yash-singh/bitcoin-25.0/bin/bitcoin-cli"in both python programs (prg1.py and prg2.py)
Run the Python scripts to interact with Bitcoin Core:
python prg1.py
python prg2.py- Shorya Kshettry - Roll No. - 230003070
- Yash Singh - Roll No. - 230051019
- Hardik Bansal - Roll No. - 230001031