Polkadot JS APIGlobals"generic/AccountIndex"AccountIndex

# Class: AccountIndex

name AccountIndex

description A wrapper around an AccountIndex, which is a shortened, variable-length encoding for an Account. We extends from U32 to provide the number-like properties.

# Hierarchy

U32

AccountIndex

# Implements

# Index

# Interfaces

# Type aliases

# Constructors

# Methods

# Type aliases

# Static Endianness

Ƭ Endianness: "le" | "be"

Defined in node_modules/@types/bn.js/index.d.ts:11


# Static IPrimeName

Ƭ IPrimeName: "k256" | "p224" | "p192" | "p25519"

Defined in node_modules/@types/bn.js/index.d.ts:12

# Constructors

# constructor

+ new AccountIndex(registry: Registry, value: AnyNumber): AccountIndex

Overrides UInt.constructor

Defined in packages/types/src/generic/AccountIndex.ts:43

Parameters:

Name Type Default
registry Registry -
value AnyNumber new BN(0)

Returns: AccountIndex

# Methods

# eq

eq(other?: unknown): boolean

Implementation of Codec

Overrides void

Defined in packages/types/src/generic/AccountIndex.ts:88

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

Parameters:

Name Type
other? unknown

Returns: boolean


# toHuman

toHuman(): string

Overrides void

Defined in packages/types/src/generic/AccountIndex.ts:101

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

Returns: string


# toJSON

toJSON(): string

Implementation of Codec

Overrides void

Defined in packages/types/src/generic/AccountIndex.ts:108

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

Returns: string


# toRawType

toRawType(): string

Implementation of Codec

Overrides void

Defined in packages/types/src/generic/AccountIndex.ts:124

description Returns the base runtime type name for this instance

Returns: string


# toString

toString(): string

Implementation of Codec

Overrides void

Defined in packages/types/src/generic/AccountIndex.ts:115

description Returns the string representation of the value

Returns: string


# Static calcLength

calcLength(_value: BN | number): number

Defined in packages/types/src/generic/AccountIndex.ts:48

Parameters:

Name Type
_value BN | number

Returns: number


# Static readLength

readLength(input: Uint8Array): [number, number]

Defined in packages/types/src/generic/AccountIndex.ts:62

Parameters:

Name Type
input Uint8Array

Returns: [number, number]


# Static with

with(bitLength: UIntBitLength, typeName?: undefined | string): ConstructorUInt

Inherited from UInt.with

Defined in packages/types/src/codec/UInt.ts:24

Parameters:

Name Type
bitLength UIntBitLength
typeName? undefined | string

Returns: ConstructorUInt


# Static writeLength

writeLength(input: Uint8Array): Uint8Array

Defined in packages/types/src/generic/AccountIndex.ts:76

Parameters:

Name Type
input Uint8Array

Returns: Uint8Array