Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/types/codec/index.ts>Enum

Package publishing for deno.land/x/polkadot
Go to Latest
class Enum
implements IEnum
import { Enum } from "https://deno.land/x/polkadot@0.2.37/types/codec/index.ts";

Constructors

new
Enum(
registry: Registry,
Types: Record<string, string | CodecClass> | Record<string, number> | string[],
value?: unknown,
index?: number,
unnamed 4?: DefinitionSetter<Definition>,
)

Properties

optional
createdAtHash: IU8a
readonly
defIndexes: number[]
readonly
defKeys: string[]
readonly
encodedLength: number
readonly
hash: IU8a
readonly
index: number
optional
initialU8aLength: number
readonly
inner: Codec
readonly
isBasic: boolean
readonly
isEmpty: boolean
readonly
isNone: boolean
optional
isStorageFallback: boolean
readonly
registry: Registry
readonly
type: string
readonly
value: Codec

Methods

protected
_toRawStruct(): string[] | Record<string, string | number>
eq(other?: unknown): boolean
inspect(): Inspect
toHex(): HexString
toHuman(isExtended?: boolean): AnyJson
toJSON(): AnyJson
toNumber(): number
toPrimitive(): AnyJson
toRawType(): string
toString(): string
toU8a(isBare?: boolean): Uint8Array

Static Methods

with(Types: Record<string, string | CodecClass> | Record<string, number> | string[]): EnumCodecClass<Enum>