Documentation ¶
Index ¶
- type BitBoxBase
- func (base *BitBoxBase) Close()
- func (base *BitBoxBase) ConnectElectrum() error
- func (base *BitBoxBase) GetRegisterTime() time.Time
- func (base *BitBoxBase) Identifier() string
- func (base *BitBoxBase) Init(testing bool)
- func (base *BitBoxBase) MiddlewareInfo() (rpcclient.SampleInfoResponse, error)
- func (base *BitBoxBase) Ping() (bool, error)
- func (base *BitBoxBase) RPCClient() *rpcclient.RPCClient
- type Interface
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, bitboxBaseConfigDir string, onUnregister func(string)) (*BitBoxBase, error)
NewBitBoxBase creates a new bitboxBase instance
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 bitbox base was registered
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
func (*BitBoxBase) MiddlewareInfo ¶
func (base *BitBoxBase) MiddlewareInfo() (rpcclient.SampleInfoResponse, error)
MiddlewareInfo returns the received MiddlewareInfo packet from the rpcClient
func (*BitBoxBase) Ping ¶
func (base *BitBoxBase) Ping() (bool, error)
Ping sends a get requset to the bitbox base middleware root handler and returns true if successful
func (*BitBoxBase) RPCClient ¶
func (base *BitBoxBase) RPCClient() *rpcclient.RPCClient
RPCClient returns ths current instance of the rpcClient
type Interface ¶
type Interface interface { Init(testing bool) // Identifier returns the bitboxBaseID. Identifier() string // GetRPCClient returns the rpcClient so we can listen to its events. RPCClient() *rpcclient.RPCClient // 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 // MiddlewareInfo returns some blockchain information. MiddlewareInfo() (rpcclient.SampleInfoResponse, error) // ConnectElectrum connects to the electrs server on the base and configures the backend accordingly ConnectElectrum() error // Ping sends a get requset to the bitbox base middleware root handler and returns true if successful Ping() (bool, error) }
Interface represents bitbox base.