radholm / kotlin-blockchain-crypto

My personal cryptocurrency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kotlin-blockchain-crypto

Description

Appendix

Demo

# Create Docker Image
$ docker build -t kotlin-blockchain-crypto .

# Start Container
$ docker run -d -p 4567:4567 -p 8778:8778 kotlin-blockchain-crypto
# Get current chain info
$ curl -s http://localhost:4567/chain
# Register a new transaction
$ curl -s http://localhost:4567/transactions/new -X POST -d '{"sender":"testSender","recipient":"testRecipient","amount":1}'
# Mining
$ curl -s http://localhost:4567/mine
# Register a new node
$ curl -s http://localhost:4567/nodes/register -X POST -d '{"url":"https://radholm.com"}'
# Consensus algorithm
$ curl -s http://localhost:4567/nodes/resolve

Environment

  • Docker version 18.03.0-ce, build 0520e24
  • Kotlin version 1.2.21-release-88 (JRE 1.8.0_73-b02)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

My personal cryptocurrency


Languages

Language:Kotlin 92.6%Language:Dockerfile 7.4%