feat(invocation): ipld unseal to invocation

This commit is contained in:
Steve Moyer
2024-11-04 16:07:11 -05:00
parent a98653b769
commit 187e7a869c
5 changed files with 88 additions and 21 deletions

View File

@@ -192,6 +192,11 @@ func FromIPLD(node datamodel.Node) (*Token, error) {
return tkn, err
}
type stringAny struct {
Keys []string
Values map[string]datamodel.Node
}
func (t *Token) toIPLD(privKey crypto.PrivKey) (datamodel.Node, error) {
var aud *string
@@ -220,10 +225,7 @@ func (t *Token) toIPLD(privKey crypto.PrivKey) (datamodel.Node, error) {
i++
}
args := struct {
Keys []string
Values map[string]datamodel.Node
}{
args := stringAny{
Keys: argsKey,
Values: t.arguments,
}