drand

package
Version: v0.0.0-...-90d1e6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DrandBeacon

type DrandBeacon struct {
	DrandClient client.Client
	PublicKey   kyber.Point
	Interval    time.Duration
	// contains filtered or unexported fields
}

func NewDrandBeacon

func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub) (*DrandBeacon, error)

func (*DrandBeacon) Entry

func (db *DrandBeacon) Entry(ctx context.Context, round uint64) <-chan beacon.BeaconResult

func (*DrandBeacon) LatestBeaconRound

func (db *DrandBeacon) LatestBeaconRound() uint64

func (*DrandBeacon) VerifyEntry

func (db *DrandBeacon) VerifyEntry(curr, prev types.BeaconEntry) error

type DrandResponse

type DrandResponse struct {
	// PreviousSig is the previous signature generated
	PreviousSig []byte
	// Round is the round number this beacon is tied to
	Round uint64
	// Signature is the BLS deterministic signature over Round || PreviousRand
	Signature []byte
	// Randomness for specific round generated by Drand
	Randomness []byte
}

DrandResponse structure representing response from drand network

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL