U64
Primitive 6 v411About This Type
Unsigned 64-bit integer (0 to 2^64 - 1).
Fixed-width 8-byte unsigned integer.
Encoding: Fixed-width: 8 bytes, little-endian.
Primitive Type
- Name
- U64
- Byte Size
- 8 bytes
- SCALE Encoding
- Fixed-width, little-endian
SCALE Encoding
- Rule
- Fixed-width 8-byte unsigned integer, little-endian.
- Size
- 8 bytes
Examples
1 TAO (1,000,000,000 RAO) = 1,000,000,000
0x00ca9a3b0000000000 ca 9a 3b 00 00 00 00 8 bytes little-endian (0x3B9ACA00 = 10^9)Zero = 0
0x000000000000000000 00 00 00 00 00 00 00 8 zero bytesCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode a U64 value
const value = registry.createType("U64", 1_000_000_000n);
console.log("Hex:", value.toHex());
console.log("Bytes:", value.toU8a());Type Information
- Type ID
- 6
- Kind
- Primitive
- Runtime
- v411