Documentation ¶
Index ¶
- type Config
- type EventHandler
- type EventMineKeystone
- type EventTransactionBroadcast
- type EventType
- type L2KeystoneProcessingContainer
- type Miner
- func (m *Miner) AddL2Keystone(val hemi.L2Keystone)
- func (m *Miner) BitcoinBalance(ctx context.Context, scriptHash string) (*bfgapi.BitcoinBalanceResponse, error)
- func (m *Miner) BitcoinInfo(ctx context.Context) (*bfgapi.BitcoinInfoResponse, error)
- func (m *Miner) BitcoinUTXOs(ctx context.Context, scriptHash string) (*bfgapi.BitcoinUTXOsResponse, error)
- func (m *Miner) Connected() bool
- func (m *Miner) L2Keystones(ctx context.Context, count uint64) (*bfgapi.L2KeystonesResponse, error)
- func (m *Miner) Ping(ctx context.Context, timestamp int64) (*bfgapi.PingResponse, error)
- func (m *Miner) RegisterEventHandler(handler EventHandler)
- func (m *Miner) Run(pctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // BFGWSURL specifies the URL of the BFG private websocket endpoint BFGWSURL string // BTCChainName specifies the name of the Bitcoin chain that // this PoP miner is operating on. BTCChainName string // XXX are we brave enough to rename this BTCNetwork? // BTCPrivateKey provides a BTC private key as a string of // hexadecimal digits. BTCPrivateKey string LogLevel string PrometheusListenAddress string PprofListenAddress string RetryMineThreshold uint StaticFee uint }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type EventHandler ¶ added in v0.2.5
EventHandler is a function that can handle an event.
type EventMineKeystone ¶ added in v0.2.5
type EventMineKeystone struct {
Keystone *hemi.L2Keystone
}
EventMineKeystone is the data for EventTypeMineKeystone.
type EventTransactionBroadcast ¶ added in v0.2.5
type EventTransactionBroadcast struct { Keystone *hemi.L2Keystone TxHash string }
EventTransactionBroadcast is the data for EventTypeTransactionBroadcast.
type L2KeystoneProcessingContainer ¶ added in v0.1.1
type L2KeystoneProcessingContainer struct {
// contains filtered or unexported fields
}
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
func (*Miner) AddL2Keystone ¶ added in v0.1.1
func (m *Miner) AddL2Keystone(val hemi.L2Keystone)
func (*Miner) BitcoinBalance ¶
func (*Miner) BitcoinInfo ¶
func (*Miner) BitcoinUTXOs ¶
func (*Miner) L2Keystones ¶
func (*Miner) RegisterEventHandler ¶ added in v0.2.5
func (m *Miner) RegisterEventHandler(handler EventHandler)
RegisterEventHandler registers an event handler to receive all events dispatched by the miner. The dispatched events can be filtered by EventType when received.
Click to show internal directories.
Click to hide internal directories.