A naive blockchain implementation highly inspired by the projects in build-your-own-x. It was a sandbox for getting more familiar with UTXO-based blockchains and Effect smol.
pnpm installcd packages/ledger
pnpm devcd packages/explorer
pnpm devThe explorer will be available at http://localhost:4200
To test sending transactions, you first need a wallet and some coins from mining.
From the packages/wallet directory:
pnpm cli generate-walletThis will output a new address and private key. You can store the keys in the keys/ folder (gitignored).
Set your wallet address as the miner address in packages/ledger/.env.development:
LEDGER_SHOULD_MINE=true
LEDGER_MINER_ADDRESS=<your-generated-address>Run the ledger node. It will start mining blocks and your address will receive coinbase rewards.
Once you have a balance, you can send transactions using the CLI:
pnpm cli send --to <recipient-address> --amount <amount> --private-key <your-private-key>You can check your balance with:
pnpm cli balance --address <your-address>