BoundedVec

Composite 424 v411

bounded_collections::bounded_vec::BoundedVec

About This Type

Structured type: BoundedVec.

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)

#NameType
0(unnamed)Vec<u8>

SCALE Encoding

Rule
1-byte variant selects the signature scheme, followed by the raw signature.
Size
65 or 66 bytes

Examples

Sr25519 signature = Sr25519(0xaabb...)
0x01<64 bytes of signature>
01 Variant 1 = Sr25519
<64 bytes> 64-byte Sr25519 signature

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

T = u8
S

Referenced By (27)

and 7 more...

Type Information

Type ID
424
Kind
Composite
Path
bounded_collections::bounded_vec::BoundedVec
Runtime
v411