serviceoffercontroller

package
v0.10.0-rc17 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIdentityRegistrationDocument added in v0.10.0

func BuildIdentityRegistrationDocument(view IdentityRegistrationView) erc8004.AgentRegistration

BuildIdentityRegistrationDocument is the single render entry point shared by the active and tombstone paths. It produces an active document when at least one referencing offer is published-for-registration; otherwise it produces a tombstone (active:false, x402Support:false) that still carries the recorded agentId so external observers see the historical record.

func SeedIdentityFromOffers added in v0.10.0

func SeedIdentityFromOffers(offers []*monetizeapi.ServiceOffer) *monetizeapi.AgentIdentity

SeedIdentityFromOffers returns per-chain AgentIdentity registrations from existing ServiceOffer status. Caller is responsible for the actual CR write. Returns nil when no offer carries a recorded agentId.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *rest.Config) (*Controller, error)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, workers int) error

type IdentityRegistrationView added in v0.10.0

type IdentityRegistrationView struct {
	// Identity is the durable on-chain agent. Required.
	Identity *monetizeapi.AgentIdentity
	// Offers are ServiceOffers that currently reference Identity. Only the
	// subset that pass offerPublishedForRegistration is included in the active
	// document services list. May be empty when the identity is tombstoned.
	Offers []*monetizeapi.ServiceOffer
	// BaseURL is the public origin (tunnel URL) that should prefix all
	// service endpoint paths and the agent image fallback.
	BaseURL string
}

IdentityRegistrationView is the identity-driven inputs needed to render an ERC-8004 registration document. Decouples the renderer from owner-offer coupling so the registration document survives deletion of every ServiceOffer that ever referenced the identity.

Jump to

Keyboard shortcuts

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