Versions in this module Expand all Collapse all v0 v0.8.0 Jan 4, 2017 Changes in this version + var ErrCoinsNoSelectionAvailable = errors.New("no coin selection possible") + func NewMsgTxWithInputCoins(inputCoins Coins) *wire.MsgTx + type Coin interface + Hash func() *chainhash.Hash + Index func() uint32 + NumConfs func() int64 + PkScript func() []byte + Value func() dcrutil.Amount + ValueAge func() int64 + type CoinSelector interface + CoinSelect func(targetValue dcrutil.Amount, coins []Coin) (Coins, error) + type CoinSet struct + func NewCoinSet(coins []Coin) *CoinSet + func (cs *CoinSet) Coins() []Coin + func (cs *CoinSet) Num() int + func (cs *CoinSet) PopCoin() Coin + func (cs *CoinSet) PushCoin(c Coin) + func (cs *CoinSet) ShiftCoin() Coin + func (cs *CoinSet) TotalValue() (value dcrutil.Amount) + func (cs *CoinSet) TotalValueAge() (valueAge int64) + type Coins interface + Coins func() []Coin + type MaxValueAgeCoinSelector struct + MaxInputs int + MinChangeAmount dcrutil.Amount + func (s MaxValueAgeCoinSelector) CoinSelect(targetValue dcrutil.Amount, coins []Coin) (Coins, error) + type MinIndexCoinSelector struct + MaxInputs int + MinChangeAmount dcrutil.Amount + func (s MinIndexCoinSelector) CoinSelect(targetValue dcrutil.Amount, coins []Coin) (Coins, error) + type MinNumberCoinSelector struct + MaxInputs int + MinChangeAmount dcrutil.Amount + func (s MinNumberCoinSelector) CoinSelect(targetValue dcrutil.Amount, coins []Coin) (Coins, error) + type MinPriorityCoinSelector struct + MaxInputs int + MinAvgValueAgePerInput int64 + MinChangeAmount dcrutil.Amount + func (s MinPriorityCoinSelector) CoinSelect(targetValue dcrutil.Amount, coins []Coin) (Coins, error) + type SimpleCoin struct + Tx *dcrutil.Tx + TxIndex uint32 + TxNumConfs int64 + func (c *SimpleCoin) Hash() *chainhash.Hash + func (c *SimpleCoin) Index() uint32 + func (c *SimpleCoin) NumConfs() int64 + func (c *SimpleCoin) PkScript() []byte + func (c *SimpleCoin) Value() dcrutil.Amount + func (c *SimpleCoin) ValueAge() int64