accountmanager

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnlockedPrefix    = "unlock_"
	BalancePrefix     = "balance_"
	BalanceEthPrefix  = "balance_eth_"
	AllowancePrefix   = "allowance_"
	CustomTokenPrefix = "customtoken_"
)

Variables

This section is empty.

Functions

func GetAllowanceWithSymbolResult

func GetAllowanceWithSymbolResult(owner, spender common.Address) (map[string]*big.Int, error)

func GetBalanceAndAllowance

func GetBalanceAndAllowance(owner, token, spender common.Address) (balance, allowance *big.Int, err error)

func GetBalanceWithSymbolResult

func GetBalanceWithSymbolResult(owner common.Address) (map[string]*big.Int, error)

func GetCutoff

func GetCutoff(contract, address string) (int, error)

func HasUnlocked

func HasUnlocked(owner string) (exists bool, err error)

func IsInit

func IsInit() bool

Types

type AccountAllowances

type AccountAllowances struct {
	AccountBase
	Allowances map[common.Address]map[common.Address]Allowance //token -> spender
}

type AccountBalances

type AccountBalances struct {
	AccountBase
	Balances map[common.Address]Balance
}

ethbalance need special process

type AccountBase

type AccountBase struct {
	Owner        common.Address
	CustomTokens []types.Token
}

type AccountManager

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

func Initialize

func Initialize(options *AccountManagerOptions, brokers []string) AccountManager

func InitializeView

func InitializeView(options *AccountViewOptions) AccountManager

func (*AccountManager) Start

func (accountManager *AccountManager) Start()

func (*AccountManager) UnlockedWallet

func (a *AccountManager) UnlockedWallet(owner string) (err error)

type AccountManagerOptions

type AccountManagerOptions struct {
	CacheDuration    int64
	EthCacheDuration int64
}

type AccountViewOptions

type AccountViewOptions struct {
	CacheDuration    int64
	EthCacheDuration int64
}

type Allowance

type Allowance struct {
	LastBlock *types.Big `json:"last_block"`
	Allowance *types.Big `json:"allowance"`
}

type Balance

type Balance struct {
	LastBlock *types.Big `json:"last_block"`
	Balance   *types.Big `json:"balance"`
}

type ChangedOfBlock

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

Jump to

Keyboard shortcuts

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