Polkadot JS APIGlobals"codec/U8aFixed"U8aFixed

# Class: U8aFixed

name U8aFixed

description A U8a that manages a a sequence of bytes up to the specified bitLength. Not meant to be used directly, rather is should be subclassed with the specific lengths.

# Hierarchy

Raw

U8aFixed

AccountId

CallIndex

Vote

# Implements

# Indexable

  • [ index: number]: number

name U8aFixed

description A U8a that manages a a sequence of bytes up to the specified bitLength. Not meant to be used directly, rather is should be subclassed with the specific lengths.

# Index

# Constructors

# Properties

# Accessors

# Methods

# Constructors

# constructor

+ new U8aFixed(registry: Registry, value: AnyU8a, bitLength: BitLength): U8aFixed

Overrides Raw.constructor

Defined in packages/types/src/codec/U8aFixed.ts:44

Parameters:

Name Type Default
registry Registry -
value AnyU8a new Uint8Array()
bitLength BitLength 256

Returns: U8aFixed

# Properties

# Readonly registry

registry: Registry

Implementation of IU8a.registry

Inherited from Raw.registry

Defined in packages/types/src/codec/Raw.ts:30

# Accessors

# encodedLength

get encodedLength(): number

Inherited from Raw.encodedLength

Defined in packages/types/src/codec/Raw.ts:41

description The length of the value when encoded as a Uint8Array

Returns: number


# hash

get hash(): H256

Inherited from Raw.hash

Defined in packages/types/src/codec/Raw.ts:48

description returns a hash of the contents

Returns: H256


# isEmpty

get isEmpty(): boolean

Inherited from Raw.isEmpty

Defined in packages/types/src/codec/Raw.ts:55

description Returns true if the type wraps an empty/default all-0 value

Returns: boolean


# length

get length(): number

Inherited from Raw.length

Overrides IU8a.length

Defined in packages/types/src/codec/Raw.ts:62

description The length of the value

Returns: number

# Methods

# bitLength

bitLength(): number

Implementation of IU8a

Inherited from Raw.bitLength

Defined in packages/types/src/codec/Raw.ts:70

description Returns the number of bits in the value

Returns: number


# eq

eq(other?: unknown): boolean

Implementation of IU8a

Inherited from Raw.eq

Defined in packages/types/src/codec/Raw.ts:77

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

Parameters:

Name Type
other? unknown

Returns: boolean


# subarray

subarray(begin: number, end?: undefined | number): Uint8Array

Inherited from Raw.subarray

Overrides IU8a.subarray

Defined in packages/types/src/codec/Raw.ts:91

description Create a new subarray from the actual buffer. This is needed for compat reasons since a new Uint8Array gets returned here

Parameters:

Name Type Description
begin number The position to start at
end? undefined | number The position to end at

Returns: Uint8Array


# toHex

toHex(): string

Inherited from Raw.toHex

Defined in packages/types/src/codec/Raw.ts:98

description Returns a hex string representation of the value

Returns: string


# toHuman

toHuman(): AnyJson

Inherited from Raw.toHuman

Defined in packages/types/src/codec/Raw.ts:105

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

Returns: AnyJson


# toJSON

toJSON(): string

Implementation of IU8a

Inherited from Raw.toJSON

Defined in packages/types/src/codec/Raw.ts:112

description Converts the Object to JSON, typically used for RPC transfers

Returns: string


# toRawType

toRawType(): string

Implementation of IU8a

Overrides Raw.toRawType

Defined in packages/types/src/codec/U8aFixed.ts:64

description Returns the base runtime type name for this instance

Returns: string


# toString

toString(): string

Implementation of IU8a

Inherited from Raw.toString

Overrides IU8a.toString

Defined in packages/types/src/codec/Raw.ts:126

description Returns the string representation of the value

Returns: string


# toU8a

toU8a(isBare?: undefined | false | true): Uint8Array

Inherited from Raw.toU8a

Defined in packages/types/src/codec/Raw.ts:135

description Encodes the value as a Uint8Array as per the SCALE specifications

Parameters:

Name Type Description
isBare? undefined | false | true true when the value has none of the type-specific prefixes (internal)

Returns: Uint8Array


# Static with

with(bitLength: BitLength, typeName?: undefined | string): ConstructorU8aFixed

Defined in packages/types/src/codec/U8aFixed.ts:49

Parameters:

Name Type
bitLength BitLength
typeName? undefined | string

Returns: ConstructorU8aFixed