BeaconConfiguration
Composite 360 v393pallet_drand::types::BeaconConfiguration
About This Type
Structured type: BeaconConfiguration.
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 (7)
| # | Name | Type |
|---|---|---|
| 0 | public_key | BoundedVec |
| 1 | period | u32 |
| 2 | genesis_time | u32 |
| 3 | hash | BoundedVec |
| 4 | group_hash | BoundedVec |
| 5 | scheme_id | BoundedVec |
| 6 | metadata | Metadata |
SCALE Encoding
- Rule
- 7 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 7 fields = public_key: BoundedVec, period: u32, genesis_time: u32, hash: BoundedVec, group_hash: BoundedVec, scheme_id: BoundedVec, metadata: Metadata
0x<field0><field1><field2><field3><field4><field5><field6>field 0 public_key: BoundedVecfield 1 period: u32field 2 genesis_time: u32field 3 hash: BoundedVecfield 4 group_hash: BoundedVecfield 5 scheme_id: BoundedVecfield 6 metadata: MetadataCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode BeaconConfiguration
const value = registry.createType("BeaconConfiguration", {
public_key: 0,
period: 1000000,
genesis_time: 1000000,
hash: 0,
group_hash: 0,
scheme_id: 0,
metadata: 0
});
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 360
- Kind
- Composite
- Path
- pallet_drand::types::BeaconConfiguration
- Runtime
- v393