lnrpc/walletrpc: implement the WalletKitServer gRPC service

In this commit, we implement the newly defiend WalletKitServer gRPC
service. We use the same template w.r.t build tags as the existing
signrpc service.
This commit is contained in:
Olaoluwa Osuntokun committed 2018-12-06 16:25:34 -08:00
1 parent 097b6f7f6d
commit 406fd2a37e
5 files changed
+512

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
// +build walletrpc
package walletrpc
import (
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/macaroons"
)
// Config is the primary configuration struct for the WalletKit RPC server. It
// contains all the items required for the signer rpc server to carry out its
// duties. The fields with struct tags are meant to be parsed as normal
// configuration options, while if able to be populated, the latter fields MUST
// also be specified.
type Config struct {
// WalletKitMacPath is the path for the signer macaroon. If unspecified
// then we assume that the macaroon will be found under the network
// directory, named DefaultWalletKitMacFilename.
WalletKitMacPath string `long:"walletkitmacaroonpath" description:"Path to the wallet kit macaroon"`
// NetworkDir is the main network directory wherein the signer rpc
// server will find the macaroon named DefaultWalletKitMacFilename.
NetworkDir string
// MacService is the main macaroon service that we'll use to handle
// authentication for the signer rpc server.
MacService *macaroons.Service
// FeeEstimator is an instance of the primary fee estimator instance
// the WalletKit will use to respond to fee estimation requests.
FeeEstimator lnwallet.FeeEstimator
// Wallet is the primary wallet that the WalletKit will use to proxy
// any relevant requests to.
Wallet lnwallet.WalletController
// KeyRing is an interface that the WalletKit will use to derive any
// keys due to incoming client requests.
KeyRing keychain.KeyRing
}