📦 Installation
|
🧪 Examples & Tests
|
📚 Documentation
|
🤝 Contributing
|
🛠️ Code Standards
|
⚡ Benchmarks
|
🤖 AI Usage
|
📝 License
|
👥 Maintainers
|
spv-wallet-go-client requires a supported release of Go.
go get -u github.com/bsv-blockchain/spv-walletBuild the binary:
go build -o spv-wallet cmd/*Run the binary:
./spv-wallet- API Reference – Dive into the godocs at pkg.go.dev/github.com/bsv-blockchain/spv-wallet
- Test Suite – Review both the unit tests and fuzz tests (powered by
testify) - SPV Wallet Docs - please refer to the SPV Wallet Documentation
Development Build Commands
Get the MAGE-X build tool for development:
go install github.com/mrz1836/mage-x/cmd/magex@latestView all build commands
magex helpMakefile Commands
View all makefile commands
make helpList of all current commands:
all Runs multiple commands
clean Remove previous builds and any cached data
clean-mods Remove all the Go mod cache
coverage Shows the test coverage
diff Show the git diff
generate Runs the go generate command in the base of the repo
godocs Sync the latest tag with GoDocs
help Show this help message
install Install the application
install-go Install the application (Using Native Go)
install-releaser Install the GoReleaser application
lint Run the golangci-lint application (install if not found)
release Full production release (creates release in GitHub)
release Runs common.release then runs godocs
release-snap Test the full release (build binaries)
release-test Full production test release (everything except deploy)
replace-version Replaces the version in HTML/JS (pre-deploy)
tag Generate a new tag and push (tag version=0.0.0)
tag-remove Remove a tag if found (tag-remove version=0.0.0)
tag-update Update an existing tag to current commit (tag-update version=0.0.0)
test Runs lint and ALL tests
test-ci Runs all tests via CI (exports coverage)
test-ci-no-race Runs all tests via CI (no race) (exports coverage)
test-ci-short Runs unit tests via CI (exports coverage)
test-no-lint Runs just tests
test-short Runs vet, lint and tests (excludes integration tests)
test-unit Runs tests and outputs coverage
uninstall Uninstall the application (and remove files)
update-linter Update the golangci-lint package (macOS only)
vet Run the Go vet application
Repository Features
This repository includes 25+ built-in features covering CI/CD, security, code quality, developer experience, and community tooling.
Library Deployment
This project uses goreleaser for streamlined binary and library deployment to GitHub. To get started, install it via:
brew install goreleaserThe release process is defined in the .goreleaser.yml configuration file.
Then create and push a new Git tag using:
magex version:bump push=true bump=patch branch=mainThis process ensures consistent, repeatable releases with properly versioned artifacts and citation metadata.
Pre-commit Hooks
Set up the Go-Pre-commit System to run the same formatting, linting, and tests defined in AGENTS.md before every commit:
go install github.com/mrz1836/go-pre-commit/cmd/go-pre-commit@latest
go-pre-commit installThe system is configured via modular env files in .github/env/ and provides 17x faster execution than traditional Python-based pre-commit hooks. See the complete documentation for details.
GitHub Workflows
All workflows are driven by modular configuration in .github/env/ — no YAML editing required.
Updating Dependencies
To update all dependencies (Go modules, linters, and related tools), run:
magex deps:updateThis command ensures all dependencies are brought up to date in a single step, including Go modules and any tools managed by MAGE-X. It is the recommended way to keep your development environment and CI in sync with the latest versions.
Usage & Configuration
Every configurable variable is described in config.example.yaml.
Default Configuration:
Running spv-wallet without configuration uses defaults from defaults.go:
- Cache: freecache
- Database: SQLite
- Paymail: enabled (signing disabled)
- BEEF: enabled
Config Variables
Default config variables can be overridden by (in order of priority):
- Flags (highest priority)
- Environment variables
- Config file (lowest priority)
-C, --config_file string custom config file path
-h, --help show help
-v, --version show version
-d, --dump_config dump config to file, specified by config_file (-C) flagGenerate config file with defaults:
go run ./cmd/main.go -dThe default config file path is the project root with filename config.yaml. Override with the -C flag:
go run ./cmd/main.go -C /my/config.jsonOverride any config variable using the SPVWALLET_ prefix with the mapstructure annotation path (use _ as delimiter, all uppercase).
Example: Given this fragment from config.example.yaml:
auth:
admin_key: xpub...
require_signing: false
scheme: xpubOverride admin_key with:
SPVWALLET_AUTH_ADMIN_KEY="your_admin_key"To use TAAL services, an API key is required.
Getting an API Key:
- Visit platform.taal.com
- Register or login to TAAL Platform
- Find your mainnet and testnet API keys on the dashboard
See the TAAL documentation for details.
Configuration: Add your key to config.example.yaml at nodes → apis → token
Docker Compose Quickstart
The start.sh script uses docker-compose.yml to start SPV Wallet with web-frontend, web-backend, and your choice of database and cache storage.
Manual Configuration (interactive prompts):
./start.shFlag-based Configuration:
./start.sh -db postgresql -c redis -sw true -b falseRun ./start.sh -h or ./start.sh --help to see all available options.
Load Previous Configuration:
./start.sh -lThis uses a previously created .env.config file.
| Port | Service |
|---|---|
| 3002 | SPV Wallet web-frontend |
| 8180 | SPV Wallet web-backend |
| 3003 | SPV Wallet (core service) |
| 3000 | SPV Wallet admin |
| 5432 | PostgreSQL DB |
| 6379 | Redis |
| 8080 | Block Headers Service |
| 80 | Paymail domain (HTTP) |
| 443 | Paymail domain (HTTPS) |
All unit tests and examples run via GitHub Actions and use Go version 1.24.x. View the configuration file.
Run all tests (fast):
magex testRun all tests with race detector (slower):
magex test:raceRun the Go benchmarks:
magex benchRead more about this Go project's code standards.
Read the AI Usage & Assistant Guidelines for details on how AI is used in this project and how to interact with AI assistants.
![]() |
![]() |
![]() |
|---|---|---|
| Siggi | Dylan | MrZ |
View the contributing guidelines and please follow the code of conduct.
All kinds of contributions are welcome 🙌! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬.


