wallet

package
v0.0.0-...-c57a2f4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidCoinType wallet.CoinType = wallet.CoinType(^uint32(0))

Variables

View Source
var ErrTrustedPeerRequired = errors.New("trusted peer required in spv wallet config during regtest use")

ErrTrustedPeerRequired is returned when the config is missing the TrustedPeer field

Functions

func NewMultiWallet

func NewMultiWallet(cfg *WalletConfig) (multiwallet.MultiWallet, error)

NewMultiWallet returns a functional set of wallets using the provided WalletConfig. The value of schema.WalletsConfig.<COIN>.Type must be "API" or will be ignored. BTC and BCH can also use the "SPV" Type.

Types

type StatusUpdater

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

func NewStatusUpdater

func NewStatusUpdater(mw multiwallet.MultiWallet, c chan repo.Notifier, ctx context.Context) *StatusUpdater

func (*StatusUpdater) Start

func (s *StatusUpdater) Start()

type WalletConfig

type WalletConfig struct {
	// ConfigFile contains the options of each native wallet
	ConfigFile *schema.WalletsConfig
	// RepoPath is the base path which contains the nodes data directory
	RepoPath string
	// Logger is an interface to support internal wallet logging
	Logger logging.Backend
	// DB is an interface to support internal transaction persistance
	DB *db.DB
	// Mnemonic is the string entropy used to generate the wallet's BIP39-compliant seed
	Mnemonic string
	// WalletCreationDate represents the time when new transactions were added by this wallet
	WalletCreationDate time.Time
	// Params describe the desired blockchain params to enforce on joining the network
	Params *chaincfg.Params
	// Proxy is an interface which allows traffic for the wallet to proxied
	Proxy proxy.Dialer
	// DisableExchangeRates will disable usage of the internal exchange rate API
	DisableExchangeRates bool
}

WalletConfig describes the options needed to create a MultiWallet

type WalletDatastore

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

func CreateWalletDB

func CreateWalletDB(database *db.DB, coinType wallet.CoinType) *WalletDatastore

func (*WalletDatastore) Keys

func (d *WalletDatastore) Keys() wallet.Keys

func (*WalletDatastore) Stxos

func (d *WalletDatastore) Stxos() wallet.Stxos

func (*WalletDatastore) Txns

func (d *WalletDatastore) Txns() wallet.Txns

func (*WalletDatastore) Utxos

func (d *WalletDatastore) Utxos() wallet.Utxos

func (*WalletDatastore) WatchedScripts

func (d *WalletDatastore) WatchedScripts() wallet.WatchedScripts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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