tvl

package
v0.0.0-...-efbd42f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.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 Tvl

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

Tvl is the tvl client.

func NewTVL

func NewTVL(p2pNetwork string, cache deltaswapscanCache.Cache, tvlKey string, expiration int, logger *zap.Logger) *Tvl

NewTVL init a new tvl client.

func (*Tvl) Get

func (t *Tvl) Get(ctx context.Context) (string, error)

Get get tvl value from cache if exists or call wormhole api to get tvl value and set the in cache for t.expiration time.

type TvlAPI

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

func NewTvlAPI

func NewTvlAPI(net string) *TvlAPI

NewCoingeckoAPI creates a new coingecko client

func (*TvlAPI) GetNotionalUSD

func (c *TvlAPI) GetNotionalUSD(ctx context.Context, ids []string) (*string, error)

Jump to

Keyboard shortcuts

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