config

package
v1.6.4-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PollChallengedNullifier = iota
	PollNullifierTreeRoot
	PollParticipationEventID
	PollChallengedEventID
)

Variables

View Source
var (
	ErrInvalidProposalEventID   = errors.New("invalid proposal event id")
	ErrInvalidRoot              = errors.New("invalid root")
	ErrInvalidChallengedEventID = errors.New("invalid challenged event id")
)

Functions

This section is empty.

Types

type Config

func New

func New(getter kv.Getter) Config

type DailyQuestions added in v1.5.0

type DailyQuestions struct {
	Location *time.Location
	// contains filtered or unexported fields
}

func (*DailyQuestions) ClearDeadlines added in v1.5.0

func (q *DailyQuestions) ClearDeadlines() map[int]int

func (*DailyQuestions) GetDeadline added in v1.5.0

func (q *DailyQuestions) GetDeadline(nullifier string) *Deadline

func (*DailyQuestions) LocalTime added in v1.5.0

func (q *DailyQuestions) LocalTime(date time.Time) time.Time

func (*DailyQuestions) SetDeadline added in v1.5.0

func (q *DailyQuestions) SetDeadline(nullifier string, id int, duration time.Duration) bool

type Deadline added in v1.5.0

type Deadline struct {
	ID int
	At time.Time
}

type Level

type Level struct {
	Level     int  `fig:"lvl,required"`
	Threshold int  `fig:"threshold,required"`
	Referrals int  `fig:"referrals"`
	Infinity  bool `fig:"infinity"`
}

type Levels

type Levels struct {
	Downgradeable bool
	// contains filtered or unexported fields
}

func (*Levels) LvlChange added in v1.3.0

func (l *Levels) LvlChange(currentLevel int, totalAmount int64) (refCoundToAdd *int, newLevel int)

LvlUp Calculates new lvl. New lvl always greater then current level

func (Levels) MinLvl

func (l Levels) MinLvl() int

type PollVerifier added in v1.4.0

type PollVerifier struct {
	RPC                  *ethclient.Client `fig:"rpc,required"`
	ProposalStateAddress common.Address    `fig:"proposal_state_address,required"`
	// contains filtered or unexported fields
}

func (*PollVerifier) VerifyProof added in v1.4.0

func (v *PollVerifier) VerifyProof(proof zkptypes.ZKProof, proposalID, proposalEventID *big.Int) error

type PollVerifierer added in v1.4.0

type PollVerifierer interface {
	PollVerifier() *PollVerifier
}

func NewPollVerifier added in v1.4.0

func NewPollVerifier(getter kv.Getter) PollVerifierer

type Verifiers added in v1.3.0

type Verifiers struct {
	Passport *zk.Verifier
	Poll     *zk.Verifier
	PollRoot *root.ProposalSMTVerifier
}

Jump to

Keyboard shortcuts

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