reviewgrant

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthorityRoot

func DefaultAuthorityRoot() (string, error)

func SigningPayload

func SigningPayload(value spatialcontract.ApprovalVerification) []byte

SigningPayload is the stable UTF-8 message Node/C# bridges sign with their registered Ed25519 private key. Each field is length-prefixed to prevent delimiter ambiguity.

Types

type ApprovalReceipt

type ApprovalReceipt struct {
	Action              string `json:"action"`
	Authority           string `json:"authority"`
	ContractHash        string `json:"contract_hash"`
	CurrentHash         string `json:"current_hash"`
	CaptureSetHash      string `json:"capture_set_hash"`
	Reviewer            string `json:"reviewer"`
	ContractPath        string `json:"contract_path"`
	SubjectGeometryHash string `json:"subject_geometry_hash,omitempty"`
	TargetGeometryHash  string `json:"target_geometry_hash,omitempty"`
}

ApprovalReceipt is cryptographically verified provenance returned by the concrete ledger. Interaction consumers use its signed geometry bindings to reject stale relative poses after either asset geometry changes.

type InteractionGeometryProvenance

type InteractionGeometryProvenance struct {
	SubjectGUID         string `json:"subject_guid"`
	TargetGUID          string `json:"target_guid"`
	SubjectContractPath string `json:"subject_contract_path"`
	TargetContractPath  string `json:"target_contract_path"`
	SubjectContractHash string `json:"subject_contract_hash"`
	TargetContractHash  string `json:"target_contract_hash"`
	SubjectGeometryHash string `json:"subject_geometry_hash"`
	TargetGeometryHash  string `json:"target_geometry_hash"`
}

InteractionGeometryProvenance is resolved exclusively from canonical, ledger-authorized asset contracts. Contract hashes are audit evidence; the geometry hashes are the signed staleness gate for an interaction pose.

func (InteractionGeometryProvenance) ApprovalBindings

type Ledger

type Ledger struct {
	Root          string
	AuthorityRoot string
	Now           func() time.Time
	// contains filtered or unexported fields
}

Ledger is both the consume-once nonce store and the durable external record used to authorize later consumption of an Approved contract.

func DefaultLedger

func DefaultLedger() (*Ledger, error)

func (*Ledger) ConsumeApprovalGrant

func (ledger *Ledger) ConsumeApprovalGrant(value spatialcontract.ApprovalVerification, apply func() error) error

func (*Ledger) ResolveInteractionGeometry

func (ledger *Ledger) ResolveInteractionGeometry(projectRoot string, interaction spatialcontract.Contract) (InteractionGeometryProvenance, error)

ResolveInteractionGeometry verifies each dependency against its own signed durable receipt before exposing geometry hashes to the interaction signer. Caller-provided "current" hashes are never accepted as authority.

func (*Ledger) VerifyApprovedContract

func (ledger *Ledger) VerifyApprovedContract(value spatialcontract.ApprovedContractVerification) error

func (*Ledger) VerifyApprovedContractReceipt

func (ledger *Ledger) VerifyApprovedContractReceipt(value spatialcontract.ApprovedContractVerification) (ApprovalReceipt, error)

VerifyApprovedContractReceipt verifies both the tracked-contract binding and the original human authority signature, then returns only signed provenance.

type ReceiptCommittedError

type ReceiptCommittedError struct {
	Err error
}

ReceiptCommittedError reports a failure that happened only after the immutable approval receipt was durably committed. Callers can distinguish this from uncertain receipt publication without importing this package.

func (*ReceiptCommittedError) Error

func (err *ReceiptCommittedError) Error() string

func (*ReceiptCommittedError) ReceiptCommitted

func (err *ReceiptCommittedError) ReceiptCommitted() bool

func (*ReceiptCommittedError) Unwrap

func (err *ReceiptCommittedError) Unwrap() error

type Verifier

type Verifier struct {
	AuthorityRoot string
	Now           func() time.Time
}

Verifier validates an action-scoped grant signed by an authority whose public key was registered outside the Unity project.

func (Verifier) VerifyApproval

func (verifier Verifier) VerifyApproval(value spatialcontract.ApprovalVerification) error

Jump to

Keyboard shortcuts

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