walletmanager

package
v0.0.0-...-5c64d9c Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name           string
	Note           string
	Type           AccountType
	PrivateKey     string
	PaymentAddress string
	OTAKey         string
	ViewKey        string
	IsEncrypted    bool
	WatchTokens    map[string]struct{}
}

type AccountCoinState

type AccountCoinState struct {
	PRVUTXOList   []string
	TokenUTXOList map[string][]string
	// contains filtered or unexported fields
}

type AccountType

type AccountType int
const (
	Masterless AccountType = iota
	WatchOnly
)

type CoinSyncManager

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

func (*CoinSyncManager) GetCoinByPubkey

func (csm *CoinSyncManager) GetCoinByPubkey(pubkeys [][]byte) ([]coin.CoinV2, error)

func (*CoinSyncManager) GetCoinPubkeyByIndices

func (csm *CoinSyncManager) GetCoinPubkeyByIndices(shardid int, tokenID string, from uint64, to uint64) ([][]byte, error)

func (*CoinSyncManager) StartSyncCoinsProcess

func (csm *CoinSyncManager) StartSyncCoinsProcess() error

func (*CoinSyncManager) SyncShard

func (csm *CoinSyncManager) SyncShard(shardid int) error

type Contact

type Contact struct {
	Name    string
	Address string
	Note    string
}

type RuntimeAccount

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

func (*RuntimeAccount) AddWatchToken

func (rtacc *RuntimeAccount) AddWatchToken(tokenID string) error

func (*RuntimeAccount) RemoveWatchToken

func (rtacc *RuntimeAccount) RemoveWatchToken(tokenID string) error

type WalletManager

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

func InitWallet

func InitWallet(db *database.Database) (*WalletManager, error)

func (*WalletManager) AddNewAccount

func (wlm *WalletManager) AddNewAccount(account Account) error

func (*WalletManager) GetAccountBalance

func (wlm *WalletManager) GetAccountBalance(account string) map[string]uint64

func (*WalletManager) GetAccountInstance

func (wlm *WalletManager) GetAccountInstance(account string) *RuntimeAccount

func (*WalletManager) GetCurrentNetwork

func (wlm *WalletManager) GetCurrentNetwork() common.NetworkID

func (*WalletManager) ListAccounts

func (wlm *WalletManager) ListAccounts() ([]Account, error)

func (*WalletManager) Start

func (wlm *WalletManager) Start() error

func (*WalletManager) Stop

func (wlm *WalletManager) Stop() error

func (*WalletManager) SwitchNetwork

func (wlm *WalletManager) SwitchNetwork(networkParam common.NetworkID, incclient *incclient.IncClient) error

Jump to

Keyboard shortcuts

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