Skip to content

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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy