Versions in this module Expand all Collapse all v0 v0.2.97 Oct 15, 2022 Changes in this version + const BitcoinCsv + const BitcoinCsvSafetyLimit + const BitcoinFeeTargetBlocks + const BitcoinMinConfs + const DefaultBitcoinStaticFeePerKW + const EstimatedOpeningTxSize + const FeePerKwFloor + const LiquidConfs + const LiquidCsv + const LiquidTargetBlocks + func GetCooperativeWitness(takerSig, makerSig, redeemScript []byte) [][]byte + func GetCsvWitness(signature, redeemScript []byte) [][]byte + func GetOpeningTxScript(takerPubkeyHash []byte, makerPubkeyHash []byte, pHash []byte, csv uint32) ([]byte, error) + func GetPreimageWitness(signature, preimage, redeemScript []byte) [][]byte + func ParamsToTxScript(p *swap.OpeningParams, locktimeHeight uint32) ([]byte, error) + type BitcoinOnChain struct + func NewBitcoinOnChain(estimator Estimator, fallbackFeeRateSatPerKw btcutil.Amount, ...) *BitcoinOnChain + func (b *BitcoinOnChain) CreateOpeningAddress(params *swap.OpeningParams, csv uint32) (string, error) + func (b *BitcoinOnChain) GetCSVHeight() uint32 + func (b *BitcoinOnChain) GetChain() *chaincfg.Params + func (b *BitcoinOnChain) GetFee(txSize int64) (uint64, error) + func (b *BitcoinOnChain) GetFeeSatsFromTx(psbtString, txHex string) (uint64, error) + func (b *BitcoinOnChain) GetOutputScript(params *swap.OpeningParams) ([]byte, error) + func (b *BitcoinOnChain) GetVoutAndVerify(txHex string, params *swap.OpeningParams) (bool, uint32, error) + func (b *BitcoinOnChain) PrepareSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams, ...) (tx *wire.MsgTx, sigHash, redeemScript []byte, err error) + func (b *BitcoinOnChain) TxIdFromHex(txHex string) (string, error) + func (b *BitcoinOnChain) ValidateTx(swapParams *swap.OpeningParams, openingTxHex string) (bool, error) + type Estimator interface + EstimateFeePerKW func(targetBlocks uint32) (btcutil.Amount, error) + Start func() error + type GBitcoindBackend interface + EstimateFee func(blocks uint32, mode string) (*gbitcoin.FeeResponse, error) + GetMempoolInfo func() (*gbitcoin.MempoolInfo, error) + Ping func() (bool, error) + type GBitcoindEstimator struct + func NewGBitcoindEstimator(bitcoindRpc GBitcoindBackend, estimateMode string, ...) (*GBitcoindEstimator, error) + func (g *GBitcoindEstimator) EstimateFeePerKW(targetBlocks uint32) (btcutil.Amount, error) + func (g *GBitcoindEstimator) Start() error + type LiquidOnChain struct + func NewLiquidOnChain(elements *gelements.Elements, wallet wallet.Wallet, network *network.Network) *LiquidOnChain + func (b *LiquidOnChain) GetOutputScript(params *swap.OpeningParams) ([]byte, error) + func (l *LiquidOnChain) AddBlindingRandomFactors(claimParams *swap.ClaimParams) (err error) + func (l *LiquidOnChain) Blech32ToScript(blech32Addr string) ([]byte, error) + func (l *LiquidOnChain) BroadcastOpeningTx(unpreparedTxHex string) (string, string, error) + func (l *LiquidOnChain) CreateBlindedOpeningAddress(redeemScript []byte, blindingPubkey *btcec.PublicKey) (string, error) + func (l *LiquidOnChain) CreateCoopSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams, ...) (txId, txHex string, error error) + func (l *LiquidOnChain) CreateCsvSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (txId, txHex string, error error) + func (l *LiquidOnChain) CreateOpeningAddress(redeemScript []byte) (string, error) + func (l *LiquidOnChain) CreateOpeningTransaction(swapParams *swap.OpeningParams) (unpreparedTxHex string, fee uint64, vout uint32, err error) + func (l *LiquidOnChain) CreatePreimageSpendingTransaction(swapParams *swap.OpeningParams, claimParams *swap.ClaimParams) (string, string, error) + func (l *LiquidOnChain) FindVout(outputs []*transaction.TxOutput, redeemScript []byte) (uint32, error) + func (l *LiquidOnChain) GetAsset() string + func (l *LiquidOnChain) GetCSVHeight() uint32 + func (l *LiquidOnChain) GetFlatSwapOutFee() (uint64, error) + func (l *LiquidOnChain) GetNetwork() string + func (l *LiquidOnChain) GetOnchainBalance() (uint64, error) + func (l *LiquidOnChain) GetRefundFee() (uint64, error) + func (l *LiquidOnChain) NewAddress() (string, error) + func (l *LiquidOnChain) TxIdFromHex(txHex string) (string, error) + func (l *LiquidOnChain) ValidateTx(openingParams *swap.OpeningParams, txHex string) (bool, error) + func (l *LiquidOnChain) VoutFromTxHex(txHex string, redeemScript []byte) (uint32, error) + type LndEstimator struct + func NewLndEstimator(walletkit walletrpc.WalletKitClient, fallbackFeeRate btcutil.Amount, ...) (*LndEstimator, error) + func (l *LndEstimator) EstimateFeePerKW(targetBlocks uint32) (btcutil.Amount, error) + func (l *LndEstimator) Start() error + type RegtestFeeEstimator struct + func NewRegtestFeeEstimator() (*RegtestFeeEstimator, error) + func (r *RegtestFeeEstimator) EstimateFeePerKW(targetBlocks uint32) (btcutil.Amount, error) + func (r *RegtestFeeEstimator) Start() error