Skip to content
Juvix imports

module arch.node.engines.commitment_messages;

import prelude open;
import arch.node.types.identities open;

Commitment Messages

Message interface

MsgCommitmentRequest RequestCommitment

type RequestCommitment := mkRequestCommitment@{data : Signable};

A RequestCommitment instructs a commitment engine instance to produce a commitment (signature) over the provided data.

Arguments
data:
The data to sign.

MsgCommitmentResponse ResponseCommitment

type ResponseCommitment :=
mkResponseCommitment@{
commitment : Commitment;
err : Option String;
};

A ResponseCommitment contains the commitment (signature) generated by the commitment engine instance in response to a RequestCommitment.

Arguments
commitment:
The generated commitment (signature).
err:
An error message if commitment generation failed.

CommitmentMsg

type CommitmentMsg :=
| MsgCommitmentRequest RequestCommitment
| MsgCommitmentResponse ResponseCommitment;

Message sequence diagrams

Commitment Generation Sequence

sequenceDiagram
    participant C as Client
    participant CE as Commitment Engine

    C->>CE: RequestCommitment(data)
    Note over CE: Generate commitment using internal signer
    CE-->>C: ResponseCommitment(commitment)
Sequence diagram for commitment generation.

Engine Components