mirror of
https://github.com/muun/recovery.git
synced 2025-02-23 03:22:31 -05:00
27 lines
529 B
Go
27 lines
529 B
Go
package libwallet
|
|
|
|
import (
|
|
"runtime/debug"
|
|
)
|
|
|
|
// Listener is an interface implemented by the apps to receive notifications
|
|
// of data changes from the libwallet code. Each change is reported with a
|
|
// string tag identifying the type of change.
|
|
type Listener interface {
|
|
OnDataChanged(tag string)
|
|
}
|
|
|
|
// Config defines the global libwallet configuration.
|
|
type Config struct {
|
|
DataDir string
|
|
Listener Listener
|
|
}
|
|
|
|
var cfg *Config
|
|
|
|
// Init configures the libwallet
|
|
func Init(c *Config) {
|
|
debug.SetTraceback("crash")
|
|
cfg = c
|
|
}
|