Class: Message

Message(message) → {Message}

The Message type defines the Application Messaging Protocol, or AMP. Each Actor in the network receives and broadcasts messages, selectively disclosing new routes to peers which may have open circuits.

Constructor

new Message(message) → {Message}

The `Message` type is standardized in Fabric as a Array, which can be added to any other vector to compute a resulting state.
Parameters:
Name Type Description
message Object Message vector. Will be serialized by Array#_serialize.
Source:
Returns:
Instance of the message.
Type
Message

Methods

_setSigner(signer) → {Message}

Sets the signer for the message.
Parameters:
Name Type Description
signer Signer Signer instance.
Source:
Returns:
Instance of the Message with associated signer.
Type
Message

asRaw() → {Buffer}

Returns a Buffer of the complete message.
Source:
Returns:
Buffer of the encoded Message.
Type
Buffer

sign() → {Message}

Signs the message using the associated signer.
Source:
Returns:
Signed message.
Type
Message

verify() → {Boolean}

Verify a message's signature.
Source:
Returns:
`true` if the signature is valid, `false` if not.
Type
Boolean