apr

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetAprByAddressHttpHandler

func NewGetAprByAddressHttpHandler(db *store.Store, c *client.Client) *getAprByAddressHttpHandler

func NewGetAprByAddressUseCase

func NewGetAprByAddressUseCase(db *store.Store, c *client.Client) *getAprByAddressUseCase

Types

type MonthlyAprTotal

type MonthlyAprTotal struct {
	MonthlyRewardRate *big.Float
	DayCount          int64
	Dailies           []RewardRate
}

type MonthlyAprView

type MonthlyAprView struct {
	MonthInfo string       `json:"month_info"`
	AvgApr    float64      `json:"avg_apr"`
	Dailies   []RewardRate `json:"dailies"`
}

type MonthlyAprViewResult

type MonthlyAprViewResult struct {
	Result []MonthlyAprView `json:"result"`
}

type RewardRate

type RewardRate struct {
	TimeBucket          types.Time     `json:"time_bucket"`
	StartHeight         int64          `json:"start_height"`
	EscrowActiveBalance types.Quantity `json:"escrow_active_balance"`
	TotalRewards        types.Quantity `json:"total_rewards"`
	Rate                big.Float      `json:"rate"`
}

func NewRewardRate

func NewRewardRate(summary model.BalanceSummary, rawAccount *accountpb.GetByAddressResponse) RewardRate

Jump to

Keyboard shortcuts

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