sgns::primitives¶
Namespaces¶
| Name |
|---|
| sgns::primitives::detail |
| sgns::primitives::parachain |
Classes¶
Types¶
| Name | |
|---|---|
| enum class uint8_t | ApplyOutcome |
| enum class uint8_t | ApplyError |
| enum class | InherentDataError { IDENTIFIER_ALREADY_EXISTS = 1, IDENTIFIER_DOES_NOT_EXIST} inherent data encode/decode error codes |
| enum class uint8_t | InvalidTransaction { Call = 1, Payment, Future, Stale, BadProof, AncientBirthBlock, ExhaustsResources, Custom} Transaction is invalid. Details are described by the error code. |
| enum class uint8_t | UnknownTransaction { CannotLookup = 1, NoUnsignedValidator, Custom} An unknown transaction validity. |
| using boost::variant< ApplyOutcome, ApplyError > | ApplyResult |
| using uint64_t | SubscriptionId SubscriptionId primitive. |
| using boost::optional< std::shared_ptr< Session > > | Metadata Metadata primitive. |
| using std::vector< uint8_t > | ExtrinsicKey ExtrinsicKey is used as a key to search extrinsic. |
| using uint64_t | AuthorityWeight |
| using uint64_t | AuthorityIndex |
| using std::vector< Extrinsic > | BlockBody |
| using base::Hash256 | BlockHash |
| using boost::variant< BlockHash, BlockNumber > | BlockId Block id is the variant over BlockHash and BlockNumber. |
| using uint64_t | BlocksRequestId |
| using uint64_t | BlockNumber |
| using detail::BlockInfoT< struct BlockInfoTag > | BlockInfo |
| using scale::CompactInteger | CompactInteger |
| using base::Blob< 4 > | VerificationEngineId Verification engine unique ID. |
| using base::Hash256 | ChangesTrieRoot |
| using boost::variant< Unused< 0 >, Unused< 1 >, ChangesTrieRoot, Unused< 3 >, Verification, Seal, PreRuntime > | DigestItem |
| using std::vector< DigestItem > | Digest |
| using uint32_t | ExtrinsicIndex |
| using base::Blob< 8u > | InherentIdentifier |
| using std::vector< uint8_t > | OpaqueMetadata |
| using uint64_t | ProductionSlotNumber |
| using clock::SystemClock | ProductionClock |
| using ProductionClock::Duration | ProductionDuration |
| using base::Blob< crypto::constants::sr25519::vrf::OUTPUT_SIZE > | Randomness |
| using base::Blob< 32 > | SessionKey |
| using boost::variant< InvalidTransaction, UnknownTransaction > | TransactionValidityError |
| using boost::variant< ValidTransaction, TransactionValidityError > | TransactionValidity |
| using base::Blob< 8u > | ApiId The identity of a particular API interface that the runtime might provide. |
| using std::pair< ApiId, uint32_t > | Api single Api item |
| using std::vector< Api > | ApisVec A vector of pairs of ApiId and a u32 for version. |
Functions¶
| Name | |
|---|---|
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const ApplyOutcome & outcome) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, ApplyOutcome & outcome) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const ApplyError & error) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, ApplyError & error) |
| bool | operator<(const AuthorityId & lhs, const AuthorityId & rhs) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const AuthorityId & a) outputs object of type AuthorityId to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, AuthorityId & a) decodes object of type AuthorityId from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const Authority & a) outputs object of type Authority to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, Authority & a) decodes object of type Authority from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const Block & b) outputs object of type Block to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, Block & b) decodes object of type Block from stream |
| bool | operator==(const BlockData & lhs, const BlockData & rhs) compares two BlockData instances |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const BlockData & v) outputs object of type BlockData to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, BlockData & v) decodes object of type BlockData from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const BlockHeader & bh) Outputs a BlockHeader to an encoding stream. |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, BlockHeader & bh) Decodes a BlockHeader from a decoding stream. |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, CheckInherentsResult & v) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const detail::DigestItemCommon & dic) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, detail::DigestItemCommon & dic) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const Extrinsic & v) outputs object of type Extrinisic to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, Extrinsic & v) decodes object of type Extrinisic from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const InherentData & v) output InherentData object instance to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, InherentData & v) decodes InherentData object instance from stream |
| bool | operator==(const Justification & lhs, const Justification & rhs) compares two Justification instances |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const Justification & v) outputs object of type Justification to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, Justification & v) decodes object of type Justification from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const ProductionConfiguration & config) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, ProductionConfiguration & config) |
| template <class Stream > Stream & |
operator<<(Stream & s, const DelayInChain & delay) |
| template <class Stream > Stream & |
operator>>(Stream & s, DelayInChain & delay) |
| template <class Stream > Stream & |
operator<<(Stream & s, const OnDisabled & target) |
| template <class Stream > Stream & |
operator>>(Stream & s, OnDisabled & target) |
| template <class Stream > Stream & |
operator<<(Stream & s, const AuthorityListChange & alc) |
| template <class Stream > Stream & |
operator>>(Stream & s, AuthorityListChange & alc) |
| bool | operator==(const Transaction & v1, const Transaction & v2) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const InvalidTransaction & v) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, InvalidTransaction & v) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const UnknownTransaction & v) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, UnknownTransaction & v) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const ValidTransaction & v) outputs object of type Valid to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, ValidTransaction & v) decodes object of type Valid from stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const Version & v) outputs object of type Version to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, Version & v) decodes object of type Version from stream |
Attributes¶
| Name | |
|---|---|
| const auto | kProductionEngineId |
| const auto | kFinalityEngineId |
Detailed Description¶
Authoring api primitives
Types Documentation¶
enum ApplyOutcome¶
| Enumerator | Value | Description |
|---|---|---|
| SUCCESS | 0 | |
| FAIL | 1 |
enum ApplyError¶
| Enumerator | Value | Description |
|---|---|---|
| BAD_SIGNATURE | 0 | Bad signature. |
| STALE | 1 | Nonce too low. |
| FUTURE | 2 | Nonce too high. |
| CANT_PAY | 3 | Sending account had too low a balance. |
| FULL_BLOCK | 255 | Block is full, no more extrinsics can be applied. |
enum InherentDataError¶
| Enumerator | Value | Description |
|---|---|---|
| IDENTIFIER_ALREADY_EXISTS | 1 | |
| IDENTIFIER_DOES_NOT_EXIST |
inherent data encode/decode error codes
enum InvalidTransaction¶
| Enumerator | Value | Description |
|---|---|---|
| Call | 1 | 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. |
Transaction is invalid. Details are described by the error code.
enum UnknownTransaction¶
| Enumerator | Value | Description |
|---|---|---|
| CannotLookup | 1 | 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. |
An unknown transaction validity.
using ApplyResult¶
using SubscriptionId¶
SubscriptionId primitive.
using Metadata¶
Metadata primitive.
using ExtrinsicKey¶
ExtrinsicKey is used as a key to search extrinsic.
using AuthorityWeight¶
using AuthorityIndex¶
Authority index
using BlockBody¶
using BlockHash¶
using BlockId¶
Block id is the variant over BlockHash and BlockNumber.
using BlocksRequestId¶
using BlockNumber¶
using BlockInfo¶
using CompactInteger¶
using VerificationEngineId¶
Verification engine unique ID.
using ChangesTrieRoot¶
System digest item that contains the root of changes trie at given block. It is created for every block iff runtime supports changes trie creation.
using DigestItem¶
using sgns::primitives::DigestItem = boost::variant<Unused<0>,
Unused<1>,
ChangesTrieRoot,
Unused<3>,
Verification,
Seal,
PreRuntime>;
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:
using Digest¶
Digest is an implementation- and usage-defined entity, for example, information, needed to verify the block
using ExtrinsicIndex¶
Index of an extrinsic in a block
using InherentIdentifier¶
using OpaqueMetadata¶
SuperGenius primitive, which is opaque representation of RuntimeMetadata
using ProductionSlotNumber¶
using ProductionClock¶
using ProductionDuration¶
using Randomness¶
using SessionKey¶
using TransactionValidityError¶
using sgns::primitives::TransactionValidityError =
boost::variant<InvalidTransaction, UnknownTransaction>;
using TransactionValidity¶
using sgns::primitives::TransactionValidity =
boost::variant<ValidTransaction, TransactionValidityError>;
Information on a transaction's validity and, if valid, on how it relate to other transactions.
using ApiId¶
The identity of a particular API interface that the runtime might provide.
This is the same structure as RuntimeVersion from substrate
using Api¶
single Api item
using ApisVec¶
A vector of pairs of ApiId and a u32 for version.
Functions Documentation¶
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const ApplyOutcome & outcome
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
ApplyOutcome & outcome
)
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const ApplyError & error
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
ApplyError & error
)
function operator<¶
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const AuthorityId & a
)
outputs object of type AuthorityId to stream
Parameters:
- s stream reference
- a value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
AuthorityId & a
)
decodes object of type AuthorityId from stream
Parameters:
- s stream reference
- a value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const Authority & a
)
outputs object of type Authority to stream
Parameters:
- s stream reference
- a value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
Authority & a
)
decodes object of type Authority from stream
Parameters:
- s stream reference
- a value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const Block & b
)
outputs object of type Block to stream
Parameters:
- s stream reference
- b value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
Block & b
)
decodes object of type Block from stream
Parameters:
- s stream reference
- b value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator==¶
compares two BlockData instances
Parameters:
- lhs first instance
- rhs second instance
Return: true if equal false otherwise
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const BlockData & v
)
outputs object of type BlockData to stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
BlockData & v
)
decodes object of type BlockData from stream
Parameters:
- s stream reference
- v value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const BlockHeader & bh
)
Outputs a BlockHeader to an encoding stream.
Parameters:
- s Stream reference.
- bh Header to output.
Template Parameters:
- Stream Output stream type.
Return: Reference to stream.
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
BlockHeader & bh
)
Decodes a BlockHeader from a decoding stream.
Parameters:
- s Stream reference.
- bh Header to populate.
Template Parameters:
- Stream Input stream type.
Return: Reference to stream.
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
CheckInherentsResult & v
)
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const detail::DigestItemCommon & dic
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
detail::DigestItemCommon & dic
)
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const Extrinsic & v
)
outputs object of type Extrinisic to stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
Extrinsic & v
)
decodes object of type Extrinisic from stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
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
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
InherentData & v
)
decodes InherentData object instance from stream
Parameters:
- s stream reference
- v value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator==¶
compares two Justification instances
Parameters:
- lhs first instance
- rhs second instance
Return: true if equal false otherwise
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const Justification & v
)
outputs object of type Justification to stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
Justification & v
)
decodes object of type Justification from stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const ProductionConfiguration & config
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
ProductionConfiguration & config
)
function operator<<¶
function operator>>¶
function operator<<¶
function operator>>¶
function operator<<¶
function operator>>¶
function operator==¶
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const InvalidTransaction & v
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
InvalidTransaction & v
)
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const UnknownTransaction & v
)
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
UnknownTransaction & v
)
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const ValidTransaction & v
)
outputs object of type Valid to stream
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
ValidTransaction & v
)
decodes object of type Valid from stream
Parameters:
- s stream reference
- v value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
function operator<<¶
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
Parameters:
- s stream reference
- v value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
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
Parameters:
- s stream reference
- v value to decode
Template Parameters:
- Stream input stream type
Return: reference to stream
Attributes Documentation¶
variable kProductionEngineId¶
variable kFinalityEngineId¶
Updated on 2026-03-04 at 13:10:43 -0800