Documentation ¶
Index ¶
- Variables
- type Backend
- func (backend *Backend) Accounts() []*btc.Account
- func (backend *Backend) CheckElectrumServer(server string, pemCert string) error
- func (backend *Backend) Coin(code string) *btc.Coin
- func (backend *Backend) Config() *config.Config
- func (backend *Backend) DefaultConfig() config.AppConfig
- func (backend *Backend) Deregister(deviceID string)
- func (backend *Backend) DeregisterKeystore()
- func (backend *Backend) DevicesRegistered() []string
- func (backend *Backend) DownloadCert(server string) (string, error)
- func (backend *Backend) Events() <-chan interface{}
- func (backend *Backend) Keystores() keystore.Keystores
- func (backend *Backend) OnDeviceInit(f func(device.Interface))
- func (backend *Backend) OnDeviceUninit(f func(string))
- func (backend *Backend) OnWalletInit(f func(*btc.Account))
- func (backend *Backend) OnWalletUninit(f func(*btc.Account))
- func (backend *Backend) Rates() map[string]map[string]float64
- func (backend *Backend) Register(theDevice device.Interface) error
- func (backend *Backend) RegisterKeystore(keystore keystore.Keystore)
- func (backend *Backend) Start() <-chan interface{}
- func (backend *Backend) Testing() bool
- func (backend *Backend) UserLanguage() language.Tag
- func (backend *Backend) WalletStatus() string
- type WalletEvent
Constants ¶
This section is empty.
Variables ¶
var ( // Version of the backend as displayed to the user. Version = semver.NewSemVer(4, 0, 0) )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend ties everything together and is the main starting point to use the godbb library.
func NewBackend ¶
NewBackend creates a new backend with the given arguments.
func (*Backend) CheckElectrumServer ¶
CheckElectrumServer checks if a tls connection can be established with the electrum server, and whether the server is an electrum server.
func (*Backend) DefaultConfig ¶
DefaultConfig returns the default app config.y
func (*Backend) Deregister ¶
Deregister deregisters the device with the given ID from this backend.
func (*Backend) DeregisterKeystore ¶
func (backend *Backend) DeregisterKeystore()
DeregisterKeystore removes the registered keystore.
func (*Backend) DevicesRegistered ¶
DevicesRegistered returns a slice of device IDs of registered devices.
func (*Backend) DownloadCert ¶
DownloadCert downloads the first element of the remote certificate chain.
func (*Backend) Events ¶
func (backend *Backend) Events() <-chan interface{}
Events returns the push notifications channel.
func (*Backend) OnDeviceInit ¶
OnDeviceInit installs a callback to be called when a device is initialized.
func (*Backend) OnDeviceUninit ¶
OnDeviceUninit installs a callback to be called when a device is uninitialized.
func (*Backend) OnWalletInit ¶
OnWalletInit installs a callback to be called when a wallet is initialized.
func (*Backend) OnWalletUninit ¶
OnWalletUninit installs a callback to be called when a wallet is stopped.
func (*Backend) RegisterKeystore ¶
RegisterKeystore registers the given keystore at this backend.
func (*Backend) Start ¶
func (backend *Backend) Start() <-chan interface{}
Start starts the background services. It returns a channel of events to handle by the library client.
func (*Backend) UserLanguage ¶
UserLanguage returns the language the UI should be presented in to the user.
func (*Backend) WalletStatus ¶
WalletStatus returns whether the wallets have been initialized.
type WalletEvent ¶
type WalletEvent struct { Type string `json:"type"` Code string `json:"code"` Data string `json:"data"` }
WalletEvent models an event triggered by a wallet.
Directories ¶
Path | Synopsis |
---|---|
coins
|
|
btc/blockchain/mocks
Code generated by mockery v1.0.0.
|
Code generated by mockery v1.0.0. |
btc/electrum/client
Package client implements an Electrum JSON RPC client.
|
Package client implements an Electrum JSON RPC client. |
btc/headers/mocks
Code generated by mockery v1.0.0.
|
Code generated by mockery v1.0.0. |
btc/maketx
Package maketx provides transaction creation code for wallets.
|
Package maketx provides transaction creation code for wallets. |
db
|
|
devices
|
|
bitbox
Package bitbox contains the API to the physical device.
|
Package bitbox contains the API to the physical device. |
bitbox/mocks
Code generated by mockery v1.0.0.
|
Code generated by mockery v1.0.0. |
mocks
Code generated by mockery v1.0.0.
|
Code generated by mockery v1.0.0. |