UNPKG

3.13 kBJavaScriptView Raw
1// Copyright 2017-2022 @polkadot/types authors & contributors
2// SPDX-License-Identifier: Apache-2.0
3// order important in structs... :)
4
5/* eslint-disable sort-keys */
6export default {
7 rpc: {
8 epochAuthorship: {
9 description: 'Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore',
10 params: [],
11 type: 'HashMap<AuthorityId, EpochAuthorship>'
12 }
13 },
14 types: {
15 AllowedSlots: {
16 _enum: ['PrimarySlots', 'PrimaryAndSecondaryPlainSlots', 'PrimaryAndSecondaryVRFSlots']
17 },
18 BabeAuthorityWeight: 'u64',
19 BabeEpochConfiguration: {
20 c: '(u64, u64)',
21 allowedSlots: 'AllowedSlots'
22 },
23 BabeBlockWeight: 'u32',
24 BabeEquivocationProof: {
25 offender: 'AuthorityId',
26 slotNumber: 'SlotNumber',
27 firstHeader: 'Header',
28 secondHeader: 'Header'
29 },
30 BabeWeight: 'u64',
31 MaybeRandomness: 'Option<Randomness>',
32 MaybeVrf: 'Option<VrfData>',
33 EpochAuthorship: {
34 primary: 'Vec<u64>',
35 secondary: 'Vec<u64>',
36 secondary_vrf: 'Vec<u64>'
37 },
38 NextConfigDescriptor: {
39 _enum: {
40 V0: 'Null',
41 V1: 'NextConfigDescriptorV1'
42 }
43 },
44 NextConfigDescriptorV1: {
45 c: '(u64, u64)',
46 allowedSlots: 'AllowedSlots'
47 },
48 Randomness: 'Hash',
49 RawBabePreDigest: {
50 _enum: {
51 Phantom: 'Null',
52 // index starts at 1... empty slot at 0
53 Primary: 'RawBabePreDigestPrimary',
54 SecondaryPlain: 'RawBabePreDigestSecondaryPlain',
55 SecondaryVRF: 'RawBabePreDigestSecondaryVRF'
56 }
57 },
58 RawBabePreDigestPrimary: {
59 authorityIndex: 'u32',
60 // AuthorityIndex (also in aura)
61 slotNumber: 'SlotNumber',
62 vrfOutput: 'VrfOutput',
63 vrfProof: 'VrfProof'
64 },
65 RawBabePreDigestSecondaryPlain: {
66 authorityIndex: 'u32',
67 // AuthorityIndex (also in aura)
68 slotNumber: 'SlotNumber'
69 },
70 RawBabePreDigestSecondaryVRF: {
71 authorityIndex: 'u32',
72 slotNumber: 'SlotNumber',
73 vrfOutput: 'VrfOutput',
74 vrfProof: 'VrfProof'
75 },
76 RawBabePreDigestTo159: {
77 _enum: {
78 Primary: 'RawBabePreDigestPrimaryTo159',
79 Secondary: 'RawBabePreDigestSecondaryTo159'
80 }
81 },
82 RawBabePreDigestPrimaryTo159: {
83 authorityIndex: 'u32',
84 slotNumber: 'SlotNumber',
85 weight: 'BabeBlockWeight',
86 vrfOutput: 'VrfOutput',
87 vrfProof: 'VrfProof'
88 },
89 RawBabePreDigestSecondaryTo159: {
90 authorityIndex: 'u32',
91 slotNumber: 'SlotNumber',
92 weight: 'BabeBlockWeight'
93 },
94 // a cross old/new compatible version of the digest, that is _only_ useful
95 // for partial parsing and extraction of the author. This assumes that all
96 // entries has the authorityIndex in the first position - and that it is all
97 // we are interested in
98 RawBabePreDigestCompat: {
99 _enum: {
100 Zero: 'u32',
101 One: 'u32',
102 Two: 'u32',
103 Three: 'u32'
104 }
105 },
106 SlotNumber: 'u64',
107 VrfData: '[u8; 32]',
108 VrfOutput: '[u8; 32]',
109 VrfProof: '[u8; 64]'
110 }
111};
\No newline at end of file