wallet

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Confirmed uint64
	Pending   uint64
}

type Wallet

type Wallet interface {
	NewWallet(name string, mnemonic string, password string) error
	OpenWallet(name string, password string) error
	CloseWallet() error
	HasWallet(name string) bool
	GetAvailableWallets() (map[string]string, error)
	GetAccount() (string, error)
	GetSecret() (common.SecretKey, error)
	GetMnemonic() (string, error)
	GetPublic() (common.PublicKey, error)
	GetAccountRaw() ([20]byte, error)
	GetBalance() (*Balance, error)
	StartValidatorBulk(k []common.SecretKey) (bool, error)
	ExitValidatorBulk(k []common.PublicKey) (bool, error)
	StartValidator(validatorPrivBytes common.SecretKey) (bool, error)
	ExitValidator(validatorPubKey common.PublicKey) (bool, error)
	SendToAddress(to string, amount uint64) (*chainhash.Hash, error)
}

Wallet is the interface for wallet

func NewWallet

func NewWallet(ch chain.Blockchain, h host.Host, pool mempool.Pool) (Wallet, error)

NewWallet creates a new wallet.

Jump to

Keyboard shortcuts

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