CLI application for interacting with paymail service providers
- Installation
- Commands
- Documentation
- Examples & Tests
- Code Standards
- Usage
- Maintainers
- Contributing
- License
Install with brew
brew tap mrz1836/paymail-inspector && brew install paymail-inspector
paymail
Install using a compiled binary on Linux or Mac (Mac example)
curl -LkSs https://github.com/mrz1836/paymail-inspector/releases/download/v0.3.28/paymail-inspector_macOS_64-bit.tar.gz -o app.tar.gz
tar -zxf app.tar.gz && cd ./app/
./paymail
Install with go
go get github.com/mrz1836/paymail-inspector
cd /$GOPATH/src/github.com/mrz1836/paymail-inspector && make install
paymail
List all known brfc specifications (view example)
paymail brfc list
Generate a new
BRFC ID
for a new specification (view example)
paymail brfc generate --title "BRFC Specifications" --author "andy (nChain)" --version 1
Search all brfc specifications (id, title, author) (view example)
paymail brfc search nChain
Lists the available capabilities of the paymail service (view example)
paymail capabilities moneybutton.com
Starts a P2P payment request and returns (n) outputs of (
script
,satoshis
,address
) (view example)
paymail p2p [email protected]
Returns the
pubkey
,output script
,address
andprofile
for a given paymail address (view example)
paymail resolve [email protected]
Runs several validations on the paymail service for DNSSEC, SSL, SRV and required capabilities (view example)
paymail validate moneybutton.com
Verifies if a paymail is associated to a pubkey (view example)
paymail verify [email protected] 02ead23149a1e33df17325ec7a7ba9e0b20c674c57c630f527d69b866aa9b65b10
Searches all public paymail providers for a given handle (view example)
paymail whois mrz
Get started with the examples. View the generated golang godocs.
All the generated command documentation can be found in docs/commands.
This application was built using the official paymail specifications.
Additional paymail information can also be found via MoneyButton's documentation.
- Linux
- Mac
- Windows (coming soon)
Implemented BRFCs
- BRFC ID Assignment (assignment)
- Service Discovery (b2aa66e26b43)
- Public Key Infrastructure (pki) (0c4339ef99c2)
- Basic Address Resolution (759684b1a19a)
- Verify Public Key Owner (a9f510c16bde)
- PayTo Protocol Prefix (7bd25e5a1fc6)
- Public Profile (f12f968c92d6)
- P2P Payment Destination (2a40af698840)
- Sender Validation (6745385c3fc0)
- P2P Transactions (5f1323cddf31)
- Receiver Approvals (3d7c2ca83a46)
- Asset Information (1300361cb2d4)
- SFP Paymail Extension Build Action (189e32d93d28)
- SFP Paymail Extension Authorise Action (95dddb461bff)
- P2P Payment Destination with Tokens Support (f792b6eff07a)
- Merchant API (ce852c4c2cd1)
- JSON Envelope Specification (298e080a4598)
- Fee Specification (fb567267440a)
- MinerID (07f0786cdab6)
- MinerID Extension: FeeSpec (62b21572ca46)
- MinerID Extension: MinerParams (1b1d980b5b72)
- MinerID Extension: BlockInfo (a224052ad433)
- MinerID Extension: BlockBind (b8930c2bbf5d)
- SPV Channels API Specification (d534abdf761f)
Integrated Services
Custom Configuration
The configuration file should be located in your $HOME/paymail
folder and named config.yaml
.
View the example config file.
You can also specify a custom configuration file using --config "/folder/path/file.yaml"
Local Database (Cache)
The database is located in your $HOME/paymail
folder.
To clear the entire database:
paymail --flush-cache
Run commands ignoring local cache:
paymail whois mrz --no-cache
Package Dependencies
- badger for persistent database storage
- cobra and viper for an easy configuration & CLI application development
- color for colorful logs
- columnize for displaying terminal data in columns
- dns package for advanced DNS functionality
- go-homedir to find the home directory
- go-paymail for Paymail library support
- go-sanitize for sanitation and data formatting
- go-validate for domain/email/ip validations
- resty for custom HTTP client support
Application Deployment
goreleaser for easy binary deployment to GitHub and can be installed via: brew install goreleaser
.
The .goreleaser.yml file is used to configure goreleaser.
Use make release-snap
to create a snapshot version of the release, and finally make release
to ship to production.
The release can also be deployed to a homebrew
repository: homebrew-paymail-inspector.
Makefile Commands
View all makefile
commands
make help
List of all current commands:
all Runs multiple commands
build Build all binaries (darwin, linux, windows)
clean Remove previous builds and any test cache data
clean-mods Remove all the Go mod cache
coverage Shows the test coverage
darwin Build for Darwin (macOS amd64)
diff Show the git diff
gen-docs Generate documentation from all available commands (fresh install)
generate Runs the go generate command in the base of the repo
gif-render Render gifs in .github dir (find/replace text etc)
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)
linux Build for Linux (amd64)
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)
update-terminalizer Update the terminalizer application
vet Run the Go vet application
windows Build for Windows (amd64)
All unit tests and examples run via GitHub Actions and uses Go version 1.19.x. View the configuration file.
Run all tests (including integration tests)
make test
Read more about this Go project's code standards.
View all the examples and see the commands above
All the generated command documentation can be found in docs/commands.
MrZ | Satchmo |
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 💬. You can also support this project by becoming a sponsor on GitHub 👏 or by making a bitcoin donation to ensure this journey continues indefinitely! 🚀
Inspiration and code snippets from dnssec and check-ssl
Utilized terminalizer to record example gifs