Vec<(Vec<u8>, Vec<u8>)>
Sequence 107 v393About This Type
Variable-length list of (Vec<u8, Vec<u8>)> 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
- (Vec<u8>, Vec<u8>)
- SCALE Encoding
- Length-prefixed (Compact<u32> length followed by elements)
SCALE Encoding
- Rule
- Compact<u32> length prefix followed by each (Vec<u8>, Vec<u8>) element encoded in sequence.
- Size
- variable
Examples
3-element Vec<(Vec<u8>, Vec<u8>)> = [elem0, elem1, elem2]
0x0c<elem0><elem1><elem2>0c Compact length = 3<elem0>... Each (Vec<u8>, Vec<u8>) encoded in sequenceCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode a Vec<(Vec<u8>, Vec<u8>)>
const vec = registry.createType("Vec<(Vec<u8>, Vec<u8>)>", [1, 2, 3]);
console.log("Hex:", vec.toHex());Referenced By (1)
Type Information
- Type ID
- 107
- Kind
- Sequence
- Runtime
- v393