Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions loaders/eth.go

This file was deleted.

53 changes: 0 additions & 53 deletions verifiable/proof.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package verifiable

import (
"math/big"

core "github.com/iden3/go-iden3-core"
mt "github.com/iden3/go-merkletree-sql"
)
Expand Down Expand Up @@ -72,54 +70,3 @@ type ZKProof struct {
Proof *ProofData `json:"proof"`
PubSignals []string `json:"pub_signals"`
}

// 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)
}

var (
// ZeroKnowledgeProofType describes zkp type
ZeroKnowledgeProofType ProofType = "zeroknowledge"
// SignatureProofType describes signature
SignatureProofType ProofType = "signature"
)

// ProofRequest is a request for zk / signature proof generation
type ProofRequest interface {
GetType() ProofType
GetRules() map[string]interface{}
GetID() string
GetChallenge() *big.Int
}

// ZeroKnowledgeProofRequest represents structure of zkp object
type ZeroKnowledgeProofRequest struct {
Type ProofType `json:"type"`
CircuitID string `json:"circuit_id"`
Challenge *big.Int `json:"challenge"`
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
}