Documentation
¶
Overview ¶
Package artifact defines the transport-neutral, versioned MALT artifacts shared by resolvers, provers, verifiers, gateways, daemons, and SDKs.
Index ¶
Constants ¶
const Profile = "malt.artifact/v0alpha2"
Profile identifies the artifact contract introduced by MALT v0.0.4. The Go package remains unversioned; the serialized envelope carries the profile.
Variables ¶
This section is empty.
Functions ¶
func SchemaNames ¶
func SchemaNames() []string
SchemaNames lists the schemas published by this artifact profile.
func Verify ¶
func Verify(ctx context.Context, req VerifyRequest, verifier malt.ProofVerifier) error
Verify validates the request/artifact envelope and all cryptographic evidence. Resolution is existential: it proves the returned ordered arc chain, not that the execution engine selected a unique or longest chain.
Types ¶
type Artifact ¶
type Artifact struct {
Profile string `json:"profile"`
Operation Operation `json:"operation"`
Root string `json:"root"`
Query Query `json:"query"`
Target string `json:"target"`
RangeSegments []string `json:"range_segments,omitempty"`
ProofList prooflist.ProofList `json:"prooflist"`
}
Artifact binds one request, target, and ProofList under an explicit profile. RangeSegments is populated only for measured-list range proofs.
func NewProveArtifact ¶
func NewProveArtifact(req ProveRequest, result malt.ReadResult) (Artifact, error)
func NewResolveArtifact ¶
type ProveRequest ¶
type ProveRequest struct {
Profile string `json:"profile"`
Root string `json:"root"`
Query Query `json:"query"`
}
ProveRequest asks for one primitive typed map/list proof.
func (ProveRequest) Validate ¶
func (r ProveRequest) Validate() error
type Query ¶
type Query struct {
Kind QueryKind `json:"kind"`
Segments []string `json:"segments,omitempty"`
Index *uint64 `json:"index,omitempty"`
Start *uint64 `json:"start,omitempty"`
End *uint64 `json:"end,omitempty"`
}
Query is the stable artifact projection of a MALT path or primitive typed query. Exactly the fields selected by Kind are meaningful.
type ResolveRequest ¶
type ResolveRequest struct {
Profile string `json:"profile"`
Root string `json:"root"`
Segments []string `json:"segments"`
}
ResolveRequest asks an execution engine for one authenticated derivation of a caller-supplied segment path. Candidate selection is not part of the proof contract; the reference engine currently prefers the longest prefix.
func (ResolveRequest) Validate ¶
func (r ResolveRequest) Validate() error
type VerifyRequest ¶
VerifyRequest asks a verifier to validate all artifact bindings and proof evidence without trusting the resolver or gateway that produced it.
func (VerifyRequest) Validate ¶
func (r VerifyRequest) Validate() error