state

package
v0.0.0-...-a111a03 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group -- encodes all data of a group as recorded on the blockchain

func NewGroup

func NewGroup(addresses []common.Address, k uint16) Group

NewGroup -- create a new Group struct with list of members and empty pubkey

func (Group) Address

func (g Group) Address() (a common.Address)

Address - the group address

func (Group) Log

func (g Group) Log()

Log -- print multi-line group state

func (Group) Members

func (g Group) Members() []common.Address

Members -- the list of members

func (Group) Pubkey

func (g Group) Pubkey() bls.Pubkey

Pubkey -- the group pubkey

func (*Group) SetPubkey

func (g *Group) SetPubkey(pub bls.Pubkey, k uint16)

SetPubkey -- set the group's pubkey and threshold

func (Group) Size

func (g Group) Size() int

Size -- the number of members

func (Group) String

func (g Group) String() string

String -- one-line summary representation

func (Group) Threshold

func (g Group) Threshold() int

Threshold -- the threshold used in the setup

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node -- encodes the information with which a process (=node) is registered on the blockchain

func NodeFromSeckey

func NodeFromSeckey(sec bls.Seckey) Node

NodeFromSeckey --

func (Node) Address

func (n Node) Address() common.Address

Address --

func (Node) ID

func (n Node) ID() bls.ID

ID --

func (Node) Log

func (n Node) Log()

Log --

func (Node) String

func (n Node) String() string

String --

type State

type State struct {
	// contains filtered or unexported fields
}

State -- encodes the state of the chain (state of 1 block)

func NewState

func NewState() State

NewState --

func (*State) AddGroup

func (s *State) AddGroup(g Group) (valid bool)

AddGroup --

func (*State) AddNode

func (s *State) AddNode(n Node) (valid bool)

AddNode --

func (State) GroupAddressList

func (s State) GroupAddressList() []common.Address

GroupAddressList --

func (State) GroupPubkey

func (s State) GroupPubkey(a common.Address) bls.Pubkey

GroupPubkey --

func (State) Log

func (s State) Log()

Log --

func (State) NewRandomGroup

func (s State) NewRandomGroup(r bls.Rand, n uint16) Group

NewRandomGroup --

func (State) NodeAddressList

func (s State) NodeAddressList() []common.Address

NodeAddressList --

func (State) Rand

func (s State) Rand() bls.Rand

Rand --

func (State) SelectedGroupAddress

func (s State) SelectedGroupAddress() common.Address

SelectedGroupAddress --

func (State) SelectedGroupPubkey

func (s State) SelectedGroupPubkey() bls.Pubkey

SelectedGroupPubkey --

func (*State) SetSignature

func (s *State) SetSignature(sig bls.Signature)

SetSignature --

func (State) String

func (s State) String(long bool) string

String --

Jump to

Keyboard shortcuts

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