Polkadot JS APIGlobals"generic/Event"Event

# Class: Event <S, T, V, E>

name Event

description A representation of a system event. These are generated via the [[Metadata]] interfaces and specific to a specific Substrate runtime

# Type parameters

S: TypesDef

T: object

V: object

E: object

# Hierarchy

Struct

Event

# Implements

# Index

# Constructors

# Properties

# Accessors

# Methods

# Constructors

# constructor

+ new Event(registry: Registry, _value?: Uint8Array): Event

Overrides Struct.constructor

Defined in packages/types/src/generic/Event.ts:72

Parameters:

Name Type
registry Registry
_value? Uint8Array

Returns: Event

# Properties

# Readonly registry

registry: Registry

Implementation of Codec.registry

Inherited from Struct.registry

Defined in packages/types/src/codec/Struct.ts:112

# Accessors

# Type

get Type(): E

Inherited from Struct.Type

Defined in packages/types/src/codec/Struct.ts:175

description Returns the Type description to sthe structure

Returns: E


# data

get data(): EventData

Defined in packages/types/src/generic/Event.ts:107

description The wrapped EventData

Returns: EventData


# defKeys

get defKeys(): string[]

Inherited from Struct.defKeys

Defined in packages/types/src/codec/Struct.ts:153

description The available keys for this enum

Returns: string[]


# encodedLength

get encodedLength(): number

Inherited from Struct.encodedLength

Defined in packages/types/src/codec/Struct.ts:189

description The length of the value when encoded as a Uint8Array

Returns: number


# hash

get hash(): H256

Inherited from Struct.hash

Defined in packages/types/src/codec/Struct.ts:200

description returns a hash of the contents

Returns: H256


# index

get index(): EventId

Defined in packages/types/src/generic/Event.ts:114

description The EventId, identifying the raw event

Returns: EventId


# isEmpty

get isEmpty(): boolean

Inherited from Struct.isEmpty

Defined in packages/types/src/codec/Struct.ts:160

description Checks if the value is an empty value

Returns: boolean


# meta

get meta(): EventMetadataLatest

Defined in packages/types/src/generic/Event.ts:121

description The [[EventMetadata]] with the documentation

Returns: EventMetadataLatest


# method

get method(): string

Defined in packages/types/src/generic/Event.ts:128

description The method string identifying the event

Returns: string


# section

get section(): string

Defined in packages/types/src/generic/Event.ts:135

description The section string identifying the event

Returns: string


# typeDef

get typeDef(): TypeDef[]

Defined in packages/types/src/generic/Event.ts:142

description The [[TypeDef]] for the event

Returns: TypeDef[]

# Methods

# eq

eq(other?: unknown): boolean

Implementation of Codec

Inherited from Struct.eq

Defined in packages/types/src/codec/Struct.ts:207

description Compares the value of the input to see if there is a match

Parameters:

Name Type
other? unknown

Returns: boolean


# get

get(name: keyof S): Codec | undefined

Inherited from Struct.get

Overrides CodecMap.get

Defined in packages/types/src/codec/Struct.ts:215

description Returns a specific names entry in the structure

Parameters:

Name Type Description
name keyof S The name of the entry to retrieve

Returns: Codec | undefined


# getAtIndex

getAtIndex(index: number): Codec

Inherited from Struct.getAtIndex

Defined in packages/types/src/codec/Struct.ts:222

description Returns the values of a member at a specific index (Rather use get(name) for performance)

Parameters:

Name Type
index number

Returns: Codec


# toArray

toArray(): Codec[]

Inherited from Struct.toArray

Defined in packages/types/src/codec/Struct.ts:229

description Converts the Object to an standard JavaScript Array

Returns: Codec[]


# toHex

toHex(): string

Inherited from Struct.toHex

Defined in packages/types/src/codec/Struct.ts:236

description Returns a hex string representation of the value

Returns: string


# toHuman

toHuman(isExpanded?: undefined | false | true): AnyJson

Implementation of Codec

Overrides Struct.toHuman

Defined in packages/types/src/generic/Event.ts:150

description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information

Parameters:

Name Type
isExpanded? undefined | false | true

Returns: AnyJson


# toJSON

toJSON(): AnyJson

Implementation of Codec

Inherited from Struct.toJSON

Defined in packages/types/src/codec/Struct.ts:256

description Converts the Object to JSON, typically used for RPC transfers

Returns: AnyJson


# toRawType

toRawType(): string

Implementation of Codec

Inherited from Struct.toRawType

Defined in packages/types/src/codec/Struct.ts:280

description Returns the base runtime type name for this instance

Returns: string


# toString

toString(): string

Implementation of Codec

Inherited from Struct.toString

Defined in packages/types/src/codec/Struct.ts:289

description Returns the string representation of the value

Returns: string


# toU8a

toU8a(isBare?: BareOpts): Uint8Array

Implementation of Codec

Inherited from Struct.toU8a

Defined in packages/types/src/codec/Struct.ts:297

description Encodes the value as a Uint8Array as per the SCALE specifications

Parameters:

Name Type Description
isBare? BareOpts true when the value has none of the type-specific prefixes (internal)

Returns: Uint8Array


# Static typesToMap

typesToMap(registry: Registry, Types: Record‹string, Constructor›): Record‹string, string›

Inherited from Struct.typesToMap

Defined in packages/types/src/codec/Struct.ts:269

Parameters:

Name Type
registry Registry
Types Record‹string, Constructor

Returns: Record‹string, string›


# Static with

with<S>(Types: S, jsonMap?: Map‹keyof S, string›): ConstructorStruct‹S››

Inherited from Struct.with

Defined in packages/types/src/codec/Struct.ts:129

Type parameters:

S: TypesDef

Parameters:

Name Type
Types S
jsonMap? Map‹keyof S, string›

Returns: ConstructorStruct‹S››