Versions in this module Expand all Collapse all v0 v0.1.0 Jan 22, 2020 Changes in this version + const HASH_NO + const HASH_YES + const TREE_LEVEL + func Verify(vkString string, proof *goSnarkVerifier.CircomProof, publicSignal []string) bool + func VerifyByFile(vkPath string, pfPath string) bool + type IdentityPool struct + func NewIdentityPool() (*IdentityPool, error) + func NewIdentityPoolWithTreeLevel(treeLevel uint8) (*IdentityPool, error) + func (i *IdentityPool) GetAllIds() []*IdPathElement + func (i *IdentityPool) GetIdentityTreePath(value *IdPathElement) ([]*IdPathElement, []int, *IdPathElement) + func (i *IdentityPool) GetIndex(value *IdPathElement) int + func (i *IdentityPool) HasRegistered(idc *IdPathElement) bool + func (i *IdentityPool) InsertIdc(idCommitment *IdPathElement) (int, error) + func (i *IdentityPool) IsMember(root *IdPathElement) bool + func (i *IdentityPool) OverwriteIdElements(commitmentSet []*IdPathElement) (int, error) + func (i *IdentityPool) Update(index uint, oldIDCommitment, newIDCommitment *IdPathElement) error + type Proposal struct + func NewProposal() (*Proposal, error) + func (p *Proposal) Close(idx int) + func (p *Proposal) GetBallots() ba.Map + func (p *Proposal) GetCurrentIdex() int + func (p *Proposal) GetVotes(idx int) (yes, no int) + func (p *Proposal) HasProposal(q string) int + func (p *Proposal) HasProposalByHash(hash *big.Int) int + func (p *Proposal) InsertBallot(ballot *ba.Ballot) error + func (p *Proposal) ProposeSubject(subHash subject.HashHex) int + func (p *Proposal) Remove(idx int) + func (p *Proposal) VoteWithProof(ballot *ba.Ballot, vkString string) error + type Voter struct + func NewVoter(subject *subject.Subject, ps *pubsub.PubSub, lc *localContext.Context, ...) (*Voter, error) + func (v *Voter) GetAllIdentities() []id.Identity + func (v *Voter) GetBallotMap() ba.Map + func (v *Voter) GetIdentityIndex(identity id.Identity) int + func (v *Voter) GetIdentityPath(identity id.Identity) ([]*id.IdPathElement, []int, *id.IdPathElement, error) + func (v *Voter) GetIdentitySub() *pubsub.Subscription + func (v *Voter) GetSubject() *subject.Subject + func (v *Voter) GetVoteSub() *pubsub.Subscription + func (v *Voter) InsertIdentity(identity *id.Identity) (int, error) + func (v *Voter) Join(identity *id.Identity) error + func (v *Voter) Open() (yes, no int) + func (v *Voter) OverwriteIds(identities []*id.Identity) (int, error) + func (v *Voter) Propose() int + func (v *Voter) Vote(ballot *ba.Ballot, silent bool) error