Skip to content
Juvix imports

module tutorial.engines.template_minimum;

import tutorial.engines.template_minimum_messages open public;
import tutorial.engines.template_minimum_config open public;
import tutorial.engines.template_minimum_environment open public;
import tutorial.engines.template_minimum_behaviour open public;
import arch.node.types.basics open;
import arch.node.types.engine open;
import arch.node.types.anoma as Anoma open;

open template_minimum_config_example;
open template_minimum_environment_example;
open template_minimum_behaviour_example;

Template Minimum Engine

Purpose

Brief summary of the purpose of the engine.

Components

  • Template Minimum Messages
  • Template Minimum Configuration
  • Template Minimum Environment
  • Template Minimum Behaviour
  • Some
  • Useful
  • Links

Type

TemplateMinimumEngine : Type :=
Engine
TemplateMinimumLocalCfg
TemplateMinimumLocalState
TemplateMinimumMailboxState
TemplateMinimumTimerHandle
TemplateMinimumActionArguments
Anoma.Msg
Anoma.Cfg
Anoma.Env;

Instantiation

exTemplateMinimumEngine : TemplateMinimumEngine :=
mkEngine@{
cfg := exTemplateMinimumCfg;
env := exTemplateMinimumEnv;
behaviour := exTemplateMinimumBehaviour;
};

Where exTemplateMinimumCfg is defined as follows:

exTemplateMinimumCfg : TemplateMinimumCfg :=
mkEngineCfg@{
node := Curve25519PubKey "0xabcd1234";
name := "template-minimum";
cfg := mkTemplateMinimumLocalCfg;
};

exTemplateMinimumEnv is defined as follows:

exTemplateMinimumEnv : TemplateMinimumEnv :=
mkEngineEnv@{
localState := mkTemplateMinimumLocalState;
mailboxCluster := Map.empty;
acquaintances := Set.empty;
timers := [];
};

and exTemplateMinimumBehaviour is defined as follows:

module template_minimum_behaviour_example;
exTemplateMinimumBehaviour : TemplateMinimumBehaviour :=
mkEngineBehaviour@{
guards := First [exampleReplyGuard];
};
end;