electrs

package
v0.0.0-...-313251d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewElectrumClient

func NewElectrumClient(globalConfig *config.Config, config *Config, dbAdapter *db.DatabaseAdapter, eventBus *events.EventBus) (*Client, error)

func NewElectrumClients

func NewElectrumClients(globalConfig *config.Config, dbAdapter *db.DatabaseAdapter, eventBus *events.EventBus) ([]*Client, error)

func (*Client) CreateRelayData

func (c *Client) CreateRelayData(vaultTx types.VaultTransaction) (models.RelayData, error)

func (*Client) CreateRelayDatas

func (c *Client) CreateRelayDatas(vaultTxs []types.VaultTransaction) ([]models.RelayData, error)

func (*Client) PreProcessMessages

func (c *Client) PreProcessMessages(vaultTxs []types.VaultTransaction) error

Todo: Log and validate incomming message

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

type Config

type Config struct {
	//Electrum server host
	Host string
	//Electrum server port
	Port int
	//Electrum server user
	User string
	//Electrum server password
	Password string
	//Source chain - This must match with bridge config in the xchains core config. For example bitcoin-testnet4
	SourceChain string
	//Las Vault Tx's hash received from electrum server.
	//If this parameter is empty, server will start from the first vault tx from db.
	BatchSize   int
	LastVaultTx string
}

Jump to

Keyboard shortcuts

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