I64

Primitive 96 v393

About This Type

Signed 64-bit integer (-2^63 to 2^63 - 1).

Fixed-width 8-byte signed integer.

Encoding: Fixed-width: 8 bytes, little-endian.

Primitive Type

Name
I64
Byte Size
8 bytes
SCALE Encoding
Fixed-width, little-endian

SCALE Encoding

Rule
Fixed-width 8-byte signed two's complement integer, little-endian.
Size
8 bytes

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode a I64 value
const value = registry.createType("I64", 0);
console.log("Hex:", value.toHex());
console.log("Bytes:", value.toU8a());

Type Information

Type ID
96
Kind
Primitive
Runtime
v393