staking

package
v1.2.0-fix5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: LGPL-3.0 Imports: 15 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 uint64        `json:"createTime"`

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

type Candidate

type Candidate struct {
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Address     meter.Address `json:"address"` // 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:"commission"`
	DistList    []*Distributor `json:"distributors"`
}

type Distributor

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

type RewardInfo added in v1.2.0

type RewardInfo struct {
	Address meter.Address `json:"address"`
	Amount  *big.Int      `json:"amount"`
}

type Stakeholder

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

type Staking

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

func New

func New(chain *chain.Chain,
	stateCreator *state.Creator) *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"`
	TotalReward string        `json:"totalReward"`
	Rewards     []*RewardInfo `json:"rewards"`
}

Jump to

Keyboard shortcuts

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