delegation: add a Bundle to carry around decoded, sealed and Cid

This commit is contained in:
Michael Muré
2024-12-04 19:54:46 +01:00
parent d0d4ec3abe
commit 72e0f353e7

View File

@@ -15,3 +15,10 @@ type Loader interface {
// If not found, ErrDelegationNotFound is returned. // If not found, ErrDelegationNotFound is returned.
GetDelegation(cid cid.Cid) (*Token, error) GetDelegation(cid cid.Cid) (*Token, error)
} }
// Bundle carries together a decoded delegation with its Cid and raw signed data.
type Bundle struct {
Cid cid.Cid
Decoded *Token
Sealed []byte
}