Kagome
Polkadot Runtime Engine in C++17
kagome::primitives Namespace Reference

Namespaces

 detail
 
 dispatch_error
 
 events
 
 parachain
 

Classes

struct  Authority
 
struct  AuthorityId
 
struct  AuthorityListChange
 
struct  AuthoritySet
 
struct  BabeConfiguration
 Configuration data used by the BABE consensus engine. More...
 
struct  Block
 Block class represents polkadot block primitive. More...
 
struct  BlockData
 
struct  BlockDataFlags
 
struct  BlockHeader
 
struct  CheckInherentsResult
 result of check_inherents method of BlockBuilder runtime api More...
 
struct  CodeSubstituteBlockIds
 
struct  Consensus
 
struct  DecodedConsensusMessage
 
struct  DelayInChain
 
class  DispatchSuccess
 
struct  Extrinsic
 Extrinsic class represents extrinsic. More...
 
struct  ForcedChange
 
struct  GenesisBlockHeader
 
struct  InherentData
 
struct  Justification
 
struct  NextConfigDataV1
 
struct  NextEpochData
 
struct  OnDisabled
 
struct  Other
 
struct  Pause
 
struct  PreRuntime
 
struct  Resume
 
struct  RpcMethods
 
struct  RuntimeDispatchInfo
 
struct  RuntimeEnvironmentUpdated
 Runtime code or heap pages updated. More...
 
struct  ScheduledChange
 
struct  Seal
 
struct  Session
 Session primitive. More...
 
class  Strobe
 
struct  Transaction
 
class  Transcript
 
struct  ValidTransaction
 Information concerning a valid transaction. More...
 
struct  Version
 

Typedefs

using AccountId = crypto::Sr25519PublicKey
 
using AccountNonce = uint32_t
 
using DispatchError = boost::variant< de::Other, de::CannotLookup, de::BadOrigin, de::Module, de::ConsumerRemaining, de::NoProviders, de::Token, de::Arithmetic >
 
using DispatchOutcome = boost::variant< DispatchSuccess, DispatchError >
 
using ApplyExtrinsicResult = boost::variant< DispatchOutcome, TransactionValidityError >
 
using SubscriptionId = uint64_t
 SubscriptionId primitive. More...
 
using Metadata = std::optional< std::shared_ptr< Session >>
 Metadata primitive. More...
 
using ExtrinsicKey = std::vector< uint8_t >
 ExtrinsicKey is used as a key to search extrinsic. More...
 
using AuthorityWeight = uint64_t
 
using AuthoritySetId = uint64_t
 
using AuthorityListSize = uint64_t
 
using AuthorityIndex = uint32_t
 
using AuthorityList = common::SLVector< Authority, consensus::kMaxValidatorsNumber >
 
using AuthorityDiscoveryId = crypto::Sr25519PublicKey
 
using BabeSlotNumber = uint64_t
 
using BabeClock = clock::SystemClock
 
using BabeDuration = BabeClock::Duration
 
using Randomness = common::Blob< crypto::constants::sr25519::vrf::OUTPUT_SIZE >
 
using BlockBody = std::vector< Extrinsic >
 
using BlockHash = common::Hash256
 
using BlockId = boost::variant< BlockHash, BlockNumber >
 Block id is the variant over BlockHash and BlockNumber. More...
 
using BlockNumber = uint32_t
 
using ThreadNumber = size_t
 
using BlockInfo = detail::BlockInfoT< struct BlockInfoTag >
 
using CompactInteger = scale::CompactInteger
 
using ConsensusEngineId = common::Blob< 4 >
 Consensus engine unique ID. More...
 
using BabeDigest = boost::variant< Unused< 0 >, NextEpochData, OnDisabled, NextConfigData >
 https://github.com/paritytech/substrate/blob/polkadot-v0.9.8/primitives/consensus/babe/src/lib.rs#L130 More...
 
using GrandpaDigest = boost::variant< Unused< 0 >, ScheduledChange, ForcedChange, OnDisabled, Pause, Resume >
 https://github.com/paritytech/substrate/blob/polkadot-v0.9.8/primitives/finality-grandpa/src/lib.rs#L92 More...
 
using UnsupportedDigest_POL1 = Tagged< Empty, struct POL1 >
 
using UnsupportedDigest_BEEF = Tagged< Empty, struct BEEF >
 
using DigestItem = boost::variant< Other, Unused< 1 >, Unused< 2 >, Unused< 3 >, Consensus, Seal, PreRuntime, Unused< 7 >, RuntimeEnvironmentUpdated >
 
using Digest = common::SLVector< DigestItem, kMaxItemsInDigest >
 
using ExtrinsicIndex = uint32_t
 
using InherentIdentifier = common::Blob< 8u >
 
using OpaqueMetadata = std::vector< uint8_t >
 
using NextConfigData = boost::variant< Unused< 0 >, NextConfigDataV1 >
 
using GenericSessionKey = common::Blob< 32 >
 
using BabeSessionKey = crypto::Sr25519PublicKey
 
using GrandpaSessionKey = crypto::Ed25519PublicKey
 
using TransactionValidityError = boost::variant< InvalidTransaction, UnknownTransaction >
 
using TransactionValidity = boost::variant< ValidTransaction, TransactionValidityError >
 
using ApiId = common::Blob< 8u >
 The identity of a particular API interface that the runtime might provide. More...
 
using Api = std::pair< ApiId, uint32_t >
 single Api item More...
 
using ApisVec = std::vector< Api >
 A vector of pairs of ApiId and a u32 for version. More...
 

Enumerations

enum  ArithmeticError : uint8_t { ArithmeticError::Underflow = 1, ArithmeticError::Overflow, ArithmeticError::DivisionByZero }
 
enum  AllowedSlots : uint8_t { AllowedSlots::PrimaryOnly, AllowedSlots::PrimaryAndSecondaryPlain, AllowedSlots::PrimaryAndSecondaryVRF }
 
enum  InherentDataError { InherentDataError::IDENTIFIER_ALREADY_EXISTS = 1, InherentDataError::IDENTIFIER_DOES_NOT_EXIST }
 inherent data encode/decode error codes More...
 
enum  Ss58Error { Ss58Error::INVALID_LENGTH = 1, Ss58Error::INVALID_CHECKSUM }
 
enum  TokenError : uint8_t {
  TokenError::NoFunds = 1, TokenError::WouldDie, TokenError::BelowMinimum, TokenError::CannotCreate,
  TokenError::UnknownAsset, TokenError::Frozen, TokenError::Unsupported
}
 
enum  TransactionSource : uint8_t { TransactionSource::InBlock, TransactionSource::Local, TransactionSource::External }
 
enum  InvalidTransaction : uint8_t {
  InvalidTransaction::Call = 1, InvalidTransaction::Payment, InvalidTransaction::Future, InvalidTransaction::Stale,
  InvalidTransaction::BadProof, InvalidTransaction::AncientBirthBlock, InvalidTransaction::ExhaustsResources, InvalidTransaction::Custom,
  InvalidTransaction::BadMandatory, InvalidTransaction::MandatoryDispatch
}
 Transaction is invalid. Details are described by the error code. More...
 
enum  UnknownTransaction : uint8_t { UnknownTransaction::CannotLookup = 1, UnknownTransaction::NoUnsignedValidator, UnknownTransaction::Custom }
 An unknown transaction validity. More...
 

Functions

 SCALE_EMPTY_CODER (DispatchSuccess)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const ArithmeticError &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, ArithmeticError &v)
 
bool operator< (const AuthorityId &lhs, const AuthorityId &rhs)
 
std::string_view to_string (AllowedSlots s)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const BabeConfiguration &config)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, BabeConfiguration &config)
 
outcome::result< BlockHashcalculateBlockHash (BlockHeader const &header, crypto::Hasher const &hasher)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const BlockHeader &bh)
 outputs object of type BlockHeader to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, BlockHeader &bh)
 decodes object of type BlockHeader from stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, CheckInherentsResult &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const InherentData &v)
 output InherentData object instance to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, InherentData &v)
 decodes InherentData object instance from stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const RuntimeDispatchInfo &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, RuntimeDispatchInfo &v)
 
static common::Buffer calculateChecksum (gsl::span< uint8_t, kSs58Length-kSs58ChecksumLength > ss58_address, const crypto::Hasher &hasher)
 
outcome::result< AccountIddecodeSs58 (std::string_view account_address, const crypto::Hasher &hasher) noexcept
 
std::string encodeSs58 (uint8_t account_type, const AccountId &id, const crypto::Hasher &hasher) noexcept
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const TokenError &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, TokenError &v)
 
bool operator== (const Transaction &v1, const Transaction &v2)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const InvalidTransaction &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, InvalidTransaction &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const UnknownTransaction &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, UnknownTransaction &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<< (Stream &s, const Version &v)
 outputs object of type Version to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>> (Stream &s, Version &v)
 decodes object of type Version from stream More...
 

Variables

const auto kBabeEngineId
 
const auto kGrandpaEngineId
 
const auto kUnsupportedEngineId_POL1
 
const auto kUnsupportedEngineId_BEEF
 
static constexpr uint32_t kRpcMethodsVersion = 1
 
constexpr size_t kSs58ChecksumLength = 2
 
constexpr size_t kSs58Length
 

Detailed Description

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 Authoring api primitives


Class Documentation

struct kagome::primitives::CheckInherentsResult

result of check_inherents method of BlockBuilder runtime api

Definition at line 15 of file check_inherents_result.hpp.

Collaboration diagram for kagome::primitives::CheckInherentsResult:
Class Members
InherentData errors We use the InherentData to store our errors.
bool is_fatal_error Did we encounter a fatal error?
bool is_okay Did the check succeed?
class kagome::primitives::DispatchSuccess

Definition at line 24 of file apply_result.hpp.

Collaboration diagram for kagome::primitives::DispatchSuccess:
struct kagome::primitives::GenesisBlockHeader

Definition at line 46 of file block_header.hpp.

Collaboration diagram for kagome::primitives::GenesisBlockHeader:
Class Members
const BlockHash hash
const BlockHeader header
struct kagome::primitives::RuntimeDispatchInfo

Information related to a dispatchable's class, weight, and fee that can be queried from the runtime.

Definition at line 14 of file runtime_dispatch_info.hpp.

Collaboration diagram for kagome::primitives::RuntimeDispatchInfo:
Class Members
typedef uint32_t Balance
typedef uint64_t Weight
Class Members
DispatchClass
Class Members
enum DispatchClass dispatch_class
Balance partial_fee

The inclusion fee of this dispatch. This does not include a tip or anything else that depends on the signature (i.e. depends on a SignedExtension).

Weight weight
struct kagome::primitives::Session

Session primitive.

Definition at line 27 of file author_api_primitives.hpp.

Collaboration diagram for kagome::primitives::Session:
Class Members
uint32_t id
struct kagome::primitives::Transaction

Definition at line 14 of file transaction.hpp.

Collaboration diagram for kagome::primitives::Transaction:
Class Members
typedef Hash256 Hash Hash of tx.
typedef uint64_t Longevity

Minimum number of blocks a transaction will remain valid for. TransactionLongevity::max_value() means "forever".

typedef uint64_t Priority Priority for a transaction. Additive. Higher is better.
typedef vector< uint8_t > Tag

Tag for a transaction. No two transactions with the same tag should be placed on-chain.

Class Members
size_t bytes Number of bytes encoding of the transaction requires.
Extrinsic ext Raw extrinsic representing that transaction.
Hash hash Extrinsic hash (non-unique)
Priority priority Transaction priority (higher = better)
vector< Tag > provides Tags that this transaction provides.
vector< Tag > requires Tags required by the transaction.
bool should_propagate Should that transaction be propagated.
Longevity valid_till At which block the transaction becomes invalid?

Typedef Documentation

using kagome::primitives::AccountId = typedef crypto::Sr25519PublicKey

Definition at line 13 of file account.hpp.

using kagome::primitives::AccountNonce = typedef uint32_t

Definition at line 15 of file account.hpp.

using kagome::primitives::Api = typedef std::pair<ApiId, uint32_t>

single Api item

Definition at line 31 of file version.hpp.

The identity of a particular API interface that the runtime might provide.

This is the same structure as RuntimeVersion from substrate https://github.com/paritytech/substrate/blob/e670c040d42132da982e156e25a385df213354ed/primitives/version/src/lib.rs

Definition at line 26 of file version.hpp.

using kagome::primitives::ApisVec = typedef std::vector<Api>

A vector of pairs of ApiId and a u32 for version.

Definition at line 36 of file version.hpp.

Definition at line 99 of file apply_result.hpp.

using kagome::primitives::AuthorityDiscoveryId = typedef crypto::Sr25519PublicKey

Definition at line 12 of file authority_discovery_id.hpp.

using kagome::primitives::AuthorityIndex = typedef uint32_t

Authority index

Definition at line 36 of file authority.hpp.

List of authorities

Definition at line 52 of file authority.hpp.

using kagome::primitives::AuthorityListSize = typedef uint64_t

Definition at line 21 of file authority.hpp.

using kagome::primitives::AuthoritySetId = typedef uint64_t

Definition at line 20 of file authority.hpp.

using kagome::primitives::AuthorityWeight = typedef uint64_t

Definition at line 19 of file authority.hpp.

Definition at line 19 of file babe_configuration.hpp.

using kagome::primitives::BabeSessionKey = typedef crypto::Sr25519PublicKey

Definition at line 17 of file session_key.hpp.

using kagome::primitives::BabeSlotNumber = typedef uint64_t

Definition at line 18 of file babe_configuration.hpp.

using kagome::primitives::BlockBody = typedef std::vector<Extrinsic>

Definition at line 14 of file block.hpp.

Definition at line 15 of file block_id.hpp.

using kagome::primitives::BlockId = typedef boost::variant<BlockHash, BlockNumber>

Block id is the variant over BlockHash and BlockNumber.

Definition at line 18 of file block_id.hpp.

using kagome::primitives::BlockInfo = typedef detail::BlockInfoT<struct BlockInfoTag>

Definition at line 63 of file common.hpp.

using kagome::primitives::BlockNumber = typedef uint32_t

Definition at line 18 of file common.hpp.

using kagome::primitives::CompactInteger = typedef scale::CompactInteger

Definition at line 13 of file compact_integer.hpp.

Consensus engine unique ID.

Definition at line 23 of file digest.hpp.

using kagome::primitives::Digest = typedef common::SLVector<DigestItem, kMaxItemsInDigest>

Digest is an implementation- and usage-defined entity, for example, information, needed to verify the block

Definition at line 194 of file digest.hpp.

Digest item that is able to encode/decode 'system' digest items and provide opaque access to other items. Note: order of types in variant matters. Should match type ids from here: https://github.com/paritytech/substrate/blob/polkadot-v0.9.12/primitives/runtime/src/generic/digest.rs#L272

Definition at line 182 of file digest.hpp.

Definition at line 96 of file apply_result.hpp.

using kagome::primitives::ExtrinsicIndex = typedef uint32_t

Index of an extrinsic in a block

Definition at line 19 of file extrinsic.hpp.

using kagome::primitives::ExtrinsicKey = typedef std::vector<uint8_t>

ExtrinsicKey is used as a key to search extrinsic.

Definition at line 40 of file author_api_primitives.hpp.

Definition at line 15 of file session_key.hpp.

using kagome::primitives::GrandpaSessionKey = typedef crypto::Ed25519PublicKey

Definition at line 18 of file session_key.hpp.

Definition at line 34 of file inherent_data.hpp.

using kagome::primitives::Metadata = typedef std::optional<std::shared_ptr<Session>>

Metadata primitive.

Definition at line 35 of file author_api_primitives.hpp.

using kagome::primitives::NextConfigData = typedef boost::variant<Unused<0>, NextConfigDataV1>

Definition at line 45 of file scheduled_change.hpp.

using kagome::primitives::OpaqueMetadata = typedef std::vector<uint8_t>

Polkadot primitive, which is opaque representation of RuntimeMetadata

Definition at line 16 of file opaque_metadata.hpp.

using kagome::primitives::SubscriptionId = typedef uint64_t

SubscriptionId primitive.

Definition at line 22 of file author_api_primitives.hpp.

using kagome::primitives::ThreadNumber = typedef size_t

Definition at line 20 of file common.hpp.

Information on a transaction's validity and, if valid, on how it relate to other transactions.

Definition at line 201 of file transaction_validity.hpp.

Definition at line 76 of file digest.hpp.

Definition at line 75 of file digest.hpp.

Enumeration Type Documentation

enum kagome::primitives::AllowedSlots : uint8_t
strong
Enumerator
PrimaryOnly 
PrimaryAndSecondaryPlain 
PrimaryAndSecondaryVRF 

Definition at line 23 of file babe_configuration.hpp.

enum kagome::primitives::ArithmeticError : uint8_t
strong
Enumerator
Underflow 

Underflow.

Overflow 

Overflow.

DivisionByZero 

Division by zero.

Definition at line 15 of file arithmetic_error.hpp.

inherent data encode/decode error codes

Enumerator
IDENTIFIER_ALREADY_EXISTS 
IDENTIFIER_DOES_NOT_EXIST 

Definition at line 25 of file inherent_data.hpp.

Transaction is invalid. Details are described by the error code.

Enumerator
Call 

The call of the transaction is not expected.

Payment 

General error to do with the inability to pay some fees (e.g. account balance too low).

Future 

General error to do with the transaction not yet being valid (e.g. nonce too high).

Stale 

General error to do with the transaction being outdated (e.g. nonce too low).

BadProof 

General error to do with the transaction's proofs (e.g. signature).

AncientBirthBlock 

The transaction birth block is ancient.

ExhaustsResources 

The transaction would exhaust the resources of current block.

The transaction might be valid, but there are not enough resources left
in the current block.  
Custom 

Any other custom invalid validity that is not covered by this enum.

BadMandatory 

An extrinsic with a Mandatory dispatch resulted in Error. This is indicative of either a malicious validator or a buggy provide_inherent. In any case, it can result in dangerously overweight blocks and therefore if found, invalidates the block.

MandatoryDispatch 

A transaction with a mandatory dispatch. This is invalid; only inherent extrinsics are allowed to have mandatory dispatches.

Definition at line 95 of file transaction_validity.hpp.

Enumerator
INVALID_LENGTH 
INVALID_CHECKSUM 

Definition at line 20 of file ss58_codec.hpp.

enum kagome::primitives::TokenError : uint8_t
strong
Enumerator
NoFunds 

Funds are unavailable.

WouldDie 

Account that must exist would die.

BelowMinimum 

Account cannot exist with the funds that would be given.

CannotCreate 

Account cannot be created.

UnknownAsset 

The asset in question is unknown.

Frozen 

Funds exist but are frozen.

Unsupported 

Operation is not supported by the asset.

Definition at line 15 of file token_error.hpp.

Enumerator
InBlock 

Transaction is already included in block.

This means that we can't really tell where the transaction is coming
from, since it's already in the received block. Note that the custom
validation logic using either `Local` or `External` should most likely
just allow `InBlock` transactions as well.  
Local 

Transaction is coming from a local source.

This means that the transaction was produced internally by the node
(for instance an Off-Chain Worker, or an Off-Chain Call), as opposed
to being received over the network.  
External 

Transaction has been received externally.

This means the transaction has been received from (usually) "untrusted"
source, for instance received over the network or RPC.  

Definition at line 20 of file transaction_validity.hpp.

An unknown transaction validity.

Enumerator
CannotLookup 

Could not lookup some information that is required to validate the transaction.

NoUnsignedValidator 

No validator found for the given unsigned transaction.

Custom 

Any other custom unknown validity that is not covered by this enum.

Definition at line 156 of file transaction_validity.hpp.

Function Documentation

outcome::result< BlockHash > kagome::primitives::calculateBlockHash ( BlockHeader const &  header,
crypto::Hasher const &  hasher 
)

Definition at line 5 of file block_header.cpp.

static common::Buffer kagome::primitives::calculateChecksum ( gsl::span< uint8_t, kSs58Length-kSs58ChecksumLength ss58_address,
const crypto::Hasher hasher 
)
static

Definition at line 27 of file ss58_codec.cpp.

outcome::result< AccountId > kagome::primitives::decodeSs58 ( std::string_view  account_address,
const crypto::Hasher hasher 
)
noexcept

Return the account id part of the provided ss58 address. The checksum is verified in the process.

Definition at line 37 of file ss58_codec.cpp.

std::string kagome::primitives::encodeSs58 ( uint8_t  account_type,
const AccountId id,
const crypto::Hasher hasher 
)
noexcept

Definition at line 67 of file ss58_codec.cpp.

bool kagome::primitives::operator< ( const AuthorityId lhs,
const AuthorityId rhs 
)
inline

Definition at line 29 of file authority.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const ArithmeticError v 
)

Definition at line 26 of file arithmetic_error.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const TokenError v 
)

Definition at line 34 of file token_error.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const RuntimeDispatchInfo v 
)

Definition at line 52 of file runtime_dispatch_info.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const BlockHeader bh 
)

outputs object of type BlockHeader to stream

Template Parameters
Streamoutput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 60 of file block_header.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const BabeConfiguration config 
)

Definition at line 78 of file babe_configuration.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const InherentData v 
)

output InherentData object instance to stream

Template Parameters
Streamstream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 98 of file inherent_data.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const Version v 
)

outputs object of type Version to stream

Template Parameters
Streamoutput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 117 of file version.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const InvalidTransaction v 
)

Definition at line 130 of file transaction_validity.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::primitives::operator<< ( Stream &  s,
const UnknownTransaction v 
)

Definition at line 168 of file transaction_validity.hpp.

bool kagome::primitives::operator== ( const Transaction v1,
const Transaction v2 
)
inline

Definition at line 61 of file transaction.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
CheckInherentsResult v 
)

Definition at line 26 of file check_inherents_result.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
ArithmeticError v 
)

Definition at line 34 of file arithmetic_error.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
TokenError v 
)

Definition at line 42 of file token_error.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
RuntimeDispatchInfo v 
)

Definition at line 58 of file runtime_dispatch_info.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
BlockHeader bh 
)

decodes object of type BlockHeader from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 74 of file block_header.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
BabeConfiguration config 
)

Definition at line 90 of file babe_configuration.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
InherentData v 
)

decodes InherentData object instance from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to decode
Returns
reference to stream

Definition at line 118 of file inherent_data.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
Version v 
)

decodes object of type Version from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to decode
Returns
reference to stream

Definition at line 132 of file version.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
InvalidTransaction v 
)

Definition at line 139 of file transaction_validity.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::primitives::operator>> ( Stream &  s,
UnknownTransaction v 
)

Definition at line 177 of file transaction_validity.hpp.

kagome::primitives::SCALE_EMPTY_CODER ( DispatchSuccess  )
std::string_view kagome::primitives::to_string ( AllowedSlots  s)
inline

Definition at line 29 of file babe_configuration.hpp.

Variable Documentation

const auto kagome::primitives::kBabeEngineId
inline
Initial value:
=
ConsensusEngineId::fromString("BABE").value()

Definition at line 25 of file digest.hpp.

const auto kagome::primitives::kGrandpaEngineId
inline
Initial value:
=
ConsensusEngineId::fromString("FRNK").value()

Definition at line 28 of file digest.hpp.

constexpr uint32_t kagome::primitives::kRpcMethodsVersion = 1
static

Definition at line 18 of file rpc_methods.hpp.

constexpr size_t kagome::primitives::kSs58ChecksumLength = 2

Definition at line 22 of file ss58_codec.hpp.

constexpr size_t kagome::primitives::kSs58Length
Initial value:
= AccountId::size() + kSs58ChecksumLength
+ 1
constexpr size_t kSs58ChecksumLength
Definition: ss58_codec.hpp:22

Definition at line 23 of file ss58_codec.hpp.

const auto kagome::primitives::kUnsupportedEngineId_BEEF
inline
Initial value:
=
ConsensusEngineId::fromString("BEEF").value()

Definition at line 34 of file digest.hpp.

const auto kagome::primitives::kUnsupportedEngineId_POL1
inline
Initial value:
=
ConsensusEngineId::fromString("POL1").value()

Definition at line 31 of file digest.hpp.