Documentation ¶
Index ¶
Constants ¶
View Source
const ( Wei = 1 GWei = 1e9 Ether = 1e18 )
All ethereum values uses bit.Int to calculate Wei values in GWei: new(big.Int).Mul(value, big.NewInt(params.GWei))
View Source
const ( SigTypeUnknown = SigType(math.MaxUint8) SigTypeSecp256k1 = SigType(iota) SigTypeBLS SigTypeEd25519 )
View Source
const SignatureMaxLength = 200
View Source
const TicketRandomnessLookback = 1
Variables ¶
View Source
var ( ErrKeyInfoNotFound = fmt.Errorf("key info not found") ErrKeyExists = fmt.Errorf("key already exists") )
View Source
var MaxWinCount = 10 * config.ExpectedLeadersPerEpoch.Int64()
Functions ¶
This section is empty.
Types ¶
type BeaconEntry ¶
func NewBeaconEntry ¶
func NewBeaconEntry(round uint64, data []byte, metadata map[string]interface{}) BeaconEntry
type DioneTask ¶
type DioneTask struct { OriginChain uint8 RequestType string RequestParams string Payload []byte RequestID string }
DioneTask represents the values of task computation
type ElectionProof ¶
func (*ElectionProof) ComputeWinCount ¶
ComputeWinCount uses VRFProof to compute number of wins The algorithm is based on Algorand's Sortition with Binomial distribution replaced by Poisson distribution.
type KeyStore ¶
type KeyStore interface { // List lists all the keys stored in the KeyStore List() ([]string, error) // Get gets a key out of keystore and returns KeyInfo corresponding to named key Get(string) (KeyInfo, error) // Put saves a key info under given name Put(string, KeyInfo) error // Delete removes a key from keystore Delete(string) error }
KeyStore is used for storing secret keys
type KeyType ¶
type KeyType string
KeyType defines a type of a key
const (
KTEd25519 KeyType = "ed25519"
)
func (*KeyType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.