A complete blockchain project written in Go
go mod vendor
go install ./cmd/...
tbb help
tbb run --datadir=~/.tbb
tbb run --datadir=~/.tbb --bootstrap=""
tbb wallet new-account --datadir=~/.tbb
curl -X GET http://localhost:8080/balances/list -H 'Content-Type: application/json'
curl --location --request POST 'http://localhost:8080/tx/add' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "0x22ba1f80452e6220c7cc6ea2d1e3eeddac5f694a",
"to": "0x6fdc0d8d15ae6b4ebf45c52fd2aafbcbb19a65c8",
"value": 100,
"pwd": "indeed-worried-action-wear"
}'
To local OS:
go install ./cmd/...
To cross-compile:
xgo --targets=linux/amd64 ./cmd/tbb
Run all tests with verbosity but one at a time, without timeout, to avoid ports collisions:
go test -v -p=1 -timeout=0 ./...
Note: Majority are integration tests and take time. Expect the test suite to finish in ~30 mins.