Vec<(u64, AccountId)>

Sequence 44 v393

About This Type

Variable-length list of (u64, AccountId) values.

A dynamically-sized collection. The encoded length precedes the element data.

Encoding: Compact<u32> length prefix followed by each element encoded in sequence.

Sequence (Vec)

Element Type
(u64, AccountId)
SCALE Encoding
Length-prefixed (Compact<u32> length followed by elements)

SCALE Encoding

Rule
Compact<u32> length prefix followed by each (u64, AccountId) element encoded in sequence.
Size
variable

Examples

3-element Vec<(u64, AccountId)> = [elem0, elem1, elem2]
0x0c<elem0><elem1><elem2>
0c Compact length = 3
<elem0>... Each (u64, AccountId) encoded in sequence

Code Examples

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

const registry = new TypeRegistry();

// Encode a Vec<(u64, AccountId)>
const vec = registry.createType("Vec<(u64, AccountId)>", [1, 2, 3]);
console.log("Hex:", vec.toHex());

Referenced By (4)

Type Information

Type ID
44
Kind
Sequence
Runtime
v393