staking_v1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StakingContract          = "io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza"
	MemberGateway            = "https://member.iotex.io/api-gateway/"
	MemberAllCandidatesQuery = `` /* 241-byte string literal not displayed */
)
View Source
const StakingABI = `` /* 12350-byte string literal not displayed */

Variables

This section is empty.

Functions

func MemberDelegations

func MemberDelegations(w http.ResponseWriter, r *http.Request)

func MemberValidators

func MemberValidators(w http.ResponseWriter, r *http.Request)

Types

type Delegation

type Delegation struct {
	Delegator StakeValidator   `json:"delegator"`
	Value     string           `json:"value"`
	Status    DelegationStatus `json:"status"`
	Metadata  interface{}      `json:"metadata,omitempty"`
}

type DelegationStatus

type DelegationStatus string
const (
	DelegationStatusActive  DelegationStatus = "active"
	DelegationStatusPending DelegationStatus = "pending"
)

type DelegationsPage

type DelegationsPage []Delegation

type MemberDelegates

type MemberDelegates struct {
	Data struct {
		BPCandidates []struct {
			ID               string   `json:"id"`
			Rand             string   `json:"rank"`
			Logo             string   `json:"logo"`
			Name             string   `json:"name"`
			Status           string   `json:"status"`
			Category         string   `json:"category"`
			ServerStatus     string   `json:"serverStatus"`
			LiveVotes        int64    `json:"liveVotes"`
			LiveVotesDelta   int64    `json:"liveVotesDelta"`
			Percent          string   `json:"percent"`
			RegisteredName   string   `json:"registeredName"`
			SocialMedia      []string `json:"socialMedia"`
			Productivity     int      `json:"productivity"`
			ProductivityBase int      `json:"productivityBase"`
		} `json:"bpCandidates"`
	} `json:"data"`
}

type StakeValidator

type StakeValidator struct {
	ID      string             `json:"id"`
	Status  bool               `json:"status,omitempty"`
	Info    StakeValidatorInfo `json:"info,omitempty"`
	Details StakingDetails     `json:"details,omitempty"`
}

type StakeValidatorInfo

type StakeValidatorInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Image       string `json:"image"`
	Website     string `json:"website"`
}

type StakingDetails

type StakingDetails struct {
	Reward        StakingReward `json:"reward"`
	LockTime      int           `json:"locktime"`
	MinimumAmount string        `json:"minimum_amount"`
}

type StakingReward

type StakingReward struct {
	Annual float64 `json:"annual"`
}

type Validator

type Validator struct {
	ID      string         `json:"id"`
	Status  bool           `json:"status"`
	Details StakingDetails `json:"details"`
}

type ValidatorPage

type ValidatorPage []Validator

Jump to

Keyboard shortcuts

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