delegate

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: 12 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:"delegator_count"`
	PercentOfDelegators  float64 `json:"percent_of_delegators"`
	VotingPower          float64 `json:"voting_power"`
	PercentOfVotingPower float64 `json:"percent_of_voting_power"`
}

type DelegateProfile

type DelegateProfile struct {
	Address              string                `json:"address"`
	VotingPower          float64               `json:"voting_power"`
	IncomingPower        float64               `json:"incoming_power"`
	OutgoingPower        float64               `json:"outgoing_power"`
	PercentOfVotingPower float64               `json:"percent_of_voting_power"`
	PercentOfDelegators  float64               `json:"percent_of_delegators"`
	Delegates            []ProfileDelegateItem `json:"delegates"`
	Expiration           *time.Time            `json:"expiration"`
}

type DelegatesWrapper added in v0.6.2

type DelegatesWrapper struct {
	Delegates []Delegate `json:"delegates"`
	Total     int        `json:"total"`
}

type GetDelegateProfileParams

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

type GetDelegatesParams

type GetDelegatesParams struct {
	Dao       string
	Strategy  json.RawMessage
	By        *string
	Addresses []string
	Limit     int
	Offset    int
}

type GrpcServer

type GrpcServer struct {
	delegatepb.UnimplementedDelegateServer
	// contains filtered or unexported fields
}

func NewGrpcServer

func NewGrpcServer(s *Service) *GrpcServer

func (*GrpcServer) GetDelegates

type ProfileDelegateItem

type ProfileDelegateItem struct {
	Address        string  `json:"address"`
	Weight         float64 `json:"weight"`
	DelegatedPower float64 `json:"delegated_power"`
}

type Service

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

func NewService

func NewService(gnosisSDK *gnosis.SDK) *Service

func (*Service) GetDelegateProfile

func (s *Service) GetDelegateProfile(ctx context.Context, req GetDelegateProfileParams) (DelegateProfile, error)

func (*Service) GetDelegates

func (s *Service) GetDelegates(ctx context.Context, req GetDelegatesParams) (DelegatesWrapper, error)

Jump to

Keyboard shortcuts

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