Documentation
¶
Index ¶
- func CheckForKYC() (bool, error)
- func Finalize(_proposalID string) (bool, bool, error)
- func GetBalances() (float64, []string, []float64, error)
- func GetHashOfString(_string string) [32]byte
- func GetVoteInfo(_proposalID ...int) error
- func InitDitRepository(_optionalRepository ...string) error
- func Open(_proposalID string) error
- func ProposeCommit(_branch string, _branchHeadHash string) (string, int, error)
- func SearchForHashInVotes(_branchHash string) (int, bool, bool, string, error)
- func SetDitCoordinator(_ditCoordinatorAddressString string) error
- func Vote(_proposalID string, _choice string, _salt string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForKYC ¶
CheckForKYC will return whether a user has already passed the KYC
func Finalize ¶
Finalize will finalize a vote as it will trigger the calculation of the reward of this user including the xDAI and KNW reward in case of a voting for the winning decision or the losing of xDAI and KNW in case of a voting for the losing decision The first caller who executes this will also trigger the calculation whether the vote passed or not
func GetBalances ¶
GetBalances will print the xDAI and KNW balances
func GetHashOfString ¶
GetHashOfString takes a string a returns it as keccak256
func GetVoteInfo ¶
GetVoteInfo will print information about a vote
func InitDitRepository ¶
InitDitRepository will initialize a new repository and store its ditContracts address together with additional information into the config When there is no ditContract for this repository, the user will be prompted to deploy one
func Open ¶
Open will open and thus reveal a vote (that was commited through a hash) to the public during the opening phase
func ProposeCommit ¶
ProposeCommit will start a new proposal on the ditContract of this repository
func SearchForHashInVotes ¶
SearchForHashInVotes will search for a vote on a given branch hash and return the outcome
func SetDitCoordinator ¶
SetDitCoordinator will write the dit coordinators address to the config and retrieve the addresses of the KNWToken and KNWVoting contracts
Types ¶
This section is empty.