Documentation ¶
Index ¶
Constants ¶
View Source
const ( NullifierSignalsIndex = 0 PkIdentityHashSignalsIndex = 1 EventIDSignalsIndex = 2 EventDataSignalsIndex = 3 )
https://github.com/iden3/circuits/blob/master/circuits/authV2.circom
Proof pub signals example with description:
21493028867609342730075626961959697053940727668683389257942040837777854978 - user did (index 0) 21493028867609342730075626961959697053940727668683389257942040837777854978 - challenge (index 1) 16285847858933578151298306208524779888950768974039235725833670860163361043104 - gistRoot (index 2)
View Source
const ChallengeExpirationDelta = 5 * time.Minute
View Source
const EventIDValue = "111186066134341633902189494613533900917417361106374681011849132651019822199"
Variables ¶
View Source
var ( ErrChallengeWasNotRequested = errors.New("challenge was not requested") ErrChallengeIsInvalid = errors.New("challenge is already invalid") )
View Source
var NullifierRegexp = regexp.MustCompile("^0x[0-9a-fA-F]{64}$")
Functions ¶
This section is empty.
Types ¶
type AuthVerifier ¶
type AuthVerifier struct { VerificationKey []byte Disabled bool // contains filtered or unexported fields }
func (*AuthVerifier) VerifyProof ¶
func (v *AuthVerifier) VerifyProof(user string, proof *zkptypes.ZKProof) (err error)
VerifyProof performs ZK Groth16 proof verification based on specified verification key and hardcoded/passed parameters.
type AuthVerifierer ¶
type AuthVerifierer interface {
AuthVerifier() *AuthVerifier
}
func NewAuthVerifierer ¶
func NewAuthVerifierer(getter kv.Getter) AuthVerifierer
Click to show internal directories.
Click to hide internal directories.