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
Name | Type | Description |
---|---|---|
valueA | StreamTriggerish [] | the first StreamTriggerish[] data to compare |
valueB | StreamTriggerish [] | the second StreamTriggerish[] data to compare |
Returns
boolean
true if all values are equal, false otherwise
create
▸ Static
create(data
): StreamTrigger
Parameters
Name | Type |
---|---|
data | StreamTriggerish |
Returns
equals
▸ Static
equals(valueA
, valueB
): boolean
Parameters
Name | Type |
---|---|
valueA | StreamTriggerish |
valueB | StreamTriggerish |
Returns
boolean
equals
▸ equals(value
): boolean
Compares an StreamTrigger data to this StreamTrigger instance.
Example
streamTrigger.equals(value);
Parameters
Name | Type | Description |
---|---|---|
value | StreamTriggerish | the 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
Implementation of
MoralisDataObject.format
toJSON
▸ toJSON(): StreamTriggerJSON
Converts the StreamTrigger instance to a JSON object.
Example
streamTrigger.toJSON()
Returns
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
Name | Type |
---|---|
data | StreamTriggerInput |