Skip to main content

luna.engine.local_validator

LocalValidator Objects

class LocalValidator()

Class: LocalValidator

A local implementation of Luna's validation mechanism, designed primarily for use in local environments. This class offers a simplified validation process focusing on account and participant verification within contracts.

Key Features:

  • Basic Validation Checks: Performs essential validation checks for accounts and participants.
  • Simplified Process: Tailored for local environments where comprehensive validation is not required.
  • Default Success Responses: By default, returns successful validation responses unless explicitly mocked for testing purposes.

Usage:

This validator is used in scenarios where a full-fledged validation mechanism is not necessary, such as during local testing or development.

execute

def execute(accounts: list[str], participants: list[str],
contract_id: str) -> list[ValidationError]

Executes the validation process for the given accounts and participants in a contract.

Arguments:

  • accounts (list[str]): A list of account identifiers to validate.
  • participants (list[str]): A list of participant identifiers to validate.
  • contract_id (str): The identifier of the contract under validation.

Returns:

  • list[ValidationError]: A list of validation errors (empty by default unless mocked).