Class: Event

rep.protos.Event(propertiesopt)

Represents an Event.

Constructor

new Event(propertiesopt)

Constructs a new Event.
Parameters:
Name Type Attributes Description
properties rep.protos.IEvent <optional>
Properties to set
Implements:
  • IEvent
Source:

Members

(static) Action :string

Action enum.
Type:
  • string
Properties:
Name Type Description
SUBSCRIBE_TOPIC number SUBSCRIBE_TOPIC value
TRANSACTION number TRANSACTION value
BLOCK_NEW number BLOCK_NEW value
BLOCK_ENDORSEMENT number BLOCK_ENDORSEMENT value
ENDORSEMENT number ENDORSEMENT value
MEMBER_UP number MEMBER_UP value
MEMBER_DOWN number MEMBER_DOWN value
CANDIDATOR number CANDIDATOR value
GENESIS_BLOCK number GENESIS_BLOCK value
BLOCK_SYNC number BLOCK_SYNC value
BLOCK_SYNC_DATA number BLOCK_SYNC_DATA value
BLOCK_SYNC_SUC number BLOCK_SYNC_SUC value
Source:

action :rep.protos.Event.Action

Event action.
Type:
Source:

blk :rep.protos.IBlock|null|undefined

Event blk.
Type:
Source:

from :string

Event from.
Type:
  • string
Source:

to :string

Event to.
Type:
  • string
Source:

Methods

(static) create(propertiesopt) → {rep.protos.Event}

Creates a new Event instance using the specified properties.
Parameters:
Name Type Attributes Description
properties rep.protos.IEvent <optional>
Properties to set
Source:
Returns:
Event instance
Type
rep.protos.Event

(static) decode(reader, lengthopt) → {rep.protos.Event}

Decodes an Event message from the specified reader or buffer.
Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array Reader or buffer to decode from
length number <optional>
Message length if known beforehand
Source:
Throws:
  • If the payload is not a reader or valid buffer
    Type
    Error
  • If required fields are missing
    Type
    $protobuf.util.ProtocolError
Returns:
Event
Type
rep.protos.Event

(static) decodeDelimited(reader) → {rep.protos.Event}

Decodes an Event message from the specified reader or buffer, length delimited.
Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array Reader or buffer to decode from
Source:
Throws:
  • If the payload is not a reader or valid buffer
    Type
    Error
  • If required fields are missing
    Type
    $protobuf.util.ProtocolError
Returns:
Event
Type
rep.protos.Event

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified Event message. Does not implicitly verify messages.
Parameters:
Name Type Attributes Description
message rep.protos.IEvent Event message or plain object to encode
writer $protobuf.Writer <optional>
Writer to encode to
Source:
Returns:
Writer
Type
$protobuf.Writer

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified Event message, length delimited. Does not implicitly verify messages.
Parameters:
Name Type Attributes Description
message rep.protos.IEvent Event message or plain object to encode
writer $protobuf.Writer <optional>
Writer to encode to
Source:
Returns:
Writer
Type
$protobuf.Writer

(static) fromObject(object) → {rep.protos.Event}

Creates an Event message from a plain object. Also converts values to their respective internal types.
Parameters:
Name Type Description
object Object.<string, *> Plain object
Source:
Returns:
Event
Type
rep.protos.Event

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from an Event message. Also converts values to other types if specified.
Parameters:
Name Type Attributes Description
message rep.protos.Event Event
options $protobuf.IConversionOptions <optional>
Conversion options
Source:
Returns:
Plain object
Type
Object.<string, *>

(static) verify(message) → {string|null}

Verifies an Event message.
Parameters:
Name Type Description
message Object.<string, *> Plain object to verify
Source:
Returns:
`null` if valid, otherwise the reason why it is not
Type
string | null

toJSON() → {Object.<string, *>}

Converts this Event to JSON.
Source:
Returns:
JSON object
Type
Object.<string, *>