container: Reader should keep around and expose the sealed bytes

This commit is contained in:
Michael Muré
2025-01-23 17:12:26 +01:00
parent e218b49577
commit 9d047f038d
6 changed files with 83 additions and 29 deletions

View File

@@ -39,3 +39,10 @@ type Marshaller interface {
// ToDagJsonWriter is the same as ToDagJson, but it accepts an io.Writer.
ToDagJsonWriter(w io.Writer, privKey crypto.PrivKey) error
}
// Bundle carries together a decoded token with its Cid and raw signed data.
type Bundle[T Token] struct {
Cid cid.Cid
Decoded T
Sealed []byte
}