Documentation
¶
Index ¶
- func DefaultAuthorityRoot() (string, error)
- func SigningPayload(value spatialcontract.ApprovalVerification) []byte
- type ApprovalReceipt
- type InteractionGeometryProvenance
- type Ledger
- func (ledger *Ledger) ConsumeApprovalGrant(value spatialcontract.ApprovalVerification, apply func() error) error
- func (ledger *Ledger) ResolveInteractionGeometry(projectRoot string, interaction spatialcontract.Contract) (InteractionGeometryProvenance, error)
- func (ledger *Ledger) VerifyApprovedContract(value spatialcontract.ApprovedContractVerification) error
- func (ledger *Ledger) VerifyApprovedContractReceipt(value spatialcontract.ApprovedContractVerification) (ApprovalReceipt, error)
- type ReceiptCommittedError
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthorityRoot ¶
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 ¶
func (value InteractionGeometryProvenance) ApprovalBindings() spatialcontract.ApprovalGeometryBindings
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 (*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 ¶
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