Versions in this module Expand all Collapse all v1 v1.0.1 Jun 2, 2022 v1.0.0 May 20, 2022 Changes in this version + const P2PKHOutputSize + const P2PKHPkScriptSize + const P2WPKHOutputSize + const P2WPKHPkScriptSize + const RedeemNestedP2WPKHInputSize + const RedeemNestedP2WPKHScriptSize + const RedeemP2PKHInputSize + const RedeemP2PKHSigScriptSize + const RedeemP2WPKHInputSize + const RedeemP2WPKHInputWitnessWeight + const RedeemP2WPKHScriptSize + var BTC_DEFAULT_FEE = new(big.Int).SetString("50000", 10) + var ChainConfig = chaincfg.TestNet3Params + var ChainConfig2 = chaincfg.TestNet3Params + var RequiredConfirmations int64 + func BTCInit() + func EstimateSerializeSize(inputCount int, txOuts []*wire.TxOut, addChangeOutput bool) int + func EstimateVirtualSize(numP2PKHIns, numP2WPKHIns, numNestedP2WPKHIns int, txOuts []*wire.TxOut, ...) int + func GetTransaction_electrs(hash string) (*electrsTx, error) + func GetTxOut(txs []*btcjson.SearchRawTransactionsResult, toaddr btcutil.Address) []interface + func ListUnspent_BTCD(address string) (utxos []btcjson.ListUnspentResult, balance *big.Int, err error) + func ListUnspent_electrs(addr string) (list []btcjson.ListUnspentResult, balance *big.Int, err error) + func MakeInputSource(outputs []btcjson.ListUnspentResult) txauthor.InputSource + func SearchRawTransaction(do func([]*btcjson.SearchRawTransactionsResult, btcutil.Address) []interface{}) func(btcutil.Address) interface + func SendRawTransaction(c *rpcutils.RpcClient, tx *wire.MsgTx, allowHighFees bool) (ret string, err error) + func SumOutputSerializeSizes(outputs []*wire.TxOut) (serializeSize int) + func SumOutputValues(outputs []*wire.TxOut) (totalOutput btcutil.Amount) + type AddrApiResult struct + Address string + Balance float64 + Final_balance float64 + Final_n_tx int64 + N_tx int64 + Total_received float64 + Tx_url string + Txrefs []Txref + Unconfirmed_balance uint64 + Unconfirmed_n_tx int64 + type AuthoredTx struct + ChangeIndex int + Digests []string + PrevInputValues []btcutil.Amount + PrevScripts [][]byte + PubKeyData []byte + TotalInput btcutil.Amount + Tx *wire.MsgTx + func NewUnsignedTransaction(outputs []*wire.TxOut, relayFeePerKb btcutil.Amount, ...) (*AuthoredTx, error) + type BTCHandler struct + func NewBTCHandler() *BTCHandler + func NewBTCHandlerWithConfig(userServerHost string, suserServerPort int, userRpcuser, userPasswd string, ...) *BTCHandler + func (h *BTCHandler) BuildUnsignedTransaction(fromAddress, fromPublicKey, toAddress string, amount *big.Int, ...) (transaction interface{}, digests []string, err error) + func (h *BTCHandler) FiltTransaction(blocknumber uint64, filter types.Filter) (txhashes []string, err error) + func (h *BTCHandler) GetAddressBalance(address string, jsonstring string) (balance types.Balance, err error) + func (h *BTCHandler) GetDefaultFee() types.Value + func (h *BTCHandler) GetTransactionInfo(txhash string) (*types.TransactionInfo, error) + func (h *BTCHandler) IsToken() bool + func (h *BTCHandler) MakeSignedTransaction(rsv []string, transaction interface{}) (signedTransaction interface{}, err error) + func (h *BTCHandler) MakeSignedTransactionByJson(rsv []string, txjson string) (signedTransaction interface{}, err error) + func (h *BTCHandler) PublicKeyToAddress(pubKeyHex string) (address string, err error) + func (h *BTCHandler) SignTransaction(hash []string, wif interface{}) (rsv []string, err error) + func (h *BTCHandler) SubmitTransaction(signedTransaction interface{}) (ret string, err error) + func (h *BTCHandler) SubmitTransactionByJson(txjson string) (txhash string, err error) + type Output struct + Addresses []string + Script string + type TxApiResult struct + Outputs []Output + TxHash string + type Txref struct + Block_height int64 + Confirmations int64 + Confirmed string + Double_spend bool + Ref_balance float64 + Spent bool + Tx_hash string + Tx_input_n int32 + Tx_output_n int32 + Value float64 + type UtxoLsRes struct + Unspent_outputs []UtxoRes + type UtxoRes struct + Confirmations int64 + Script string + Tx_hash_big_endian string + Tx_output_n uint32 + Value float64