Skip to content
/ naivechain Public

implementation of a simple block chain for learning.

Notifications You must be signed in to change notification settings

tkc/naivechain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

naivechain

a simple Blockchain inspired by https://github.com/kofj/naivechain

Implementation of a simple block chain for learning.

Run First Node

go run main.go 

Run Second Node

go run main.go -api :3002 -p2p :6002 -peers ws://localhost:6001

Show blocks

$ curl http://localhost:3001/blocks

Mine block

$ curl -H "Content-type:application/json" --data '{"data" : "Some data to the first block"}' http://localhost:3001/mine_block

Add peer

$ curl -H "Content-type:application/json" --data '{"peer" : "ws://localhost:6002"}' http://localhost:3001/add_peer

Query peers

$ curl http://localhost:3001/peers

About

implementation of a simple block chain for learning.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages