Skip to main content

Module message

Module message 

Source
Expand description

Signing and verification of arbitrary messages.

Messages are signed with a BIP-340 Schnorr signature over a SHA256 hash of the message bytes:

digest = SHA256( "bark/message" || message )

The hash is prefixed with a constant string to prevent collisions with other signatures.

A message can be verified either against a public key directly, or against an Ark Address.

Functionsยง

sign
Sign an arbitrary message with the given keypair
verify
Verify a message signature created by sign against the given public key
verify_for_address
Verify a message signature created by sign against the user public key of the given Address