token: ditch the generic bundle in favor of specialized struct

It's kust cleaner that way, the generic has no upside.
This commit is contained in:
Michael Muré
2025-01-29 14:28:13 +01:00
parent 126177b9e5
commit 506ed21b94
9 changed files with 53 additions and 40 deletions

View File

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