I128
Primitive 323 v393About This Type
Signed 128-bit integer (-2^127 to 2^127 - 1).
Fixed-width 16-byte signed integer.
Encoding: Fixed-width: 16 bytes, little-endian.
Primitive Type
- Name
- I128
- Byte Size
- 16 bytes
- SCALE Encoding
- Fixed-width, little-endian
SCALE Encoding
- Rule
- Fixed-width 16-byte signed two's complement integer, little-endian.
- Size
- 16 bytes
Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode a I128 value
const value = registry.createType("I128", 0);
console.log("Hex:", value.toHex());
console.log("Bytes:", value.toU8a());Type Information
- Type ID
- 323
- Kind
- Primitive
- Runtime
- v393