Documentation ¶
Index ¶
- Variables
- func CountSigOps(tx *btcutil.Tx) int
- func DirectWPKHScriptFromPKH(pkh [20]byte) []byte
- type BalanceResponse
- type Utxo
- type Wallet
- func (w *Wallet) CountP2SHSigOps(tx *btcutil.Tx, isCoinBaseTx bool) (int, error)
- func (w *Wallet) GetBalance() (bal uint64, balImmature uint64)
- func (w *Wallet) GetSigOpCost(tx *btcutil.Tx, pkScript []byte, isCoinBaseTx bool, bip16, segWit bool) (int, error)
- func (w *Wallet) PrepareSweep(addr string) ([]*wire.MsgTx, error)
- func (w *Wallet) Send(tx *wire.MsgTx) (string, error)
- func (w *Wallet) SignMyInputs(tx *wire.MsgTx, password string) error
- func (w *Wallet) Update()
- func (w *Wallet) Utxos() ([]Utxo, error)
Constants ¶
This section is empty.
Variables ¶
var WitnessScaleFactor = 4
Functions ¶
func CountSigOps ¶
CountSigOps returns the number of signature operations for all transaction input and output scripts in the provided transaction. This uses the quicker, but imprecise, signature operation counting mechanism from txscript.
func DirectWPKHScriptFromPKH ¶
Types ¶
type BalanceResponse ¶
type Wallet ¶
type Wallet struct { Address string Script []byte Spendable uint64 Maturing uint64 // contains filtered or unexported fields }
func (*Wallet) CountP2SHSigOps ¶
CountP2SHSigOps returns the number of signature operations for all input transactions which are of the pay-to-script-hash type. This uses the precise, signature operation counting mechanism from the script engine which requires access to the input transaction scripts.
func (*Wallet) GetBalance ¶
GetBalance will scan the utxos in the wallet and return two values: mature and immature balance. Mining outputs need to wait for 101 confirmations before being allowed to spend
func (*Wallet) GetSigOpCost ¶
func (*Wallet) SignMyInputs ¶
SignMyInputs finds the inputs in a transaction that came from our own wallet, and signs them with our private keys. Will modify the transaction in place, but will ignore inputs that we can't sign and leave them unsigned.