Skip to content

guke1024/blockchain_first_try

Repository files navigation

This project has only been tested with go 1.17 and golang on Windows operating system.

Usage

Pull project

git clone https://github.com/guke1024/blockchain_first_try.git

Add required modules and build

First, you need to install btcd.

cd $GOPATH\pkg\mod\github.com
git clone https://github.com/btcsuite/btcd.git
go env -w GO111MODULE=on
go install -v . ./cmd/...

Second, you need to install bbolt.

go get go.etcd.io/bbolt/...

Finally, you need to initialize go mod.

cd blockchain_first_try
go mod init
go mod tidy
.\run.bat

Run

.\blockchain_first_try.exe [command]

Or you can use the following command to test quickly.

.\blockchain_first_try.exe transfer 1JLyj9EK6sEv2NpVFV74NvEmgakc2uqmUj 134cxCG8v3RXjfzQRfrQbfw9kKc8bcwh74 20 16f7nqgn2nxnQkcdGtfSBCr1rparBDMPdH wuhu~
.\blockchain_first_try.exe getBalance --address 1JLyj9EK6sEv2NpVFV74NvEmgakc2uqmUj
.\blockchain_first_try.exe getBalance --address 134cxCG8v3RXjfzQRfrQbfw9kKc8bcwh74
.\blockchain_first_try.exe getBalance --address 16f7nqgn2nxnQkcdGtfSBCr1rparBDMPdH

If you don't want to use this data, please delete the wallet.dat.

About

Blockchain with go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published