Documentation ¶
Index ¶
Constants ¶
const DefaultSchemeID = "pedersen-bls-chained"
DefaultSchemeID is the default scheme ID.
const UnchainedSchemeID = "pedersen-bls-unchained"
UnchainedSchemeID is the scheme id used to set unchained randomness on beacons.
Variables ¶
This section is empty.
Functions ¶
func ListSchemes ¶
func ListSchemes() (schemeIDs []string)
ListSchemes will return a slice of valid scheme ids
Types ¶
type Scheme ¶
Scheme is used to group a set of configurations related to the scheme beacons will use to generate randomness
func GetSchemeByID ¶
GetSchemeByID allows the user to retrieve the scheme configuration looking by its ID. It will return a boolean which indicates if the scheme was found or not.
func GetSchemeByIDWithDefault ¶
GetSchemeByIDWithDefault allows the user to retrieve the scheme configuration looking by its ID. It will return a boolean which indicates if the scheme was foound or not. In addition to it, if the received ID is an empty string, it will return the default defined scheme
func GetSchemeFromEnv ¶
func GetSchemeFromEnv() Scheme
GetSchemeFromEnv allows the user to retrieve the scheme configuration looking by the ID set on an environmental variable. If the scheme is not found, function will panic.
func ReadSchemeByEnv ¶
ReadSchemeByEnv allows the user to retrieve the scheme configuration looking by the ID set on an environmental variable. It will return a boolean which indicates if the scheme was found or not. If the env var is an empty string, it will use the default scheme ID.