Skip to content

Rufaim/Simple-golang-blockchain-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Blockchain example

This is the simplest blockchain example possible. it implements only a chain of blocks with data. And does not include any of high order concepts like mining of chain verification.

How to use it

1) First, download the repository

git clone https://github.com/Rufaim/Simple-golang-blockchain-example.git

OR

go get github.com/Rufaim/Simple-golang-blockchain-example

2) Second, run a server

go run . config.json

Message Server is on http://localhost:8080 should appear is console for default config.

3) Then open visualization interface at http://localhost:8080. interface

Direct API requests are also supported.
To add block use

curl -X POST http://localhost:8080/bc -d '{"data":"some_data"}'

To get all blocks use

curl -X GET http://localhost:8080/bc

Please note that a block added via API request is visible on visualization interface after page update.

About

Simple blockchain implementation and visualization interface

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published