Skip to main content

GraphQlEvent

Namespace: IotaSdk

An event as returned by the GraphQL events query.

This is a faithful view of the GraphQL response, distinct from the chain Event. Three fields are optional, for two different reasons:

  • package_id, module and sender are absent for events emitted by the system or at genesis (e.g. the genesis validator 0x3::validator::StakingRequestEvents): on chain their sender is the zero address and their emitting module can't be resolved, both of which the GraphQL server reports as null.
  • timestamp is absent for events not yet included in a checkpoint (e.g. from a dry run or a just-executed transaction).

move_type, contents, data and json are always present (non-null in the GraphQL schema). Unlike the chain Event, this type is not BCS/JSON-serializable as a chain event.

public record class GraphQlEvent : System.IDisposable, System.IEquatable`1[[IotaSdk.GraphQlEvent, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inheritance ObjectGraphQlEvent
Implements IDisposable, IEquatable<GraphQlEvent>
Attributes NullableContextAttribute, NullableAttribute

Properties

PackageId

Package id of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events.

public ObjectId? PackageId { get; init; }

Property Value

ObjectId

Module

Module name of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events.

public string? Module { get; init; }

Property Value

String

Sender

Address of the account that sent the transaction where this event was emitted. None for system events.

public Address? Sender { get; init; }

Property Value

Address

MoveType

The type of the event emitted

public string MoveType { get; init; }

Property Value

String

Contents

BCS serialized bytes of the event

public Byte[] Contents { get; init; }

Property Value

Byte[]

Timestamp

UTC timestamp in milliseconds since epoch (1/1/1970)

public string? Timestamp { get; init; }

Property Value

String

Data

Structured contents of a Move value

public string Data { get; init; }

Property Value

String

Json

Representation of a Move value in JSON

public string Json { get; init; }

Property Value

String

Constructors

GraphQlEvent(ObjectId, String, Address, String, Byte[], String, String, String)

An event as returned by the GraphQL events query.

This is a faithful view of the GraphQL response, distinct from the chain Event. Three fields are optional, for two different reasons:

  • package_id, module and sender are absent for events emitted by the system or at genesis (e.g. the genesis validator 0x3::validator::StakingRequestEvents): on chain their sender is the zero address and their emitting module can't be resolved, both of which the GraphQL server reports as null.
  • timestamp is absent for events not yet included in a checkpoint (e.g. from a dry run or a just-executed transaction).

move_type, contents, data and json are always present (non-null in the GraphQL schema). Unlike the chain Event, this type is not BCS/JSON-serializable as a chain event.

public GraphQlEvent(ObjectId? PackageId, string? Module, Address? Sender, string MoveType, Byte[] Contents, string? Timestamp, string Data, string Json)

Parameters

PackageId ObjectId?
Package id of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events.

Module String?
Module name of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events.

Sender Address?
Address of the account that sent the transaction where this event was emitted. None for system events.

MoveType String
The type of the event emitted

Contents Byte[]
BCS serialized bytes of the event

Timestamp String?
UTC timestamp in milliseconds since epoch (1/1/1970)

Data String
Structured contents of a Move value

Json String
Representation of a Move value in JSON

Methods

Dispose()

public void Dispose()