sgns::IInputValidator¶
Strategy interface for validating transaction inputs and their witness data.
#include <InputValidators.hpp>
Inherited by sgns::GeniusInputValidator, sgns::PublicChainInputValidator
Public Functions¶
| Name | |
|---|---|
| virtual | ~IInputValidator() =default Destroys the input validator. |
| virtual bool | ValidateUTXOParameters(const UTXOTxParameters & params, const std::string & address, const UTXOManager & utxo_manager) const =0 Validates ownership and structure of the supplied UTXO parameters. |
| virtual bool | ValidateWitness(const ConsensusSubject & subject, const std::shared_ptr< GeniusTransaction > & tx, const UTXOTxParameters & params, const std::shared_ptr< Blockchain > & blockchain) const =0 Validates the chain-specific witness data associated with a transaction input set. |
| virtual bool | RequiresConsensusUTXOData() const =0 Indicates whether this validator requires consensus-provided UTXO data. |
Public Functions Documentation¶
function ~IInputValidator¶
Destroys the input validator.
function ValidateUTXOParameters¶
virtual bool ValidateUTXOParameters(
const UTXOTxParameters & params,
const std::string & address,
const UTXOManager & utxo_manager
) const =0
Validates ownership and structure of the supplied UTXO parameters.
Parameters:
- params UTXO inputs and outputs carried by the transaction.
- address Source address expected to own or authorize the inputs.
- utxo_manager Local UTXO manager used for ownership and signature checks when required.
Return: True when the parameters are structurally valid for this source chain.
Reimplemented by: sgns::GeniusInputValidator::ValidateUTXOParameters, sgns::PublicChainInputValidator::ValidateUTXOParameters
function ValidateWitness¶
virtual bool ValidateWitness(
const ConsensusSubject & subject,
const std::shared_ptr< GeniusTransaction > & tx,
const UTXOTxParameters & params,
const std::shared_ptr< Blockchain > & blockchain
) const =0
Validates the chain-specific witness data associated with a transaction input set.
Parameters:
- subject Consensus subject that carries nonce, witness, and UTXO commitment data.
- tx Transaction whose inputs and outputs are being validated.
- params UTXO inputs and outputs carried by
tx. - blockchain Blockchain service used to resolve producer certificates when required.
Return: True when the witness proves that params are valid for tx.
Reimplemented by: sgns::GeniusInputValidator::ValidateWitness, sgns::PublicChainInputValidator::ValidateWitness
function RequiresConsensusUTXOData¶
Indicates whether this validator requires consensus-provided UTXO data.
Return: True when the validator needs UTXO witness and commitment data from consensus.
Reimplemented by: sgns::GeniusInputValidator::RequiresConsensusUTXOData, sgns::PublicChainInputValidator::RequiresConsensusUTXOData
Updated on 2026-06-05 at 17:22:18 -0700