Documentation ¶
Index ¶
- type Relayer
- func (rl *Relayer) ChainTwoTxAndSend(utxo *types.UTXO, data1 []byte, data2 []byte) (*btcutil.Tx, *btcutil.Tx, error)
- func (rl *Relayer) GetChangeAddress() (btcutil.Address, error)
- func (rl *Relayer) PickHighUTXO() (*types.UTXO, error)
- func (rl *Relayer) SendCheckpointToBTC(ckpt *ckpttypes.RawCheckpointWithMeta) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Relayer ¶
func New ¶
func New( wallet btcclient.BTCWallet, tag btctxformatter.BabylonTag, version btctxformatter.FormatVersion, submitterAddress sdk.AccAddress, resendIntervals uint, ) *Relayer
func (*Relayer) ChainTwoTxAndSend ¶
func (rl *Relayer) ChainTwoTxAndSend( utxo *types.UTXO, data1 []byte, data2 []byte, ) (*btcutil.Tx, *btcutil.Tx, error)
ChainTwoTxAndSend consumes one utxo and build two chaining txs: the second tx consumes the output of the first tx
func (*Relayer) GetChangeAddress ¶ added in v0.2.0
GetChangeAddress randomly picks one address from local addresses that have received funds it gives priority to SegWit Bech32 addresses
func (*Relayer) PickHighUTXO ¶
PickHighUTXO picks a UTXO that has the highest amount
func (*Relayer) SendCheckpointToBTC ¶
func (rl *Relayer) SendCheckpointToBTC(ckpt *ckpttypes.RawCheckpointWithMeta) error
SendCheckpointToBTC converts the checkpoint into two transactions and send them to BTC
Click to show internal directories.
Click to hide internal directories.