verification

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const StateABIJSON = "" /* 6041-byte string literal not displayed */

StateABIJSON is JSON ABI of state contract

Variables

View Source
var StateABI abi.ABI

StateABI is an ABI of State contarct

Functions

func VerifyProof

func VerifyProof(proof types.ProofData, publicInputs []string, verificationKey []byte) error

VerifyProof performs a verification of zkp based on verification key and public inputs

Types

type StateVerificationResult

type StateVerificationResult struct {
	State               string `json:"state"`
	Latest              bool   `json:"latest"`
	TransitionTimestamp int64  `json:"transition_timestamp"`
}

StateVerificationResult can be the state verification result

func VerifyState

func VerifyState(ctx context.Context, rpcURL, contractAddress string, id, state *big.Int) (StateVerificationResult, error)

VerifyState is used to verify identity state rpcURL - url to connect to the blockchain contractAddress is an address of state contract id is base58 identifier e.g. id:11A2HgCZ1pUcY8HoNDMjNWEBQXZdUnL3YVnVCUvR5s state is bigint string representation of identity state

Jump to

Keyboard shortcuts

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