gnosis

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delegate

type Delegate struct {
	Address              string  `json:"address"`
	DelegatorCount       int32   `json:"delegatorCount"`
	PercentOfDelegators  float64 `json:"percentOfDelegators"`
	VotingPower          float64 `json:"votingPower"`
	PercentOfVotingPower float64 `json:"percentOfVotingPower"`
}

type DelegateProfileRequest

type DelegateProfileRequest struct {
	Dao      string
	Address  string
	Strategy json.RawMessage
}

type DelegateProfileResponse

type DelegateProfileResponse struct {
	BlockNumber          int64               `json:"blockNumber"`
	ChainID              int64               `json:"chainId"`
	Address              string              `json:"address"`
	VotingPower          float64             `json:"votingPower"`
	IncomingPower        float64             `json:"incomingPower"`
	OutgoingPower        float64             `json:"outgoingPower"`
	PercentOfVotingPower float64             `json:"percentOfVotingPower"`
	PercentOfDelegators  float64             `json:"percentOfDelegators"`
	Delegators           []string            `json:"delegators"`
	Delegates            []string            `json:"delegates"`
	DelegateTree         []DelegateTreeItem  `json:"delegateTree"`
	DelegatorTree        []DelegatorTreeItem `json:"delegatorTree"`
}

type DelegateTreeItem

type DelegateTreeItem struct {
	Delegate           string  `json:"delegate"`
	Weight             float64 `json:"weight"`
	DelegatedPower     float64 `json:"delegatedPower"`
	ExpirationUnixTime int     `json:"expiration"`
}

type DelegatorTreeItem

type DelegatorTreeItem struct {
	Delegator      string  `json:"delegator"`
	Weight         float64 `json:"weight"`
	DelegatedPower float64 `json:"delegatedPower"`
}

type Pagination added in v0.6.2

type Pagination struct {
	Offset int `json:"offset"`
	Limit  int `json:"limit"`
	Total  int `json:"total"`
}

type SDK

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

func NewSDK

func NewSDK() *SDK

func (*SDK) GetDelegateProfile

func (s *SDK) GetDelegateProfile(ctx context.Context, req DelegateProfileRequest) (DelegateProfileResponse, error)

func (*SDK) GetTopDelegates

func (s *SDK) GetTopDelegates(ctx context.Context, req TopDelegatesRequest) (TopDelegatesResponse, error)

type TopDelegatesRequest

type TopDelegatesRequest struct {
	Dao      string
	Strategy json.RawMessage
	By       string
	Limit    int
	Offset   int
}

type TopDelegatesResponse

type TopDelegatesResponse struct {
	BlockNumber int64      `json:"blockNumber"`
	ChainID     int64      `json:"chainId"`
	Delegates   []Delegate `json:"delegates"`
	Pagination  Pagination `json:"pagination"`
}

Jump to

Keyboard shortcuts

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