drng

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0, BSD-2-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PluginName = "WebAPI DRNG Endpoint"

PluginName is the name of the web API DRNG endpoint plugin.

Variables

This section is empty.

Functions

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

Types

type CollectiveBeaconRequest added in v0.3.0

type CollectiveBeaconRequest struct {
	Payload []byte `json:"payload"`
}

CollectiveBeaconRequest is a request containing a collective beacon response.

type CollectiveBeaconResponse added in v0.3.0

type CollectiveBeaconResponse struct {
	ID    string `json:"id,omitempty"`
	Error string `json:"error,omitempty"`
}

CollectiveBeaconResponse is the HTTP response from broadcasting a collective beacon message.

type Committee added in v0.3.0

type Committee struct {
	InstanceID    uint32   `json:"instanceID,omitempty"`
	Threshold     uint8    `json:"threshold,omitempty"`
	Identities    []string `json:"identities,omitempty"`
	DistributedPK string   `json:"distributedPK,omitempty"`
}

Committee defines the information about a committee.

type CommitteeResponse added in v0.3.0

type CommitteeResponse struct {
	Committees []Committee `json:"committees,omitempty"`
	Error      string      `json:"error,omitempty"`
}

CommitteeResponse is the HTTP message containing the DRNG committee.

type Randomness added in v0.3.0

type Randomness struct {
	InstanceID uint32    `json:"instanceID,omitempty"`
	Round      uint64    `json:"round,omitempty"`
	Timestamp  time.Time `json:"timestamp,omitempty"`
	Randomness []byte    `json:"randomness,omitempty"`
}

Randomness defines the content of new randomness.

type RandomnessResponse added in v0.3.0

type RandomnessResponse struct {
	Randomness []Randomness `json:"randomness,omitempty"`
	Error      string       `json:"error,omitempty"`
}

RandomnessResponse is the HTTP message containing the current DRNG randomness.

Jump to

Keyboard shortcuts

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