Polkadot JS APIGlobals"codec/UInt"UInt

# Class: UInt

name UInt

description A generic unsigned integer codec. For Substrate all numbers are Little Endian encoded, this handles the encoding and decoding of those numbers. Upon construction the bitLength is provided and any additional use keeps the number to this length. This extends BN, so all methods available on a normal BN object is available here.

# Hierarchy

# 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 UInt(registry: Registry, value: AnyNumber, bitLength: UIntBitLength, isHexJson: boolean): UInt

Overrides void

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


Name Type Default
registry Registry -
value AnyNumber 0
bitLength UIntBitLength DEFAULT_UINT_BITS
isHexJson boolean false

Returns: UInt

# Methods

# Static with

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

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


Name Type
bitLength UIntBitLength
typeName? undefined | string

Returns: ConstructorUInt