wallet

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet struct {
	Name          string         `mapstructure:"name"`
	Address       common.Address `mapstructure:"address"`
	ENS           *ens.Name      `mapstructure:"ens"`
	ENSName       string         `mapstructure:"ens_name"`
	Color         lipgloss.Color `mapstructure:"color"`
	Balance       *big.Int
	BalanceBefore *big.Int
	BalanceTrend  string
	Tokens        map[common.Address]map[string]*token.Token
}

Wallet represents a EOA account/wallet.

func (*Wallet) ColoredName

func (w *Wallet) ColoredName(maxWalletNameLength int) string

func (*Wallet) Render

func (w *Wallet) Render(text string) string

type Wallets

type Wallets map[common.Address]*Wallet

func (*Wallets) Addresses

func (ws *Wallets) Addresses() []common.Address

func (*Wallets) ContainsAddressFromSlice

func (ws *Wallets) ContainsAddressFromSlice(addresses []common.Address) common.Address

func (*Wallets) ContainsToken added in v0.7.1

func (ws *Wallets) ContainsToken(tokenAddress common.Address, tokenID string) bool

func (*Wallets) FormattedNames

func (ws *Wallets) FormattedNames() []string

func (*Wallets) SortByBalance

func (ws *Wallets) SortByBalance() []*Wallet

func (*Wallets) StringAddresses

func (ws *Wallets) StringAddresses() []string

Jump to

Keyboard shortcuts

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