wallet

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group added in v0.2.0

type Group []*Wallet

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 the wallets configured by the user.

func (*Wallet) ColoredName

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

func (*Wallet) Render added in v0.2.0

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

func (ws *Wallets) Contains(address common.Address) bool

Contains returns true if the given string is in the slice.

func (*Wallets) ContainsOneOf added in v0.2.0

func (ws *Wallets) ContainsOneOf(addresses map[common.Address]bool) common.Address

func (*Wallets) FormattedNames

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

func (*Wallets) GetAll

func (ws *Wallets) GetAll() WalletsSlice

func (*Wallets) StringAddresses

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

type WalletsSlice

type WalletsSlice []*Wallet

func (WalletsSlice) Len

func (w WalletsSlice) Len() int

func (WalletsSlice) Less

func (w WalletsSlice) Less(i, j int) bool

func (WalletsSlice) Swap

func (w WalletsSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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