Juvix imports
module arch.node.engines.commitment_config;
import prelude open;
import arch.node.engines.commitment_messages open;
import arch.system.identity.identity as Identity;
import arch.system.identity.identity as Identity;
import arch.node.types.engine open;
import arch.node.types.messages open;
import arch.node.types.identities open;
Commitment Configuration¶
Overview¶
The commitment engine configuration contains static information for commitment engine instances, namely the signer and the backend.
The Commitment Local Configuration¶
CommitmentLocalCfg
¶
The type for engine-specific local configuration.
type CommitmentLocalCfg :=
mk@{
signer : Identity.Signer Backend Signable Commitment;
backend : Backend;
};
Arguments
signer
:- The signer for the identity.
backend
:- The backend to use for signing.
The Commitment Configuration¶
CommitmentCfg
¶
CommitmentCfg : Type := EngineCfg CommitmentLocalCfg;
Instantiation¶
commitmentCfg : CommitmentCfg :=
EngineCfg.mk@{
node := PublicKey.Curve25519PubKey "0xabcd1234";
name := "commitment";
cfg :=
CommitmentLocalCfg.mk@{
signer :=
Identity.Signer.mkSigner@{
sign := \{_ x := Signature.Ed25519Signature "0xabcd1234"};
};
backend := Backend.LocalMemory;
};
};