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

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

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

Constructors

new
Compact(
registry: Registry,
Type: CodecClass<T> | string,
value?: Compact<T> | AnyNumber,
unnamed 3?: DefinitionSetter<CodecClass<T>>,
)

Type Parameters

T extends INumber

Properties

optional
createdAtHash: IU8a
readonly
encodedLength: number
readonly
hash: IU8a
optional
initialU8aLength: number
readonly
isEmpty: boolean
optional
isStorageFallback: boolean
readonly
registry: Registry

Methods

bitLength(): number
eq(other?: unknown): boolean
inspect(): Inspect
toBigInt(): bigint
toBn(): BN
toHex(isLe?: boolean): HexString
toHuman(isExtended?: boolean): AnyJson
toJSON(): AnyJson
toNumber(): number
toPrimitive(): string | number
toRawType(): string
toString(): string
toU8a(_isBare?: boolean): Uint8Array

Static Methods

with<O extends INumber>(Type: CodecClass<O> | string): CodecClass<Compact<O>>