Class: EvmStreamResult
moralis-monorepo / @moralisweb3/common-streams-utils / EvmStreamResult
Class: EvmStreamResult
@moralisweb3/common-streams-utils.EvmStreamResult
The EvmStreamResult class is representation of the webhook data that is returned from the Stream api
Implements
MoralisDataObject
Table of contents
Methods
Accessors
- abi
- abiInterface
- block
- chain
- confirmed
- decodedLogs
- erc20Approvals
- erc20Transfers
- logs
- nativeBalances
- nftApprovals
- nftTransfers
- ntfTokenApprovals
- retries
- streamId
- tag
- txs
- txsInternal
Constructors
Methods
create
▸ Static create(data): EvmStreamResult
Create a new instance of EvmStreamResult
Example
const evmStreamResult = EvmStreamResult.create(data);
Parameters
| Name | Type | Description |
|---|---|---|
data | EvmStreamResultish | the EvmStreamResultish type |
Returns
an instance of EvmStreamResult
equals
▸ Static equals(valueA, valueB): boolean
Compares two EvmStreamResult data. It checks a deep equality check of both values.
Example
EvmStreamResult.equals(valueA, valueB);
Parameters
| Name | Type | Description |
|---|---|---|
valueA | EvmStreamResultish | the first EvmStreamResultish data to compare |
valueB | EvmStreamResultish | the second EvmStreamResultish data to compare |
Returns
boolean
true if the values are equal, false otherwise
equals
▸ equals(value): boolean
Compares an EvmStreamResultish data to this EvmStreamResult instance.
Example
evmStreamResult.equals(value);
Parameters
| Name | Type | Description |
|---|---|---|
value | EvmStreamResultish | the value to compare |
Returns
boolean
true if the value is equal to the current instance, false otherwise
Implementation of
MoralisDataObject.equals
format
▸ format(): Object
Deprecated
This method will be removed soon. To format the value, use one of the properties.
Returns
Object
| Name | Type |
|---|---|
abi | EvmAbi |
block | {} |
chain | string |
confirmed | boolean |
erc20Approvals | StreamErc20ApprovalJSON[] |
erc20Transfers | StreamErc20TransferJSON[] |
logs | StreamEvmTransactionLogJSON[] |
nativeBalances | StreamNativeBalanceJSON[] |
nftApprovals | { ERC1155: StreamErc1155ApprovalJSON[] ; ERC721: StreamErc721ApprovalJSON[] } |
nftApprovals.ERC1155 | StreamErc1155ApprovalJSON[] |
nftApprovals.ERC721 | StreamErc721ApprovalJSON[] |
nftTransfers | StreamEvmNftTransferJSON[] |
ntfTokenApprovals | MoralisDataObjectValue[] |
retries | number |
streamId | string |
tag | string |
txs | StreamEvmTransactionJSON[] |
txsInternal | StreamEvmInternalTransactionJSON[] |
Implementation of
MoralisDataObject.format
toJSON
▸ toJSON(): Object
Converts the EvmStreamResult instance to a JSON object.
Example
evmStreamResult.toJSON()
Returns
Object
JSON object of the EvmStreamResult instance
| Name | Type |
|---|---|
abi | EvmAbi |
block | {} |
chain | string |
confirmed | boolean |
erc20Approvals | StreamErc20ApprovalJSON[] |
erc20Transfers | StreamErc20TransferJSON[] |
logs | StreamEvmTransactionLogJSON[] |
nativeBalances | StreamNativeBalanceJSON[] |
nftApprovals | { ERC1155: StreamErc1155ApprovalJSON[] ; ERC721: StreamErc721ApprovalJSON[] } |
nftApprovals.ERC1155 | StreamErc1155ApprovalJSON[] |
nftApprovals.ERC721 | StreamErc721ApprovalJSON[] |
nftTransfers | StreamEvmNftTransferJSON[] |
ntfTokenApprovals | MoralisDataObjectValue[] |
retries | number |
streamId | string |
tag | string |
txs | StreamEvmTransactionJSON[] |
txsInternal | StreamEvmInternalTransactionJSON[] |
Implementation of
MoralisDataObject.toJSON
Accessors
abi
• get abi(): EvmAbi
Returns
abiInterface
• get abiInterface(): null | Interface
Returns
null | Interface
block
• get block(): EvmSimpleBlock
Returns
EvmSimpleBlock
chain
• get chain(): EvmChain
Returns
EvmChain
confirmed
• get confirmed(): boolean
Returns
boolean
decodedLogs
• get decodedLogs(): LogDescription[]
Returns
LogDescription[]
erc20Approvals
• get erc20Approvals(): StreamErc20Approval[]
Returns
erc20Transfers
• get erc20Transfers(): StreamErc20Transfer[]
Returns
logs
• get logs(): StreamEvmTransactionLog[]
Returns
nativeBalances
• get nativeBalances(): StreamNativeBalance[]
Returns
StreamNativeBalance[]
nftApprovals
• get nftApprovals(): Object
Deprecated
Use ntfTokenApprovals instead. This property will be removed in the future.
Returns
Object
| Name | Type |
|---|---|
ERC1155 | StreamErc1155Approval[] |
ERC721 | StreamErc721Approval[] |
nftTransfers
• get nftTransfers(): StreamEvmNftTransfer[]
Returns
ntfTokenApprovals
• get ntfTokenApprovals(): StreamEvmNftTokenApproval[]
Returns
retries
• get retries(): number
Returns
number
streamId
• get streamId(): string
Returns
string
tag
• get tag(): string
Returns
string
txs
• get txs(): StreamEvmTransaction[]
Returns
txsInternal
• get txsInternal(): StreamEvmInternalTransaction[]
Returns
StreamEvmInternalTransaction[]
Constructors
constructor
• new EvmStreamResult(data)
Parameters
| Name | Type |
|---|---|
data | IWebhook |