luna.engine.api
EngineApi Objects
class EngineApi(ABC)
Abstract base class for Luna's engine API, defining essential engine functionalities.
put_audit
@abstractmethod
def put_audit(req: types.PutAuditRequest) -> types.PutAuditResponse
Logs audit information for contract executions.
get_template
@abstractmethod
def get_template(req: types.GetTemplateRequest) -> types.GetTemplateResponse
Retrieves a contract template based on the provided request.
get_project
@abstractmethod
def get_project(req: types.GetProjectRequest) -> types.GetProjectResponse
Retrieves a project's repository data.
get_parameter
@abstractmethod
def get_parameter(
req: types.GetParameterRequest) -> types.GetParameterResponse
Fetches the value of a specified parameter in a contract.
get_variable
@abstractmethod
def get_variable(req: types.GetVariableRequest) -> types.GetVariableResponse
Retrieves the value of a variable from a contract.
get_secret
@abstractmethod
def get_secret(req: types.GetSecretRequest) -> types.GetSecretResponse
Obtains secret data associated with a specified contract.
get_connection
@abstractmethod
def get_connection(
req: types.GetConnectionRequest) -> types.GetConnectionResponse
Get data describing a data connection.
get_participant_detail
@abstractmethod
def get_participant_detail(
req: types.GetParticipantDetailRequest
) -> types.GetParticipantDetailResponse
Obtains the value of a participants detail
update_participant_detail
@abstractmethod
def update_participant_detail(
req: types.UpdateParticipantDetailRequest
) -> types.UpdateParticipantDetailResponse
Updates the value of a participants detail
get_role
@abstractmethod
def get_role(req: types.GetRoleRequest) -> types.GetRoleResponse
Fetches role data, such as participant IDs, from a contract.
get_clause_eval_count
@abstractmethod
def get_clause_eval_count(
req: types.GetClauseEvalCountRequest
) -> types.GetClauseEvalCountResponse
Retrieves the evaluation count of a specified clause within a contract.
get_evaluated_clause
@abstractmethod
def get_evaluated_clause(
req: types.GetEvaluatedClauseRequest
) -> types.GetEvaluatedClauseResponse
Fetches data for a clause that has been evaluated in a contract.
get_linked_contract
@abstractmethod
def get_linked_contract(
req: types.GetLinkedContractRequest
) -> types.GetLinkedContractResponse
Retrieves information about a contract linked to another contract.
get_children
@abstractmethod
def get_children(req: types.GetChildrenRequest) -> types.GetChildrenResponse
Obtains information about child contracts linked to a parent contract.
get_tick_count
@abstractmethod
def get_tick_count(
req: types.GetTickCountRequest) -> types.GetTickCountResponse
Fetches the tick count, representing the number of iterations or executions, of a contract.
get_tick_datetime
@abstractmethod
def get_tick_datetime(
req: types.GetTickDatetimeRequest) -> types.GetTickDatetimeResponse
Retrieves the datetime of the most recent tick or iteration in a contract.
get_terminated
@abstractmethod
def get_terminated(
req: types.GetTerminatedRequest) -> types.GetTerminatedResponse
Determines if the specified contract has been terminated.
get_events
@abstractmethod
def get_events(req: types.GetEventsRequest) -> types.GetEventsResponse
Fetches a list of events that have occurred within a contract.
get_event
@abstractmethod
def get_event(req: types.GetEventRequest) -> types.GetEventResponse
Retrieves specific event data from a contract.
get_contract_info
@abstractmethod
def get_contract_info(
req: types.GetContractInfoRequest) -> types.GetContractInfoResponse
Obtains comprehensive information about a specific contract.
validate
@abstractmethod
def validate(req: types.ValidateRequest) -> types.ValidateResponse
Validates contract data, such as parameters and roles, ensuring they meet specific criteria.
run_function
@abstractmethod
def run_function(req: types.RunFunctionRequest) -> types.RunFunctionResponse
Executes a specified function within the context of a contract.
make_payment
@abstractmethod
def make_payment(req: types.MakePaymentRequest)
Initiates the creation of a payment