Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper BulletinBoardKeeper) sdk.Querier
- type BulletinBoardKeeper
- func (k BulletinBoardKeeper) GetBallot(ctx sdk.Context, electionCredential big.Int) *types.Ballot
- func (k BulletinBoardKeeper) GetBallotsIterator(ctx sdk.Context) sdk.Iterator
- func (k BulletinBoardKeeper) GetCredentialPolynomial(ctx sdk.Context) crypto.Polynomial
- func (k BulletinBoardKeeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k BulletinBoardKeeper) GetVoterCredentialsIterator(ctx sdk.Context) sdk.Iterator
- func (k BulletinBoardKeeper) HasElectionCredential(ctx sdk.Context, uHat *big.Int) bool
- func (k BulletinBoardKeeper) HasVoterCredential(ctx sdk.Context, credential big.Int) bool
- func (k BulletinBoardKeeper) SetParams(ctx sdk.Context, params types.Params)
- func (k BulletinBoardKeeper) StoreBallot(ctx sdk.Context, b types.Ballot) error
- func (k BulletinBoardKeeper) StoreVoterCredential(ctx sdk.Context, credential crypto.Int) error
Constants ¶
View Source
const ( QueryBallots = "ballots" QueryParameters = "parameters" QueryVoterCredentials = "voterCredentials" QueryCredentialPolynomial = "credentialPolynomial" )
Query endpoints supported by the pbb Querier
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func NewQuerier(keeper BulletinBoardKeeper) sdk.Querier
NewQuerier is the module level router for state queries
Types ¶
type BulletinBoardKeeper ¶
type BulletinBoardKeeper struct {
// contains filtered or unexported fields
}
BulletinBoardKeeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine
func NewBulletinBoardKeeper ¶
func NewBulletinBoardKeeper(credentialStoreKey sdk.StoreKey, ballotStoreKey sdk.StoreKey, polyStoreKey sdk.StoreKey, cdc *codec.Codec, paramStore subspace.Subspace) BulletinBoardKeeper
NewBulletinBoardKeeper creates new instances of the pbb BulletinBoardKeeper
func (BulletinBoardKeeper) GetBallotsIterator ¶
func (k BulletinBoardKeeper) GetBallotsIterator(ctx sdk.Context) sdk.Iterator
func (BulletinBoardKeeper) GetCredentialPolynomial ¶
func (k BulletinBoardKeeper) GetCredentialPolynomial(ctx sdk.Context) crypto.Polynomial
func (BulletinBoardKeeper) GetParams ¶
func (k BulletinBoardKeeper) GetParams(ctx sdk.Context) (params types.Params)
GetParams gets the bulletin board module's parameters.
func (BulletinBoardKeeper) GetVoterCredentialsIterator ¶
func (k BulletinBoardKeeper) GetVoterCredentialsIterator(ctx sdk.Context) sdk.Iterator
func (BulletinBoardKeeper) HasElectionCredential ¶
func (BulletinBoardKeeper) HasVoterCredential ¶
func (BulletinBoardKeeper) SetParams ¶
func (k BulletinBoardKeeper) SetParams(ctx sdk.Context, params types.Params)
SetParams sets the auth module's parameters.
func (BulletinBoardKeeper) StoreBallot ¶
func (BulletinBoardKeeper) StoreVoterCredential ¶
StoreVoterCredential stores the given voter credential in the credentials KV store and updates the credentials polynomial, i.e includes the credential in the polynomial. Throws an error if the credential is already in the store.
Click to show internal directories.
Click to hide internal directories.