Documentation ¶
Index ¶
- func CalcBalance(utxos []wi.Utxo, txns []wi.Txn) (confirmed, unconfirmed int64)
- func DecodeAddress(address string, params *chaincfg.Params) (btcutil.Address, error)
- func GatherCoins(height uint32, utxos []wallet.Utxo, ...) map[coinset.Coin]*hd.ExtendedKey
- func LoadAllInputs(tx *wire.MsgTx, coinMap map[coinset.Coin]*hd.ExtendedKey, ...) (int64, map[wire.OutPoint]int64, map[wire.OutPoint][]byte, ...)
- func NewCoin(txid chainhash.Hash, index uint32, value btcutil.Amount, numConfs int64, ...) (coinset.Coin, error)
- func NormalizeCurrencyCode(currencyCode string) string
- func OutPointsEqual(a, b wire.OutPoint) bool
- func SatoshisPerCoin(coinType wallet.CoinType) float64
- type Coin
- type FeeProvider
- type FeeTargetInUSDCents
- type Fees
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAddress ¶
func GatherCoins ¶
func LoadAllInputs ¶
func NormalizeCurrencyCode ¶
NormalizeCurrencyCode standardizes the format for the given currency code
func OutPointsEqual ¶
func SatoshisPerCoin ¶
func SatoshisPerCoin(coinType wallet.CoinType) float64
All implemented coins currently have 100m satoshis per coin
Types ¶
type Coin ¶
type FeeProvider ¶
type FeeProvider struct {
// contains filtered or unexported fields
}
func NewFeeProvider ¶
func NewFeeProvider(maxFee, priorityFee, normalFee, economicFee, superEconomicFee uint64, exchangeRates wallet.ExchangeRates) *FeeProvider
func (*FeeProvider) GetFeePerByte ¶
func (fp *FeeProvider) GetFeePerByte(feeLevel wallet.FeeLevel) uint64
type FeeTargetInUSDCents ¶
type FeeTargetInUSDCents float64
We will target a fee per byte such that it would equal 0.1 USD cent for economic, 1 USD cents for normal and 5 USD cents for priority for a median (226 byte) transaction.
const ( EconomicTarget FeeTargetInUSDCents = 0.1 NormalTarget FeeTargetInUSDCents = 1 PriorityTarget FeeTargetInUSDCents = 5 AverageTransactionSize = 226 )
Click to show internal directories.
Click to hide internal directories.