executionreceipt

package
v0.2.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package executionreceipt validates, digests, signs, and verifies Codefly's product-neutral execution receipt contract.

Index

Constants

View Source
const (
	// SchemaV1 is the only receipt schema accepted by this package.
	SchemaV1 = "codefly.execution-receipt/v1"
	// SignatureAlgorithm is the attestation signature algorithm.
	SignatureAlgorithm = "Ed25519"
)

Variables

View Source
var (
	// ErrInvalid is returned for a malformed or internally inconsistent receipt.
	ErrInvalid = errors.New("invalid Codefly execution receipt")
)

Functions

func Attest

func Attest(
	receipt *executionv1.ExecutionReceiptV1,
	signerID string,
	keyID string,
	privateKey ed25519.PrivateKey,
) (*executionv1.ExecutionAttestationV1, error)

Attest prepares receipt and signs its deterministic protobuf bytes with one registered Gateway key. The input message is never mutated.

func Prepare

Prepare clones receipt, validates its immutable facts, and populates the deterministic payload digest. A non-empty caller-supplied digest must already match; Prepare never silently repairs conflicting immutable bytes.

func Verify

Verify validates every receipt invariant, recomputes its payload digest, and verifies the Gateway signature. The returned receipt is a defensive clone.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL