Skip to content

Commit

Permalink
docs: Added info on signMessage (#1343).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 18, 2021
1 parent 79c5bf6 commit f9d0964
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs.wrm/api/signer.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ _property: signer.signMessage(message) => Promise<string<[RawSignature](signatur
This returns a Promise which resolves to the [[signature-raw]]
of //message//.

A signed message is prefixd with ``"\\x19Ethereum signed message:\\n"`` and
the length of the message, using the [hashMessage](utils-hashMessage)
method, so that it is [EIP-191](link-eip-191) compliant. If recovering
the address in Solidity, this prefix will be required to create a matching
hash.

Sub-classes **must** implement this, however they may throw if signing a
message is not supported, such as in a Contract-based Wallet or
Meta-Transaction-based Wallet.
Expand Down

0 comments on commit f9d0964

Please sign in to comment.