Welcome to IITIChain, a simple blockchain implementation written in TypeScript/Node.js. This was my first blockchain project, built to understand the core concepts of decentralized ledgers, mining, transactions, and wallets.
- Simple blockchain structure with linked blocks
- Basic Proof-of-Work (PoW) mining mechanism
- Simulated wallets with RSA public/private keys
- Secure transaction signing
- Mining rewards for block creation
- Chain validation to detect tampering
IITIBlock/
├── node_modules/ # Installed dependencies
├── index.ts # Main TypeScript source code
├── index.js # Compiled JavaScript output
├── package.json # Project metadata and dependencies
├── package-lock.json # Exact dependency versions
├── tsconfig.json # TypeScript configuration
└── .gitignore # Files ignored by Git- Wallets: Everyone has a wallet with a public and private key.
- Transactions: You send "money" by creating a transaction signed with your private key.
- Transaction Pool: Transactions wait in a pool before being recorded.
- Mining: A miner collects transactions and tries different numbers until they find a valid block hash (this is Proof-of-Work).
- Blockchain: Blocks are added to a chain, secured by cryptographic hashes.
git clone https://github.com/dadhichmohak/IITIBlock.git
cd IITIBlocknpm installnpx tscnode index.jsconst wallet1 = new Wallet(); // user1
const wallet2 = new Wallet(); // user2
const wallet3 = new Wallet(); // user3
wallet1.sendMoney(50, wallet2.publicKey);
wallet2.sendMoney(23, wallet3.publicKey);
wallet3.sendMoney(5, wallet2.publicKey);
IITIChain.instance.mineTransactions(wallet1.publicKey);Output: A new block is mined, rewards are distributed, and the blockchain is updated.
- The structure and flow of blockchain networks
- Public key cryptography for signing transactions
- Proof-of-Work mining mechanics
- Block validation and linking via hashes
- How transactions are bundled into blocks
- Track wallet balances
- Verify digital signatures before accepting transactions
- Add a simple frontend to view the blockchain
- Simulate peer-to-peer networks or nodes
- Add transaction history lookup
