Versions in this module Expand all Collapse all v0 v0.0.1 Mar 23, 2022 Changes in this version + func BtcToSatoshi(v float64) int64 + func DecodeAddress(addr string, chainParams *chaincfg.Params) (btcutil.Address, error) + func DecodeMsgTx(mtx *wire.MsgTx, chainParams *chaincfg.Params) *btcjson.TxRawDecodeResult + func EstimateFee(numP2PKHIns, numP2WPKHIns, numNestedP2WPKHIns int, outputs []BtcOutput, ...) (int64, int64, error) + func HexToHash(s string) (*chainhash.Hash, error) + func SatoshiToBtc(v int64) float64 + type BtcClient struct + RpcClient *rpcclient.Client + func NewBtcClient(URL string, user string, pass string, chainId int) (*BtcClient, error) + func (this *BtcClient) EstimateFeePerKb() (int64, error) + func (this *BtcClient) SendRawTransaction(signedHex string, allowHighFees bool) (string, error) + type BtcOutput struct + Address btcutil.Address + Amount int64 + type BtcTransaction struct + func NewBtcTransaction(unspents []BtcUnspent, outputs []BtcOutput, changeAddress btcutil.Address, ...) (*BtcTransaction, error) + func (t *BtcTransaction) Decode() *btcjson.TxRawDecodeResult + func (t *BtcTransaction) GetFee() int64 + func (t *BtcTransaction) GetFeePerKb() int64 + func (t *BtcTransaction) GetTxid() string + func (t *BtcTransaction) HasChange() bool + func (t *BtcTransaction) Send(client *rpcclient.Client, allowHighFees bool) (*chainhash.Hash, error) + func (t *BtcTransaction) Serialize() (string, error) + func (t *BtcTransaction) Sign(wallet *wallet.BtcWallet) error + func (t *BtcTransaction) SignWithSecretsSource(secretsSource txauthor.SecretsSource) error + type BtcUnspent struct + Amount float64 + RedeemScript string + ScriptPubKey string + TxID string + Vout uint32