Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/harveynw/blokechain
- Owner: harveynw
- Created: 2021-08-10T21:19:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-14T19:38:37.000Z (about 2 years ago)
- Last Synced: 2024-08-01T08:17:38.322Z (4 months ago)
- Language: Go
- Homepage:
- Size: 4.32 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - harveynw/blokechain - Subset of the bitcoin protocol in Golang (Go)
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/chainThese are data structures representing blocks, transactions and merkle trees used in the protocol.
## internal/miner
Block mining functionality.
## internal/wallet
Keypair management and serialisation.