From 72e0f353e71aaff9390c82f156561f98a7b5ed14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Wed, 4 Dec 2024 19:54:46 +0100 Subject: [PATCH] delegation: add a Bundle to carry around decoded, sealed and Cid --- token/delegation/{loader.go => utilities.go} | 7 +++++++ 1 file changed, 7 insertions(+) rename token/delegation/{loader.go => utilities.go} (73%) diff --git a/token/delegation/loader.go b/token/delegation/utilities.go similarity index 73% rename from token/delegation/loader.go rename to token/delegation/utilities.go index 13dd81d..957ca9d 100644 --- a/token/delegation/loader.go +++ b/token/delegation/utilities.go @@ -15,3 +15,10 @@ type Loader interface { // If not found, ErrDelegationNotFound is returned. 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 +}