From 350b36903069d9f40b01a8234e07fc955c4b41e8 Mon Sep 17 00:00:00 2001 From: Stephen Searles Date: Sun, 13 May 2018 23:03:13 -0400 Subject: [PATCH] pkg/schema: expose signer and signature information on claims This will allow consumers of pkg/schema to do things like verify the signature on claims. Fixes #1167 Change-Id: Iec76e382e18d91f82694412bc855ac5be82df825 --- pkg/schema/blob.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/schema/blob.go b/pkg/schema/blob.go index ac46916a3..6a64bc3d7 100644 --- a/pkg/schema/blob.go +++ b/pkg/schema/blob.go @@ -222,6 +222,12 @@ func (c Claim) Attribute() string { return c.b.ss.Attribute } // Value returns the "value" field, if set. func (c Claim) Value() string { return c.b.ss.Value } +// Signer returns the ref of the blob containing the signing key that signed the claim. +func (c Claim) Signer() blob.Ref { return c.b.ss.Signer } + +// Signature returns the claim's signature. +func (c Claim) Signature() string { return c.b.ss.Sig } + // ModifiedPermanode returns the claim's "permaNode" field, if it's // a claim that modifies a permanode. Otherwise a zero blob.Ref is // returned.