Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/harveynw/blokechain

Subset of the bitcoin protocol in Golang
https://github.com/harveynw/blokechain

Last synced: about 1 month ago
JSON representation

Subset of the bitcoin protocol in Golang

Awesome Lists containing this project

README

        

# Blokechain

A from-scratch zero dependency* implementation of various parts of the Bitcoin protocol, using the original whitepaper and guides online. Goal is to have a fully functioning wallet and node some time in the future™. Purely educational and not to be trusted in prod.

## internal/script

A fully functioning Bitcoin script interpreter. Can execute P2PK, P2PKH, P2MS, P2SH transactions and anything else allowed by the spec (https://en.bitcoin.it/wiki/Script), except for Locktime opcodes which are still TODO.

## internal/cryptography

This implements secp256k1 ECDSA as well as handling signatures, keypairs and hashing. The clever stuff here is really a port of Andrej Karpathy's excellent blog post: [A from-scratch tour of Bitcoin in Python](http://karpathy.github.io/2021/06/21/blockchain/).

Had to include the /x/crypto module* as RIPEMD160 is not in the stdlib.


## internal/chain

These are data structures representing blocks, transactions and merkle trees used in the protocol.

## internal/miner

Block mining functionality.

## internal/wallet

Keypair management and serialisation.