Polkadot JS APIGlobals"codec/Int"Int

# Class: Int

name Int

description A generic signed 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 Int(registry: Registry, value: AnyNumber, bitLength: UIntBitLength, isHexJson: boolean): Int

Overrides void

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


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

Returns: Int

# Methods

# Static with

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

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


Name Type
bitLength UIntBitLength
typeName? undefined | string

Returns: ConstructorInt