wallet

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 6 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
}

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) 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