mirror of
https://github.com/muun/recovery.git
synced 2025-11-11 22:40:16 -05:00
Update project structure and build process
This commit is contained in:
26
libwallet/init.go
Normal file
26
libwallet/init.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user