bitboxbase

package
v4.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitBoxBase

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

BitBoxBase provides the dictated bitboxbase api to communicate with the base

func NewBitBoxBase

func NewBitBoxBase(address string, id string, config *config.Config) (*BitBoxBase, error)

NewBitBoxBase creates a new bitboxBase instance

func (*BitBoxBase) BlockInfo

func (base *BitBoxBase) BlockInfo() string

BlockInfo returns the received blockinfo packet from the updater

func (*BitBoxBase) Close

func (base *BitBoxBase) Close()

Close implements a method to unset the bitboxBase

func (*BitBoxBase) ConnectElectrum

func (base *BitBoxBase) ConnectElectrum() error

ConnectElectrum connects to the electrs server on the base and configures the backend accordingly

func (*BitBoxBase) GetRegisterTime

func (base *BitBoxBase) GetRegisterTime() time.Time

GetRegisterTime implements a getter for the timestamp of when the bitboxBase was registered

func (*BitBoxBase) GetUpdaterInstance

func (base *BitBoxBase) GetUpdaterInstance() *updater.Updater

GetUpdaterInstance return ths current instance of the updater

func (*BitBoxBase) Identifier

func (base *BitBoxBase) Identifier() string

Identifier implements a getter for the bitboxBase ID

func (*BitBoxBase) Init

func (base *BitBoxBase) Init(testing bool)

Init initializes the bitboxBase

type Interface

type Interface interface {
	Init(testing bool)

	// Identifier returns the bitboxBaseID.
	Identifier() string

	// GetUpdater returns the updater so we can listen to its events.
	GetUpdaterInstance() *updater.Updater

	// Close tells the bitboxbase to close all connections.
	Close()

	//GetRegisterTime implements a getter for the timestamp of when the bitboxBase was registered
	GetRegisterTime() time.Time

	// BlockInfo returns some blockchain information.
	BlockInfo() string

	// ConnectElectrum connects to the electrs server on the base and configures the backend accordingly
	ConnectElectrum() error
}

Interface represents bitbox base.

Directories

Path Synopsis
Package mdns manages detects and/or registers new bitbox bases.
Package mdns manages detects and/or registers new bitbox bases.
Package updater manages the connection with the bitboxbase, establishing a websocket listener and sending events when receiving packets.
Package updater manages the connection with the bitboxbase, establishing a websocket listener and sending events when receiving packets.

Jump to

Keyboard shortcuts

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