Module: utils/message

Members

(static, constant) MAGIC_STRING :String

Bitcoin signing magic string.

Type:
  • String
Default Value:
  • Bitcoin Signed Message:
Source:

Methods

(static) magicHash(message, prefixopt) → {Hash}

Hash message with magic string.

Parameters:
Name Type Attributes Default Description
message String
prefix String <optional>
message.MAGIC_STRING
Source:
Returns:
Type
Hash

(static) recover(msg, signature, prefixopt)

Recover raw public key from message and signature.

Parameters:
Name Type Attributes Default Description
msg String
signature Buffer
prefix String <optional>
MAGIC_STRING
Source:

(static) sign(msg, ring, prefixopt) → {Buffer}

Sign message with key.

Parameters:
Name Type Attributes Default Description
msg String
ring KeyRing
prefix String <optional>
message.MAGIC_STRING
Source:
Returns:
Type
Buffer