verify-signed-message

module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: ISC

README

Bitcoin Signed Message Verifier

Latest tag Go Version GoDoc Tests status Go report License

A simple Golang package with a single purpose, to verify messages signed via Bitcoin message signing (BMS).

Requirements

  • Golang 1.25+

Installation

Your $PATH must contain the Go path and the Go bin path (see GoLang's getting started for more information).

Once done, you can install this package:

go get -u github.com/bitonicnl/verify-signed-message

Usage

For examples, checkout the example folder.

Support

This library tries to support as many signatures as possible, as long as they properly follow specifications.

Generic / BIP-0137

This specification is considered legacy signing in BIP-322.

Supported
  • Any wallet that does signing like Electrum, example:
    • Electrum: P2PKH, P2WPKH and P2SH-P2WPKH
    • Coinomi: P2PKH, P2WPKH and P2SH-P2WPKH
    • Samourai: P2PKH, P2WPKH and P2SH-P2WPKH
    • Mycelium: P2PKH, P2WPKH and P2SH-P2WPKH
  • Any wallet that allows for legacy address signatures (P2PKH), example:
    • Bitcoin Core
  • Any wallet that follows BIP 137, example:
    • Trezor: P2PKH, P2WPKH and P2SH-P2WPKH
  • Taproot (P2TR)
    • The verification is using the internal key, so only addresses without a tapscript are allowed.
Not supported
  • Pay-to-Witness-Script-Hash (P2WSH)
BIP-322
Supported
Not supported
UniSat

The UniSat wallet used to not follow established standards for signing messages when using non-taproot addresses. Specifically, it used to set incorrect recovery flags, resulting in signatures that are seen as invalid by Electrum, Bitcoin Core, Trezor, etc.

This seems to have been resolved in recent versions of Unisat. Not sure if they resolved it or one of their dependencies resolved it, but in our latest tests it worked as expected. If you run into issues, make sure you are using the latest version and generate new signatures.

Development

This package is developed in-house and pushed from our internal repository to GitHub.

Contributing

Contributions, issues and feature requests are welcome.

License

Copyright © 2020-2026 Bitonic. This project is ISC licensed.

Directories

Path Synopsis
Package internal holds all the relevant tools to actually build and validate signed message.
Package internal holds all the relevant tools to actually build and validate signed message.
bip322
Package bip322 holds all the relevant tools to actually build and validate signed message via BIP-322.
Package bip322 holds all the relevant tools to actually build and validate signed message via BIP-322.
generic
Package generic holds all the relevant tools to actually build and validate signed message made by older signed message implementations.
Package generic holds all the relevant tools to actually build and validate signed message made by older signed message implementations.
Package verifier implements utility routines for verifying signed message via Bitcoin message signing (BMS).
Package verifier implements utility routines for verifying signed message via Bitcoin message signing (BMS).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL