nbtc

package
v0.0.0-...-ce31223 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

README

nbtc Relayer

  1. Relays sign requests from nbtc module of a remote chain (Native Cosmos chain) to Ika.
  2. Monitors for signed transactions
  3. Broadcasts signed transactions to Bitcoin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relayer

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

Relayer handles the flow of transactions from the Native chain to Bitcoin. It uses two processors: - nativeProcessor: To send transactions from Native to IKA for signing. - btcProcessor: To broadcast signed transactions to Bitcoin and monitor confirmations.

func NewRelayer

func NewRelayer(
	relayerConfig RelayerConfig,
	db dal.DB,
	btcProcessor *ika2btc.Processor,
	fetcher native.SignReqFetcher,
) (*Relayer, error)

NewRelayer creates a new Relayer instance with the given configuration and processors. TODO: need to add Ika signatures querier

func (*Relayer) Start

func (r *Relayer) Start(ctx context.Context) error

Start starts the relayer's main loop.

func (*Relayer) Stop

func (r *Relayer) Stop()

Stop initiates a shutdown of the relayer.

type RelayerConfig

type RelayerConfig struct {
	ProcessTxsInterval   time.Duration
	ConfirmTxsInterval   time.Duration
	SignReqFetchInterval time.Duration
	// ID of the first sign req that we want to fetch in
	SignReqFetchFrom  int
	SignReqFetchLimit int
}

RelayerConfig holds the configuration parameters for the Relayer.

Jump to

Keyboard shortcuts

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