Skip to main content
Module

x/polkadot/mod.ts>typesCodec.Compact

Package publishing for deno.land/x/polkadot
Go to Latest
class typesCodec.Compact
implements ICompact<T>
import { typesCodec } from "https://deno.land/x/polkadot@0.2.40/mod.ts";
const { Compact } = typesCodec;

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>>