BTreeMap
Composite 574 v393BTreeMap
About This Type
Structured type: BTreeMap.
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 (1)
| # | Name | Type |
|---|---|---|
| 0 | (unnamed) | Vec<([u8; 8], Vec<u8>)> |
SCALE Encoding
- Rule
- 1 field encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 1 field = ?: Vec<([u8; 8], Vec<u8>)>
0x<field0>field 0 field0: Vec<([u8; 8], Vec<u8>)>Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode BTreeMap
const value = registry.createType("BTreeMap", {
field: 0
});
console.log("Hex:", value.toHex());Type Parameters
K = [u8; 8]
V = Vec<u8>
Referenced By (2)
Type Information
- Type ID
- 574
- Kind
- Composite
- Path
- BTreeMap
- Runtime
- v393