forked from lightninglabs/taproot-assets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
85 lines (56 loc) · 1.73 KB
/
config.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package taro
import (
"net"
"time"
"github.com/btcsuite/btcd/chaincfg"
"github.com/lightninglabs/taro/address"
"github.com/lightninglabs/taro/proof"
"github.com/lightninglabs/taro/tarodb"
"github.com/lightninglabs/taro/tarofreighter"
"github.com/lightninglabs/taro/tarogarden"
"github.com/lightningnetwork/lnd"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/signal"
"google.golang.org/grpc"
)
// RPCConfig is a sub-config of the main server that packages up everything
// needed to start the RPC server.
type RPCConfig struct {
LisCfg *lnd.ListenerCfg
RPCListeners []net.Addr
RESTListeners []net.Addr
GrpcServerOpts []grpc.ServerOption
RestDialOpts []grpc.DialOption
RestListenFunc func(net.Addr) (net.Listener, error)
WSPingInterval time.Duration
WSPongWait time.Duration
RestCORS []string
NoMacaroons bool
MacaroonPath string
}
// DatabaseConfig is the config that holds all the persistence related structs
// and interfaces needed for tarod to function.
type DatabaseConfig struct {
RootKeyStore *tarodb.RootKeyStore
MintingStore tarogarden.MintingStore
AssetStore *tarodb.AssetStore
TaroAddrBook *tarodb.TaroAddressBook
}
// Config is the main config of the Taro server.
type Config struct {
DebugLevel string
// TODO(roasbeef): use the taro chain param wrapper here?
ChainParams chaincfg.Params
SignalInterceptor signal.Interceptor
AssetMinter tarogarden.Planter
AssetCustodian *tarogarden.Custodian
ChainBridge tarogarden.ChainBridge
AddrBook *address.Book
ProofArchive proof.Archiver
ChainPorter tarofreighter.Porter
// LogWriter is the root logger that all of the daemon's subloggers are
// hooked up to.
LogWriter *build.RotatingLogWriter
*RPCConfig
*DatabaseConfig
}