Class EventsService

Hierarchy

  • EventsService

Constructors

Properties

httpRequest: BaseHttpRequest

Methods

  • Get events by creation number Event types are globally identifiable by an account address and monotonically increasing creation_number, one per event type emitted to the given account. This API returns events corresponding to that that event type.

    Returns

    VersionedEvent

    Throws

    ApiError

    Parameters

    • address: string

      Hex-encoded 32 byte Aptos account, with or without a 0x prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.

    • creationNumber: string

      Creation number corresponding to the event stream originating from the given account.

    • Optional start: string

      Starting sequence number of events.

      If unspecified, by default will retrieve the most recent events

    • Optional limit: number

      Max number of events to retrieve.

      If unspecified, defaults to default page size

    Returns CancelablePromise<VersionedEvent[]>

  • Get events by event handle This API uses the given account address, eventHandle, and fieldName to build a key that can globally identify an event types. It then uses this key to return events emitted to the given account matching that event type.

    Returns

    VersionedEvent

    Throws

    ApiError

    Parameters

    • address: string

      Hex-encoded 32 byte Aptos account, with or without a 0x prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.

    • eventHandle: string

      Name of struct to lookup event handle e.g. 0x1::account::Account

    • fieldName: string

      Name of field to lookup event handle e.g. withdraw_events

    • Optional start: string

      Starting sequence number of events.

      If unspecified, by default will retrieve the most recent

    • Optional limit: number

      Max number of events to retrieve.

      If unspecified, defaults to default page size

    Returns CancelablePromise<VersionedEvent[]>

Generated using TypeDoc