Skip to content
Juvix imports

module arch.node.engines.signs_for_messages;

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

Signs For Messages

Message interface

type SignsForMsg :=
| SignsForRequest {
externalIdentityA : ExternalIdentity;
externalIdentityB : ExternalIdentity
}
| SignsForResponse {
signsFor : Bool;
err : Option String
}
| SubmitSignsForEvidenceRequest {evidence : SignsForEvidence}
| SubmitSignsForEvidenceResponse {err : Option String}
| QuerySignsForEvidenceRequest {externalIdentity : ExternalIdentity}
| QuerySignsForEvidenceResponse {
externalIdentity : ExternalIdentity;
evidence : Set SignsForEvidence;
err : Option String
};

SignsForRequest message

SignsForRequest

SignsForRequest {
  externalIdentityA : ExternalIdentity;
  externalIdentityB : ExternalIdentity
}

A SignsForRequest queries whether externalIdentityA can sign on behalf of externalIdentityB.

  • externalIdentityA: The identity attempting to sign.
  • externalIdentityB: The identity on whose behalf the signature is made.

SignsForResponse message

SignsForResponse

SignsForResponse {
  signsFor : Bool;
  err : Option String
}

A SignsForResponse indicates whether the signs_for relationship exists.

  • signsFor: True if externalIdentityA can sign for externalIdentityB, False otherwise.
  • err: An error message if the query failed.

SubmitSignsForEvidenceRequest message

SubmitSignsForEvidenceRequest

SubmitSignsForEvidenceRequest {
  evidence : SignsForEvidence
}

A SubmitSignsForEvidenceRequest submits evidence of a signs_for relationship.

  • evidence: The evidence supporting the signs_for relationship.

SubmitSignsForEvidenceResponse message

SubmitSignsForEvidenceResponse

SubmitSignsForEvidenceResponse {
  err : Option String
}

A SubmitSignsForEvidenceResponse acknowledges the submission of evidence.

  • err: An error message if the submission failed.

QuerySignsForEvidenceRequest message

QuerySignsForEvidenceRequest

QuerySignsForEvidenceRequest {
  externalIdentity : ExternalIdentity
}

A QuerySignsForEvidenceRequest queries all signs_for evidence related to an identity.

  • externalIdentity: The identity for which to retrieve evidence.

QuerySignsForEvidenceResponse message

QuerySignsForEvidenceResponse

QuerySignsForEvidenceResponse {
  externalIdentity : ExternalIdentity;
  evidence : Set SignsForEvidence;
  err : Option String
}

A QuerySignsForEvidenceResponse provides the requested evidence.

  • evidence: A set of SignsForEvidence related to the identity.
  • err: An error message if the query failed.

Message sequence diagrams

Submitting Signs For Evidence

sequenceDiagram
    participant Client
    participant SignsForEngine

    Client->>SignsForEngine: SubmitSignsForEvidenceRequest
    Note over SignsForEngine: Process and store evidence
    SignsForEngine->>Client: SubmitSignsForEvidenceResponse
Submitting evidence of a signs_for relationship

Querying Signs For Relationship

sequenceDiagram
    participant Client
    participant SignsForEngine

    Client->>SignsForEngine: SignsForRequest (X signs for Y?)
    Note over SignsForEngine: Check stored evidence
    SignsForEngine->>Client: SignsForResponse
Querying whether a specific signs_for relationship exists

Retrieving Signs For Evidence

sequenceDiagram
    participant Client
    participant SignsForEngine

    Client->>SignsForEngine: QuerySignsForEvidenceRequest (for X)
    Note over SignsForEngine: Retrieve relevant evidence
    SignsForEngine->>Client: QuerySignsForEvidenceResponse
Retrieving all signs_for evidence related to a particular identity

Engine Components

  • Signs For Engine Environment
  • Signs For Engine Dynamics