ZapClient class

The reference ZAP client.

Constructors

ZapClient({required Stream<String> inbound(), required void send(String line)})
ZapClient.overProcess(Process process)
Builds a client wired to a live Process (stdin/stdout NDJSON).
factory

Properties

checkpoints List<CheckpointMessage>
Checkpoint replies received.
final
errors List<ZapError>
Error envelopes received.
final
evidence List<EvidencePacket>
Evidence packets received, in wire order.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
send → void Function(String line)
Sends one NDJSON line to the host.
final

Methods

close() Future<void>
evidenceFor(String missionId) List<EvidencePacket>
Evidence for missionId, in order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recomputeChainDigest(String missionId) String
Recomputes the evidence chain for missionId from the packets this client received — the client side of receipt verification.
restoreCheckpoint(String missionId, String stateId) Future<CheckpointMessage>
Requests a restore of stateId; resolves with the restored reply.
saveCheckpoint(String missionId) Future<CheckpointMessage>
Requests a checkpoint snapshot; resolves with the saved reply.
start() → void
Starts consuming the inbound stream. Call once before submitting.
submit(MissionEnvelope mission) Future<ZapReceipt>
Submits mission; resolves when THIS mission's receipt arrives.
toString() String
A string representation of this object.
inherited
verifyReceipt(ZapReceipt receipt) bool
Verifies receipt against everything this client witnessed: the verdict, the checks, and — the cryptographic core — the recomputed chain digest.

Operators

operator ==(Object other) bool
The equality operator.
inherited