/
params.go
36 lines (30 loc) · 869 Bytes
/
params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package asset
import (
"time"
"github.com/decred/slog"
"github.com/itswisdomagain/libwallet/walletdata"
)
// CreateWalletParams are the parameters for opening a wallet.
type OpenWalletParams[Tx any] struct {
Net Network
DataDir string
DbDriver string
Logger slog.Logger
UserConfigDB walletdata.UserConfigDB
WalletConfigDB walletdata.WalletConfigDB
// TxIndexDB is only required if transaction indexing is desired. Can be nil
// otherwise.
TxIndexDB walletdata.TxIndexDB[Tx]
}
// CreateWalletParams are the parameters for creating a wallet.
type CreateWalletParams[Tx any] struct {
OpenWalletParams[Tx]
Pass []byte
Birthday time.Time
}
// RecoveryCfg is the information used to recover a wallet.
type RecoveryCfg struct {
Seed []byte
NumExternalAddresses uint32
NumInternalAddresses uint32
}