2017-08-26 20:17:57 -05:00
|
|
|
# Blockchain in Go
|
|
|
|
|
|
|
|
A blockchain implementation in Go, as described in these articles:
|
|
|
|
|
|
|
|
1. [Basic Prototype](https://jeiwan.cc/posts/building-blockchain-in-go-part-1/)
|
|
|
|
2. [Proof-of-Work](https://jeiwan.cc/posts/building-blockchain-in-go-part-2/)
|
2017-09-19 04:44:23 -05:00
|
|
|
3. [Persistence and CLI](https://jeiwan.cc/posts/building-blockchain-in-go-part-3/)
|
|
|
|
4. [Transactions 1](https://jeiwan.cc/posts/building-blockchain-in-go-part-4/)
|
|
|
|
5. [Addresses](https://jeiwan.cc/posts/building-blockchain-in-go-part-5/)
|
|
|
|
6. [Transactions 2](https://jeiwan.cc/posts/building-blockchain-in-go-part-6/)
|
2017-10-06 05:32:52 -05:00
|
|
|
7. [Network](https://jeiwan.cc/posts/building-blockchain-in-go-part-7/)
|
2017-10-21 21:23:40 -05:00
|
|
|
|
|
|
|
# Quick Start
|
|
|
|
|
|
|
|
## Download and install
|
|
|
|
|
|
|
|
go get github.com/richardweiyang/blockchain_go
|
|
|
|
|
|
|
|
## Create file `main.go`
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "github.com/richardweiyang/blockchain_go"
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
cli := bc.CLI{}
|
|
|
|
cli.Run()
|
|
|
|
}
|
|
|
|
```
|
|
|
|
#### Build and run
|
|
|
|
|
|
|
|
go build main.go
|
|
|
|
./main
|
|
|
|
|