Documentation
¶
Index ¶
- type AnyReceipt
- type Option
- type Receipt
- type ReceiptReader
- func NewAnyReceiptReader(opts ...bindnode.Option) ReceiptReader[ipld.Node, ipld.Node]
- func NewReceiptReader[O, X any](resultschema []byte, opts ...bindnode.Option) (ReceiptReader[O, X], error)
- func NewReceiptReaderFromTypes[O, X any](successType schema.Type, errType schema.Type, opts ...bindnode.Option) (ReceiptReader[O, X], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyReceipt ¶
func Extract ¶ added in v0.6.2
func Extract(b []byte) (AnyReceipt, error)
func NewAnyReceipt ¶ added in v0.6.0
func NewAnyReceipt(root ipld.Link, blocks blockstore.BlockReader, opts ...bindnode.Option) (AnyReceipt, error)
type Option ¶
type Option func(cfg *receiptConfig) error
Option is an option configuring a UCAN delegation.
func WithProofs ¶
func WithProofs(prf delegation.Proofs) Option
WithProofs configures the proofs for the receipt. If the `issuer` of this `Receipt` is not the resource owner / service provider, for the delegated capabilities, the `proofs` must contain valid `Proof`s containing delegations to the `issuer`.
type Receipt ¶
type Receipt[O, X any] interface { ipld.View Ran() ran.Ran Out() result.Result[O, X] Fx() fx.Effects Meta() map[string]any Issuer() ucan.Principal Proofs() delegation.Proofs Signature() signature.SignatureView VerifySignature(verifier signature.Verifier) (bool, error) Archive() io.Reader Export() iter.Seq2[block.Block, error] Clone() (Receipt[O, X], error) AttachInvocation(invocation invocation.Invocation) error }
Receipt represents a view of the invocation receipt. This interface provides an ergonomic API and allows you to reference linked IPLD objects if they are included in the source DAG.
func NewReceipt ¶
Click to show internal directories.
Click to hide internal directories.