zkp

package
v0.0.1-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorSignalsIndex  = 12
	ValueSignalsIndex     = 13
	SchemaSignalsIndex    = 8
	IssuerIdSignalsIndex  = 3
	UserIdSignalsIndex    = 1
	TimestampSignalsIndex = 7
)

https://github.com/rarimo/polygonid-integration-contracts/blob/master/contracts/validators/QueryValidatorOffChain.sol

Proof pub signals example with description:

1 - merklized (index 0) 21493028867609342730075626961959697053940727668683389257942040837777854978 - user did (index 1) 1 - request id (index 2) 25184604364095609755556118842424980177747920164392483581520900191475012098 - issuer id (index 3) 16285847858933578151298306208524779888950768974039235725833670860163361043104 - issuerClaimIdenState (index 4) 1 - isRevocationChecked (index 5) 16285847858933578151298306208524779888950768974039235725833670860163361043104 - issuerClaimNonRevState (index 6) 1689621213 - unix timestamp (index 7) 74977327600848231385663280181476307657 - schema id (index 8) 0 - claimPathNotExists (index 9) 20376033832371109177683048456014525905119173674985843915445634726167450989630 - claimPathKey (index 10) 0 - slotIndex (index 11) 2 - operator equals (index 12) 20020101 - value (index 13 and more)

View Source
const (
	OperatorValue = "2"
)
View Source
const (
	ProofValidnessDuration = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Verifier

type Verifier struct {
	Enabled bool
	Schema  string
}

func (*Verifier) VerifyProof

func (v *Verifier) VerifyProof(issuer string, user string, role uint32, group *uuid.UUID, proof *zkptypes.ZKProof) error

VerifyProof performs ZK Groth16 proof verification based on specified verification key and hardcoded/passed parameters.

type Verifierer

type Verifierer interface {
	Verifier() *Verifier
}

func NewVerifierer

func NewVerifierer(getter kv.Getter) Verifierer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL