Skip to main content

Class: StreamErc721Approval

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

Class: StreamErc721Approval

@moralisweb3/common-streams-utils.StreamErc721Approval

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

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): StreamErc721Approval

Create a new instance of StreamErc721Approval

Example

const evmNftApproval = StreamErc721Approval.create(data);

Parameters

NameTypeDescription
dataStreamErc721Approvalishthe StreamErc721Approvalish type

Returns

StreamErc721Approval

an instance of StreamErc721Approval


equals

Static equals(valueA, valueB): boolean

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

Example

 StreamErc721Approval.equals(valueA, valueB);

Parameters

NameTypeDescription
valueAStreamErc721Approvalishthe first StreamErc721Approvalish data to compare
valueBStreamErc721Approvalishthe second StreamErc721Approvalish data to compare

Returns

boolean

true if the values are equal, false otherwise


equals

equals(value): boolean

Compares an StreamErc721Approvalish data to this StreamErc721Approval instance.

Example

evmNftApproval.equals(value);

Parameters

NameTypeDescription
valueStreamErc721Approvalishthe value to compare

Returns

boolean

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

Implementation of

MoralisDataObject.equals


format

format(): StreamErc721ApprovalJSON

Deprecated

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

Returns

StreamErc721ApprovalJSON

Implementation of

MoralisDataObject.format


toJSON

toJSON(): StreamErc721ApprovalJSON

Converts the StreamErc721Approval instance to a JSON object.

Example

evmNftApproval.toJSON()

Returns

StreamErc721ApprovalJSON

JSON object of the StreamErc721Approval instance

Implementation of

MoralisDataObject.toJSON

Accessors

approved

get approved(): EvmAddress

Returns

EvmAddress


chain

get chain(): EvmChain

Returns

EvmChain


contract

get contract(): EvmAddress

Returns

EvmAddress


logIndex

get logIndex(): number

Returns

number


owner

get owner(): EvmAddress

Returns

EvmAddress


tokenContractType

get tokenContractType(): string

Returns

string


tokenId

get tokenId(): 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 StreamErc721Approval(data)

Parameters

NameType
dataStreamErc721ApprovalInput