Skip to main content

Class: AptosStream

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

Class: AptosStream

@moralisweb3/common-streams-utils.AptosStream

The AptosStream class is a representation of an Aptos Stream that is returned by the Moralis Stream API

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): AptosStream

Create a new instance of AptosStream

Example

const aptosStream = AptosStream.create(data);

Parameters

NameTypeDescription
dataAptosStreamishthe AptosStreamish type

Returns

AptosStream

an instance of AptosStream


equals

Static equals(valueA, valueB): boolean

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

Example

 AptosStream.equals(valueA, valueB);

Parameters

NameTypeDescription
valueAAptosStreamishthe first AptosStreamish data to compare
valueBAptosStreamishthe second AptosStreamish data to compare

Returns

boolean

true if the values are equal, false otherwise


equals

equals(value): boolean

Compares an AptosStreamish data to this AptosStream instance.

Example

aptosStream.equals(value);

Parameters

NameTypeDescription
valueAptosStreamishthe value to compare

Returns

boolean

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

Implementation of

MoralisDataObject.equals


format

format(): AptosStreamJSON

Converts the AptosStream instance to a JSON object.

Example

aptosStream.format()

Returns

AptosStreamJSON

JSON object of the AptosStream instance

Implementation of

MoralisDataObject.format


toJSON

toJSON(): AptosStreamJSON

Converts the AptosStream instance to a JSON object.

Example

aptosStream.toJSON()

Returns

AptosStreamJSON

JSON object of the AptosStream instance

Implementation of

MoralisDataObject.toJSON

Accessors

allAddresses

get allAddresses(): boolean

Returns

boolean


amountOfAddresses

get amountOfAddresses(): number

Returns

number


demo

get demo(): boolean

Returns

boolean


description

get description(): string

Returns

string


events

get events(): string[]

Returns

string[]


functions

get functions(): string[]

Returns

string[]


id

get id(): string

Returns

string


includeChanges

get includeChanges(): boolean

Returns

boolean


includeEvents

get includeEvents(): boolean

Returns

boolean


includePayload

get includePayload(): boolean

Returns

boolean


isErrorSince

get isErrorSince(): null | string

Returns

null | string


network

get network(): AptosNetwork[]

Returns

AptosNetwork[]


status

get status(): StreamStatus

Returns

StreamStatus


statusMessage

get statusMessage(): string

Returns

string


tag

get tag(): string

Returns

string


webhookUrl

get webhookUrl(): string

Returns

string

Constructors

constructor

new AptosStream(data)

Parameters

NameType
dataAptosStreamInput