Documentation ¶
Index ¶
- Constants
- Variables
- type Abstraction
- type AbstractionConfig
- func (r *AbstractionConfig) CreateAccount(ctx context.Context, nullifier [32]byte) (common.Address, error)
- func (r *AbstractionConfig) GetAccount(nullifier [32]byte) (common.Address, error)
- func (r *AbstractionConfig) Mint(ctx context.Context, account common.Address, amount *big.Int) (common.Hash, error)
- type Config
- type DailyQuestions
- func (q *DailyQuestions) ClearDeadlines() map[int]int
- func (q *DailyQuestions) GetDeadline(nullifier string) *Deadline
- func (q *DailyQuestions) LocalTime(date time.Time) time.Time
- func (q *DailyQuestions) Notification() *messaging.Message
- func (q *DailyQuestions) SendNotification() error
- func (q *DailyQuestions) SetDeadline(nullifier string, id int, duration time.Duration) bool
- func (q *DailyQuestions) ZeroDeadline(nullifier string) *Deadline
- type Deadline
- type Level
- type Levels
- type NotificationConfig
- type PollVerifier
- type PollVerifierer
- type Verifiers
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") )
View Source
var ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
Functions ¶
This section is empty.
Types ¶
type Abstraction ¶ added in v1.7.2
type Abstraction interface {
AbstractionConfig() *AbstractionConfig
}
func NewAbstractionConfig ¶ added in v1.7.2
func NewAbstractionConfig(getter kv.Getter) Abstraction
type AbstractionConfig ¶ added in v1.7.2
type AbstractionConfig struct { RPC *ethclient.Client AccountFactory common.Address PointTokens common.Address ChainID *big.Int PointPrice *big.Int // contains filtered or unexported fields }
func (*AbstractionConfig) CreateAccount ¶ added in v1.7.2
func (*AbstractionConfig) GetAccount ¶ added in v1.7.2
func (r *AbstractionConfig) GetAccount(nullifier [32]byte) (common.Address, error)
type Config ¶
type Config interface { comfig.Logger pgdb.Databaser comfig.Listenerer auth.Auther //nolint:misspell broadcaster.Broadcasterer evtypes.EventTypeser hmacsig.SigCalculatorProvider PollVerifierer Abstraction Levels() *Levels Verifiers() Verifiers DailyQuestions() *DailyQuestions }
type DailyQuestions ¶ added in v1.5.0
type DailyQuestions struct { Location *time.Location RawLocation int Notifications *NotificationConfig // 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) Notification ¶ added in v1.8.0
func (q *DailyQuestions) Notification() *messaging.Message
func (*DailyQuestions) SendNotification ¶ added in v1.8.0
func (q *DailyQuestions) SendNotification() error
func (*DailyQuestions) SetDeadline ¶ added in v1.5.0
func (*DailyQuestions) ZeroDeadline ¶ added in v1.8.1
func (q *DailyQuestions) ZeroDeadline(nullifier string) *Deadline
type Levels ¶
type Levels struct { Downgradeable bool // contains filtered or unexported fields }
func (*Levels) LvlChange ¶ added in v1.3.0
LvlUp Calculates new lvl. New lvl always greater then current level
func (*Levels) WithdrawalAllowed ¶ added in v1.7.1
type NotificationConfig ¶ added in v1.8.0
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
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
Click to show internal directories.
Click to hide internal directories.