kendricktan / misocoin
- четверг, 7 декабря 2017 г. в 03:15:28
Barebones bitcoin-like protocol implemented in Python 3.6
Misocoin
Misocoin is a barebones bitcoin-like protocol implemented in Python 3.x. It was written as a challenge for myself to see if I could implement a bitcoin clone from scratch.
This project doesn't follow the full bitcoin-protocol, but rather implements a barebones version that (with enough nodes) can still act as a trust-less third party for storing and ensuring the integrity of arbitrary data.
WARNING: Misocoin is not production ready and should only be used as an educational tool.
git clone git@github.com:kendricktan/misocoin.git
cd misocoin && pip install -r requirements.txt
# To start it on localhost:4000 with a random private key
./misocoind.py
** [Welcome] Your misocoin address is 610d2657b8c4df8da493bbe0671e7406d2bee7a6
* Running on http://localhost:4000/ (Press CTRL+C to quit)
# To start it on localhost:4001 with a specific private key
# ./misocoind.py -host=localhost -port=4001 -priv_key=60c8cb60c21143fffdd682f399ef3baa4b67c56a1f83a274284cfe7c57e007ed
./misocoin-cli.py get_info
./misocoin-cli.py get_block <block_number>
./misocoin-cli.py get_balance
./misocoin-cli.py send_misocoin <to_address> <amount>
# To specify which host and port the daemon is located at
# ./misocoin-cli.py -host=<localhost> -port=<4000> [methods [args..]]
./misocoind.py -nodes=host1:port1,host2:port2
. E.g:./misocoind.py -port=4001
./misocoind.py -port=4002 -nodes=localhost:4001
Miso is my cat. You can find out about him more on his instagram page.
I made it to understand more about bitcoin. Jks. I made it for Miso's birthday (15 December). I love my cat.
Sure