Skip to main content

Class: StreamErc1155Approval

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

Class: StreamErc1155Approval

@moralisweb3/common-streams-utils.StreamErc1155Approval

The StreamErc1155Approval class is a representation of a nft approval (ERC1155) that is returned by the Moralis Stream API

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): StreamErc1155Approval

Create a new instance of StreamErc1155Approval

Example

const evmNftApproval = StreamErc1155Approval.create(data);

Parameters

NameTypeDescription
dataStreamErc1155Approvalishthe StreamErc1155Approvalish type

Returns

StreamErc1155Approval

an instance of StreamErc1155Approval


equals

Static equals(valueA, valueB): boolean

Compares two StreamErc1155Approval data. It checks a deep equality check of both values.

Example

 StreamErc1155Approval.equals(valueA, valueB);

Parameters

NameTypeDescription
valueAStreamErc1155Approvalishthe first StreamErc1155Approvalish data to compare
valueBStreamErc1155Approvalishthe second StreamErc1155Approvalish data to compare

Returns

boolean

true if the values are equal, false otherwise


equals

equals(value): boolean

Compares an StreamErc1155Approvalish data to this StreamErc1155Approval instance.

Example

evmNftApproval.equals(value);

Parameters

NameTypeDescription
valueStreamErc1155Approvalishthe value to compare

Returns

boolean

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

Implementation of

MoralisDataObject.equals


format

format(): StreamErc1155ApprovalJSON

Converts the StreamErc1155Approval instance to a JSON object.

Example

evmNftApproval.format()

Returns

StreamErc1155ApprovalJSON

JSON object of the StreamErc1155Approval instance

Implementation of

MoralisDataObject.format


toJSON

toJSON(): StreamErc1155ApprovalJSON

Converts the StreamErc1155Approval instance to a JSON object.

Example

evmNftApproval.toJSON()

Returns

StreamErc1155ApprovalJSON

JSON object of the StreamErc1155Approval instance

Implementation of

MoralisDataObject.toJSON

Accessors

account

get account(): EvmAddress

Returns

EvmAddress


approved

get approved(): boolean

Returns

boolean


chain

get chain(): EvmChain

Returns

EvmChain


contract

get contract(): EvmAddress

Returns

EvmAddress


logIndex

get logIndex(): number

Returns

number


operator

get operator(): EvmAddress

Returns

EvmAddress


tokenContractType

get tokenContractType(): string

Returns

string


tokenName

get tokenName(): string

Returns

string


tokenSymbol

get tokenSymbol(): string

Returns

string


transactionHash

get transactionHash(): string

Returns

string


triggers

get triggers(): undefined | StreamTriggerOutput[]

Returns

undefined | StreamTriggerOutput[]

Constructors

constructor

new StreamErc1155Approval(data)

Parameters

NameType
dataStreamErc1155ApprovalInput