Skip to content
Juvix imports

module arch.node.engines.verification_messages;

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

Verification Messages

Message interface

MsgVerificationRequest RequestVerification

type RequestVerification :=
mkRequestVerification@{
data : Signable;
commitment : Commitment;
externalIdentity : ExternalIdentity;
useSignsFor : Bool;
};

A RequestVerification instructs the Verification Engine to verify a commitment (signature) from a particular external identity, possibly using known signs_for relationships.

Arguments
data:
The data that was signed.
commitment:
The commitment (signature) to verify.
externalIdentity:
The external identity that supposedly made the commitment.
useSignsFor:
Whether or not to use known signs_for relationships.

MsgVerificationResponse ResponseVerification

type ResponseVerification :=
mkResponseVerification@{
result : Bool;
err : Option String;
};

A ResponseVerification contains the result of verifying a commitment in response to a RequestVerification.

Arguments
result:
True if the verification succeeded, False otherwise.
err:
An error message if verification failed.

VerificationMsg

type VerificationMsg :=
| MsgVerificationRequest RequestVerification
| MsgVerificationResponse ResponseVerification;

Message sequence diagrams

Verification Sequence (Without SignsFor evidence)

sequenceDiagram
    participant C as Client
    participant VE as Verification Engine

    C->>VE: RequestVerification(useSignsFor=false)
    Note over VE: Verify commitment directly for external identity
    VE-->>C: ResponseVerification
Sequence diagram for verification (no signs for).

Verification Sequence (With SignsFor evidence)

sequenceDiagram
    participant C as Client
    participant VE as Verification Engine
    participant SF as SignsFor Engine

    C->>VE: RequestVerification(useSignsFor=true)
    VE->>SF: QuerySignsForEvidenceRequest
    Note over SF: Retrieve signs_for evidence
    SF-->>VE: QuerySignsForEvidenceResponse
    Note over VE: Verify commitment using SignsFor evidence
    VE-->>C: ResponseVerification
Sequence diagram for verification (signs for).

Engine Components