Skip to content

Latest commit

 

History

History
40 lines (36 loc) · 1.02 KB

README.md

File metadata and controls

40 lines (36 loc) · 1.02 KB

Wolfsrudel

Wolfsrudel Proof of Work Implementation of IdaMurni Blockchain
run Blockchain:
target dir blockchain_server http://0.0.0.0:5000

go run *go

available BlockchainServer API

func (bcs *BlockchainServer) Run() {
	bcs.GetBlockchain().Run()
	http.HandleFunc("/", bcs.GetChain)
	http.HandleFunc("/transactions", bcs.Transactions)
	http.HandleFunc("/mine", bcs.Mine)
	http.HandleFunc("/mine/start", bcs.StartMine)
	http.HandleFunc("/amount", bcs.Amount)
	http.HandleFunc("/consensus", bcs.Consensus)
	log.Fatal(http.ListenAndServe("0.0.0.0:"+strconv.Itoa(int(bcs.Port())), nil))
}

run Wallet:
target dir wallet_server http://0.0.0.0:8080

go run *go

available wallet API:

func (ws *WalletServer) Run() {
	http.HandleFunc("/", ws.Index)
	http.HandleFunc("/wallet", ws.Wallet)
	http.HandleFunc("/wallet/amount", ws.WalletAmount)
	http.HandleFunc("/transaction", ws.CreateTransaction)
	log.Fatal(http.ListenAndServe("0.0.0.0:"+strconv.Itoa(int(ws.Port())), nil))
}