referrerpolicy=no-referrer-when-downgrade

polkadot_primitives/
lib.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Polkadot types shared between the runtime and the Node-side code.
18
19#![warn(missing_docs)]
20#![cfg_attr(not(feature = "std"), no_std)]
21
22// `v13` is currently the latest stable version of the runtime API, the number below
23// should be incremented when a new version is released and is independent of the
24// released version of the Polkadot runtime.
25pub mod v9;
26
27// The 'staging' version is special - it contains primitives which are
28// still in development. Once they are considered stable, they will be
29// moved to a new versioned module.
30pub mod vstaging;
31
32// `runtime_api` contains the actual API implementation. It contains stable and
33// unstable functions.
34pub mod runtime_api;
35
36extern crate alloc;
37
38// Current primitives not requiring versioning are exported here.
39// Primitives requiring versioning must not be exported and must be referred by an exact version.
40pub use v9::{
41	async_backing, byzantine_threshold, check_candidate_backing, effective_minimum_backing_votes,
42	executor_params, metric_definitions, node_features, skip_ump_signals, slashing,
43	supermajority_threshold, transpose_claim_queue, well_known_keys, AbridgedHostConfiguration,
44	AbridgedHrmpChannel, AccountId, AccountIndex, AccountPublic, ApprovalVote,
45	ApprovalVoteMultipleCandidates, ApprovalVotingParams, ApprovedPeerId, AssignmentId,
46	AsyncBackingParams, AuthorityDiscoveryId, AvailabilityBitfield, BackedCandidate, Balance,
47	BlakeTwo256, Block, BlockId, BlockNumber, CandidateCommitments, CandidateDescriptorV2,
48	CandidateDescriptorVersion, CandidateDescriptorVersionCheckError, CandidateEvent,
49	CandidateHash, CandidateIndex, CandidateReceiptV2, CheckedDisputeStatementSet,
50	CheckedMultiDisputeStatementSet, ChunkIndex, ClaimQueueOffset, CollatorId, CollatorSignature,
51	CommittedCandidateReceiptError, CommittedCandidateReceiptV2, CompactStatement, ConsensusLog,
52	CoreIndex, CoreSelector, CoreState, DisputeOffenceKind, DisputeState, DisputeStatement,
53	DisputeStatementSet, DownwardMessage, EncodeAs, ExecutorHostFunction, ExecutorParam,
54	ExecutorParamError, ExecutorParams, ExecutorParamsHash, ExecutorParamsPrepHash,
55	ExplicitDisputeStatement, GroupIndex, GroupRotationInfo, Hash, HashT, HeadData, Header,
56	HorizontalMessages, HrmpChannelId, Id, InboundDownwardMessage, InboundHrmpMessage, IndexedVec,
57	InherentData, InvalidDisputeStatementKind, Moment, MultiDisputeStatementSet, NodeFeatures,
58	Nonce, OccupiedCore, OccupiedCoreAssumption, OutboundHrmpMessage, ParathreadClaim,
59	ParathreadEntry, PersistedValidationData, PvfCheckStatement, PvfExecKind, PvfPrepKind,
60	RuntimeMetricLabel, RuntimeMetricLabelValue, RuntimeMetricLabelValues, RuntimeMetricLabels,
61	RuntimeMetricOp, RuntimeMetricUpdate, ScheduledCore, SchedulerParams, ScrapedOnChainVotes,
62	SessionIndex, SessionInfo, Signature, Signed, SignedAvailabilityBitfield,
63	SignedAvailabilityBitfields, SignedStatement, SigningContext, Slot, TransposedClaimQueue,
64	UMPSignal, UncheckedSigned, UncheckedSignedAvailabilityBitfield,
65	UncheckedSignedAvailabilityBitfields, UncheckedSignedStatement, UpgradeGoAhead,
66	UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode,
67	ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation,
68	ValidityError, ASSIGNMENT_KEY_TYPE_ID, DEFAULT_CLAIM_QUEUE_OFFSET,
69	DEFAULT_SCHEDULING_LOOKAHEAD, LEGACY_MIN_BACKING_VOTES, LOWEST_PUBLIC_ID, MAX_CODE_SIZE,
70	MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, MIN_CODE_SIZE, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
71	ON_DEMAND_MAX_QUEUE_MAX_SIZE, PARACHAINS_INHERENT_IDENTIFIER, PARACHAIN_KEY_TYPE_ID,
72	RELAY_CHAIN_SLOT_DURATION_MILLIS, UMP_SEPARATOR,
73};
74
75#[cfg(feature = "test")]
76pub use v9::{AppVerify, MutateDescriptorV2};
77
78#[cfg(feature = "std")]
79pub use v9::{AssignmentPair, CollatorPair, ValidatorPair};