| 
    Kagome
    
   Polkadot Runtime Engine in C++17 
   | 
 
#include <vrf_provider.hpp>
Public Member Functions | |
| virtual | ~VRFProvider ()=default | 
| virtual Sr25519Keypair | generateKeypair () const =0 | 
| virtual std::optional< VRFOutput > | sign (const common::Buffer &msg, const Sr25519Keypair &keypair, const VRFThreshold &threshold) const =0 | 
| virtual VRFVerifyOutput | verify (const common::Buffer &msg, const VRFOutput &output, const Sr25519PublicKey &public_key, const VRFThreshold &threshold) const =0 | 
| virtual std::optional< VRFOutput > | signTranscript (const primitives::Transcript &msg, const Sr25519Keypair &keypair, const VRFThreshold &threshold) const =0 | 
| virtual std::optional< VRFOutput > | signTranscript (const primitives::Transcript &msg, const Sr25519Keypair &keypair) const =0 | 
| virtual VRFVerifyOutput | verifyTranscript (const primitives::Transcript &msg, const VRFOutput &output, const Sr25519PublicKey &public_key, const VRFThreshold &threshold) const =0 | 
SR25519 based verifiable random function implementation
Definition at line 20 of file vrf_provider.hpp.
      
  | 
  virtualdefault | 
      
  | 
  pure virtual | 
Generates random keypair for signing the message
Implemented in kagome::crypto::VRFProviderImpl.
      
  | 
  pure virtual | 
Sign message
| msg | using | 
| keypair. | If computed value is less than | 
| threshold | then return optional containing this value and proof. Otherwise none returned | 
Implemented in kagome::crypto::VRFProviderImpl.
      
  | 
  pure virtual | 
Sign transcript message
| msg | using | 
| keypair. | If computed value is less than | 
| threshold | then return optional containing this value and proof. Otherwise none returned | 
Implemented in kagome::crypto::VRFProviderImpl.
      
  | 
  pure virtual | 
Sign transcript message
| msg | using | 
| keypair | without any threshold check. Returns proof if no error happened. | 
Implemented in kagome::crypto::VRFProviderImpl.
      
  | 
  pure virtual | 
Verifies that
| output | was derived using | 
| public_key | on | 
| msg | 
Implemented in kagome::crypto::VRFProviderImpl.
      
  | 
  pure virtual | 
Verifies that
| output | was derived using | 
| public_key | on transcript | 
| msg | 
Implemented in kagome::crypto::VRFProviderImpl.