Documentation
¶
Overview ¶
Package prooflist defines the verifier-facing read proof transcript shape.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProofList ¶
type ProofList struct {
Root cid.Cid `json:"root"`
Query string `json:"query,omitempty"`
Steps []Step `json:"steps"`
}
ProofList is an ordered verifier-facing proof artifact for a read.
It is a schema and adapter boundary only. Cryptographic verification is still owned by the concrete semantic backend that emitted each proof payload.
func (ProofList) LastStepTarget ¶
LastStepTarget returns the target CID of the final ordered step.
func (ProofList) ValidateShape ¶
func (p ProofList) ValidateShape(opts ...ValidateOption) error
ValidateShape checks that the ProofList is structurally usable by a verifier.
This does not perform cryptographic end-to-end verification.
type Step ¶
type Step struct {
Kind StepKind `json:"kind"`
From cid.Cid `json:"from"`
Query string `json:"query,omitempty"`
Coordinate string `json:"coordinate,omitempty"`
Path string `json:"path,omitempty"`
Index *uint64 `json:"index,omitempty"`
Length *uint64 `json:"length,omitempty"`
Start *uint64 `json:"start,omitempty"`
End *uint64 `json:"end,omitempty"`
ChildCount *uint64 `json:"child_count,omitempty"`
TotalSize *uint64 `json:"total_size,omitempty"`
ChunkSize *uint64 `json:"chunk_size,omitempty"`
Target cid.Cid `json:"target"`
Segments []cid.Cid `json:"segments,omitempty"`
EvidenceKind string `json:"evidence_kind,omitempty"`
EvidenceBackend string `json:"evidence_backend,omitempty"`
Evidence []byte `json:"evidence,omitempty"`
Proof []byte `json:"proof,omitempty"`
}
Step records one hop from a structure root or block to a target CID.
type StepKind ¶
type StepKind string
StepKind identifies the semantic role of one ordered proof step.
const ( KindMapStep StepKind = "map_step" KindPayloadBinding StepKind = "payload_binding" KindListIndex StepKind = "list_index" KindListRange StepKind = "list_range" KindBlobBinding StepKind = "blob_binding" KindImplicitBlock StepKind = "implicit_block" KindLegacyUnknown StepKind = "legacy_unknown" )
type ValidateOption ¶
type ValidateOption func(*validateConfig)
ValidateOption customizes shape validation.
func RequireSteps ¶
func RequireSteps() ValidateOption
RequireSteps rejects a ProofList with no ordered steps.