Skip to main content

Class: StreamTrigger

moralis-monorepo / @moralisweb3/common-streams-utils / StreamTrigger

Class: StreamTrigger

@moralisweb3/common-streams-utils.StreamTrigger

The StreamTrigger class is a representation of a stream trigger that is used by the Moralis Stream API

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

arrayEquals

Static arrayEquals(valueA, valueB): boolean

Compares two StreamTrigger arrays. It checks a deep equality check of both values, meaning that all the values have to be on both arrays.

Example

 StreamTrigger.arrayEquals(valueA, valueB);

Parameters

NameTypeDescription
valueAStreamTriggerish[]the first StreamTriggerish[] data to compare
valueBStreamTriggerish[]the second StreamTriggerish[] data to compare

Returns

boolean

true if all values are equal, false otherwise


create

Static create(data): StreamTrigger

Parameters

NameType
dataStreamTriggerish

Returns

StreamTrigger


equals

Static equals(valueA, valueB): boolean

Parameters

NameType
valueAStreamTriggerish
valueBStreamTriggerish

Returns

boolean


equals

equals(value): boolean

Compares an StreamTrigger data to this StreamTrigger instance.

Example

streamTrigger.equals(value);

Parameters

NameTypeDescription
valueStreamTriggerishthe value to compare

Returns

boolean

true if the value is equal to the current instance, false otherwise

Implementation of

MoralisDataObject.equals


format

format(): StreamTriggerJSON

Deprecated

This method will be removed soon. To format the value, use one of the properties.

Returns

StreamTriggerJSON

Implementation of

MoralisDataObject.format


toJSON

toJSON(): StreamTriggerJSON

Converts the StreamTrigger instance to a JSON object.

Example

streamTrigger.toJSON()

Returns

StreamTriggerJSON

JSON object of the StreamTrigger instance

Implementation of

MoralisDataObject.toJSON

Accessors

callFrom

get callFrom(): undefined | StreamSelector | EvmAddress

Returns

undefined | StreamSelector | EvmAddress


contractAddress

get contractAddress(): StreamSelector | EvmAddress

Returns

StreamSelector | EvmAddress


functionAbi

get functionAbi(): unknown

Returns

unknown


inputs

get inputs(): undefined | (string | string[])[]

Returns

undefined | (string | string[])[]


topic0

get topic0(): undefined | string

Returns

undefined | string


type

get type(): "tx" | "log" | "erc20transfer" | "erc20approval" | "nfttransfer"

Returns

"tx" | "log" | "erc20transfer" | "erc20approval" | "nfttransfer"

Constructors

constructor

new StreamTrigger(data)

Parameters

NameType
dataStreamTriggerInput