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

x/polkadot/types-codec/mod.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.17/types-codec/mod.ts";

Constructors

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

Properties

optional
createdAtHash: IU8a
readonly
defIndexes: number[]
readonly
defKeys: string[]
readonly
encodedLength: number
readonly
hash: IU8a
readonly
index: number
readonly
optional
initialU8aLength: number
readonly
inner: Codec
readonly
isBasic: boolean
readonly
isEmpty: boolean
readonly
isNone: 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>