Documentation ¶
Index ¶
- Constants
- func A2BTrade(wif string, receiver *Target, netParams *chaincfg.Params) (txid string, err error)
- func AS2BSTrade(wif string, receivers []*Target, netParams *chaincfg.Params) (txid string, err error)
- func AS2BTrade(wif string, receiver btcutil.Address, netParams *chaincfg.Params) (txid string, err error)
- func BtcWif2Address(wif string, netParams *chaincfg.Params) (address btcutil.Address)
- func BuildMultiSigP2SHAddr(pubs []*btcutil.AddressPubKey, required int, p *chaincfg.Params) (multiSigAddr string, pkScript []byte, err error)
- func BuildMultiSigScript(pubs []*btcutil.AddressPubKey, required int) (pkScript []byte, err error)
- func DisAsembleScript(lockingScript string) (string, error)
- func GetBalance(outputs []*btcapi.UnspentOutput) (amount int64)
- func GetClientUnspent(wif string, netParams *chaincfg.Params) (client *txpool.TxpoolClient, outputs []*btcapi.UnspentOutput, ...)
- func GetTxFee(tx *wire.MsgTx, l feelevel) int64
- func MakeOrder()
- func MakeSignedTxAndBroastcast(t tx_type, client *txpool.TxpoolClient, receivers []*Target, wif string, ...) (txid string, err error)
- func SignMultiSigTxin(wif string, redeemTx *wire.MsgTx, index int, redeemScript []byte) ([]byte, error)
- func SignTx(privKey string, pkScripts []string, redeemTx *wire.MsgTx) (*wire.MsgTx, error)
- func SpendMultiSig(sigs [][]byte, required int, receivers []*Receiver, ...) (*wire.MsgTx, error)
- type BTCFee
- type FeeRate
- type Receiver
- type Target
Constants ¶
View Source
const (
FEE_URL string = "https://mempool.space/api/v1/fees/recommended"
)
Variables ¶
This section is empty.
Functions ¶
func AS2BSTrade ¶
func AS2BSTrade(wif string, receivers []*Target, netParams *chaincfg.Params) (txid string, err error)
3: pay for salary
func AS2BTrade ¶
func AS2BTrade(wif string, receiver btcutil.Address, netParams *chaincfg.Params) (txid string, err error)
2: found collect
func BtcWif2Address ¶
func BuildMultiSigP2SHAddr ¶
func BuildMultiSigScript ¶
func BuildMultiSigScript(pubs []*btcutil.AddressPubKey, required int) (pkScript []byte, err error)
func DisAsembleScript ¶
func GetBalance ¶
func GetBalance(outputs []*btcapi.UnspentOutput) (amount int64)
func GetClientUnspent ¶
func GetClientUnspent(wif string, netParams *chaincfg.Params) (client *txpool.TxpoolClient, outputs []*btcapi.UnspentOutput, from btcutil.Address, err error)
func MakeSignedTxAndBroastcast ¶
func MakeSignedTxAndBroastcast(t tx_type, client *txpool.TxpoolClient, receivers []*Target, wif string, from btcutil.Address, outputs []*btcapi.UnspentOutput) (txid string, err error)
func SignMultiSigTxin ¶
Types ¶
type BTCFee ¶
type BTCFee struct {
// contains filtered or unexported fields
}
func InitBtcFee ¶
func InitBtcFee() *BTCFee
func (*BTCFee) GetFeeRate ¶
Click to show internal directories.
Click to hide internal directories.