Juvix imports
module arch.node.engines.signs_for;
import prelude open;
import arch.node.types.engine open;
import arch.node.engines.signs_for_config open public;
import arch.node.engines.signs_for_messages open public;
import arch.node.engines.signs_for_environment open public;
import arch.node.engines.signs_for_behaviour open public;
import arch.node.types.anoma as Anoma open;
open signs_for_config_example;
open signs_for_environment_example;
Signs For Engine¶
The Signs For Engine manages signs for relationships between identities. A "signs for" relationship indicates that one identity can produce signatures (commitments) on behalf of another identity.
Purpose¶
The Signs For Engine maintains and manages the state of sings for relationships between identities. It handles queries about these relationships, allows submission of new evidence, and provides information about existing relationships. This is useful in scenarios where signature delegation or proxy signing is required.
Components¶
Type¶
SignsForEngine : Type :=
Engine
SignsForCfg
SignsForLocalState
SignsForMailboxState
SignsForTimerHandle
SignsForActionArguments
Anoma.Msg
Anoma.Cfg
Anoma.Env;
Example of a signsFor engine¶
exampleSignsForEngine : SignsForEngine :=
mkEngine@{
cfg := signsForCfg;
env := signsForEnv;
behaviour := signsForBehaviour;
};
where signsForCfg
is defined as follows:
signsForCfg : EngineCfg SignsForCfg :=
mkEngineCfg@{
node := Curve25519PubKey "0xabcd1234";
name := "signs for";
cfg := mkSignsForCfg;
};
signsForEnv
is defined as follows:
signsForEnv : SignsForEnv :=
mkEngineEnv@{
localState :=
mkSignsForLocalState@{
evidenceStore := Set.empty;
};
mailboxCluster := Map.empty;
acquaintances := Set.empty;
timers := [];
};
and signsForBehaviour
is defined as follows:
signsForBehaviour : SignsForBehaviour :=
mkEngineBehaviour@{
guards :=
First [signsForQueryGuard; submitEvidenceGuard; queryEvidenceGuard];
};