service

package
v0.0.0-...-3a7d5fb Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 23 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logging.MustGetLogger("WalletService")

Functions

This section is empty.

Types

type HashAndHeight

type HashAndHeight struct {
	Height    uint32    `json:"height"`
	Hash      string    `json:"string"`
	Timestamp time.Time `json:"timestamp"`
}

type WalletService

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

func NewWalletService

func NewWalletService(db wallet.Datastore, km *keys.KeyManager, client model.APIClient, params *chaincfg.Params, coinType wallet.CoinType, cache cache.Cacher) (*WalletService, error)

func (*WalletService) AddTransactionListener

func (ws *WalletService) AddTransactionListener(callback func(callback wallet.TransactionCallback))

func (*WalletService) ChainTip

func (ws *WalletService) ChainTip() (uint32, chainhash.Hash)

func (*WalletService) InvokeTransactionListeners

func (ws *WalletService) InvokeTransactionListeners(callback wallet.TransactionCallback)

InvokeTransactionListeners will invoke the transaction listeners for the updation of order state

func (*WalletService) ProcessIncomingTransaction

func (ws *WalletService) ProcessIncomingTransaction(tx model.Transaction)

This is a transaction fresh off the wire. Let's save it to the db.

func (*WalletService) Start

func (ws *WalletService) Start()

func (*WalletService) Stop

func (ws *WalletService) Stop()

func (*WalletService) UpdateState

func (ws *WalletService) UpdateState()

updateState will query the API for both UTXOs and TXs relevant to our wallet and then update the db state to match the API responses.

Jump to

Keyboard shortcuts

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