args: simplify API + code

This commit is contained in:
Michael Muré
2024-11-12 12:14:58 +01:00
parent 633b3d210a
commit 522181b16a
5 changed files with 206 additions and 205 deletions

View File

@@ -187,6 +187,8 @@ func FromIPLD[T Tokener](node datamodel.Node) (T, error) {
return zero, errors.New("the VarsigHeader key type doesn't match the issuer's key type")
}
// TODO: this re-encode the payload! Is there a less wasteful way?
data, err := ipld.Encode(info.sigPayloadNode, dagcbor.Encode)
if err != nil {
return zero, err