Constructor
new SignedMessage(options)
Parameters:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Properties:
Name | Type | Description |
---|---|---|
classType |
string | base class type used for reflection |
signature |
Signature | the signature for this message |
- Source:
Members
from
Properties:
Name | Type | Description |
---|---|---|
from |
Buffer | the calculate from based on the message hash and signature |
- Source:
Methods
_recoverAddress() → {Buffer}
_recoverAddress - recovers the ethereum address form the signature and message hash
- Source:
Returns:
- 20 byte Buffer representing the ethereum address
- Type
- Buffer
getHash()
getHash - child classes must override implementation
- Source:
isSigned() → {bool}
isSigned
- Source:
Returns:
- Type
- bool
sign(privateKey)
sign - signs the message with the private key and sets the signature property
Parameters:
Name | Type | Description |
---|---|---|
privateKey |
Buffer |
- Source: