module arch.node.engines.pub_sub_topic_environment;

import arch.node.engines.pub_sub_topic_messages open;

import arch.node.types.basics open;
import arch.node.types.engine open;
import arch.node.types.messages open;
import arch.node.types.identities open;
import arch.node.types.anoma_message as Anoma open;

PubSubTopicMailboxState : Type := Unit;

type PubSubTopicLocalState := mkPubSubTopicLocalState;

PubSubTopicTimerHandle : Type := Unit;

PubSubTopicTimestampedTrigger : Type :=
  TimestampedTrigger PubSubTopicTimerHandle Anoma.Msg;

PubSubTopicEnv : Type :=
  EngineEnv
    PubSubTopicLocalState
    PubSubTopicMailboxState
    PubSubTopicTimerHandle
    Anoma.Msg;

module pub_sub_topic_environment_example;
  
  exPubSubTopicEnv : PubSubTopicEnv :=
    mkEngineEnv@{
      localState := mkPubSubTopicLocalState;
      mailboxCluster := Map.empty;
      acquaintances := Set.empty;
      timers := [];
    };

end;