UInt

Composite 319 v393

substrate_typenum::uint::UInt

About This Type

Structured type: UInt.

A struct-like type where each field is encoded in declaration order.

Encoding: Fields encoded consecutively in declaration order, no field names or separators.

Fields (2)

#NameType
0msbUTerm
1lsbB1

SCALE Encoding

Rule
2 fields encoded consecutively in declaration order. No field names or delimiters.
Size
sum of field sizes

Examples

Struct with 2 fields = msb: UTerm, lsb: B1
0x<field0><field1>
field 0 msb: UTerm
field 1 lsb: B1

Code Examples

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

const registry = new TypeRegistry();

// Encode UInt
const value = registry.createType("UInt", {
  msb: 0,
  lsb: 0
});
console.log("Hex:", value.toHex());

Type Parameters

U = UTerm
B = B1

Referenced By (6)

Type Information

Type ID
319
Kind
Composite
Path
substrate_typenum::uint::UInt
Runtime
v393