Documentation
¶
Index ¶
- type 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
- type 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 (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
- func (l *BlockchainRpcTxWatcher) TxClaimed(swaps []string)
- func (l *BlockchainRpcTxWatcher) TxHexFromId(resp *TxOutResp, txId string) (string, error)
- type 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
- type TxOutResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitcoinBlockchainRpc ¶
type BitcoinBlockchainRpc struct {
// contains filtered or unexported fields
}
func NewBitcoinRpc ¶
func NewBitcoinRpc(bcli *gbitcoin.Bitcoin) *BitcoinBlockchainRpc
func (*BitcoinBlockchainRpc) GetBlockHash ¶
func (b *BitcoinBlockchainRpc) GetBlockHash(height uint32) (string, error)
func (*BitcoinBlockchainRpc) GetBlockHeight ¶
func (b *BitcoinBlockchainRpc) GetBlockHeight() (uint64, error)
func (*BitcoinBlockchainRpc) GetBlockHeightByHash ¶
func (b *BitcoinBlockchainRpc) GetBlockHeightByHash(blockhash string) (uint32, error)
func (*BitcoinBlockchainRpc) GetRawtransactionWithBlockHash ¶
func (b *BitcoinBlockchainRpc) GetRawtransactionWithBlockHash(txId string, blockHash string) (string, error)
func (*BitcoinBlockchainRpc) GetTxOut ¶
func (b *BitcoinBlockchainRpc) GetTxOut(txid string, vout uint32) (*TxOutResp, error)
func (*BitcoinBlockchainRpc) String ¶
func (b *BitcoinBlockchainRpc) String() string
type BlockchainRpc ¶
type BlockchainRpcTxWatcher ¶
BlockchainRpcTxWatcher handles notifications of confirmed and csv-passed events
func NewBlockchainRpcTxWatcher ¶
func NewBlockchainRpcTxWatcher(ctx context.Context, blockchain BlockchainRpc, requiredConfs uint32, csv uint32) *BlockchainRpcTxWatcher
func (*BlockchainRpcTxWatcher) AddConfirmationCallback ¶
func (l *BlockchainRpcTxWatcher) AddConfirmationCallback(f func(swapId string, txHex string) error)
func (*BlockchainRpcTxWatcher) AddCsvCallback ¶
func (l *BlockchainRpcTxWatcher) AddCsvCallback(f func(swapId string) error)
func (*BlockchainRpcTxWatcher) AddWaitForConfirmationTx ¶
func (l *BlockchainRpcTxWatcher) AddWaitForConfirmationTx(swapId, txId string, vout, startingBlockheight uint32, _ []byte)
func (*BlockchainRpcTxWatcher) AddWaitForCsvTx ¶
func (l *BlockchainRpcTxWatcher) AddWaitForCsvTx(swapId, txId string, vout uint32, startingBlockheight uint32, _ []byte)
func (*BlockchainRpcTxWatcher) CheckTxConfirmed ¶
func (s *BlockchainRpcTxWatcher) CheckTxConfirmed(swapId string, txId string, vout uint32) string
func (*BlockchainRpcTxWatcher) GetBlockHeight ¶
func (s *BlockchainRpcTxWatcher) GetBlockHeight() (uint32, error)
func (*BlockchainRpcTxWatcher) HandleConfirmedTx ¶
func (s *BlockchainRpcTxWatcher) HandleConfirmedTx(blockheight uint64) error
HandleConfirmedTx looks for transactions that are confirmed fixme: why does this function return an error if no error ever is returned?
func (*BlockchainRpcTxWatcher) HandleCsvTx ¶
func (s *BlockchainRpcTxWatcher) HandleCsvTx(blockheight uint64) error
HandleCsvTx looks for transactions that have enough confirmations to be spend using the csv path
func (*BlockchainRpcTxWatcher) StartBlockWatcher ¶
func (s *BlockchainRpcTxWatcher) StartBlockWatcher(currentBlock uint64) error
StartBlockWatcher starts listening for new blocks
func (*BlockchainRpcTxWatcher) StartWatchingTxs ¶
func (s *BlockchainRpcTxWatcher) StartWatchingTxs() error
StartWatchingTxs starts the txwatcher
func (*BlockchainRpcTxWatcher) TxClaimed ¶
func (l *BlockchainRpcTxWatcher) TxClaimed(swaps []string)
func (*BlockchainRpcTxWatcher) TxHexFromId ¶
func (l *BlockchainRpcTxWatcher) TxHexFromId(resp *TxOutResp, txId string) (string, error)
type ElementsBlockChainRpc ¶
type ElementsBlockChainRpc struct {
// contains filtered or unexported fields
}
func NewElementsCli ¶
func NewElementsCli(ecli *gelements.Elements) *ElementsBlockChainRpc
func (*ElementsBlockChainRpc) GetBlockHash ¶
func (e *ElementsBlockChainRpc) GetBlockHash(height uint32) (string, error)
func (*ElementsBlockChainRpc) GetBlockHeight ¶
func (e *ElementsBlockChainRpc) GetBlockHeight() (uint64, error)
func (*ElementsBlockChainRpc) GetBlockHeightByHash ¶
func (e *ElementsBlockChainRpc) GetBlockHeightByHash(blockhash string) (uint32, error)
func (*ElementsBlockChainRpc) GetRawtransactionWithBlockHash ¶
func (e *ElementsBlockChainRpc) GetRawtransactionWithBlockHash(txId string, blockHash string) (string, error)
func (*ElementsBlockChainRpc) GetTxOut ¶
func (e *ElementsBlockChainRpc) GetTxOut(txid string, vout uint32) (*TxOutResp, error)
func (*ElementsBlockChainRpc) String ¶
func (e *ElementsBlockChainRpc) String() string
type SwapTxInfo ¶
Click to show internal directories.
Click to hide internal directories.