Kagome
Polkadot Runtime Engine in C++17
kagome::parachain::ValidatorSigner Class Reference

Signs payload with signing context and validator keypair. More...

#include <signer.hpp>

Collaboration diagram for kagome::parachain::ValidatorSigner:

Public Types

using ValidatorIndex = network::ValidatorIndex
 

Public Member Functions

 ValidatorSigner (ValidatorIndex validator_index, SigningContext context, std::shared_ptr< crypto::Sr25519Keypair > keypair, std::shared_ptr< crypto::Hasher > hasher, std::shared_ptr< crypto::Sr25519Provider > sr25519_provider)
 
template<typename T >
outcome::result< network::Signed< T > > sign (T payload) const
 Sign payload. More...
 
ValidatorIndex validatorIndex () const
 Get validator index. More...
 
const primitives::BlockHashrelayParent () const
 Get relay parent hash. More...
 

Private Attributes

ValidatorIndex validator_index_
 
SigningContext context_
 
std::shared_ptr< crypto::Sr25519Keypairkeypair_
 
std::shared_ptr< crypto::Hasherhasher_
 
std::shared_ptr< crypto::Sr25519Providersr25519_provider_
 

Detailed Description

Signs payload with signing context and validator keypair.

Definition at line 52 of file signer.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

kagome::parachain::ValidatorSigner::ValidatorSigner ( ValidatorIndex  validator_index,
SigningContext  context,
std::shared_ptr< crypto::Sr25519Keypair keypair,
std::shared_ptr< crypto::Hasher hasher,
std::shared_ptr< crypto::Sr25519Provider sr25519_provider 
)

Definition at line 17 of file signer.cpp.

Member Function Documentation

const primitives::BlockHash & kagome::parachain::ValidatorSigner::relayParent ( ) const

Get relay parent hash.

Definition at line 33 of file signer.cpp.

template<typename T >
outcome::result<network::Signed<T> > kagome::parachain::ValidatorSigner::sign ( payload) const
inline

Sign payload.

Definition at line 64 of file signer.hpp.

ValidatorSigner::ValidatorIndex kagome::parachain::ValidatorSigner::validatorIndex ( ) const

Get validator index.

Definition at line 29 of file signer.cpp.

Member Data Documentation

SigningContext kagome::parachain::ValidatorSigner::context_
private

Definition at line 82 of file signer.hpp.

std::shared_ptr<crypto::Hasher> kagome::parachain::ValidatorSigner::hasher_
private

Definition at line 84 of file signer.hpp.

std::shared_ptr<crypto::Sr25519Keypair> kagome::parachain::ValidatorSigner::keypair_
private

Definition at line 83 of file signer.hpp.

std::shared_ptr<crypto::Sr25519Provider> kagome::parachain::ValidatorSigner::sr25519_provider_
private

Definition at line 85 of file signer.hpp.

ValidatorIndex kagome::parachain::ValidatorSigner::validator_index_
private

Definition at line 81 of file signer.hpp.


The documentation for this class was generated from the following files: