Versions in this module Expand all Collapse all v1 v1.1.0 Aug 24, 2021 v1.0.3 Aug 24, 2021 Changes in this version + var ErrCoinsNoSelectionAvailable = errors.New("no coin selection possible") + func NewMsgTxWithInputCoins(txVersion int32, inputCoins Coins) *wire.MsgTx + type Coin interface + Hash func() *chainhash.Hash + Index func() uint32 + NumConfs func() int64 + PkScript func() []byte + Value func() bglutil.Amount + ValueAge func() int64 + type CoinSelector interface + CoinSelect func(targetValue bglutil.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 bglutil.Amount) + func (cs *CoinSet) TotalValueAge() (valueAge int64) + type Coins interface + Coins func() []Coin + type MaxValueAgeCoinSelector struct + MaxInputs int + MinChangeAmount bglutil.Amount + func (s MaxValueAgeCoinSelector) CoinSelect(targetValue bglutil.Amount, coins []Coin) (Coins, error) + type MinIndexCoinSelector struct + MaxInputs int + MinChangeAmount bglutil.Amount + func (s MinIndexCoinSelector) CoinSelect(targetValue bglutil.Amount, coins []Coin) (Coins, error) + type MinNumberCoinSelector struct + MaxInputs int + MinChangeAmount bglutil.Amount + func (s MinNumberCoinSelector) CoinSelect(targetValue bglutil.Amount, coins []Coin) (Coins, error) + type MinPriorityCoinSelector struct + MaxInputs int + MinAvgValueAgePerInput int64 + MinChangeAmount bglutil.Amount + func (s MinPriorityCoinSelector) CoinSelect(targetValue bglutil.Amount, coins []Coin) (Coins, error) + type SimpleCoin struct + Tx *bglutil.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() bglutil.Amount + func (c *SimpleCoin) ValueAge() int64