OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
signature.cpp File Reference
#include "signature.hpp"
#include "address.hpp"
#include "crypto/sha256.h"
#include "format.hpp"
#include "hash.hpp"
#include "rlp.hpp"
#include "serialization.hpp"
#include "util.hpp"
#include "util/common/hash.hpp"
#include "util/serialization/util.hpp"
#include <optional>
#include <secp256k1.h>
Include dependency graph for signature.cpp:

Go to the source code of this file.

Namespaces

namespace  cbdc
 
namespace  cbdc::parsec
 
namespace  cbdc::parsec::agent
 
namespace  cbdc::parsec::agent::runner
 

Functions

auto cbdc::parsec::agent::runner::secp256k1_ecdsa_recoverable_signature_to_evm_sig (secp256k1_ecdsa_recoverable_signature &sig, evm_tx_type type, uint64_t chain_id) -> evm_sig
 
auto cbdc::parsec::agent::runner::evm_sig_to_secp256k1_ecdsa_recoverable_signature (const evm_sig &esig, evm_tx_type type, uint64_t chain_id) -> std::optional< secp256k1_ecdsa_recoverable_signature >
 
auto cbdc::parsec::agent::runner::eth_sign (const privkey_t &key, hash_t &hash, evm_tx_type type, const std::shared_ptr< secp256k1_context > &ctx, uint64_t chain_id=opencbdc_chain_id) -> evm_sig
 Signs a hash using a privkey_t using ecdsa and produces an evm_sig struct Used primarily in unit tests for signature checking.
 
auto cbdc::parsec::agent::runner::check_signature (const cbdc::parsec::agent::runner::evm_tx &tx, const std::shared_ptr< secp256k1_context > &ctx, uint64_t chain_id=opencbdc_chain_id) -> std::optional< evmc::address >
 Checks the signature of an EVM transaction.
 
auto cbdc::parsec::agent::runner::sig_hash (const cbdc::parsec::agent::runner::evm_tx &tx, uint64_t chain_id=opencbdc_chain_id) -> hash_t
 Calculates the hash for creating / validating the signature.