drng

package
v0.2.4-0...-2c2ceb1 Latest Latest
Warning

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

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

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

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

CollectiveBeaconRequest is a request containing a collective beacon response.

type CollectiveBeaconResponse

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

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

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

CommitteeResponse is the HTTP message containing the DRNG committee.

type Randomness

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

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