Versions in this module Expand all Collapse all v0 v0.2.97 Oct 15, 2022 Changes in this version + type BitcoinBlockchainRpc struct + func NewBitcoinRpc(bcli *gbitcoin.Bitcoin) *BitcoinBlockchainRpc + func (b *BitcoinBlockchainRpc) GetBlockHash(height uint32) (string, error) + func (b *BitcoinBlockchainRpc) GetBlockHeight() (uint64, error) + func (b *BitcoinBlockchainRpc) GetBlockHeightByHash(blockhash string) (uint32, error) + func (b *BitcoinBlockchainRpc) GetRawtransactionWithBlockHash(txId string, blockHash string) (string, error) + func (b *BitcoinBlockchainRpc) GetTxOut(txid string, vout uint32) (*TxOutResp, error) + func (b *BitcoinBlockchainRpc) String() string + type BlockchainRpc interface + GetBlockHash func(height uint32) (string, error) + GetBlockHeight func() (uint64, error) + GetBlockHeightByHash func(blockhash string) (uint32, error) + GetRawtransactionWithBlockHash func(txId string, blockHash string) (string, error) + GetTxOut func(txid string, vout uint32) (*TxOutResp, error) + type BlockchainRpcTxWatcher struct + func NewBlockchainRpcTxWatcher(ctx context.Context, blockchain BlockchainRpc, requiredConfs uint32, ...) *BlockchainRpcTxWatcher + func (l *BlockchainRpcTxWatcher) AddConfirmationCallback(f func(swapId string, txHex string) error) + func (l *BlockchainRpcTxWatcher) AddCsvCallback(f func(swapId string) error) + func (l *BlockchainRpcTxWatcher) AddWaitForConfirmationTx(swapId, txId string, vout, startingBlockheight uint32, _ []byte) + func (l *BlockchainRpcTxWatcher) AddWaitForCsvTx(swapId, txId string, vout uint32, startingBlockheight uint32, _ []byte) + func (l *BlockchainRpcTxWatcher) TxClaimed(swaps []string) + func (l *BlockchainRpcTxWatcher) TxHexFromId(resp *TxOutResp, txId string) (string, error) + func (s *BlockchainRpcTxWatcher) CheckTxConfirmed(swapId string, txId string, vout uint32) string + func (s *BlockchainRpcTxWatcher) GetBlockHeight() (uint32, error) + func (s *BlockchainRpcTxWatcher) HandleConfirmedTx(blockheight uint64) error + func (s *BlockchainRpcTxWatcher) HandleCsvTx(blockheight uint64) error + func (s *BlockchainRpcTxWatcher) StartBlockWatcher(currentBlock uint64) error + func (s *BlockchainRpcTxWatcher) StartWatchingTxs() error + type ElementsBlockChainRpc struct + func NewElementsCli(ecli *gelements.Elements) *ElementsBlockChainRpc + func (e *ElementsBlockChainRpc) GetBlockHash(height uint32) (string, error) + func (e *ElementsBlockChainRpc) GetBlockHeight() (uint64, error) + func (e *ElementsBlockChainRpc) GetBlockHeightByHash(blockhash string) (uint32, error) + func (e *ElementsBlockChainRpc) GetRawtransactionWithBlockHash(txId string, blockHash string) (string, error) + func (e *ElementsBlockChainRpc) GetTxOut(txid string, vout uint32) (*TxOutResp, error) + func (e *ElementsBlockChainRpc) String() string + type SwapTxInfo struct + Csv uint32 + StartingBlockHeight uint32 + TxId string + TxVout uint32 + type TxOutResp struct + BestBlockHash string + Coinbase bool + Confirmations uint32 + Value float64