accounts

package
v1.1.0-beta6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

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

func NewAccounts

func NewAccounts(stateBus *bus.Bus, iavl tree.Tree) (*Accounts, error)

func (*Accounts) AddBalance

func (a *Accounts) AddBalance(address types.Address, coin types.CoinSymbol, amount *big.Int)

func (*Accounts) Commit

func (a *Accounts) Commit() error

func (*Accounts) CreateMultisig

func (a *Accounts) CreateMultisig(weights []uint, addresses []types.Address, threshold uint) types.Address

func (*Accounts) DeleteCoin

func (a *Accounts) DeleteCoin(address types.Address, symbol types.CoinSymbol)

func (*Accounts) Exists

func (a *Accounts) Exists(msigAddress types.Address) bool

func (*Accounts) Export

func (a *Accounts) Export(state *types.AppState)

func (*Accounts) GetAccount

func (a *Accounts) GetAccount(address types.Address) *Model

func (*Accounts) GetBalance

func (a *Accounts) GetBalance(address types.Address, coin types.CoinSymbol) *big.Int

func (*Accounts) GetBalances

func (a *Accounts) GetBalances(address types.Address) map[types.CoinSymbol]*big.Int

func (*Accounts) GetNonce

func (a *Accounts) GetNonce(address types.Address) uint64

func (*Accounts) SetBalance

func (a *Accounts) SetBalance(address types.Address, coin types.CoinSymbol, amount *big.Int)

func (*Accounts) SetNonce

func (a *Accounts) SetNonce(address types.Address, nonce uint64)

func (*Accounts) SubBalance

func (a *Accounts) SubBalance(address types.Address, coin types.CoinSymbol, amount *big.Int)

type Bus

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

func NewBus

func NewBus(accounts *Accounts) *Bus

func (*Bus) AddBalance

func (b *Bus) AddBalance(address types.Address, coin types.CoinSymbol, value *big.Int)

func (*Bus) DeleteCoin

func (b *Bus) DeleteCoin(address types.Address, coin types.CoinSymbol)

type Model

type Model struct {
	Nonce        uint64
	MultisigData Multisig
	// contains filtered or unexported fields
}

func (*Model) IsMultisig

func (model *Model) IsMultisig() bool

func (*Model) Multisig

func (model *Model) Multisig() Multisig

type Multisig

type Multisig struct {
	Weights   []uint
	Threshold uint
	Addresses []types.Address
}

func (*Multisig) Address

func (m *Multisig) Address() types.Address

func (*Multisig) GetWeight

func (m *Multisig) GetWeight(address types.Address) uint

Jump to

Keyboard shortcuts

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