A lightweight Go tool for generating admin key pairs for Bitcoin SV (SPV-Wallet) applications.
CI / CD Β Β
|
|
Β Β Β Β Quality Β Β
|
|
Security Β Β
|
|
Β Β Β Β Community Β Β
|
|
π¦Β Installation
|
π§ͺΒ ExamplesΒ &Β Tests
|
πΒ Documentation
|
π€Β Contributing
|
π οΈΒ CodeΒ Standards
|
β‘Β Benchmarks
|
π€Β AIΒ Usage
|
πΒ License
|
π₯Β Maintainers
|
spv-wallet-admin-keygen requires a supported release of Go.
go get -u github.com/bsv-blockchain/spv-wallet-admin-keygen- SPV Wallet Guide β For in-depth information and guidance, refer to the SPV Wallet Documentation
Usage
Generate admin key pairs by running:
go run main.goThis creates two files:
- xpub_key.txt β Contains the public key
- xprv_key.txt β Contains the private key
- Build the binary:
CGO_ENABLED=0 go build -ldflags="-s -w" -v -o /generator- Run the script:
./keygen.shUse -h to see available options:
./keygen.sh -hdocker build --build-arg build_in_docker=true -t spv-wallet-admin-keygen:local .To print the keys without storing them in Kubernetes:
docker run spv-wallet-admin-keygen:local --print --no-k8sTo store keys in a Kubernetes secret, mount your kubeconfig file:
docker run -v ./my-kubeconfig:/kubeconfig -e KUBECONFIG=/kubeconfig spv-wallet-admin-keygen:localBy default, the secret name is spv-wallet-keys. Change it using the -s or --secret flag:
docker run -v ./my-kubeconfig:/kubeconfig -e KUBECONFIG=/kubeconfig spv-wallet-admin-keygen:local --secret my-secret-nameOr use the SECRET_NAME environment variable:
docker run -v ./my-kubeconfig:/kubeconfig -e KUBECONFIG=/kubeconfig -e SECRET_NAME=my-secret-name spv-wallet-admin-keygen:localBy default, key names are admin_xpub and admin_xpriv. Change them using --xpub-key and --xprv-key:
docker run -v ./my-kubeconfig:/kubeconfig -e KUBECONFIG=/kubeconfig spv-wallet-admin-keygen:local --xpub-key my-xpub-key --xprv-key my-xpriv-keyOr use environment variables:
docker run -v ./my-kubeconfig:/kubeconfig -e KUBECONFIG=/kubeconfig -e XPUB_KEY_NAME=my-xpub-key -e XPRV_KEY_NAME=my-xpriv-key spv-wallet-admin-keygen:localDevelopment Build Commands
Get the MAGE-X build tool for development:
go install github.com/mrz1836/mage-x/cmd/magex@latestView all build commands
magex helpRepository 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 environment files 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.
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 π¬.


