bump go-ucan

This commit is contained in:
Michael Muré
2025-01-16 15:16:01 +01:00
committed by Michael Muré
parent 3b6d70f47a
commit cf3eb1b3f7
7 changed files with 28 additions and 21 deletions

View File

@@ -38,6 +38,9 @@ type UcanCtx struct {
infura *extargs.InfuraExtArgs
}
// FromContainer prepare a UcanCtx from a UCAN container, for further evaluation in a server pipeline.
// It is expected that the container holds a single invocation and the matching delegations. If not,
// an error is returned.
func FromContainer(cont container.Reader) (*UcanCtx, error) {
inv, err := cont.GetInvocation()
if err != nil {
@@ -95,7 +98,7 @@ func (ctn UcanCtx) Policies() policy.Policy {
}
// Meta returns all the meta values from the delegations.
// They are accumulated from the root delegation to the leaf delegation, with no overwrite.
// They are accumulated from the root delegation to the leaf delegation, with no overwriting.
func (ctn UcanCtx) Meta() meta.ReadOnly {
return ctn.meta.ReadOnly()
}