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// `v11` is currently the latest stable version of the runtime API.
23pub mod v8;
24
25// The 'staging' version is special - it contains primitives which are
26// still in development. Once they are considered stable, they will be
27// moved to a new versioned module.
28pub mod vstaging;
29
30// `runtime_api` contains the actual API implementation. It contains stable and
31// unstable functions.
32pub mod runtime_api;
33
34extern crate alloc;
35
36// Current primitives not requiring versioning are exported here.
37// Primitives requiring versioning must not be exported and must be referred by an exact version.
38pub use v8::{
39	async_backing, byzantine_threshold, check_candidate_backing, collator_signature_payload,
40	effective_minimum_backing_votes, executor_params, metric_definitions, node_features, slashing,
41	supermajority_threshold, well_known_keys, AbridgedHostConfiguration, AbridgedHrmpChannel,
42	AccountId, AccountIndex, AccountPublic, ApprovalVote, ApprovalVoteMultipleCandidates,
43	ApprovalVotingParams, AssignmentId, AsyncBackingParams, AuthorityDiscoveryId,
44	AvailabilityBitfield, BackedCandidate, Balance, BlakeTwo256, Block, BlockId, BlockNumber,
45	CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateIndex,
46	CandidateReceipt, CheckedDisputeStatementSet, CheckedMultiDisputeStatementSet, ChunkIndex,
47	CollatorId, CollatorSignature, CommittedCandidateReceipt, CompactStatement, ConsensusLog,
48	CoreIndex, CoreState, DisputeState, DisputeStatement, DisputeStatementSet, DownwardMessage,
49	EncodeAs, ExecutorParam, ExecutorParamError, ExecutorParams, ExecutorParamsHash,
50	ExecutorParamsPrepHash, ExplicitDisputeStatement, GroupIndex, GroupRotationInfo, Hash, HashT,
51	HeadData, Header, HorizontalMessages, HrmpChannelId, Id, InboundDownwardMessage,
52	InboundHrmpMessage, IndexedVec, InherentData, InvalidDisputeStatementKind, Moment,
53	MultiDisputeStatementSet, NodeFeatures, Nonce, OccupiedCore, OccupiedCoreAssumption,
54	OutboundHrmpMessage, ParathreadClaim, ParathreadEntry, PersistedValidationData,
55	PvfCheckStatement, PvfExecKind, PvfPrepKind, RuntimeMetricLabel, RuntimeMetricLabelValue,
56	RuntimeMetricLabelValues, RuntimeMetricLabels, RuntimeMetricOp, RuntimeMetricUpdate,
57	ScheduledCore, SchedulerParams, ScrapedOnChainVotes, SessionIndex, SessionInfo, Signature,
58	Signed, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SignedStatement,
59	SigningContext, Slot, UncheckedSigned, UncheckedSignedAvailabilityBitfield,
60	UncheckedSignedAvailabilityBitfields, UncheckedSignedStatement, UpgradeGoAhead,
61	UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode,
62	ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation,
63	ValidityError, ASSIGNMENT_KEY_TYPE_ID, DEFAULT_SCHEDULING_LOOKAHEAD, LEGACY_MIN_BACKING_VOTES,
64	LOWEST_PUBLIC_ID, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, MIN_CODE_SIZE,
65	ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE, ON_DEMAND_MAX_QUEUE_MAX_SIZE, PARACHAINS_INHERENT_IDENTIFIER,
66	PARACHAIN_KEY_TYPE_ID,
67};
68
69#[cfg(feature = "std")]
70pub use v8::{AssignmentPair, CollatorPair, ValidatorPair};