Skip to content
Juvix imports

module arch.system.types.resource_machine;

import prelude open;
import arch.system.types.transaction open;

Resource Machines

A resource machine is a term of type ResourceMachine.

ResourceMachine

trait
type ResourceMachine A :=
mkResourceMachine@{
createTransaction : Unit -> Transaction A;
composeTransactions : Transaction A -> Transaction A -> Transaction A;
verifyTransaction : Transaction A -> Bool;
};

Purpose

The purpose of the ResourceMachine is to allow us to:

  • create a transaction,
  • compose transactions, and
  • verify transactions according to the rules of the protocol.