package
0.43.0
Repository: https://github.com/cornbase/common-lib.git
Documentation: pkg.go.dev

# Functions

All returns every possible recovery flag, taken from https://github.com/btclib-org/btclib/blob/v2022.7.20/btclib/ecc/bms.py#L83.
Compressed returns all compressed recovery flags.
CreateMagicMessage builds a properly signed message.
CreateMagicMessageBIP322 builds a properly signed message (in BIP-322 format).
ElectrumP2SHAndP2WPKH returns all P2SH-P2WPKH recovery flags related to Electrum.
ElectrumP2WPKH returns all P2WPKH recovery flags related to Electrum.
GetKeyID returns the Key ID for a specified recovery flag Taken from https://github.com/btclib-org/btclib/blob/v2023.7.12/btclib/ecc/bms.py#L302.
ParsePublicKey parses a public key from a hex string.
ParseSignature is a convenience function to parse a signature from a hex or base64 string.
No description provided by the author
Based on https://github.com/BitonicNL/verify-signed-message/blob/main/internal/generic/verify.go.
SHA256 returns the SHA256 hash of the input data.
ShouldBeCompressed returns if a recovery flag signals a compressed key Taken from https://github.com/btclib-org/btclib/blob/v2023.7.12/btclib/ecc/bms.py#L305.
Trezor returns all recovery flags related to Trezor.
TrezorP2SHAndP2WPKH returns all P2SH-P2WPKH recovery flags related to Trezor.
TrezorP2WPKH returns all P2WPKH recovery flags related to Trezor.
Uncompressed returns all uncompressed recovery flags.

# Constants

Signed message via BIP-322 are prepended with this bip322Tag Taken from https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki#full.
No description provided by the author
Signed message are prepended with this magicMessage Taken from https://bitcoin.stackexchange.com/a/77325.