Pulse

Composite 354 v393

pallet_drand::types::Pulse

About This Type

Structured type: Pulse.

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 (3)

#NameType
0roundu64
1randomnessBoundedVec
2signatureBoundedVec

SCALE Encoding

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

Examples

Struct with 3 fields = round: u64, randomness: BoundedVec, signature: BoundedVec
0x<field0><field1><field2>
field 0 round: u64
field 1 randomness: BoundedVec
field 2 signature: BoundedVec

Code Examples

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

const registry = new TypeRegistry();

// Encode Pulse
const value = registry.createType("Pulse", {
  round: 1_000_000_000n,
  randomness: 0,
  signature: 0
});
console.log("Hex:", value.toHex());

Referenced By (1)

Type Information

Type ID
354
Kind
Composite
Path
pallet_drand::types::Pulse
Runtime
v393