contribution

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(bc *BatchContribution, pretty bool) ([]byte, error)

Types

type BatchContribution

type BatchContribution struct {
	Contributions []Contribution
}

func DecodeBatchContribution

func DecodeBatchContribution(bcJSONBytes []byte) (*BatchContribution, error)

func (*BatchContribution) Contribute

func (bc *BatchContribution) Contribute(extRandomness ...[]byte) error

func (*BatchContribution) Verify

func (bc *BatchContribution) Verify(prevBatchContribution *BatchContribution) (bool, error)

type Contribution

type Contribution struct {
	NumG1Powers int
	NumG2Powers int
	PowersOfTau PowersOfTau
	PotPubKey   bls12381.G2Affine
}

func (*Contribution) Verify

func (c *Contribution) Verify(previousContribution *Contribution) (bool, error)

type PowersOfTau

type PowersOfTau struct {
	G1Affines []bls12381.G1Affine
	G2Affines []bls12381.G2Affine
}

Jump to

Keyboard shortcuts

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