From 59513ba75632bb4ff3d6d09c62df78423ba18597 Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@privategrity.com> Date: Sun, 24 Oct 2021 15:23:28 +0000 Subject: [PATCH] Update preimage.go --- bindings/preimage.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bindings/preimage.go b/bindings/preimage.go index 38c2bf715..99c034584 100644 --- a/bindings/preimage.go +++ b/bindings/preimage.go @@ -36,3 +36,18 @@ func (c *Client) GetPreimages(identity []byte) (string, error) { return string(marshaled), err } + +func (c *Client) GetPreimagesHack(dummy string, identity []byte) (string, error) { + + iid := &id.ID{} + copy(iid[:], identity) + + list, exist := c.api.GetStorage().GetEdge().Get(iid) + if !exist { + return "", errors.Errorf("Could not find a preimage list for %s", iid) + } + + marshaled, err := json.Marshal(&list) + + return string(marshaled), err +} -- GitLab