commitment

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchVerifyMembership

func BatchVerifyMembership(
	ctx sdk.Context,
	proof exported.Proof,
	prefix exported.Prefix,
	items map[string][]byte,
) error

BatchVerifyMembership verifies a proof that many paths have been set to specific values in a commitment. It calls the proof's VerifyMembership method with the calculated root and the provided paths. Returns false on the first failed membership verification.

func BatchVerifyNonMembership

func BatchVerifyNonMembership(
	ctx sdk.Context,
	proof exported.Proof,
	prefix exported.Prefix,
	paths []string,
) error

BatchVerifyNonMembership verifies a proof that many paths have not been set to any value in a commitment. It calls the proof's VerifyNonMembership method with the calculated root and the provided paths. Returns false on the first failed non-membership verification.

func CalculateRoot

func CalculateRoot(ctx sdk.Context) exported.Root

CalculateRoot returns the application Hash at the curretn block height as a commitment root for proof verification.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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