- Install golang 1.9 or higher
- Set $GOPATH and $GOROOT environment variables.
- Install Git, Python3 and Openssl
- Using PIP, install grpcio, grpcio-tools, setuptools with --upgrade flag.
- Install
brew install pkg-config && brew install zmq
- Install sawtooth go SDK
go get github.com/hyperledger/sawtooth-sdk-go
- Go to $GOPATH/src/github.com/hyperledger/sawtooth-sdk-go and run
go generate
- Copy $GOPATH/src/github.com/hyperledger/sawtooth-sdk-go/protobuf/events_pb2 to $GOPATH/src/protobuf/events_pb2
-
Calculate the TP prefix
-
To run, start the validator then type the following on the command line:
go run events_subcribe_client.go
Note: If you're using docker-compose file default IP is already set.
Otherwise, please set global environment variable as
VALIDATOR_URL="tcp://:4004"
Please following the instructions in the following Dockerfile
https://github.com/hyperledger/sawtooth-sdk-go/blob/master/Dockerfile