staking

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	ID         string        `json:"id"`
	Owner      meter.Address `json:"owner"`
	Value      string        `json:"value"`
	Token      uint8         `json:"token"`
	Nonce      uint64        `json:"nonce"`
	CreateTime string        `json:"createTime"`

	Unbounded    bool          `json:"unbounded"`
	Candidate    meter.Address `json:"candidate"`
	Rate         uint8         `json:"rate"`
	Option       uint32        `json:"option"`
	BonusVotes   uint64        `json:"bonusVotes"`
	TotalVotes   string        `json:"totalVotes"`
	MatureTime   string        `json:"matureTime"`
	CalcLastTime string        `json:"calcLastTime"`
}

type Candidate

type Candidate struct {
	Name       string        `json:"name"`
	Addr       meter.Address `json:"addr"`   // the address for staking / reward
	PubKey     string        `json:"pubKey"` // node public key
	IPAddr     string        `json:"ipAddr"` // network addr
	Port       uint16        `json:"port"`
	TotalVotes string        `json:"totalVotes"` // total voting from all buckets
	Commission uint64        `json:"commission"` // commission rate unit "1e09"
	Buckets    []string      `json:"buckets"`    // all buckets voted for this candidate
}

type Delegate

type Delegate struct {
	Name        string         `json:"name"`
	Address     meter.Address  `json:"address"`
	PubKey      string         `json:"pubKey"`
	VotingPower string         `json:"votingPower"`
	IPAddr      string         `json:"ipAddr"` // network addr
	Port        uint16         `json:"port"`
	Commission  uint64         `json""commissin"`
	DistList    []*Distributor `json:"distributors"`
}

type Distributor

type Distributor struct {
	Address meter.Address `json:"address"`
	Shares  uint64        `json:"shares"`
}

type Stakeholder

type Stakeholder struct {
	Holder     meter.Address `json:"holder"`
	TotalStake string        `json:"totalStake"`
	Buckets    []string      `json:"buckets"`
}

type Staking

type Staking struct {
}

func New

func New() *Staking

func (*Staking) Mount

func (st *Staking) Mount(root *mux.Router, pathPrefix string)

type ValidatorReward

type ValidatorReward struct {
	Epoch            uint32 `json:"epoch"`
	BaseReward       string `json:"baseReward"`
	ExpectDistribute string `json:"expectDistribute"`
	ActualDistribute string `json:"actualDistribute`
}

Jump to

Keyboard shortcuts

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