AiBitcoin

A small, clear blockchain with AI‑assisted checks

AiBitcoin is a learning‑friendly prototype. It favors readable Python, straightforward scripts, and honest documentation over buzzwords. If you want to understand the moving parts—and tinker with AI hooks for fraud/anomaly detection—this is for you.

MIT Licensed • Python • Works on macOS, Linux, and Windows

Terminal snippet showing how to set up the project
# Quick demo
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

# Generate wallet keys
python scripts/generate_keys.py

# Start a local node
python scripts/deploy_node.py

# Create a transaction (example)
# from src.wallet.transactions import create_transaction
# tx = create_transaction(sender, recipient, amount, private_key)

Why AiBitcoin?

Approachable by design

Clear folder structure, small modules, and comments that explain trade‑offs. You should feel comfortable reading the code and changing it.

Honest scope

Not a production coin. It’s a teaching project that shows the pieces of a chain plus optional AI checks for anomalies.

Extendable

Swap consensus, try different difficulty targets, or plug in your own model. The modules are intentionally decoupled.

What’s inside

Decentralized ledger

A tamper‑evident chain with a simple consensus loop that’s easy to trace.

AI‑assisted security

Hooks for anomaly/fraud detection so you can experiment with model‑based alerts.

Fast local flow

Lightweight scripts for key generation, node startup, and test transactions.

Readable Python

Small functions, descriptive names, and docstrings where you need them most.

Modular architecture

Separate modules for chain, wallet, networking, and scripts to help you focus.

MIT Licensed

Fork it, learn from it, and ship your own ideas.

Getting started

  1. Clone the repo: git clone https://github.com/balajibenhur/AiBitcoin.git
  2. Change directory: cd AiBitcoin
  3. Install dependencies: pip install -r requirements.txt
  4. Generate wallet keys: python scripts/generate_keys.py
  5. Start a node: python scripts/deploy_node.py

Project layout

scripts/        # helper scripts (keys, node deploy)
src/            # core blockchain, wallet, networking modules
tests/          # unit tests
README.md       # documentation
requirements.txt

What this is

  • A concise codebase to read, run, and modify.
  • A safe place to try AI‑assisted checks without heavy infrastructure.
  • A starting point for coursework, demos, or side projects.

What this isn’t

  • Not a production chain or investment vehicle.
  • Not audited. Use at your own risk and for learning purposes.
  • Not a guarantee of performance on unknown environments.

“I wanted a project I could read in a weekend and extend the next week. AiBitcoin hit that balance—small, honest, and hackable.”

Frequently asked questions

Is this a real cryptocurrency?
No. It’s an educational prototype. You can mine blocks and create transactions locally, but it’s not intended for real economies.
Where do the “AI” parts show up?
There are hooks for model‑based checks (e.g., anomaly or fraud detection). You can wire in your own models to experiment.
Can I use this in a class?
Yes. The code is deliberately compact and MIT‑licensed. Please credit the project and share improvements back if you can.
Will there be a roadmap?
Short term: docs, better tests, and optional REST endpoints. Longer term: alternative consensus modules and richer AI examples.