Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
vmidyllic committed Apr 26, 2022
1 parent 7c82e2a commit 0cedc1d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions verifiable/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type ZKProof struct {
// ProofType is a type that must be used for proof definition
type ProofType string

// String returns string representation of ProofType
func (p ProofType) String() string {
return string(p)
}
Expand All @@ -97,6 +98,7 @@ var (
SignatureProofType ProofType = "signature"
)

// ProofRequest is a request for zk / signature proof generation
type ProofRequest interface {
GetType() ProofType
GetRules() map[string]interface{}
Expand All @@ -112,15 +114,22 @@ type ZeroKnowledgeProofRequest struct {
Rules map[string]interface{} `json:"rules,omitempty"`
}

// GetType returns type from zkp request
func (r *ZeroKnowledgeProofRequest) GetType() ProofType {
return r.Type
}

// GetID returns id from zkp request
func (r *ZeroKnowledgeProofRequest) GetID() string {
return r.CircuitID
}

// GetRules rules from zkp request
func (r *ZeroKnowledgeProofRequest) GetRules() map[string]interface{} {
return r.Rules
}

// GetChallenge challenge from zkp request
func (r *ZeroKnowledgeProofRequest) GetChallenge() *big.Int {
return r.Challenge
}

0 comments on commit 0cedc1d

Please sign in to comment.