relayer

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2022 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relayer

type Relayer struct {
	btcclient.BTCWallet
	// contains filtered or unexported fields
}

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

func (rl *Relayer) GetChangeAddress() (btcutil.Address, error)

GetChangeAddress randomly picks one address from local addresses that have received funds it gives priority to SegWit Bech32 addresses

func (*Relayer) PickHighUTXO

func (rl *Relayer) PickHighUTXO() (*types.UTXO, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL