Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventBalanceHistoryUpdateStarted walletevent.EventType = "wallet-balance-history-update-started" EventBalanceHistoryUpdateFinished walletevent.EventType = "wallet-balance-history-update-finished" EventBalanceHistoryUpdateFinishedWithError walletevent.EventType = "wallet-balance-history-update-finished-with-error" )
EventBalanceHistoryUpdateStarted and EventBalanceHistoryUpdateDone are used to notify the UI that balance history is being updated
Variables ¶
This section is empty.
Functions ¶
func TimeIntervalDurationSecs ¶ added in v0.168.1
func TimeIntervalDurationSecs(timeInterval TimeInterval) uint64
Types ¶
type BalanceDB ¶
type BalanceDB struct {
// contains filtered or unexported fields
}
func NewBalanceDB ¶
type Exchange ¶ added in v0.131.5
type Exchange struct {
// contains filtered or unexported fields
}
Exchange caches conversion rates in memory on a daily basis
func NewExchange ¶ added in v0.131.5
func (*Exchange) FetchAndCacheMissingRates ¶ added in v0.131.5
fetchAndCacheRates fetches and in memory cache exchange rates for this and last year
func (*Exchange) GetExchangeRateForDay ¶ added in v0.131.5
func (e *Exchange) GetExchangeRateForDay(token tokenType, currency currencyType, date time.Time) (float32, error)
GetExchangeRate returns the exchange rate from token to currency in the day of the given date if none exists returns "missing <element>" error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
type TimeInterval ¶
type TimeInterval int
Specific time intervals for which balance history can be fetched
const ( BalanceHistory7Days TimeInterval = iota + 1 BalanceHistory1Month BalanceHistory6Months BalanceHistory1Year BalanceHistoryAllTime )
type TransfersLoadedCb ¶ added in v0.168.1
type ValuePoint ¶ added in v0.131.5
type Watcher ¶ added in v0.168.1
type Watcher struct {
// contains filtered or unexported fields
}
Watcher executes a given callback whenever an account gets added/removed
func NewWatcher ¶ added in v0.168.1
func NewWatcher(feed *event.Feed, callback TransfersLoadedCb) *Watcher
Click to show internal directories.
Click to hide internal directories.