Pezkuwi API
    Preparing search index...

    Class Compact<T>

    Compact

    A compact length-encoding codec wrapper. It performs the same function as Length, however differs in that it uses a variable number of bytes to do the actual encoding. This is mostly used by other types to add length-prefixed encoding, or in the case of wrapped types, taking a number and making the compact representation thereof

    Type Parameters

    • T extends INumber

    Implements

    • ICompact<T>
    Index
    • Type Parameters

      • T extends INumber

      Parameters

      • registry: Registry
      • Type: string | CodecClass<T, any[]>
      • value: Compact<T> | AnyNumber = 0
      • __namedParameters: DefinitionSetter<CodecClass<T, any[]>> = {}

      Returns Compact<T>

    createdAtHash?: IU8a

    The block at which this value was retrieved/created (set to non-empty when retrieved from storage)

    initialU8aLength?: number

    The length of the initial encoded value (Only available when the value was constructed from a Uint8Array input)

    isStorageFallback?: boolean

    (internal usage) Indicates that the value was created via a fallback. This is used when with data specified in the metadata when the storage entry is empty.

    With metadata fallback values (available as defaults on most storage entries) any empty storage item should erturn the default. (This is the same as the implementation on the Bizinikiwi runtime)

    registry: Registry

    The registry associated with this object

    • Parameters

      • Optionalother: unknown

      Returns boolean

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

    • Parameters

      • OptionalisLe: boolean

      Returns `0x${string}`

      Returns a hex string representation of the value. isLe returns a LE (number-only) representation

    • Parameters

      • OptionalisExtended: boolean
      • OptionaldisableAscii: boolean

      Returns AnyJson

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

    • Parameters

      • OptionaldisableAscii: boolean

      Returns string | number

      Converts the value in a best-fit primitive form

    • Parameters

      • Optional_isBare: boolean

      Returns Uint8Array

      Encodes the value as a Uint8Array as per the SCALE specifications