Expand description

Countersigned entries involve preflights between many agents to build a session that is part of the entry.

Structs

Every countersigning agent must sign against their chain state. The chain must be frozen until each agent decides to sign or exit the session.

All the data required for a countersigning session.

Every countersigning session must complete a full set of headers between the start and end times to be valid.

Base data for Create headers.

Every preflight request can have optional arbitrary bytes that can be agreed to.

The same PreflightRequest is sent to every agent. Each agent signs this data as part of their PreflightResponse. Every preflight must be identical and signed by every agent for a session to be valid.

Every agent must send back a preflight response. All the preflight response data is signed by each agent and included in the session data.

Agents can have a role specific to each countersigning session. The role is app defined and opaque to the subconscious.

Base data for Update headers.

Enums

Errors related to the secure primitive macro.

Enum to mirror Header for all the shared data required to build session headers. Does NOT hold any agent specific information.

A preflight request can be accepted, or invalid, or valid but the local agent cannot accept it.

Constants

8 seems like a reasonable limit of agents to countersign.

Need at least two to countersign.

The timestamps on headers for a session use this offset relative to the session start time. This makes it easier for agents to accept a preflight request with headers that are after their current chain top, after network latency.

Maximum time in the future the session start can be in the opinion of the participating agent. As the header will be SESSION_HEADER_TIME_OFFSET after the session start we include that here.

Type Definitions

Alias for a list of agents and their roles.