Merge pull request #4998 from bhandras/leader_election

cluster: leader election using etcd backend
This commit is contained in:
Olaoluwa Osuntokun 2021-05-04 20:05:02 -07:00 committed by GitHub
commit 6d66133459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 26951 additions and 14998 deletions

@ -249,8 +249,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
pinned_dep: pinned_dep:
- google.golang.org/grpc v1.24.0 - google.golang.org/grpc v1.29.1
- github.com/golang/protobuf v1.3.2 - github.com/golang/protobuf v1.4.3
steps: steps:
- name: git checkout - name: git checkout

@ -106,14 +106,13 @@ type Config struct {
// optional. // optional.
FeeURL string FeeURL string
// DBTimeOut specifies the timeout value to use when opening the wallet
// database.
DBTimeOut time.Duration
// Dialer is a function closure that will be used to establish outbound // Dialer is a function closure that will be used to establish outbound
// TCP connections to Bitcoin peers in the event of a pruned block being // TCP connections to Bitcoin peers in the event of a pruned block being
// requested. // requested.
Dialer chain.Dialer Dialer chain.Dialer
// LoaderOptions holds functional wallet db loader options.
LoaderOptions []btcwallet.LoaderOption
} }
const ( const (
@ -283,11 +282,10 @@ func NewChainControl(cfg *Config, blockCache *blockcache.BlockCache) (
PublicPass: cfg.PublicWalletPw, PublicPass: cfg.PublicWalletPw,
Birthday: cfg.Birthday, Birthday: cfg.Birthday,
RecoveryWindow: cfg.RecoveryWindow, RecoveryWindow: cfg.RecoveryWindow,
DataDir: homeChainConfig.ChainDir,
NetParams: cfg.ActiveNetParams.Params, NetParams: cfg.ActiveNetParams.Params,
CoinType: cfg.ActiveNetParams.CoinType, CoinType: cfg.ActiveNetParams.CoinType,
Wallet: cfg.Wallet, Wallet: cfg.Wallet,
DBTimeOut: cfg.DBTimeOut, LoaderOptions: cfg.LoaderOptions,
} }
var err error var err error

@ -169,7 +169,7 @@ func (r *RPCAcceptor) Run() error {
defer r.wg.Wait() defer r.wg.Wait()
// Create a channel that responses from acceptors are sent into. // Create a channel that responses from acceptors are sent into.
responses := make(chan lnrpc.ChannelAcceptResponse) responses := make(chan *lnrpc.ChannelAcceptResponse)
// errChan is used by the receive loop to signal any errors that occur // errChan is used by the receive loop to signal any errors that occur
// during reading from the stream. This is primarily used to shutdown // during reading from the stream. This is primarily used to shutdown
@ -193,7 +193,7 @@ func (r *RPCAcceptor) Run() error {
// dispatches them into the responses channel provided, sending any errors that // dispatches them into the responses channel provided, sending any errors that
// occur into the error channel provided. // occur into the error channel provided.
func (r *RPCAcceptor) receiveResponses(errChan chan error, func (r *RPCAcceptor) receiveResponses(errChan chan error,
responses chan lnrpc.ChannelAcceptResponse) { responses chan *lnrpc.ChannelAcceptResponse) {
for { for {
resp, err := r.receive() resp, err := r.receive()
@ -205,7 +205,7 @@ func (r *RPCAcceptor) receiveResponses(errChan chan error,
var pendingID [32]byte var pendingID [32]byte
copy(pendingID[:], resp.PendingChanId) copy(pendingID[:], resp.PendingChanId)
openChanResp := lnrpc.ChannelAcceptResponse{ openChanResp := &lnrpc.ChannelAcceptResponse{
Accept: resp.Accept, Accept: resp.Accept,
PendingChanId: pendingID[:], PendingChanId: pendingID[:],
Error: resp.Error, Error: resp.Error,
@ -236,7 +236,7 @@ func (r *RPCAcceptor) receiveResponses(errChan chan error,
// Accept() function, dispatching them to our acceptor stream and coordinating // Accept() function, dispatching them to our acceptor stream and coordinating
// return of responses to their callers. // return of responses to their callers.
func (r *RPCAcceptor) sendAcceptRequests(errChan chan error, func (r *RPCAcceptor) sendAcceptRequests(errChan chan error,
responses chan lnrpc.ChannelAcceptResponse) error { responses chan *lnrpc.ChannelAcceptResponse) error {
// Close the done channel to indicate that the acceptor is no longer // Close the done channel to indicate that the acceptor is no longer
// listening and any in-progress requests should be terminated. // listening and any in-progress requests should be terminated.
@ -332,7 +332,7 @@ func (r *RPCAcceptor) sendAcceptRequests(errChan chan error,
// acceptor, returning a boolean indicating whether to accept the channel, an // acceptor, returning a boolean indicating whether to accept the channel, an
// error to send to the peer, and any validation errors that occurred. // error to send to the peer, and any validation errors that occurred.
func (r *RPCAcceptor) validateAcceptorResponse(dustLimit btcutil.Amount, func (r *RPCAcceptor) validateAcceptorResponse(dustLimit btcutil.Amount,
req lnrpc.ChannelAcceptResponse) (bool, error, lnwire.DeliveryAddress, req *lnrpc.ChannelAcceptResponse) (bool, error, lnwire.DeliveryAddress,
error) { error) {
channelStr := hex.EncodeToString(req.PendingChanId) channelStr := hex.EncodeToString(req.PendingChanId)

@ -27,7 +27,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
dustLimit btcutil.Amount dustLimit btcutil.Amount
response lnrpc.ChannelAcceptResponse response *lnrpc.ChannelAcceptResponse
accept bool accept bool
acceptorErr error acceptorErr error
error error error error
@ -35,7 +35,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}{ }{
{ {
name: "accepted with error", name: "accepted with error",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: true, Accept: true,
Error: customError.Error(), Error: customError.Error(),
}, },
@ -45,7 +45,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}, },
{ {
name: "custom error too long", name: "custom error too long",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: false, Accept: false,
Error: strings.Repeat(" ", maxErrorLength+1), Error: strings.Repeat(" ", maxErrorLength+1),
}, },
@ -55,7 +55,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}, },
{ {
name: "accepted", name: "accepted",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: true, Accept: true,
UpfrontShutdown: validAddr, UpfrontShutdown: validAddr,
}, },
@ -66,7 +66,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}, },
{ {
name: "rejected with error", name: "rejected with error",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: false, Accept: false,
Error: customError.Error(), Error: customError.Error(),
}, },
@ -76,7 +76,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}, },
{ {
name: "rejected with no error", name: "rejected with no error",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: false, Accept: false,
}, },
accept: false, accept: false,
@ -85,7 +85,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
}, },
{ {
name: "invalid upfront shutdown", name: "invalid upfront shutdown",
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: true, Accept: true,
UpfrontShutdown: "invalid addr", UpfrontShutdown: "invalid addr",
}, },
@ -96,7 +96,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
{ {
name: "reserve too low", name: "reserve too low",
dustLimit: 100, dustLimit: 100,
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: true, Accept: true,
ReserveSat: 10, ReserveSat: 10,
}, },
@ -107,7 +107,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
{ {
name: "max htlcs too high", name: "max htlcs too high",
dustLimit: 100, dustLimit: 100,
response: lnrpc.ChannelAcceptResponse{ response: &lnrpc.ChannelAcceptResponse{
Accept: true, Accept: true,
MaxHtlcCount: 1 + input.MaxHTLCNumber/2, MaxHtlcCount: 1 + input.MaxHTLCNumber/2,
}, },

@ -1,6 +1,7 @@
package kvdb package kvdb
import ( import (
"context"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
@ -253,7 +254,14 @@ func GetTestBackend(path, name string) (Backend, func(), error) {
} }
return db, empty, nil return db, empty, nil
} else if TestBackend == EtcdBackendName { } else if TestBackend == EtcdBackendName {
return GetEtcdTestBackend(path, 0, 0) etcdConfig, cancel, err := StartEtcdTestBackend(path, 0, 0)
if err != nil {
return nil, empty, err
}
backend, err := Open(
EtcdBackendName, context.TODO(), etcdConfig,
)
return backend, cancel, err
} }
return nil, nil, fmt.Errorf("unknown backend") return nil, nil, fmt.Errorf("unknown backend")

@ -33,30 +33,3 @@ type BoltConfig struct {
DBTimeout time.Duration `long:"dbtimeout" description:"Specify the timeout value used when opening the database."` DBTimeout time.Duration `long:"dbtimeout" description:"Specify the timeout value used when opening the database."`
} }
// EtcdConfig holds etcd configuration.
type EtcdConfig struct {
Embedded bool `long:"embedded" description:"Use embedded etcd instance instead of the external one. Note: use for testing only."`
EmbeddedClientPort uint16 `long:"embedded_client_port" description:"Client port to use for the embedded instance. Note: use for testing only."`
EmbeddedPeerPort uint16 `long:"embedded_peer_port" description:"Peer port to use for the embedded instance. Note: use for testing only."`
Host string `long:"host" description:"Etcd database host."`
User string `long:"user" description:"Etcd database user."`
Pass string `long:"pass" description:"Password for the database user."`
Namespace string `long:"namespace" description:"The etcd namespace to use."`
DisableTLS bool `long:"disabletls" description:"Disable TLS for etcd connection. Caution: use for development only."`
CertFile string `long:"cert_file" description:"Path to the TLS certificate for etcd RPC."`
KeyFile string `long:"key_file" description:"Path to the TLS private key for etcd RPC."`
InsecureSkipVerify bool `long:"insecure_skip_verify" description:"Whether we intend to skip TLS verification"`
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
}

@ -7,7 +7,7 @@ package etcd
func bkey(buckets ...string) string { func bkey(buckets ...string) string {
var bucketKey []byte var bucketKey []byte
rootID := makeBucketID([]byte("")) rootID := makeBucketID([]byte(etcdDefaultRootBucketId))
parent := rootID[:] parent := rootID[:]
for _, bucketName := range buckets { for _, bucketName := range buckets {
@ -29,7 +29,7 @@ func bval(buckets ...string) string {
// vkey is a helper function used in tests to create a value key from the // vkey is a helper function used in tests to create a value key from the
// passed key and bucket list. // passed key and bucket list.
func vkey(key string, buckets ...string) string { func vkey(key string, buckets ...string) string {
rootID := makeBucketID([]byte("")) rootID := makeBucketID([]byte(etcdDefaultRootBucketId))
bucket := rootID[:] bucket := rootID[:]
for _, bucketName := range buckets { for _, bucketName := range buckets {

@ -0,0 +1,28 @@
package etcd
// Config holds etcd configuration alongside with configuration related to our higher level interface.
type Config struct {
Embedded bool `long:"embedded" description:"Use embedded etcd instance instead of the external one. Note: use for testing only."`
EmbeddedClientPort uint16 `long:"embedded_client_port" description:"Client port to use for the embedded instance. Note: use for testing only."`
EmbeddedPeerPort uint16 `long:"embedded_peer_port" description:"Peer port to use for the embedded instance. Note: use for testing only."`
Host string `long:"host" description:"Etcd database host."`
User string `long:"user" description:"Etcd database user."`
Pass string `long:"pass" description:"Password for the database user."`
Namespace string `long:"namespace" description:"The etcd namespace to use."`
DisableTLS bool `long:"disabletls" description:"Disable TLS for etcd connection. Caution: use for development only."`
CertFile string `long:"cert_file" description:"Path to the TLS certificate for etcd RPC."`
KeyFile string `long:"key_file" description:"Path to the TLS private key for etcd RPC."`
InsecureSkipVerify bool `long:"insecure_skip_verify" description:"Whether we intend to skip TLS verification"`
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
}

@ -11,9 +11,9 @@ import (
"time" "time"
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
"github.com/coreos/etcd/clientv3" "go.etcd.io/etcd/clientv3"
"github.com/coreos/etcd/clientv3/namespace" "go.etcd.io/etcd/clientv3/namespace"
"github.com/coreos/etcd/pkg/transport" "go.etcd.io/etcd/pkg/transport"
) )
const ( const (
@ -23,6 +23,10 @@ const (
// etcdLongTimeout is a timeout for longer taking etcd operatons. // etcdLongTimeout is a timeout for longer taking etcd operatons.
etcdLongTimeout = 30 * time.Second etcdLongTimeout = 30 * time.Second
// etcdDefaultRootBucketId is used as the root bucket key. Note that
// the actual key is not visible, since all bucket keys are hashed.
etcdDefaultRootBucketId = "@"
) )
// callerStats holds commit stats for a specific caller. Currently it only // callerStats holds commit stats for a specific caller. Currently it only
@ -116,7 +120,8 @@ func (c *commitStatsCollector) callback(succ bool, stats CommitStats) {
// db holds a reference to the etcd client connection. // db holds a reference to the etcd client connection.
type db struct { type db struct {
config BackendConfig cfg Config
ctx context.Context
cli *clientv3.Client cli *clientv3.Client
commitStatsCollector *commitStatsCollector commitStatsCollector *commitStatsCollector
txQueue *commitQueue txQueue *commitQueue
@ -125,66 +130,23 @@ type db struct {
// Enforce db implements the walletdb.DB interface. // Enforce db implements the walletdb.DB interface.
var _ walletdb.DB = (*db)(nil) var _ walletdb.DB = (*db)(nil)
// BackendConfig holds and etcd backend config and connection parameters.
type BackendConfig struct {
// Ctx is the context we use to cancel operations upon exit.
Ctx context.Context
// Host holds the peer url of the etcd instance.
Host string
// User is the username for the etcd peer.
User string
// Pass is the password for the etcd peer.
Pass string
// DisableTLS disables the use of TLS for etcd connections.
DisableTLS bool
// CertFile holds the path to the TLS certificate for etcd RPC.
CertFile string
// KeyFile holds the path to the TLS private key for etcd RPC.
KeyFile string
// InsecureSkipVerify should be set to true if we intend to
// skip TLS verification.
InsecureSkipVerify bool
// Prefix the hash of the prefix will be used as the root
// bucket id. This enables key space separation similar to
// name spaces.
Prefix string
// Namespace is the etcd namespace that we'll use for all keys.
Namespace string
// CollectCommitStats indicates wheter to commit commit stats.
CollectCommitStats bool
}
// newEtcdBackend returns a db object initialized with the passed backend // newEtcdBackend returns a db object initialized with the passed backend
// config. If etcd connection cannot be estabished, then returns error. // config. If etcd connection cannot be estabished, then returns error.
func newEtcdBackend(config BackendConfig) (*db, error) { func newEtcdBackend(ctx context.Context, cfg Config) (*db, error) {
if config.Ctx == nil {
config.Ctx = context.Background()
}
clientCfg := clientv3.Config{ clientCfg := clientv3.Config{
Context: config.Ctx, Context: ctx,
Endpoints: []string{config.Host}, Endpoints: []string{cfg.Host},
DialTimeout: etcdConnectionTimeout, DialTimeout: etcdConnectionTimeout,
Username: config.User, Username: cfg.User,
Password: config.Pass, Password: cfg.Pass,
MaxCallSendMsgSize: 16384*1024 - 1, MaxCallSendMsgSize: 16384*1024 - 1,
} }
if !config.DisableTLS { if !cfg.DisableTLS {
tlsInfo := transport.TLSInfo{ tlsInfo := transport.TLSInfo{
CertFile: config.CertFile, CertFile: cfg.CertFile,
KeyFile: config.KeyFile, KeyFile: cfg.KeyFile,
InsecureSkipVerify: config.InsecureSkipVerify, InsecureSkipVerify: cfg.InsecureSkipVerify,
} }
tlsConfig, err := tlsInfo.ClientConfig() tlsConfig, err := tlsInfo.ClientConfig()
@ -201,17 +163,18 @@ func newEtcdBackend(config BackendConfig) (*db, error) {
} }
// Apply the namespace. // Apply the namespace.
cli.KV = namespace.NewKV(cli.KV, config.Namespace) cli.KV = namespace.NewKV(cli.KV, cfg.Namespace)
cli.Watcher = namespace.NewWatcher(cli.Watcher, config.Namespace) cli.Watcher = namespace.NewWatcher(cli.Watcher, cfg.Namespace)
cli.Lease = namespace.NewLease(cli.Lease, config.Namespace) cli.Lease = namespace.NewLease(cli.Lease, cfg.Namespace)
backend := &db{ backend := &db{
cfg: cfg,
ctx: ctx,
cli: cli, cli: cli,
config: config, txQueue: NewCommitQueue(ctx),
txQueue: NewCommitQueue(config.Ctx),
} }
if config.CollectCommitStats { if cfg.CollectStats {
backend.commitStatsCollector = newCommitStatsColletor() backend.commitStatsCollector = newCommitStatsColletor()
} }
@ -221,10 +184,10 @@ func newEtcdBackend(config BackendConfig) (*db, error) {
// getSTMOptions creats all STM options based on the backend config. // getSTMOptions creats all STM options based on the backend config.
func (db *db) getSTMOptions() []STMOptionFunc { func (db *db) getSTMOptions() []STMOptionFunc {
opts := []STMOptionFunc{ opts := []STMOptionFunc{
WithAbortContext(db.config.Ctx), WithAbortContext(db.ctx),
} }
if db.config.CollectCommitStats { if db.cfg.CollectStats {
opts = append(opts, opts = append(opts,
WithCommitStatsCallback(db.commitStatsCollector.callback), WithCommitStatsCallback(db.commitStatsCollector.callback),
) )
@ -243,7 +206,7 @@ func (db *db) getSTMOptions() []STMOptionFunc {
func (db *db) View(f func(tx walletdb.ReadTx) error, reset func()) error { func (db *db) View(f func(tx walletdb.ReadTx) error, reset func()) error {
apply := func(stm STM) error { apply := func(stm STM) error {
reset() reset()
return f(newReadWriteTx(stm, db.config.Prefix)) return f(newReadWriteTx(stm, etcdDefaultRootBucketId))
} }
return RunSTM(db.cli, apply, db.txQueue, db.getSTMOptions()...) return RunSTM(db.cli, apply, db.txQueue, db.getSTMOptions()...)
@ -259,7 +222,7 @@ func (db *db) View(f func(tx walletdb.ReadTx) error, reset func()) error {
func (db *db) Update(f func(tx walletdb.ReadWriteTx) error, reset func()) error { func (db *db) Update(f func(tx walletdb.ReadWriteTx) error, reset func()) error {
apply := func(stm STM) error { apply := func(stm STM) error {
reset() reset()
return f(newReadWriteTx(stm, db.config.Prefix)) return f(newReadWriteTx(stm, etcdDefaultRootBucketId))
} }
return RunSTM(db.cli, apply, db.txQueue, db.getSTMOptions()...) return RunSTM(db.cli, apply, db.txQueue, db.getSTMOptions()...)
@ -278,7 +241,7 @@ func (db *db) PrintStats() string {
func (db *db) BeginReadWriteTx() (walletdb.ReadWriteTx, error) { func (db *db) BeginReadWriteTx() (walletdb.ReadWriteTx, error) {
return newReadWriteTx( return newReadWriteTx(
NewSTM(db.cli, db.txQueue, db.getSTMOptions()...), NewSTM(db.cli, db.txQueue, db.getSTMOptions()...),
db.config.Prefix, etcdDefaultRootBucketId,
), nil ), nil
} }
@ -286,7 +249,7 @@ func (db *db) BeginReadWriteTx() (walletdb.ReadWriteTx, error) {
func (db *db) BeginReadTx() (walletdb.ReadTx, error) { func (db *db) BeginReadTx() (walletdb.ReadTx, error) {
return newReadWriteTx( return newReadWriteTx(
NewSTM(db.cli, db.txQueue, db.getSTMOptions()...), NewSTM(db.cli, db.txQueue, db.getSTMOptions()...),
db.config.Prefix, etcdDefaultRootBucketId,
), nil ), nil
} }
@ -294,7 +257,7 @@ func (db *db) BeginReadTx() (walletdb.ReadTx, error) {
// start a read-only transaction to perform all operations. // start a read-only transaction to perform all operations.
// This function is part of the walletdb.Db interface implementation. // This function is part of the walletdb.Db interface implementation.
func (db *db) Copy(w io.Writer) error { func (db *db) Copy(w io.Writer) error {
ctx, cancel := context.WithTimeout(db.config.Ctx, etcdLongTimeout) ctx, cancel := context.WithTimeout(db.ctx, etcdLongTimeout)
defer cancel() defer cancel()
readCloser, err := db.cli.Snapshot(ctx) readCloser, err := db.cli.Snapshot(ctx)

@ -17,7 +17,7 @@ func TestCopy(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -53,10 +53,9 @@ func TestAbortContext(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
config := f.BackendConfig() config := f.BackendConfig()
config.Ctx = ctx
// Pass abort context and abort right away. // Pass abort context and abort right away.
db, err := newEtcdBackend(config) db, err := newEtcdBackend(ctx, config)
require.NoError(t, err) require.NoError(t, err)
cancel() cancel()

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"fmt" "fmt"
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
@ -13,45 +14,55 @@ const (
) )
// parseArgs parses the arguments from the walletdb Open/Create methods. // parseArgs parses the arguments from the walletdb Open/Create methods.
func parseArgs(funcName string, args ...interface{}) (*BackendConfig, error) { func parseArgs(funcName string, args ...interface{}) (context.Context,
if len(args) != 1 { *Config, error) {
return nil, fmt.Errorf("invalid number of arguments to %s.%s -- "+
"expected: etcd.BackendConfig", if len(args) != 2 {
return nil, nil, fmt.Errorf("invalid number of arguments to "+
"%s.%s -- expected: context.Context, etcd.Config",
dbType, funcName, dbType, funcName,
) )
} }
config, ok := args[0].(BackendConfig) ctx, ok := args[0].(context.Context)
if !ok { if !ok {
return nil, fmt.Errorf("argument to %s.%s is invalid -- "+ return nil, nil, fmt.Errorf("argument 0 to %s.%s is invalid "+
"expected: etcd.BackendConfig", "-- expected: context.Context",
dbType, funcName, dbType, funcName,
) )
} }
return &config, nil config, ok := args[1].(*Config)
if !ok {
return nil, nil, fmt.Errorf("argument 1 to %s.%s is invalid -- "+
"expected: etcd.Config",
dbType, funcName,
)
}
return ctx, config, nil
} }
// createDBDriver is the callback provided during driver registration that // createDBDriver is the callback provided during driver registration that
// creates, initializes, and opens a database for use. // creates, initializes, and opens a database for use.
func createDBDriver(args ...interface{}) (walletdb.DB, error) { func createDBDriver(args ...interface{}) (walletdb.DB, error) {
config, err := parseArgs("Create", args...) ctx, config, err := parseArgs("Create", args...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return newEtcdBackend(*config) return newEtcdBackend(ctx, *config)
} }
// openDBDriver is the callback provided during driver registration that opens // openDBDriver is the callback provided during driver registration that opens
// an existing database for use. // an existing database for use.
func openDBDriver(args ...interface{}) (walletdb.DB, error) { func openDBDriver(args ...interface{}) (walletdb.DB, error) {
config, err := parseArgs("Open", args...) ctx, config, err := parseArgs("Open", args...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return newEtcdBackend(*config) return newEtcdBackend(ctx, *config)
} }
func init() { func init() {

@ -3,14 +3,13 @@
package etcd package etcd
import ( import (
"context"
"fmt" "fmt"
"net" "net"
"net/url" "net/url"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/coreos/etcd/embed" "go.etcd.io/etcd/embed"
) )
const ( const (
@ -62,7 +61,7 @@ func getFreePort() int {
// listening on random open ports. Returns the backend config and a cleanup // listening on random open ports. Returns the backend config and a cleanup
// func that will stop the etcd instance. // func that will stop the etcd instance.
func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) ( func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
*BackendConfig, func(), error) { *Config, func(), error) {
cfg := embed.NewConfig() cfg := embed.NewConfig()
cfg.Dir = path cfg.Dir = path
@ -98,19 +97,13 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
fmt.Errorf("etcd failed to start after: %v", readyTimeout) fmt.Errorf("etcd failed to start after: %v", readyTimeout)
} }
ctx, cancel := context.WithCancel(context.Background()) connConfig := &Config{
Host: "http://" + clientURL,
connConfig := &BackendConfig{
Ctx: ctx,
Host: "http://" + peerURL,
User: "user",
Pass: "pass",
InsecureSkipVerify: true, InsecureSkipVerify: true,
Namespace: defaultNamespace, Namespace: defaultNamespace,
} }
return connConfig, func() { return connConfig, func() {
cancel()
etcd.Close() etcd.Close()
}, nil }, nil
} }

@ -9,8 +9,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/coreos/etcd/clientv3" "go.etcd.io/etcd/clientv3"
"github.com/coreos/etcd/clientv3/namespace" "go.etcd.io/etcd/clientv3/namespace"
) )
const ( const (
@ -22,14 +22,14 @@ const (
type EtcdTestFixture struct { type EtcdTestFixture struct {
t *testing.T t *testing.T
cli *clientv3.Client cli *clientv3.Client
config *BackendConfig config *Config
cleanup func() cleanup func()
} }
// NewTestEtcdInstance creates an embedded etcd instance for testing, listening // NewTestEtcdInstance creates an embedded etcd instance for testing, listening
// on random open ports. Returns the connection config and a cleanup func that // on random open ports. Returns the connection config and a cleanup func that
// will stop the etcd instance. // will stop the etcd instance.
func NewTestEtcdInstance(t *testing.T, path string) (*BackendConfig, func()) { func NewTestEtcdInstance(t *testing.T, path string) (*Config, func()) {
t.Helper() t.Helper()
config, cleanup, err := NewEmbeddedEtcdInstance(path, 0, 0) config, cleanup, err := NewEmbeddedEtcdInstance(path, 0, 0)
@ -124,7 +124,7 @@ func (f *EtcdTestFixture) Dump() map[string]string {
// BackendConfig returns the backend config for connecting to theembedded // BackendConfig returns the backend config for connecting to theembedded
// etcd instance. // etcd instance.
func (f *EtcdTestFixture) BackendConfig() BackendConfig { func (f *EtcdTestFixture) BackendConfig() Config {
return *f.config return *f.config
} }

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"fmt" "fmt"
"math" "math"
"testing" "testing"
@ -17,7 +18,7 @@ func TestBucketCreation(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -98,7 +99,7 @@ func TestBucketDeletion(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -208,7 +209,7 @@ func TestBucketForEach(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -284,7 +285,7 @@ func TestBucketForEachWithError(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -374,7 +375,7 @@ func TestBucketSequence(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -413,7 +414,7 @@ func TestKeyClash(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
// First: // First:
@ -481,7 +482,7 @@ func TestBucketCreateDelete(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"testing" "testing"
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
@ -15,7 +16,7 @@ func TestReadCursorEmptyInterval(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
err = db.Update(func(tx walletdb.ReadWriteTx) error { err = db.Update(func(tx walletdb.ReadWriteTx) error {
@ -59,7 +60,7 @@ func TestReadCursorNonEmptyInterval(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
testKeyValues := []KV{ testKeyValues := []KV{
@ -136,7 +137,7 @@ func TestReadWriteCursor(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
testKeyValues := []KV{ testKeyValues := []KV{
@ -300,7 +301,7 @@ func TestReadWriteCursorWithBucketAndValue(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
// Pre-store the first half of the interval. // Pre-store the first half of the interval.

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"testing" "testing"
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
@ -15,7 +16,7 @@ func TestTxManualCommit(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
tx, err := db.BeginReadWriteTx() tx, err := db.BeginReadWriteTx()
@ -55,7 +56,7 @@ func TestTxRollback(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
tx, err := db.BeginReadWriteTx() tx, err := db.BeginReadWriteTx()
@ -79,7 +80,7 @@ func TestChangeDuringManualTx(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
tx, err := db.BeginReadWriteTx() tx, err := db.BeginReadWriteTx()
@ -108,7 +109,7 @@ func TestChangeDuringUpdate(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
count := 0 count := 0

@ -8,7 +8,7 @@ import (
"math" "math"
"strings" "strings"
v3 "github.com/coreos/etcd/clientv3" v3 "go.etcd.io/etcd/clientv3"
) )
type CommitStats struct { type CommitStats struct {

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"errors" "errors"
"testing" "testing"
@ -21,13 +22,16 @@ func TestPutToEmpty(t *testing.T) {
t.Parallel() t.Parallel()
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
txQueue := NewCommitQueue(f.config.Ctx) ctx, cancel := context.WithCancel(context.Background())
txQueue := NewCommitQueue(ctx)
defer func() { defer func() {
cancel()
f.Cleanup() f.Cleanup()
txQueue.Wait() txQueue.Wait()
}() }()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(ctx, f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
apply := func(stm STM) error { apply := func(stm STM) error {
@ -45,8 +49,11 @@ func TestGetPutDel(t *testing.T) {
t.Parallel() t.Parallel()
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
txQueue := NewCommitQueue(f.config.Ctx) ctx, cancel := context.WithCancel(context.Background())
txQueue := NewCommitQueue(ctx)
defer func() { defer func() {
cancel()
f.Cleanup() f.Cleanup()
txQueue.Wait() txQueue.Wait()
}() }()
@ -63,7 +70,7 @@ func TestGetPutDel(t *testing.T) {
f.Put(kv.key, kv.val) f.Put(kv.key, kv.val)
} }
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(ctx, f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
apply := func(stm STM) error { apply := func(stm STM) error {
@ -128,8 +135,11 @@ func TestFirstLastNextPrev(t *testing.T) {
t.Parallel() t.Parallel()
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
txQueue := NewCommitQueue(f.config.Ctx) ctx, cancel := context.WithCancel(context.Background())
txQueue := NewCommitQueue(ctx)
defer func() { defer func() {
cancel()
f.Cleanup() f.Cleanup()
txQueue.Wait() txQueue.Wait()
}() }()
@ -145,7 +155,7 @@ func TestFirstLastNextPrev(t *testing.T) {
f.Put(kv.key, kv.val) f.Put(kv.key, kv.val)
} }
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(ctx, f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
apply := func(stm STM) error { apply := func(stm STM) error {
@ -283,13 +293,16 @@ func TestCommitError(t *testing.T) {
t.Parallel() t.Parallel()
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
txQueue := NewCommitQueue(f.config.Ctx) ctx, cancel := context.WithCancel(context.Background())
txQueue := NewCommitQueue(ctx)
defer func() { defer func() {
cancel()
f.Cleanup() f.Cleanup()
txQueue.Wait() txQueue.Wait()
}() }()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(ctx, f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
// Preset DB state. // Preset DB state.
@ -328,13 +341,16 @@ func TestManualTxError(t *testing.T) {
t.Parallel() t.Parallel()
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
txQueue := NewCommitQueue(f.config.Ctx) ctx, cancel := context.WithCancel(context.Background())
txQueue := NewCommitQueue(ctx)
defer func() { defer func() {
cancel()
f.Cleanup() f.Cleanup()
txQueue.Wait() txQueue.Wait()
}() }()
db, err := newEtcdBackend(f.BackendConfig()) db, err := newEtcdBackend(ctx, f.BackendConfig())
require.NoError(t, err) require.NoError(t, err)
// Preset DB state. // Preset DB state.

@ -3,6 +3,7 @@
package etcd package etcd
import ( import (
"context"
"testing" "testing"
"github.com/btcsuite/btcwallet/walletdb/walletdbtest" "github.com/btcsuite/btcwallet/walletdb/walletdbtest"
@ -13,5 +14,6 @@ import (
func TestWalletDBInterface(t *testing.T) { func TestWalletDBInterface(t *testing.T) {
f := NewEtcdTestFixture(t) f := NewEtcdTestFixture(t)
defer f.Cleanup() defer f.Cleanup()
walletdbtest.TestInterface(t, dbType, f.BackendConfig()) cfg := f.BackendConfig()
walletdbtest.TestInterface(t, dbType, context.TODO(), &cfg)
} }

@ -3,8 +3,6 @@
package kvdb package kvdb
import ( import (
"context"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd" "github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
) )
@ -12,49 +10,12 @@ import (
// defined, allowing testing our database code with etcd backend. // defined, allowing testing our database code with etcd backend.
const TestBackend = EtcdBackendName const TestBackend = EtcdBackendName
// GetEtcdBackend returns an etcd backend configured according to the
// passed etcdConfig.
func GetEtcdBackend(ctx context.Context, prefix string,
etcdConfig *EtcdConfig) (Backend, error) {
// Config translation is needed here in order to keep the
// etcd package fully independent from the rest of the source tree.
backendConfig := etcd.BackendConfig{
Ctx: ctx,
Host: etcdConfig.Host,
User: etcdConfig.User,
Pass: etcdConfig.Pass,
DisableTLS: etcdConfig.DisableTLS,
CertFile: etcdConfig.CertFile,
KeyFile: etcdConfig.KeyFile,
InsecureSkipVerify: etcdConfig.InsecureSkipVerify,
Prefix: prefix,
Namespace: etcdConfig.Namespace,
CollectCommitStats: etcdConfig.CollectStats,
}
return Open(EtcdBackendName, backendConfig)
}
// GetEtcdTestBackend creates an embedded etcd backend for testing // GetEtcdTestBackend creates an embedded etcd backend for testing
// storig the database at the passed path. // storig the database at the passed path.
func GetEtcdTestBackend(path string, clientPort, peerPort uint16) ( func StartEtcdTestBackend(path string, clientPort, peerPort uint16) (
Backend, func(), error) { *etcd.Config, func(), error) {
empty := func() {} return etcd.NewEmbeddedEtcdInstance(
config, cleanup, err := etcd.NewEmbeddedEtcdInstance(
path, clientPort, peerPort, path, clientPort, peerPort,
) )
if err != nil {
return nil, empty, err
}
backend, err := Open(EtcdBackendName, *config)
if err != nil {
cleanup()
return nil, empty, err
}
return backend, cleanup, nil
} }

@ -3,8 +3,9 @@
package kvdb package kvdb
import ( import (
"context"
"fmt" "fmt"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
) )
// TestBackend is conditionally set to bdb when the kvdb_etcd build tag is // TestBackend is conditionally set to bdb when the kvdb_etcd build tag is
@ -13,17 +14,9 @@ const TestBackend = BoltBackendName
var errEtcdNotAvailable = fmt.Errorf("etcd backend not available") var errEtcdNotAvailable = fmt.Errorf("etcd backend not available")
// GetEtcdBackend is a stub returning nil and errEtcdNotAvailable error. // StartEtcdTestBackend is a stub returning nil, and errEtcdNotAvailable error.
func GetEtcdBackend(ctx context.Context, prefix string, func StartEtcdTestBackend(path string, clientPort, peerPort uint16) (
etcdConfig *EtcdConfig) (Backend, error) { *etcd.Config, func(), error) {
return nil, errEtcdNotAvailable
}
// GetTestEtcdBackend is a stub returning nil, an empty closure and an
// errEtcdNotAvailable error.
func GetEtcdTestBackend(path string, clientPort, peerPort uint16) (
Backend, func(), error) {
return nil, func() {}, errEtcdNotAvailable return nil, func() {}, errEtcdNotAvailable
} }

112
cluster/etcd_elector.go Normal file

@ -0,0 +1,112 @@
// +build kvdb_etcd
package cluster
import (
"context"
"time"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/concurrency"
"go.etcd.io/etcd/clientv3/namespace"
"go.etcd.io/etcd/pkg/transport"
)
const (
// etcdConnectionTimeout is the timeout until successful connection to
// the etcd instance.
etcdConnectionTimeout = 10 * time.Second
)
// Enforce that etcdLeaderElector implements the LeaderElector interface.
var _ LeaderElector = (*etcdLeaderElector)(nil)
// etcdLeaderElector is an implemetation of LeaderElector using etcd as the
// election governor.
type etcdLeaderElector struct {
id string
ctx context.Context
cli *clientv3.Client
session *concurrency.Session
election *concurrency.Election
}
// newEtcdLeaderElector constructs a new etcdLeaderElector.
func newEtcdLeaderElector(ctx context.Context, id, electionPrefix string,
cfg *etcd.Config) (*etcdLeaderElector, error) {
clientCfg := clientv3.Config{
Context: ctx,
Endpoints: []string{cfg.Host},
DialTimeout: etcdConnectionTimeout,
Username: cfg.User,
Password: cfg.Pass,
}
if !cfg.DisableTLS {
tlsInfo := transport.TLSInfo{
CertFile: cfg.CertFile,
KeyFile: cfg.KeyFile,
InsecureSkipVerify: cfg.InsecureSkipVerify,
}
tlsConfig, err := tlsInfo.ClientConfig()
if err != nil {
return nil, err
}
clientCfg.TLS = tlsConfig
}
cli, err := clientv3.New(clientCfg)
if err != nil {
log.Errorf("Unable to connect to etcd: %v", err)
return nil, err
}
// Apply the namespace.
cli.KV = namespace.NewKV(cli.KV, cfg.Namespace)
cli.Watcher = namespace.NewWatcher(cli.Watcher, cfg.Namespace)
cli.Lease = namespace.NewLease(cli.Lease, cfg.Namespace)
log.Infof("Applied namespace to leader elector: %v", cfg.Namespace)
session, err := concurrency.NewSession(cli)
if err != nil {
log.Errorf("Unable to start new leader election session: %v",
err)
return nil, err
}
return &etcdLeaderElector{
id: id,
ctx: ctx,
cli: cli,
session: session,
election: concurrency.NewElection(
session, electionPrefix,
),
}, nil
}
// Leader returns the leader value for the current election.
func (e *etcdLeaderElector) Leader(ctx context.Context) (string, error) {
resp, err := e.election.Leader(ctx)
if err != nil {
return "", err
}
return string(resp.Kvs[0].Value), nil
}
// Campaign will start a new leader election campaign. Campaign will block until
// the elector context is canceled or the the caller is elected as the leader.
func (e *etcdLeaderElector) Campaign(ctx context.Context) error {
return e.election.Campaign(ctx, e.id)
}
// Resign resigns the leader role allowing other election members to take
// the place.
func (e *etcdLeaderElector) Resign() error {
return e.election.Resign(context.Background())
}

@ -0,0 +1,46 @@
// +build kvdb_etcd
package cluster
import (
"context"
"fmt"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
)
// makeEtcdElector will construct a new etcdLeaderElector. It expects a cancel
// context a unique (in the cluster) LND id and a *etcd.Config as arguments.
func makeEtcdElector(ctx context.Context, args ...interface{}) (LeaderElector,
error) {
if len(args) != 3 {
return nil, fmt.Errorf("invalid number of arguments to "+
"cluster.makeEtcdElector(): expected 3, got %v",
len(args))
}
id, ok := args[0].(string)
if !ok {
return nil, fmt.Errorf("invalid argument (0) to " +
"cluster.makeEtcdElector(), expected: string")
}
electionPrefix, ok := args[1].(string)
if !ok {
return nil, fmt.Errorf("invalid argument (1) to " +
"cluster.makeEtcdElector(), expected: string")
}
etcdCfg, ok := args[2].(*etcd.Config)
if !ok {
return nil, fmt.Errorf("invalid argument (2) to " +
"cluster.makeEtcdElector(), expected: *etcd.Config")
}
return newEtcdLeaderElector(ctx, id, electionPrefix, etcdCfg)
}
func init() {
RegisterLeaderElectorFactory(EtcdLeaderElector, makeEtcdElector)
}

@ -0,0 +1,104 @@
// +build kvdb_etcd
package cluster
import (
"context"
"io/ioutil"
"os"
"runtime/pprof"
"sync"
"testing"
"time"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
"github.com/stretchr/testify/require"
)
// GuardTimeout implements a test level timeout guard.
func GuardTimeout(t *testing.T, timeout time.Duration) func() {
done := make(chan struct{})
go func() {
select {
case <-time.After(timeout):
err := pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
require.NoError(t, err)
panic("test timeout")
case <-done:
}
}()
return func() {
close(done)
}
}
// TestEtcdElector tests that two candidates competing for leadership works as
// expected and that elected leader can resign and allow others to take on.
func TestEtcdElector(t *testing.T) {
guard := GuardTimeout(t, 5*time.Second)
defer guard()
tmpDir, err := ioutil.TempDir("", "etcd")
if err != nil {
t.Fatalf("unable to create temp dir: %v", err)
}
etcdCfg, cleanup, err := etcd.NewEmbeddedEtcdInstance(tmpDir, 0, 0)
require.NoError(t, err)
defer cleanup()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
const (
election = "/election/"
id1 = "e1"
id2 = "e2"
)
e1, err := newEtcdLeaderElector(
ctx, id1, election, etcdCfg,
)
require.NoError(t, err)
e2, err := newEtcdLeaderElector(
ctx, id2, election, etcdCfg,
)
require.NoError(t, err)
var wg sync.WaitGroup
ch := make(chan *etcdLeaderElector)
wg.Add(2)
ctxb := context.Background()
go func() {
defer wg.Done()
require.NoError(t, e1.Campaign(ctxb))
ch <- e1
}()
go func() {
defer wg.Done()
require.NoError(t, e2.Campaign(ctxb))
ch <- e2
}()
tmp := <-ch
first, err := tmp.Leader(ctxb)
require.NoError(t, err)
require.NoError(t, tmp.Resign())
tmp = <-ch
second, err := tmp.Leader(ctxb)
require.NoError(t, err)
require.NoError(t, tmp.Resign())
require.Contains(t, []string{id1, id2}, first)
require.Contains(t, []string{id1, id2}, second)
require.NotEqual(t, first, second)
wg.Wait()
}

37
cluster/factory.go Normal file

@ -0,0 +1,37 @@
package cluster
import (
"context"
"fmt"
)
// leaderElectorFactoryFunc is a LeaderElector factory method type.
type leaderElectorFactoryFunc func(context.Context, ...interface{}) (
LeaderElector, error)
var leaderElectorFactories map[string]leaderElectorFactoryFunc
// RegisterLeaderElectorFactory will register a new LeaderElector factory
// method corresponding to the passed id.
func RegisterLeaderElectorFactory(id string, factory leaderElectorFactoryFunc) {
if leaderElectorFactories == nil {
leaderElectorFactories = make(
map[string]leaderElectorFactoryFunc,
)
}
leaderElectorFactories[id] = factory
}
// MakeLeaderElector will constuct a LeaderElector identified by id with the
// passed arguments.
func MakeLeaderElector(ctx context.Context, id string, args ...interface{}) (
LeaderElector, error) {
if _, ok := leaderElectorFactories[id]; !ok {
return nil, fmt.Errorf("leader elector factory for '%v' "+
"not found", id)
}
return leaderElectorFactories[id](ctx, args...)
}

26
cluster/interface.go Normal file

@ -0,0 +1,26 @@
package cluster
import (
"context"
)
const (
// EtcdLeaderElector is the id used when constructing an
// etcdLeaderElector instance through the factory.
EtcdLeaderElector = "etcd"
)
// LeaderElector is a general interface implementing basic leader elections
// in a clustered environment.
type LeaderElector interface {
// Campaign starts a run for leadership. Campaign will block until
// the caller is elected as the leader.
Campaign(ctx context.Context) error
// Resign resigns from the leader role, allowing other election members
// to take on leadership.
Resign() error
// Leader returns the leader value for the current election.
Leader(ctx context.Context) (string, error)
}

27
cluster/log.go Normal file

@ -0,0 +1,27 @@
package cluster
import (
"github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/build"
)
// Subsystem defines the logging code for this subsystem.
const Subsystem = "CLUS"
// log is a logger that is initialized with the btclog.Disabled logger.
var log btclog.Logger
// The default amount of logging is none.
func init() {
UseLogger(build.NewSubLogger(Subsystem, nil))
}
// DisableLog disables all logging output.
func DisableLog() {
UseLogger(btclog.Disabled)
}
// UseLogger uses a specified Logger to output package logging info.
func UseLogger(logger btclog.Logger) {
log = logger
}

@ -744,7 +744,7 @@ func checkPsbtFlags(req *lnrpc.OpenChannelRequest) error {
return fmt.Errorf("specifying minimum confirmations for PSBT " + return fmt.Errorf("specifying minimum confirmations for PSBT " +
"funding is not supported") "funding is not supported")
} }
if req.TargetConf != 0 || req.SatPerByte != 0 || req.SatPerVbyte != 0 { if req.TargetConf != 0 || req.SatPerByte != 0 || req.SatPerVbyte != 0 { // nolint:staticcheck
return fmt.Errorf("setting fee estimation parameters not " + return fmt.Errorf("setting fee estimation parameters not " +
"supported for PSBT funding") "supported for PSBT funding")
} }

@ -366,6 +366,8 @@ type Config struct {
DB *lncfg.DB `group:"db" namespace:"db"` DB *lncfg.DB `group:"db" namespace:"db"`
Cluster *lncfg.Cluster `group:"cluster" namespace:"cluster"`
// LogWriter is the root logger that all of the daemon's subloggers are // LogWriter is the root logger that all of the daemon's subloggers are
// hooked up to. // hooked up to.
LogWriter *build.RotatingLogWriter LogWriter *build.RotatingLogWriter
@ -532,6 +534,7 @@ func DefaultConfig() Config {
MaxCommitFeeRateAnchors: lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte, MaxCommitFeeRateAnchors: lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte,
LogWriter: build.NewRotatingLogWriter(), LogWriter: build.NewRotatingLogWriter(),
DB: lncfg.DefaultDB(), DB: lncfg.DefaultDB(),
Cluster: lncfg.DefaultCluster(),
registeredChains: chainreg.NewChainRegistry(), registeredChains: chainreg.NewChainRegistry(),
ActiveNetParams: chainreg.BitcoinTestNetParams, ActiveNetParams: chainreg.BitcoinTestNetParams,
ChannelCommitInterval: defaultChannelCommitInterval, ChannelCommitInterval: defaultChannelCommitInterval,
@ -1372,6 +1375,7 @@ func ValidateConfig(cfg Config, usageMessage string,
cfg.Caches, cfg.Caches,
cfg.WtClient, cfg.WtClient,
cfg.DB, cfg.DB,
cfg.Cluster,
cfg.HealthChecks, cfg.HealthChecks,
) )
if err != nil { if err != nil {
@ -1398,10 +1402,6 @@ func (c *Config) localDatabaseDir() string {
lncfg.NormalizeNetwork(c.ActiveNetParams.Name)) lncfg.NormalizeNetwork(c.ActiveNetParams.Name))
} }
func (c *Config) networkName() string {
return lncfg.NormalizeNetwork(c.ActiveNetParams.Name)
}
// CleanAndExpandPath expands environment variables and leading ~ in the // CleanAndExpandPath expands environment variables and leading ~ in the
// passed path, cleans the result, and returns it. // passed path, cleans the result, and returns it.
// This function is taken from https://github.com/btcsuite/btcd // This function is taken from https://github.com/btcsuite/btcd

34
go.mod

@ -5,38 +5,34 @@ require (
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e // indirect github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e // indirect
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82
github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2 github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2
github.com/btcsuite/btcd v0.21.0-beta.0.20210401013323-36a96f6a0025 github.com/btcsuite/btcd v0.21.0-beta.0.20210426180113-7eba688b65e5
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce
github.com/btcsuite/btcwallet v0.11.1-0.20210421021904-50978fcf79f8 github.com/btcsuite/btcwallet v0.11.1-0.20210429224804-a7a9234968e8
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6 github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6
github.com/btcsuite/btcwallet/wallet/txrules v1.0.0 github.com/btcsuite/btcwallet/wallet/txrules v1.0.0
github.com/btcsuite/btcwallet/wallet/txsizes v1.0.1-0.20210329233242-e0607006dce6 // indirect github.com/btcsuite/btcwallet/wallet/txsizes v1.0.1-0.20210329233242-e0607006dce6 // indirect
github.com/btcsuite/btcwallet/walletdb v1.3.4 github.com/btcsuite/btcwallet/walletdb v1.3.4
github.com/btcsuite/btcwallet/wtxmgr v1.2.1-0.20210312232944-4ec908df9386 github.com/btcsuite/btcwallet/wtxmgr v1.2.1-0.20210312232944-4ec908df9386
github.com/coreos/etcd v3.3.22+incompatible
github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/dustin/go-humanize v1.0.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-errors/errors v1.0.1 github.com/go-errors/errors v1.0.1
github.com/go-openapi/strfmt v0.19.5 // indirect github.com/go-openapi/strfmt v0.19.5 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.3.2 github.com/golang/protobuf v1.4.3
github.com/google/btree v1.0.0 // indirect
github.com/gorilla/websocket v1.4.2 github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.14.3 github.com/grpc-ecosystem/grpc-gateway v1.14.3
github.com/jackpal/gateway v1.0.5 github.com/jackpal/gateway v1.0.5
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad
github.com/jedib0t/go-pretty v4.3.0+incompatible github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/jessevdk/go-flags v1.4.0 github.com/jessevdk/go-flags v1.4.0
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/jrick/logrotate v1.0.0 github.com/jrick/logrotate v1.0.0
github.com/json-iterator/go v1.1.9 // indirect github.com/json-iterator/go v1.1.9 // indirect
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c // indirect github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c // indirect
@ -48,7 +44,7 @@ require (
github.com/juju/version v0.0.0-20180108022336-b64dbd566305 // indirect github.com/juju/version v0.0.0-20180108022336-b64dbd566305 // indirect
github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec
github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea
github.com/lightningnetwork/lnd/cert v1.0.3 github.com/lightningnetwork/lnd/cert v1.0.3
github.com/lightningnetwork/lnd/clock v1.0.1 github.com/lightningnetwork/lnd/clock v1.0.1
@ -57,26 +53,24 @@ require (
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796
github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8 github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8
github.com/modern-go/reflect2 v1.0.1 // indirect github.com/prometheus/client_golang v1.0.0
github.com/prometheus/client_golang v0.9.3
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/stretchr/testify v1.5.1 github.com/stretchr/testify v1.5.1
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02
github.com/urfave/cli v1.18.0 github.com/urfave/cli v1.20.0
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50
go.etcd.io/etcd v3.4.14+incompatible
go.uber.org/zap v1.14.1 // indirect go.uber.org/zap v1.14.1 // indirect
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
google.golang.org/grpc v1.24.0 google.golang.org/grpc v1.29.1
google.golang.org/protobuf v1.23.0
gopkg.in/errgo.v1 v1.0.1 // indirect gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/macaroon-bakery.v2 v2.0.1 gopkg.in/macaroon-bakery.v2 v2.0.1
gopkg.in/macaroon.v2 v2.0.0 gopkg.in/macaroon.v2 v2.0.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
) )
replace github.com/lightningnetwork/lnd/ticker => ./ticker replace github.com/lightningnetwork/lnd/ticker => ./ticker
@ -89,4 +83,8 @@ replace github.com/lightningnetwork/lnd/clock => ./clock
replace git.schwanenlied.me/yawning/bsaes.git => github.com/Yawning/bsaes v0.0.0-20180720073208-c0276d75487e replace git.schwanenlied.me/yawning/bsaes.git => github.com/Yawning/bsaes v0.0.0-20180720073208-c0276d75487e
// Fix incompatibility of etcd go.mod package.
// See https://github.com/etcd-io/etcd/issues/11154
replace go.etcd.io/etcd => go.etcd.io/etcd v0.5.0-alpha.5.0.20201125193152-8a03d2e9614b
go 1.15 go 1.15

142
go.sum

@ -5,7 +5,6 @@ github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e h1:n+DcnTNkQ
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e/go.mod h1:Bdzq+51GR4/0DIhaICZEOm+OHvXGwwB2trKZ8B4Y6eQ= github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e/go.mod h1:Bdzq+51GR4/0DIhaICZEOm+OHvXGwwB2trKZ8B4Y6eQ=
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 h1:MG93+PZYs9PyEsj/n5/haQu2gK0h4tUtSy9ejtMwWa0= github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 h1:MG93+PZYs9PyEsj/n5/haQu2gK0h4tUtSy9ejtMwWa0=
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82/go.mod h1:GbuBk21JqF+driLX3XtJYNZjGa45YDoa9IqCTzNSfEc= github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82/go.mod h1:GbuBk21JqF+driLX3XtJYNZjGa45YDoa9IqCTzNSfEc=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2 h1:2be4ykKKov3M1yISM2E8gnGXZ/N2SsPawfnGiXxaYEU= github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2 h1:2be4ykKKov3M1yISM2E8gnGXZ/N2SsPawfnGiXxaYEU=
github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk= github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=
github.com/Yawning/bsaes v0.0.0-20180720073208-c0276d75487e h1:n88VxLC80RPVHbFG/kq7ItMizCVRPCyLj63UMqxLkOw= github.com/Yawning/bsaes v0.0.0-20180720073208-c0276d75487e h1:n88VxLC80RPVHbFG/kq7ItMizCVRPCyLj63UMqxLkOw=
@ -22,13 +21,13 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
github.com/btcsuite/btcd v0.21.0-beta.0.20201208033208-6bd4c64a54fa/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= github.com/btcsuite/btcd v0.21.0-beta.0.20201208033208-6bd4c64a54fa/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs=
github.com/btcsuite/btcd v0.21.0-beta.0.20210316172410-f86ae60936d7/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= github.com/btcsuite/btcd v0.21.0-beta.0.20210426180113-7eba688b65e5 h1:Y0v9TA1ZLSs2TNFRSrpcGk00GWq1fenVL6FsuD3dCKI=
github.com/btcsuite/btcd v0.21.0-beta.0.20210401013323-36a96f6a0025 h1:aoVqvZk4mLyF3WZbqEVPq+vXnwL2wekZg4P4mjYJNLs= github.com/btcsuite/btcd v0.21.0-beta.0.20210426180113-7eba688b65e5/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
github.com/btcsuite/btcd v0.21.0-beta.0.20210401013323-36a96f6a0025/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
@ -37,8 +36,8 @@ github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pY
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce h1:3PRwz+js0AMMV1fHRrCdQ55akoomx4Q3ulozHC3BDDY= github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce h1:3PRwz+js0AMMV1fHRrCdQ55akoomx4Q3ulozHC3BDDY=
github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ= github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ=
github.com/btcsuite/btcwallet v0.11.1-0.20210421021904-50978fcf79f8 h1:oNhbEF2hWQOHf8SIaUPZJH6Xq+9LQ6PMqCT9eiBVObE= github.com/btcsuite/btcwallet v0.11.1-0.20210429224804-a7a9234968e8 h1:e+sUdZhAtb40Rp0vmJQ6xBdBoi7KFn3Mg6h+SGpCrMU=
github.com/btcsuite/btcwallet v0.11.1-0.20210421021904-50978fcf79f8/go.mod h1:CevOfPKvF6kHr+JXhWD3TtqLbsJrD1CzrtDqZ+5G6ss= github.com/btcsuite/btcwallet v0.11.1-0.20210429224804-a7a9234968e8/go.mod h1:vpYHloeKzEe1/g+301F73iOJrcAaXQWqKaU9Rmu0HRw=
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU= github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6 h1:mO7NxcfgLe75paLDHx+LWNG5BskiDQigHnSVT2KvNZA= github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6 h1:mO7NxcfgLe75paLDHx+LWNG5BskiDQigHnSVT2KvNZA=
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU= github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU=
@ -68,18 +67,22 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk=
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.22+incompatible h1:AnRMUyVdVvh1k7lHe61YEd227+CLoNogQuAypztGSK4= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/etcd v3.3.22+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -88,9 +91,14 @@ github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/frankban/quicktest v1.2.2 h1:xfmOhhoH5fGPgbEAlhLpJH9p0z/0Qizio9osmvn9IUY= github.com/frankban/quicktest v1.2.2 h1:xfmOhhoH5fGPgbEAlhLpJH9p0z/0Qizio9osmvn9IUY=
github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
@ -101,45 +109,59 @@ github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY=
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM=
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY= github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY=
github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc= github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc=
github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad h1:heFfj7z0pGsNCekUlsFhO2jstxO4b5iQ665LjwM5mDc= github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad h1:heFfj7z0pGsNCekUlsFhO2jstxO4b5iQ665LjwM5mDc=
@ -153,6 +175,8 @@ github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI=
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c h1:3UvYABOQRhJAApj9MdCN+Ydv841ETSoy6xLzdmmr/9A= github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c h1:3UvYABOQRhJAApj9MdCN+Ydv841ETSoy6xLzdmmr/9A=
@ -170,6 +194,7 @@ github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d/go.mod h1:6/KLg8Wz/y2KV
github.com/juju/version v0.0.0-20180108022336-b64dbd566305 h1:lQxPJ1URr2fjsKnJRt/BxiIxjLt9IKGvS+0injMHbag= github.com/juju/version v0.0.0-20180108022336-b64dbd566305 h1:lQxPJ1URr2fjsKnJRt/BxiIxjLt9IKGvS+0injMHbag=
github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec h1:n1NeQ3SgUHyISrjFFoO5dR748Is8dBL9qpaTNfphQrs= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec h1:n1NeQ3SgUHyISrjFFoO5dR748Is8dBL9qpaTNfphQrs=
@ -187,13 +212,16 @@ github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQ
github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg= github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg=
github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e h1:bu8vT4/mXk9pX/H5Z/ZPoLYqsI/vEclAu+LafBd5MHk= github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e h1:bu8vT4/mXk9pX/H5Z/ZPoLYqsI/vEclAu+LafBd5MHk=
github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e/go.mod h1:d7zCVUnGmKW1L8DIgdduiCtjEziWMbTL0XhpqQs8zVY= github.com/lightninglabs/neutrino v0.11.1-0.20210429202752-e6974af1494e/go.mod h1:d7zCVUnGmKW1L8DIgdduiCtjEziWMbTL0XhpqQs8zVY=
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d h1:QWD/5MPnaZfUVP7P8wLa4M8Td2DI7XXHXt2vhVtUgGI= github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display h1:RZJ8H4ueU/aQ9pFtx5wqsuD3B/DezrewJeVwDKKYY8E=
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d/go.mod h1:KDb67YMzoh4eudnzClmvs2FbiLG9vxISmLApUkCa4uI= github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display/go.mod h1:2oKOBU042GKFHrdbgGiKax4xVrFiZu51lhacUZQ9MnE=
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea h1:oCj48NQ8u7Vz+MmzHqt0db6mxcFZo3Ho7M5gCJauY/k= github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea h1:oCj48NQ8u7Vz+MmzHqt0db6mxcFZo3Ho7M5gCJauY/k=
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea/go.mod h1:rigfi6Af/KqsF7Za0hOgcyq2PNH4AN70AaMRxcJkff4= github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea/go.mod h1:rigfi6Af/KqsF7Za0hOgcyq2PNH4AN70AaMRxcJkff4=
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY=
github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA= github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
@ -202,13 +230,14 @@ github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8 h1:PRMAcldsl4mXKJeRNB/KV
github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@ -221,26 +250,29 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
@ -251,25 +283,31 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E= github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E=
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY= github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY=
github.com/urfave/cli v1.18.0 h1:m9MfmZWX7bwr9kUcs/Asr95j0IVXzGNNc+/5ku2m26Q= github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 h1:ASw9n1EHMftwnP3Az4XW6e308+gNsrHzmdhd0Olz9Hs= go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 h1:ASw9n1EHMftwnP3Az4XW6e308+gNsrHzmdhd0Olz9Hs=
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.5.0-alpha.5.0.20201125193152-8a03d2e9614b h1:PLwvCoe5rvpuo9Un6/hlNRMAfOMVb7zBsOOeKAjV81g=
go.etcd.io/etcd v0.5.0-alpha.5.0.20201125193152-8a03d2e9614b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo=
go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@ -295,13 +333,16 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -315,16 +356,22 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@ -334,21 +381,36 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo=
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso= gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso=
gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo= gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
@ -360,8 +422,10 @@ gopkg.in/macaroon.v2 v2.0.0 h1:LVWycAfeJBUjCIqfR9gqlo7I8vmiXRr51YEOZ1suop8=
gopkg.in/macaroon.v2 v2.0.0/go.mod h1:+I6LnTMkm/uV5ew/0nsulNjL16SK4+C8yDmRUzHR17I= gopkg.in/macaroon.v2 v2.0.0/go.mod h1:+I6LnTMkm/uV5ew/0nsulNjL16SK4+C8yDmRUzHR17I=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI= gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=

74
lncfg/cluster.go Normal file

@ -0,0 +1,74 @@
package lncfg
import (
"context"
"fmt"
"os"
"github.com/lightningnetwork/lnd/cluster"
)
const (
// DefaultEtcdElectionPrefix is used as election prefix if none is provided
// through the config.
DefaultEtcdElectionPrefix = "/leader/"
)
// Cluster holds configuration for clustered LND.
type Cluster struct {
EnableLeaderElection bool `long:"enable-leader-election" description:"Enables leader election if set."`
LeaderElector string `long:"leader-elector" choice:"etcd" description:"Leader elector to use. Valid values: \"etcd\"."`
EtcdElectionPrefix string `long:"etcd-election-prefix" description:"Election key prefix when using etcd leader elector. Defaults to \"/leader/\"."`
ID string `long:"id" description:"Identifier for this node inside the cluster (used in leader election). Defaults to the hostname."`
}
// DefaultCluster creates and returns a new default DB config.
func DefaultCluster() *Cluster {
hostname, _ := os.Hostname()
return &Cluster{
LeaderElector: cluster.EtcdLeaderElector,
EtcdElectionPrefix: DefaultEtcdElectionPrefix,
ID: hostname,
}
}
// MakeLeaderElector is a helper method to construct the concrete leader elector
// based on the current configuration.
func (c *Cluster) MakeLeaderElector(electionCtx context.Context, db *DB) (
cluster.LeaderElector, error) {
if c.LeaderElector == cluster.EtcdLeaderElector {
return cluster.MakeLeaderElector(
electionCtx, c.LeaderElector, c.ID,
c.EtcdElectionPrefix, db.Etcd,
)
}
return nil, fmt.Errorf("unsupported leader elector")
}
// Validate validates the Cluster config.
func (c *Cluster) Validate() error {
if !c.EnableLeaderElection {
return nil
}
switch c.LeaderElector {
case cluster.EtcdLeaderElector:
if c.EtcdElectionPrefix == "" {
return fmt.Errorf("etcd-election-prefix must be set")
}
return nil
default:
return fmt.Errorf("unknown leader elector, valid values are: "+
"\"%v\"", cluster.EtcdLeaderElector)
}
}
// Compile-time constraint to ensure Workers implements the Validator interface.
var _ Validator = (*Cluster)(nil)

@ -6,6 +6,7 @@ import (
"time" "time"
"github.com/lightningnetwork/lnd/channeldb/kvdb" "github.com/lightningnetwork/lnd/channeldb/kvdb"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
) )
const ( const (
@ -21,7 +22,7 @@ type DB struct {
BatchCommitInterval time.Duration `long:"batch-commit-interval" description:"The maximum duration the channel graph batch schedulers will wait before attempting to commit a batch of pending updates. This can be tradeoff database contenion for commit latency."` BatchCommitInterval time.Duration `long:"batch-commit-interval" description:"The maximum duration the channel graph batch schedulers will wait before attempting to commit a batch of pending updates. This can be tradeoff database contenion for commit latency."`
Etcd *kvdb.EtcdConfig `group:"etcd" namespace:"etcd" description:"Etcd settings."` Etcd *etcd.Config `group:"etcd" namespace:"etcd" description:"Etcd settings."`
Bolt *kvdb.BoltConfig `group:"bolt" namespace:"bolt" description:"Bolt settings."` Bolt *kvdb.BoltConfig `group:"bolt" namespace:"bolt" description:"Bolt settings."`
} }
@ -56,6 +57,27 @@ func (db *DB) Validate() error {
return nil return nil
} }
// Init should be called upon start to pre-initialize database access dependent
// on configuration.
func (db *DB) Init(ctx context.Context, dbPath string) error {
// Start embedded etcd server if requested.
if db.Backend == EtcdBackend && db.Etcd.Embedded {
cfg, _, err := kvdb.StartEtcdTestBackend(
dbPath, db.Etcd.EmbeddedClientPort,
db.Etcd.EmbeddedPeerPort,
)
if err != nil {
return err
}
// Override the original config with the config for
// the embedded instance.
db.Etcd = cfg
}
return nil
}
// DatabaseBackends is a two-tuple that holds the set of active database // DatabaseBackends is a two-tuple that holds the set of active database
// backends for the daemon. The two backends we expose are the local database // backends for the daemon. The two backends we expose are the local database
// backend, and the remote backend. The LocalDB attribute will always be // backend, and the remote backend. The LocalDB attribute will always be
@ -73,8 +95,8 @@ type DatabaseBackends struct {
// GetBackends returns a set of kvdb.Backends as set in the DB config. The // GetBackends returns a set of kvdb.Backends as set in the DB config. The
// local database will ALWAYS be non-nil, while the remote database will only // local database will ALWAYS be non-nil, while the remote database will only
// be populated if etcd is specified. // be populated if etcd is specified.
func (db *DB) GetBackends(ctx context.Context, dbPath string, func (db *DB) GetBackends(ctx context.Context, dbPath string) (
networkName string) (*DatabaseBackends, error) { *DatabaseBackends, error) {
var ( var (
localDB, remoteDB kvdb.Backend localDB, remoteDB kvdb.Backend
@ -82,17 +104,9 @@ func (db *DB) GetBackends(ctx context.Context, dbPath string,
) )
if db.Backend == EtcdBackend { if db.Backend == EtcdBackend {
if db.Etcd.Embedded { remoteDB, err = kvdb.Open(
remoteDB, _, err = kvdb.GetEtcdTestBackend( kvdb.EtcdBackendName, ctx, db.Etcd,
dbPath, db.Etcd.EmbeddedClientPort, )
db.Etcd.EmbeddedPeerPort,
)
} else {
// Prefix will separate key/values in the db.
remoteDB, err = kvdb.GetEtcdBackend(
ctx, networkName, db.Etcd,
)
}
if err != nil { if err != nil {
return nil, err return nil, err
} }

164
lnd.go

@ -234,17 +234,13 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
defer cancel() defer cancel()
localChanDB, remoteChanDB, cleanUp, err := initializeDatabases(ctx, cfg) // Run configuration dependent DB pre-initialization. Note that this
switch { // needs to be done early and once during the startup process, before
case err == channeldb.ErrDryRunMigrationOK: // any DB access.
ltndLog.Infof("%v, exiting", err) if err := cfg.DB.Init(ctx, cfg.localDatabaseDir()); err != nil {
return nil return err
case err != nil:
return fmt.Errorf("unable to open databases: %v", err)
} }
defer cleanUp()
// Only process macaroons if --no-macaroons isn't set. // Only process macaroons if --no-macaroons isn't set.
serverOpts, restDialOpts, restListen, cleanUp, err := getTLSConfig(cfg) serverOpts, restDialOpts, restListen, cleanUp, err := getTLSConfig(cfg)
if err != nil { if err != nil {
@ -320,18 +316,10 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
} }
} }
// We'll create the WalletUnlockerService and check whether the wallet
// already exists.
pwService := createWalletUnlockerService(cfg)
walletExists, err := pwService.WalletExists()
if err != nil {
return err
}
// Create a new RPC interceptor that we'll add to the GRPC server. This // Create a new RPC interceptor that we'll add to the GRPC server. This
// will be used to log the API calls invoked on the GRPC server. // will be used to log the API calls invoked on the GRPC server.
interceptorChain := rpcperms.NewInterceptorChain( interceptorChain := rpcperms.NewInterceptorChain(
rpcsLog, cfg.NoMacaroons, walletExists, rpcsLog, cfg.NoMacaroons,
) )
if err := interceptorChain.Start(); err != nil { if err := interceptorChain.Start(); err != nil {
return err return err
@ -350,13 +338,14 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
grpcServer := grpc.NewServer(serverOpts...) grpcServer := grpc.NewServer(serverOpts...)
defer grpcServer.Stop() defer grpcServer.Stop()
// Register the WalletUnlockerService with the GRPC server.
lnrpc.RegisterWalletUnlockerServer(grpcServer, pwService)
// We'll also register the RPC interceptor chain as the StateServer, as // We'll also register the RPC interceptor chain as the StateServer, as
// it can be used to query for the current state of the wallet. // it can be used to query for the current state of the wallet.
lnrpc.RegisterStateServer(grpcServer, interceptorChain) lnrpc.RegisterStateServer(grpcServer, interceptorChain)
// Register the WalletUnlockerService with the GRPC server.
pwService := createWalletUnlockerService(cfg)
lnrpc.RegisterWalletUnlockerServer(grpcServer, pwService)
// Initialize, and register our implementation of the gRPC interface // Initialize, and register our implementation of the gRPC interface
// exported by the rpcServer. // exported by the rpcServer.
rpcServer := newRPCServer( rpcServer := newRPCServer(
@ -389,11 +378,111 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
} }
defer stopProxy() defer stopProxy()
// Start leader election if we're running on etcd. Continuation will be
// blocked until this instance is elected as the current leader or
// shutting down.
elected := false
if cfg.Cluster.EnableLeaderElection {
electionCtx, cancelElection := context.WithCancel(ctx)
go func() {
<-interceptor.ShutdownChannel()
cancelElection()
}()
ltndLog.Infof("Using %v leader elector",
cfg.Cluster.LeaderElector)
leaderElector, err := cfg.Cluster.MakeLeaderElector(
electionCtx, cfg.DB,
)
if err != nil {
return err
}
defer func() {
if !elected {
return
}
ltndLog.Infof("Attempting to resign from leader role "+
"(%v)", cfg.Cluster.ID)
if err := leaderElector.Resign(); err != nil {
ltndLog.Errorf("Leader elector failed to "+
"resign: %v", err)
}
}()
ltndLog.Infof("Starting leadership campaign (%v)",
cfg.Cluster.ID)
if err := leaderElector.Campaign(electionCtx); err != nil {
ltndLog.Errorf("Leadership campaign failed: %v", err)
return err
}
elected = true
ltndLog.Infof("Elected as leader (%v)", cfg.Cluster.ID)
}
localChanDB, remoteChanDB, cleanUp, err := initializeDatabases(ctx, cfg)
switch {
case err == channeldb.ErrDryRunMigrationOK:
ltndLog.Infof("%v, exiting", err)
return nil
case err != nil:
return fmt.Errorf("unable to open databases: %v", err)
}
defer cleanUp()
var loaderOpt btcwallet.LoaderOption
if cfg.Cluster.EnableLeaderElection {
// The wallet loader will attempt to use/create the wallet in
// the replicated remote DB if we're running in a clustered
// environment. This will ensure that all members of the cluster
// have access to the same wallet state.
loaderOpt = btcwallet.LoaderWithExternalWalletDB(
remoteChanDB.Backend,
)
} else {
// When "running locally", LND will use the bbolt wallet.db to
// store the wallet located in the chain data dir, parametrized
// by the active network.
chainConfig := cfg.Bitcoin
if cfg.registeredChains.PrimaryChain() == chainreg.LitecoinChain {
chainConfig = cfg.Litecoin
}
dbDirPath := btcwallet.NetworkDir(
chainConfig.ChainDir, cfg.ActiveNetParams.Params,
)
loaderOpt = btcwallet.LoaderWithLocalWalletDB(
dbDirPath, !cfg.SyncFreelist, cfg.DB.Bolt.DBTimeout,
)
}
pwService.SetLoaderOpts([]btcwallet.LoaderOption{loaderOpt})
walletExists, err := pwService.WalletExists()
if err != nil {
return err
}
if !walletExists {
interceptorChain.SetWalletNotCreated()
} else {
interceptorChain.SetWalletLocked()
}
// We wait until the user provides a password over RPC. In case lnd is // We wait until the user provides a password over RPC. In case lnd is
// started with the --noseedbackup flag, we use the default password // started with the --noseedbackup flag, we use the default password
// for wallet encryption. // for wallet encryption.
if !cfg.NoSeedBackup { if !cfg.NoSeedBackup {
params, err := waitForWalletPassword(cfg, pwService, interceptor.ShutdownChannel()) params, err := waitForWalletPassword(
cfg, pwService, []btcwallet.LoaderOption{loaderOpt},
interceptor.ShutdownChannel(),
)
if err != nil { if err != nil {
err := fmt.Errorf("unable to set up wallet password "+ err := fmt.Errorf("unable to set up wallet password "+
"listeners: %v", err) "listeners: %v", err)
@ -543,7 +632,6 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
Birthday: walletInitParams.Birthday, Birthday: walletInitParams.Birthday,
RecoveryWindow: walletInitParams.RecoveryWindow, RecoveryWindow: walletInitParams.RecoveryWindow,
Wallet: walletInitParams.Wallet, Wallet: walletInitParams.Wallet,
DBTimeOut: cfg.DB.Bolt.DBTimeout,
NeutrinoCS: neutrinoCS, NeutrinoCS: neutrinoCS,
ActiveNetParams: cfg.ActiveNetParams, ActiveNetParams: cfg.ActiveNetParams,
FeeURL: cfg.FeeURL, FeeURL: cfg.FeeURL,
@ -551,6 +639,9 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
return cfg.net.Dial("tcp", addr, cfg.ConnectionTimeout) return cfg.net.Dial("tcp", addr, cfg.ConnectionTimeout)
}, },
BlockCacheSize: cfg.BlockCacheSize, BlockCacheSize: cfg.BlockCacheSize,
LoaderOptions: []btcwallet.LoaderOption{
loaderOpt,
},
} }
activeChainControl, cleanup, err := chainreg.NewChainControl( activeChainControl, cleanup, err := chainreg.NewChainControl(
@ -1157,10 +1248,11 @@ func createWalletUnlockerService(cfg *Config) *walletunlocker.UnlockerService {
macaroonFiles := []string{ macaroonFiles := []string{
cfg.AdminMacPath, cfg.ReadMacPath, cfg.InvoiceMacPath, cfg.AdminMacPath, cfg.ReadMacPath, cfg.InvoiceMacPath,
} }
return walletunlocker.New( return walletunlocker.New(
chainConfig.ChainDir, cfg.ActiveNetParams.Params, chainConfig.ChainDir, cfg.ActiveNetParams.Params,
!cfg.SyncFreelist, macaroonFiles, cfg.DB.Bolt.DBTimeout, !cfg.SyncFreelist, macaroonFiles, cfg.DB.Bolt.DBTimeout,
cfg.ResetWalletTransactions, cfg.ResetWalletTransactions, nil,
) )
} }
@ -1327,12 +1419,8 @@ func startRestProxy(cfg *Config, rpcServer *rpcServer, restDialOpts []grpc.DialO
// this RPC server. // this RPC server.
func waitForWalletPassword(cfg *Config, func waitForWalletPassword(cfg *Config,
pwService *walletunlocker.UnlockerService, pwService *walletunlocker.UnlockerService,
shutdownChan <-chan struct{}) (*WalletUnlockParams, error) { loaderOpts []btcwallet.LoaderOption, shutdownChan <-chan struct{}) (
*WalletUnlockParams, error) {
chainConfig := cfg.Bitcoin
if cfg.registeredChains.PrimaryChain() == chainreg.LitecoinChain {
chainConfig = cfg.Litecoin
}
// Wait for user to provide the password. // Wait for user to provide the password.
ltndLog.Infof("Waiting for wallet encryption password. Use `lncli " + ltndLog.Infof("Waiting for wallet encryption password. Use `lncli " +
@ -1364,13 +1452,13 @@ func waitForWalletPassword(cfg *Config,
keychain.KeyDerivationVersion) keychain.KeyDerivationVersion)
} }
netDir := btcwallet.NetworkDir( loader, err := btcwallet.NewWalletLoader(
chainConfig.ChainDir, cfg.ActiveNetParams.Params, cfg.ActiveNetParams.Params, recoveryWindow,
) loaderOpts...,
loader := wallet.NewLoader(
cfg.ActiveNetParams.Params, netDir, !cfg.SyncFreelist,
cfg.DB.Bolt.DBTimeout, recoveryWindow,
) )
if err != nil {
return nil, err
}
// With the seed, we can now use the wallet loader to create // With the seed, we can now use the wallet loader to create
// the wallet, then pass it back to avoid unlocking it again. // the wallet, then pass it back to avoid unlocking it again.
@ -1455,9 +1543,7 @@ func initializeDatabases(ctx context.Context,
startOpenTime := time.Now() startOpenTime := time.Now()
databaseBackends, err := cfg.DB.GetBackends( databaseBackends, err := cfg.DB.GetBackends(ctx, cfg.localDatabaseDir())
ctx, cfg.localDatabaseDir(), cfg.networkName(),
)
if err != nil { if err != nil {
return nil, nil, nil, fmt.Errorf("unable to obtain database "+ return nil, nil, nil, fmt.Errorf("unable to obtain database "+
"backends: %v", err) "backends: %v", err)

@ -1,444 +1,726 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: autopilotrpc/autopilot.proto // source: autopilotrpc/autopilot.proto
package autopilotrpc package autopilotrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type StatusRequest struct { type StatusRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (x *StatusRequest) Reset() {
func (m *StatusRequest) String() string { return proto.CompactTextString(m) } *x = StatusRequest{}
func (*StatusRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatusRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusRequest) ProtoMessage() {}
func (x *StatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) Descriptor() ([]byte, []int) { func (*StatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{0} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{0}
} }
func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusRequest.Unmarshal(m, b)
}
func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic)
}
func (m *StatusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusRequest.Merge(m, src)
}
func (m *StatusRequest) XXX_Size() int {
return xxx_messageInfo_StatusRequest.Size(m)
}
func (m *StatusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_StatusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_StatusRequest proto.InternalMessageInfo
type StatusResponse struct { type StatusResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Indicates whether the autopilot is active or not. // Indicates whether the autopilot is active or not.
Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (x *StatusResponse) Reset() {
func (m *StatusResponse) String() string { return proto.CompactTextString(m) } *x = StatusResponse{}
func (*StatusResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusResponse) ProtoMessage() {}
func (x *StatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) Descriptor() ([]byte, []int) { func (*StatusResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{1} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{1}
} }
func (m *StatusResponse) XXX_Unmarshal(b []byte) error { func (x *StatusResponse) GetActive() bool {
return xxx_messageInfo_StatusResponse.Unmarshal(m, b) if x != nil {
} return x.Active
func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic)
}
func (m *StatusResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusResponse.Merge(m, src)
}
func (m *StatusResponse) XXX_Size() int {
return xxx_messageInfo_StatusResponse.Size(m)
}
func (m *StatusResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StatusResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StatusResponse proto.InternalMessageInfo
func (m *StatusResponse) GetActive() bool {
if m != nil {
return m.Active
} }
return false return false
} }
type ModifyStatusRequest struct { type ModifyStatusRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the autopilot agent should be enabled or not. // Whether the autopilot agent should be enabled or not.
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ModifyStatusRequest) Reset() { *m = ModifyStatusRequest{} } func (x *ModifyStatusRequest) Reset() {
func (m *ModifyStatusRequest) String() string { return proto.CompactTextString(m) } *x = ModifyStatusRequest{}
func (*ModifyStatusRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ModifyStatusRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModifyStatusRequest) ProtoMessage() {}
func (x *ModifyStatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ModifyStatusRequest.ProtoReflect.Descriptor instead.
func (*ModifyStatusRequest) Descriptor() ([]byte, []int) { func (*ModifyStatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{2} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{2}
} }
func (m *ModifyStatusRequest) XXX_Unmarshal(b []byte) error { func (x *ModifyStatusRequest) GetEnable() bool {
return xxx_messageInfo_ModifyStatusRequest.Unmarshal(m, b) if x != nil {
} return x.Enable
func (m *ModifyStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyStatusRequest.Marshal(b, m, deterministic)
}
func (m *ModifyStatusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyStatusRequest.Merge(m, src)
}
func (m *ModifyStatusRequest) XXX_Size() int {
return xxx_messageInfo_ModifyStatusRequest.Size(m)
}
func (m *ModifyStatusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyStatusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyStatusRequest proto.InternalMessageInfo
func (m *ModifyStatusRequest) GetEnable() bool {
if m != nil {
return m.Enable
} }
return false return false
} }
type ModifyStatusResponse struct { type ModifyStatusResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *ModifyStatusResponse) Reset() { *m = ModifyStatusResponse{} } func (x *ModifyStatusResponse) Reset() {
func (m *ModifyStatusResponse) String() string { return proto.CompactTextString(m) } *x = ModifyStatusResponse{}
func (*ModifyStatusResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ModifyStatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModifyStatusResponse) ProtoMessage() {}
func (x *ModifyStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ModifyStatusResponse.ProtoReflect.Descriptor instead.
func (*ModifyStatusResponse) Descriptor() ([]byte, []int) { func (*ModifyStatusResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{3} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{3}
} }
func (m *ModifyStatusResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyStatusResponse.Unmarshal(m, b)
}
func (m *ModifyStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyStatusResponse.Marshal(b, m, deterministic)
}
func (m *ModifyStatusResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyStatusResponse.Merge(m, src)
}
func (m *ModifyStatusResponse) XXX_Size() int {
return xxx_messageInfo_ModifyStatusResponse.Size(m)
}
func (m *ModifyStatusResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyStatusResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyStatusResponse proto.InternalMessageInfo
type QueryScoresRequest struct { type QueryScoresRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pubkeys []string `protobuf:"bytes,1,rep,name=pubkeys,proto3" json:"pubkeys,omitempty"` Pubkeys []string `protobuf:"bytes,1,rep,name=pubkeys,proto3" json:"pubkeys,omitempty"`
// If set, we will ignore the local channel state when calculating scores. // If set, we will ignore the local channel state when calculating scores.
IgnoreLocalState bool `protobuf:"varint,2,opt,name=ignore_local_state,json=ignoreLocalState,proto3" json:"ignore_local_state,omitempty"` IgnoreLocalState bool `protobuf:"varint,2,opt,name=ignore_local_state,json=ignoreLocalState,proto3" json:"ignore_local_state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *QueryScoresRequest) Reset() { *m = QueryScoresRequest{} } func (x *QueryScoresRequest) Reset() {
func (m *QueryScoresRequest) String() string { return proto.CompactTextString(m) } *x = QueryScoresRequest{}
func (*QueryScoresRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryScoresRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryScoresRequest) ProtoMessage() {}
func (x *QueryScoresRequest) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryScoresRequest.ProtoReflect.Descriptor instead.
func (*QueryScoresRequest) Descriptor() ([]byte, []int) { func (*QueryScoresRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{4} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{4}
} }
func (m *QueryScoresRequest) XXX_Unmarshal(b []byte) error { func (x *QueryScoresRequest) GetPubkeys() []string {
return xxx_messageInfo_QueryScoresRequest.Unmarshal(m, b) if x != nil {
} return x.Pubkeys
func (m *QueryScoresRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryScoresRequest.Marshal(b, m, deterministic)
}
func (m *QueryScoresRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryScoresRequest.Merge(m, src)
}
func (m *QueryScoresRequest) XXX_Size() int {
return xxx_messageInfo_QueryScoresRequest.Size(m)
}
func (m *QueryScoresRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryScoresRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryScoresRequest proto.InternalMessageInfo
func (m *QueryScoresRequest) GetPubkeys() []string {
if m != nil {
return m.Pubkeys
} }
return nil return nil
} }
func (m *QueryScoresRequest) GetIgnoreLocalState() bool { func (x *QueryScoresRequest) GetIgnoreLocalState() bool {
if m != nil { if x != nil {
return m.IgnoreLocalState return x.IgnoreLocalState
} }
return false return false
} }
type QueryScoresResponse struct { type QueryScoresResponse struct {
Results []*QueryScoresResponse_HeuristicResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` state protoimpl.MessageState
XXX_NoUnkeyedLiteral struct{} `json:"-"` sizeCache protoimpl.SizeCache
XXX_unrecognized []byte `json:"-"` unknownFields protoimpl.UnknownFields
XXX_sizecache int32 `json:"-"`
Results []*QueryScoresResponse_HeuristicResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
} }
func (m *QueryScoresResponse) Reset() { *m = QueryScoresResponse{} } func (x *QueryScoresResponse) Reset() {
func (m *QueryScoresResponse) String() string { return proto.CompactTextString(m) } *x = QueryScoresResponse{}
func (*QueryScoresResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryScoresResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryScoresResponse) ProtoMessage() {}
func (x *QueryScoresResponse) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryScoresResponse.ProtoReflect.Descriptor instead.
func (*QueryScoresResponse) Descriptor() ([]byte, []int) { func (*QueryScoresResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{5} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{5}
} }
func (m *QueryScoresResponse) XXX_Unmarshal(b []byte) error { func (x *QueryScoresResponse) GetResults() []*QueryScoresResponse_HeuristicResult {
return xxx_messageInfo_QueryScoresResponse.Unmarshal(m, b) if x != nil {
} return x.Results
func (m *QueryScoresResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryScoresResponse.Marshal(b, m, deterministic)
}
func (m *QueryScoresResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryScoresResponse.Merge(m, src)
}
func (m *QueryScoresResponse) XXX_Size() int {
return xxx_messageInfo_QueryScoresResponse.Size(m)
}
func (m *QueryScoresResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryScoresResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryScoresResponse proto.InternalMessageInfo
func (m *QueryScoresResponse) GetResults() []*QueryScoresResponse_HeuristicResult {
if m != nil {
return m.Results
}
return nil
}
type QueryScoresResponse_HeuristicResult struct {
Heuristic string `protobuf:"bytes,1,opt,name=heuristic,proto3" json:"heuristic,omitempty"`
Scores map[string]float64 `protobuf:"bytes,2,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryScoresResponse_HeuristicResult) Reset() { *m = QueryScoresResponse_HeuristicResult{} }
func (m *QueryScoresResponse_HeuristicResult) String() string { return proto.CompactTextString(m) }
func (*QueryScoresResponse_HeuristicResult) ProtoMessage() {}
func (*QueryScoresResponse_HeuristicResult) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{5, 0}
}
func (m *QueryScoresResponse_HeuristicResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryScoresResponse_HeuristicResult.Unmarshal(m, b)
}
func (m *QueryScoresResponse_HeuristicResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryScoresResponse_HeuristicResult.Marshal(b, m, deterministic)
}
func (m *QueryScoresResponse_HeuristicResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryScoresResponse_HeuristicResult.Merge(m, src)
}
func (m *QueryScoresResponse_HeuristicResult) XXX_Size() int {
return xxx_messageInfo_QueryScoresResponse_HeuristicResult.Size(m)
}
func (m *QueryScoresResponse_HeuristicResult) XXX_DiscardUnknown() {
xxx_messageInfo_QueryScoresResponse_HeuristicResult.DiscardUnknown(m)
}
var xxx_messageInfo_QueryScoresResponse_HeuristicResult proto.InternalMessageInfo
func (m *QueryScoresResponse_HeuristicResult) GetHeuristic() string {
if m != nil {
return m.Heuristic
}
return ""
}
func (m *QueryScoresResponse_HeuristicResult) GetScores() map[string]float64 {
if m != nil {
return m.Scores
} }
return nil return nil
} }
type SetScoresRequest struct { type SetScoresRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the heuristic to provide scores to. // The name of the heuristic to provide scores to.
Heuristic string `protobuf:"bytes,1,opt,name=heuristic,proto3" json:"heuristic,omitempty"` Heuristic string `protobuf:"bytes,1,opt,name=heuristic,proto3" json:"heuristic,omitempty"`
// //
//A map from hex-encoded public keys to scores. Scores must be in the range //A map from hex-encoded public keys to scores. Scores must be in the range
//[0.0, 1.0]. //[0.0, 1.0].
Scores map[string]float64 `protobuf:"bytes,2,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` Scores map[string]float64 `protobuf:"bytes,2,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SetScoresRequest) Reset() { *m = SetScoresRequest{} } func (x *SetScoresRequest) Reset() {
func (m *SetScoresRequest) String() string { return proto.CompactTextString(m) } *x = SetScoresRequest{}
func (*SetScoresRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetScoresRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetScoresRequest) ProtoMessage() {}
func (x *SetScoresRequest) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetScoresRequest.ProtoReflect.Descriptor instead.
func (*SetScoresRequest) Descriptor() ([]byte, []int) { func (*SetScoresRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{6} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{6}
} }
func (m *SetScoresRequest) XXX_Unmarshal(b []byte) error { func (x *SetScoresRequest) GetHeuristic() string {
return xxx_messageInfo_SetScoresRequest.Unmarshal(m, b) if x != nil {
} return x.Heuristic
func (m *SetScoresRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SetScoresRequest.Marshal(b, m, deterministic)
}
func (m *SetScoresRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SetScoresRequest.Merge(m, src)
}
func (m *SetScoresRequest) XXX_Size() int {
return xxx_messageInfo_SetScoresRequest.Size(m)
}
func (m *SetScoresRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SetScoresRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SetScoresRequest proto.InternalMessageInfo
func (m *SetScoresRequest) GetHeuristic() string {
if m != nil {
return m.Heuristic
} }
return "" return ""
} }
func (m *SetScoresRequest) GetScores() map[string]float64 { func (x *SetScoresRequest) GetScores() map[string]float64 {
if m != nil { if x != nil {
return m.Scores return x.Scores
} }
return nil return nil
} }
type SetScoresResponse struct { type SetScoresResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *SetScoresResponse) Reset() { *m = SetScoresResponse{} } func (x *SetScoresResponse) Reset() {
func (m *SetScoresResponse) String() string { return proto.CompactTextString(m) } *x = SetScoresResponse{}
func (*SetScoresResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetScoresResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetScoresResponse) ProtoMessage() {}
func (x *SetScoresResponse) ProtoReflect() protoreflect.Message {
mi := &file_autopilotrpc_autopilot_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetScoresResponse.ProtoReflect.Descriptor instead.
func (*SetScoresResponse) Descriptor() ([]byte, []int) { func (*SetScoresResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e0b9dc347a92e084, []int{7} return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{7}
} }
func (m *SetScoresResponse) XXX_Unmarshal(b []byte) error { type QueryScoresResponse_HeuristicResult struct {
return xxx_messageInfo_SetScoresResponse.Unmarshal(m, b) state protoimpl.MessageState
} sizeCache protoimpl.SizeCache
func (m *SetScoresResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { unknownFields protoimpl.UnknownFields
return xxx_messageInfo_SetScoresResponse.Marshal(b, m, deterministic)
} Heuristic string `protobuf:"bytes,1,opt,name=heuristic,proto3" json:"heuristic,omitempty"`
func (m *SetScoresResponse) XXX_Merge(src proto.Message) { Scores map[string]float64 `protobuf:"bytes,2,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
xxx_messageInfo_SetScoresResponse.Merge(m, src)
}
func (m *SetScoresResponse) XXX_Size() int {
return xxx_messageInfo_SetScoresResponse.Size(m)
}
func (m *SetScoresResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SetScoresResponse.DiscardUnknown(m)
} }
var xxx_messageInfo_SetScoresResponse proto.InternalMessageInfo func (x *QueryScoresResponse_HeuristicResult) Reset() {
*x = QueryScoresResponse_HeuristicResult{}
func init() { if protoimpl.UnsafeEnabled {
proto.RegisterType((*StatusRequest)(nil), "autopilotrpc.StatusRequest") mi := &file_autopilotrpc_autopilot_proto_msgTypes[8]
proto.RegisterType((*StatusResponse)(nil), "autopilotrpc.StatusResponse") ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
proto.RegisterType((*ModifyStatusRequest)(nil), "autopilotrpc.ModifyStatusRequest") ms.StoreMessageInfo(mi)
proto.RegisterType((*ModifyStatusResponse)(nil), "autopilotrpc.ModifyStatusResponse") }
proto.RegisterType((*QueryScoresRequest)(nil), "autopilotrpc.QueryScoresRequest")
proto.RegisterType((*QueryScoresResponse)(nil), "autopilotrpc.QueryScoresResponse")
proto.RegisterType((*QueryScoresResponse_HeuristicResult)(nil), "autopilotrpc.QueryScoresResponse.HeuristicResult")
proto.RegisterMapType((map[string]float64)(nil), "autopilotrpc.QueryScoresResponse.HeuristicResult.ScoresEntry")
proto.RegisterType((*SetScoresRequest)(nil), "autopilotrpc.SetScoresRequest")
proto.RegisterMapType((map[string]float64)(nil), "autopilotrpc.SetScoresRequest.ScoresEntry")
proto.RegisterType((*SetScoresResponse)(nil), "autopilotrpc.SetScoresResponse")
} }
func init() { proto.RegisterFile("autopilotrpc/autopilot.proto", fileDescriptor_e0b9dc347a92e084) } func (x *QueryScoresResponse_HeuristicResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
var fileDescriptor_e0b9dc347a92e084 = []byte{ func (*QueryScoresResponse_HeuristicResult) ProtoMessage() {}
// 468 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x8b, 0xd3, 0x40, func (x *QueryScoresResponse_HeuristicResult) ProtoReflect() protoreflect.Message {
0x14, 0xc7, 0x49, 0x16, 0xbb, 0xe6, 0x75, 0x75, 0xeb, 0x74, 0x59, 0x42, 0x2c, 0xda, 0xcd, 0xa9, mi := &file_autopilotrpc_autopilot_proto_msgTypes[8]
0x88, 0xa6, 0x58, 0x3d, 0xa8, 0xe0, 0xc1, 0x15, 0x41, 0x70, 0x3d, 0x38, 0x65, 0x2f, 0x22, 0x2c, if protoimpl.UnsafeEnabled && x != nil {
0x69, 0x76, 0x6c, 0x87, 0x8e, 0x33, 0x71, 0xe6, 0xcd, 0x4a, 0xfe, 0x21, 0xaf, 0xfe, 0x0d, 0x1e, ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
0xfd, 0xaf, 0xa4, 0x99, 0xa4, 0x26, 0xa5, 0x56, 0x84, 0xbd, 0xe5, 0xbd, 0xef, 0x9b, 0xcf, 0x9b, if ms.LoadMessageInfo() == nil {
0xf7, 0x23, 0x03, 0x83, 0xd4, 0xa2, 0xca, 0xb9, 0x50, 0xa8, 0xf3, 0x6c, 0xbc, 0x36, 0x92, 0x5c, ms.StoreMessageInfo(mi)
0x2b, 0x54, 0xe4, 0xa0, 0xa9, 0xc6, 0x87, 0x70, 0x6b, 0x8a, 0x29, 0x5a, 0x43, 0xd9, 0x57, 0xcb, }
0x0c, 0xc6, 0x23, 0xb8, 0x5d, 0x3b, 0x4c, 0xae, 0xa4, 0x61, 0xe4, 0x18, 0x3a, 0x69, 0x86, 0xfc, return ms
0x8a, 0x85, 0xde, 0xd0, 0x1b, 0xdd, 0xa4, 0x95, 0x15, 0x3f, 0x82, 0xfe, 0x7b, 0x75, 0xc9, 0x3f, }
0x17, 0x2d, 0xc0, 0x2a, 0x9c, 0xc9, 0x74, 0x26, 0xd6, 0xe1, 0xce, 0x8a, 0x8f, 0xe1, 0xa8, 0x1d, return mi.MessageOf(x)
0xee, 0xf0, 0xf1, 0x27, 0x20, 0x1f, 0x2c, 0xd3, 0xc5, 0x34, 0x53, 0x9a, 0xad, 0x29, 0x21, 0xec, }
0xe7, 0x76, 0xb6, 0x64, 0x85, 0x09, 0xbd, 0xe1, 0xde, 0x28, 0xa0, 0xb5, 0x49, 0x1e, 0x02, 0xe1,
0x73, 0xa9, 0x34, 0xbb, 0x10, 0x2a, 0x4b, 0xc5, 0x85, 0xc1, 0x14, 0x59, 0xe8, 0x97, 0xb9, 0x7a, // Deprecated: Use QueryScoresResponse_HeuristicResult.ProtoReflect.Descriptor instead.
0x4e, 0x39, 0x5b, 0x09, 0xab, 0x34, 0x2c, 0xfe, 0xee, 0x43, 0xbf, 0x85, 0xaf, 0x8a, 0x7a, 0x07, func (*QueryScoresResponse_HeuristicResult) Descriptor() ([]byte, []int) {
0xfb, 0x9a, 0x19, 0x2b, 0xd0, 0xf1, 0xbb, 0x93, 0xc7, 0x49, 0xb3, 0x2f, 0xc9, 0x96, 0x33, 0xc9, return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{5, 0}
0x5b, 0x66, 0x35, 0x37, 0xc8, 0x33, 0x5a, 0x9e, 0xa4, 0x35, 0x21, 0xfa, 0xe9, 0xc1, 0xe1, 0x86, }
0x48, 0x06, 0x10, 0x2c, 0x6a, 0x57, 0xd9, 0x89, 0x80, 0xfe, 0x71, 0x90, 0x73, 0xe8, 0x98, 0x12,
0x1e, 0xfa, 0x65, 0xf6, 0x97, 0xff, 0x9d, 0x3d, 0x71, 0xf2, 0x1b, 0x89, 0xba, 0xa0, 0x15, 0x2c, func (x *QueryScoresResponse_HeuristicResult) GetHeuristic() string {
0x7a, 0x0e, 0xdd, 0x86, 0x9b, 0xf4, 0x60, 0x6f, 0xc9, 0x8a, 0x2a, 0xfb, 0xea, 0x93, 0x1c, 0xc1, if x != nil {
0x8d, 0xab, 0x54, 0x58, 0xd7, 0x2f, 0x8f, 0x3a, 0xe3, 0x85, 0xff, 0xcc, 0x8b, 0x7f, 0x78, 0xd0, return x.Heuristic
0x9b, 0x32, 0x6c, 0x4f, 0x61, 0x77, 0x11, 0xa7, 0x1b, 0x45, 0x3c, 0x68, 0x17, 0xb1, 0x49, 0xbb, }
0xee, 0x1b, 0xf7, 0xe1, 0x4e, 0x23, 0x85, 0xeb, 0xd2, 0xe4, 0x97, 0x0f, 0xc1, 0xab, 0xfa, 0x16, return ""
0xe4, 0x35, 0x74, 0xdc, 0xb6, 0x91, 0xbb, 0x1b, 0x77, 0x6b, 0xae, 0x6c, 0x34, 0xd8, 0x2e, 0x56, }
0xab, 0x72, 0x0e, 0x07, 0xcd, 0xc5, 0x25, 0x27, 0xed, 0xe8, 0x2d, 0xff, 0x40, 0x14, 0xef, 0x0a,
0xa9, 0xb0, 0x14, 0xba, 0x8d, 0x31, 0x93, 0xe1, 0x8e, 0x0d, 0x70, 0xd0, 0x93, 0x7f, 0xee, 0x08, func (x *QueryScoresResponse_HeuristicResult) GetScores() map[string]float64 {
0x39, 0x83, 0x60, 0xdd, 0x12, 0x72, 0x6f, 0xf7, 0x38, 0xa2, 0xfb, 0x7f, 0xd5, 0x1d, 0xed, 0xf4, if x != nil {
0xe9, 0xc7, 0xc9, 0x9c, 0xe3, 0xc2, 0xce, 0x92, 0x4c, 0x7d, 0x19, 0x0b, 0x3e, 0x5f, 0xa0, 0xe4, return x.Scores
0x72, 0x2e, 0x19, 0x7e, 0x53, 0x7a, 0x39, 0x16, 0xf2, 0x72, 0x2c, 0x64, 0xeb, 0x89, 0xd1, 0x79, }
0x36, 0xeb, 0x94, 0xcf, 0xcc, 0x93, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xb6, 0x25, 0xd7, return nil
0x86, 0x04, 0x00, 0x00, }
var File_autopilotrpc_autopilot_proto protoreflect.FileDescriptor
var file_autopilotrpc_autopilot_proto_rawDesc = []byte{
0x0a, 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x61,
0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c,
0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x22, 0x0f, 0x0a, 0x0d,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a,
0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x69, 0x66,
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c,
0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x2c,
0x0a, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73,
0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x67, 0x6e, 0x6f,
0x72, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa6, 0x02, 0x0a,
0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f,
0x74, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74,
0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x73, 0x1a, 0xc1, 0x01, 0x0a, 0x0f, 0x48, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74,
0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x75, 0x72, 0x69, 0x73,
0x74, 0x69, 0x63, 0x12, 0x55, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72,
0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x53, 0x63,
0x6f, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x63, 0x6f,
0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68,
0x65, 0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70,
0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b,
0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53, 0x63,
0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc9, 0x02, 0x0a,
0x09, 0x41, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74,
0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x55, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x21, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d,
0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70,
0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53,
0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f,
0x74, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69,
0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x72,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x53, 0x65,
0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69,
0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69,
0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67,
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70,
0x63, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_autopilotrpc_autopilot_proto_rawDescOnce sync.Once
file_autopilotrpc_autopilot_proto_rawDescData = file_autopilotrpc_autopilot_proto_rawDesc
)
func file_autopilotrpc_autopilot_proto_rawDescGZIP() []byte {
file_autopilotrpc_autopilot_proto_rawDescOnce.Do(func() {
file_autopilotrpc_autopilot_proto_rawDescData = protoimpl.X.CompressGZIP(file_autopilotrpc_autopilot_proto_rawDescData)
})
return file_autopilotrpc_autopilot_proto_rawDescData
}
var file_autopilotrpc_autopilot_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_autopilotrpc_autopilot_proto_goTypes = []interface{}{
(*StatusRequest)(nil), // 0: autopilotrpc.StatusRequest
(*StatusResponse)(nil), // 1: autopilotrpc.StatusResponse
(*ModifyStatusRequest)(nil), // 2: autopilotrpc.ModifyStatusRequest
(*ModifyStatusResponse)(nil), // 3: autopilotrpc.ModifyStatusResponse
(*QueryScoresRequest)(nil), // 4: autopilotrpc.QueryScoresRequest
(*QueryScoresResponse)(nil), // 5: autopilotrpc.QueryScoresResponse
(*SetScoresRequest)(nil), // 6: autopilotrpc.SetScoresRequest
(*SetScoresResponse)(nil), // 7: autopilotrpc.SetScoresResponse
(*QueryScoresResponse_HeuristicResult)(nil), // 8: autopilotrpc.QueryScoresResponse.HeuristicResult
nil, // 9: autopilotrpc.QueryScoresResponse.HeuristicResult.ScoresEntry
nil, // 10: autopilotrpc.SetScoresRequest.ScoresEntry
}
var file_autopilotrpc_autopilot_proto_depIdxs = []int32{
8, // 0: autopilotrpc.QueryScoresResponse.results:type_name -> autopilotrpc.QueryScoresResponse.HeuristicResult
10, // 1: autopilotrpc.SetScoresRequest.scores:type_name -> autopilotrpc.SetScoresRequest.ScoresEntry
9, // 2: autopilotrpc.QueryScoresResponse.HeuristicResult.scores:type_name -> autopilotrpc.QueryScoresResponse.HeuristicResult.ScoresEntry
0, // 3: autopilotrpc.Autopilot.Status:input_type -> autopilotrpc.StatusRequest
2, // 4: autopilotrpc.Autopilot.ModifyStatus:input_type -> autopilotrpc.ModifyStatusRequest
4, // 5: autopilotrpc.Autopilot.QueryScores:input_type -> autopilotrpc.QueryScoresRequest
6, // 6: autopilotrpc.Autopilot.SetScores:input_type -> autopilotrpc.SetScoresRequest
1, // 7: autopilotrpc.Autopilot.Status:output_type -> autopilotrpc.StatusResponse
3, // 8: autopilotrpc.Autopilot.ModifyStatus:output_type -> autopilotrpc.ModifyStatusResponse
5, // 9: autopilotrpc.Autopilot.QueryScores:output_type -> autopilotrpc.QueryScoresResponse
7, // 10: autopilotrpc.Autopilot.SetScores:output_type -> autopilotrpc.SetScoresResponse
7, // [7:11] is the sub-list for method output_type
3, // [3:7] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_autopilotrpc_autopilot_proto_init() }
func file_autopilotrpc_autopilot_proto_init() {
if File_autopilotrpc_autopilot_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_autopilotrpc_autopilot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ModifyStatusRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ModifyStatusResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryScoresRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryScoresResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetScoresRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetScoresResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_autopilotrpc_autopilot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryScoresResponse_HeuristicResult); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_autopilotrpc_autopilot_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_autopilotrpc_autopilot_proto_goTypes,
DependencyIndexes: file_autopilotrpc_autopilot_proto_depIdxs,
MessageInfos: file_autopilotrpc_autopilot_proto_msgTypes,
}.Build()
File_autopilotrpc_autopilot_proto = out.File
file_autopilotrpc_autopilot_proto_rawDesc = nil
file_autopilotrpc_autopilot_proto_goTypes = nil
file_autopilotrpc_autopilot_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// AutopilotClient is the client API for Autopilot service. // AutopilotClient is the client API for Autopilot service.
// //
@ -463,10 +745,10 @@ type AutopilotClient interface {
} }
type autopilotClient struct { type autopilotClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewAutopilotClient(cc *grpc.ClientConn) AutopilotClient { func NewAutopilotClient(cc grpc.ClientConnInterface) AutopilotClient {
return &autopilotClient{cc} return &autopilotClient{cc}
} }
@ -530,16 +812,16 @@ type AutopilotServer interface {
type UnimplementedAutopilotServer struct { type UnimplementedAutopilotServer struct {
} }
func (*UnimplementedAutopilotServer) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error) { func (*UnimplementedAutopilotServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
} }
func (*UnimplementedAutopilotServer) ModifyStatus(ctx context.Context, req *ModifyStatusRequest) (*ModifyStatusResponse, error) { func (*UnimplementedAutopilotServer) ModifyStatus(context.Context, *ModifyStatusRequest) (*ModifyStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ModifyStatus not implemented") return nil, status.Errorf(codes.Unimplemented, "method ModifyStatus not implemented")
} }
func (*UnimplementedAutopilotServer) QueryScores(ctx context.Context, req *QueryScoresRequest) (*QueryScoresResponse, error) { func (*UnimplementedAutopilotServer) QueryScores(context.Context, *QueryScoresRequest) (*QueryScoresResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method QueryScores not implemented") return nil, status.Errorf(codes.Unimplemented, "method QueryScores not implemented")
} }
func (*UnimplementedAutopilotServer) SetScores(ctx context.Context, req *SetScoresRequest) (*SetScoresResponse, error) { func (*UnimplementedAutopilotServer) SetScores(context.Context, *SetScoresRequest) (*SetScoresResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetScores not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetScores not implemented")
} }

@ -1,30 +1,39 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: chainrpc/chainnotifier.proto // source: chainrpc/chainnotifier.proto
package chainrpc package chainrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ConfRequest struct { type ConfRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The transaction hash for which we should request a confirmation notification //The transaction hash for which we should request a confirmation notification
//for. If set to a hash of all zeros, then the confirmation notification will //for. If set to a hash of all zeros, then the confirmation notification will
@ -44,66 +53,74 @@ type ConfRequest struct {
//The earliest height in the chain for which the transaction/output script //The earliest height in the chain for which the transaction/output script
//could have been included in a block. This should in most cases be set to the //could have been included in a block. This should in most cases be set to the
//broadcast height of the transaction/output script. //broadcast height of the transaction/output script.
HeightHint uint32 `protobuf:"varint,4,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"` HeightHint uint32 `protobuf:"varint,4,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ConfRequest) Reset() { *m = ConfRequest{} } func (x *ConfRequest) Reset() {
func (m *ConfRequest) String() string { return proto.CompactTextString(m) } *x = ConfRequest{}
func (*ConfRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfRequest) ProtoMessage() {}
func (x *ConfRequest) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfRequest.ProtoReflect.Descriptor instead.
func (*ConfRequest) Descriptor() ([]byte, []int) { func (*ConfRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{0} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{0}
} }
func (m *ConfRequest) XXX_Unmarshal(b []byte) error { func (x *ConfRequest) GetTxid() []byte {
return xxx_messageInfo_ConfRequest.Unmarshal(m, b) if x != nil {
} return x.Txid
func (m *ConfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfRequest.Marshal(b, m, deterministic)
}
func (m *ConfRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfRequest.Merge(m, src)
}
func (m *ConfRequest) XXX_Size() int {
return xxx_messageInfo_ConfRequest.Size(m)
}
func (m *ConfRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConfRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConfRequest proto.InternalMessageInfo
func (m *ConfRequest) GetTxid() []byte {
if m != nil {
return m.Txid
} }
return nil return nil
} }
func (m *ConfRequest) GetScript() []byte { func (x *ConfRequest) GetScript() []byte {
if m != nil { if x != nil {
return m.Script return x.Script
} }
return nil return nil
} }
func (m *ConfRequest) GetNumConfs() uint32 { func (x *ConfRequest) GetNumConfs() uint32 {
if m != nil { if x != nil {
return m.NumConfs return x.NumConfs
} }
return 0 return 0
} }
func (m *ConfRequest) GetHeightHint() uint32 { func (x *ConfRequest) GetHeightHint() uint32 {
if m != nil { if x != nil {
return m.HeightHint return x.HeightHint
} }
return 0 return 0
} }
type ConfDetails struct { type ConfDetails struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The raw bytes of the confirmed transaction. // The raw bytes of the confirmed transaction.
RawTx []byte `protobuf:"bytes,1,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` RawTx []byte `protobuf:"bytes,1,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"`
// The hash of the block in which the confirmed transaction was included in. // The hash of the block in which the confirmed transaction was included in.
@ -112,147 +129,150 @@ type ConfDetails struct {
// in. // in.
BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
// The index of the confirmed transaction within the transaction. // The index of the confirmed transaction within the transaction.
TxIndex uint32 `protobuf:"varint,4,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` TxIndex uint32 `protobuf:"varint,4,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ConfDetails) Reset() { *m = ConfDetails{} } func (x *ConfDetails) Reset() {
func (m *ConfDetails) String() string { return proto.CompactTextString(m) } *x = ConfDetails{}
func (*ConfDetails) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfDetails) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfDetails) ProtoMessage() {}
func (x *ConfDetails) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfDetails.ProtoReflect.Descriptor instead.
func (*ConfDetails) Descriptor() ([]byte, []int) { func (*ConfDetails) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{1} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{1}
} }
func (m *ConfDetails) XXX_Unmarshal(b []byte) error { func (x *ConfDetails) GetRawTx() []byte {
return xxx_messageInfo_ConfDetails.Unmarshal(m, b) if x != nil {
} return x.RawTx
func (m *ConfDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfDetails.Marshal(b, m, deterministic)
}
func (m *ConfDetails) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfDetails.Merge(m, src)
}
func (m *ConfDetails) XXX_Size() int {
return xxx_messageInfo_ConfDetails.Size(m)
}
func (m *ConfDetails) XXX_DiscardUnknown() {
xxx_messageInfo_ConfDetails.DiscardUnknown(m)
}
var xxx_messageInfo_ConfDetails proto.InternalMessageInfo
func (m *ConfDetails) GetRawTx() []byte {
if m != nil {
return m.RawTx
} }
return nil return nil
} }
func (m *ConfDetails) GetBlockHash() []byte { func (x *ConfDetails) GetBlockHash() []byte {
if m != nil { if x != nil {
return m.BlockHash return x.BlockHash
} }
return nil return nil
} }
func (m *ConfDetails) GetBlockHeight() uint32 { func (x *ConfDetails) GetBlockHeight() uint32 {
if m != nil { if x != nil {
return m.BlockHeight return x.BlockHeight
} }
return 0 return 0
} }
func (m *ConfDetails) GetTxIndex() uint32 { func (x *ConfDetails) GetTxIndex() uint32 {
if m != nil { if x != nil {
return m.TxIndex return x.TxIndex
} }
return 0 return 0
} }
type Reorg struct { type Reorg struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *Reorg) Reset() { *m = Reorg{} } func (x *Reorg) Reset() {
func (m *Reorg) String() string { return proto.CompactTextString(m) } *x = Reorg{}
func (*Reorg) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Reorg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Reorg) ProtoMessage() {}
func (x *Reorg) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Reorg.ProtoReflect.Descriptor instead.
func (*Reorg) Descriptor() ([]byte, []int) { func (*Reorg) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{2} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{2}
} }
func (m *Reorg) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Reorg.Unmarshal(m, b)
}
func (m *Reorg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Reorg.Marshal(b, m, deterministic)
}
func (m *Reorg) XXX_Merge(src proto.Message) {
xxx_messageInfo_Reorg.Merge(m, src)
}
func (m *Reorg) XXX_Size() int {
return xxx_messageInfo_Reorg.Size(m)
}
func (m *Reorg) XXX_DiscardUnknown() {
xxx_messageInfo_Reorg.DiscardUnknown(m)
}
var xxx_messageInfo_Reorg proto.InternalMessageInfo
type ConfEvent struct { type ConfEvent struct {
// Types that are valid to be assigned to Event: state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Event:
// *ConfEvent_Conf // *ConfEvent_Conf
// *ConfEvent_Reorg // *ConfEvent_Reorg
Event isConfEvent_Event `protobuf_oneof:"event"` Event isConfEvent_Event `protobuf_oneof:"event"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ConfEvent) Reset() { *m = ConfEvent{} } func (x *ConfEvent) Reset() {
func (m *ConfEvent) String() string { return proto.CompactTextString(m) } *x = ConfEvent{}
func (*ConfEvent) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfEvent) ProtoMessage() {}
func (x *ConfEvent) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfEvent.ProtoReflect.Descriptor instead.
func (*ConfEvent) Descriptor() ([]byte, []int) { func (*ConfEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{3} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{3}
} }
func (m *ConfEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfEvent.Unmarshal(m, b)
}
func (m *ConfEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfEvent.Marshal(b, m, deterministic)
}
func (m *ConfEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfEvent.Merge(m, src)
}
func (m *ConfEvent) XXX_Size() int {
return xxx_messageInfo_ConfEvent.Size(m)
}
func (m *ConfEvent) XXX_DiscardUnknown() {
xxx_messageInfo_ConfEvent.DiscardUnknown(m)
}
var xxx_messageInfo_ConfEvent proto.InternalMessageInfo
type isConfEvent_Event interface {
isConfEvent_Event()
}
type ConfEvent_Conf struct {
Conf *ConfDetails `protobuf:"bytes,1,opt,name=conf,proto3,oneof"`
}
type ConfEvent_Reorg struct {
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
}
func (*ConfEvent_Conf) isConfEvent_Event() {}
func (*ConfEvent_Reorg) isConfEvent_Event() {}
func (m *ConfEvent) GetEvent() isConfEvent_Event { func (m *ConfEvent) GetEvent() isConfEvent_Event {
if m != nil { if m != nil {
return m.Event return m.Event
@ -260,78 +280,104 @@ func (m *ConfEvent) GetEvent() isConfEvent_Event {
return nil return nil
} }
func (m *ConfEvent) GetConf() *ConfDetails { func (x *ConfEvent) GetConf() *ConfDetails {
if x, ok := m.GetEvent().(*ConfEvent_Conf); ok { if x, ok := x.GetEvent().(*ConfEvent_Conf); ok {
return x.Conf return x.Conf
} }
return nil return nil
} }
func (m *ConfEvent) GetReorg() *Reorg { func (x *ConfEvent) GetReorg() *Reorg {
if x, ok := m.GetEvent().(*ConfEvent_Reorg); ok { if x, ok := x.GetEvent().(*ConfEvent_Reorg); ok {
return x.Reorg return x.Reorg
} }
return nil return nil
} }
// XXX_OneofWrappers is for the internal use of the proto package. type isConfEvent_Event interface {
func (*ConfEvent) XXX_OneofWrappers() []interface{} { isConfEvent_Event()
return []interface{}{
(*ConfEvent_Conf)(nil),
(*ConfEvent_Reorg)(nil),
}
} }
type ConfEvent_Conf struct {
//
//An event that includes the confirmation details of the request
//(txid/ouput script).
Conf *ConfDetails `protobuf:"bytes,1,opt,name=conf,proto3,oneof"`
}
type ConfEvent_Reorg struct {
//
//An event send when the transaction of the request is reorged out of the
//chain.
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
}
func (*ConfEvent_Conf) isConfEvent_Event() {}
func (*ConfEvent_Reorg) isConfEvent_Event() {}
type Outpoint struct { type Outpoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The hash of the transaction. // The hash of the transaction.
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// The index of the output within the transaction. // The index of the output within the transaction.
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Outpoint) Reset() { *m = Outpoint{} } func (x *Outpoint) Reset() {
func (m *Outpoint) String() string { return proto.CompactTextString(m) } *x = Outpoint{}
func (*Outpoint) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Outpoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Outpoint) ProtoMessage() {}
func (x *Outpoint) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Outpoint.ProtoReflect.Descriptor instead.
func (*Outpoint) Descriptor() ([]byte, []int) { func (*Outpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{4} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{4}
} }
func (m *Outpoint) XXX_Unmarshal(b []byte) error { func (x *Outpoint) GetHash() []byte {
return xxx_messageInfo_Outpoint.Unmarshal(m, b) if x != nil {
} return x.Hash
func (m *Outpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Outpoint.Marshal(b, m, deterministic)
}
func (m *Outpoint) XXX_Merge(src proto.Message) {
xxx_messageInfo_Outpoint.Merge(m, src)
}
func (m *Outpoint) XXX_Size() int {
return xxx_messageInfo_Outpoint.Size(m)
}
func (m *Outpoint) XXX_DiscardUnknown() {
xxx_messageInfo_Outpoint.DiscardUnknown(m)
}
var xxx_messageInfo_Outpoint proto.InternalMessageInfo
func (m *Outpoint) GetHash() []byte {
if m != nil {
return m.Hash
} }
return nil return nil
} }
func (m *Outpoint) GetIndex() uint32 { func (x *Outpoint) GetIndex() uint32 {
if m != nil { if x != nil {
return m.Index return x.Index
} }
return 0 return 0
} }
type SpendRequest struct { type SpendRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The outpoint for which we should request a spend notification for. If set to //The outpoint for which we should request a spend notification for. If set to
//a zero outpoint, then the spend notification will be requested for the //a zero outpoint, then the spend notification will be requested for the
@ -346,59 +392,67 @@ type SpendRequest struct {
//The earliest height in the chain for which the outpoint/output script could //The earliest height in the chain for which the outpoint/output script could
//have been spent. This should in most cases be set to the broadcast height of //have been spent. This should in most cases be set to the broadcast height of
//the outpoint/output script. //the outpoint/output script.
HeightHint uint32 `protobuf:"varint,3,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"` HeightHint uint32 `protobuf:"varint,3,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SpendRequest) Reset() { *m = SpendRequest{} } func (x *SpendRequest) Reset() {
func (m *SpendRequest) String() string { return proto.CompactTextString(m) } *x = SpendRequest{}
func (*SpendRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpendRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpendRequest) ProtoMessage() {}
func (x *SpendRequest) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpendRequest.ProtoReflect.Descriptor instead.
func (*SpendRequest) Descriptor() ([]byte, []int) { func (*SpendRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{5} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{5}
} }
func (m *SpendRequest) XXX_Unmarshal(b []byte) error { func (x *SpendRequest) GetOutpoint() *Outpoint {
return xxx_messageInfo_SpendRequest.Unmarshal(m, b) if x != nil {
} return x.Outpoint
func (m *SpendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SpendRequest.Marshal(b, m, deterministic)
}
func (m *SpendRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SpendRequest.Merge(m, src)
}
func (m *SpendRequest) XXX_Size() int {
return xxx_messageInfo_SpendRequest.Size(m)
}
func (m *SpendRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SpendRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SpendRequest proto.InternalMessageInfo
func (m *SpendRequest) GetOutpoint() *Outpoint {
if m != nil {
return m.Outpoint
} }
return nil return nil
} }
func (m *SpendRequest) GetScript() []byte { func (x *SpendRequest) GetScript() []byte {
if m != nil { if x != nil {
return m.Script return x.Script
} }
return nil return nil
} }
func (m *SpendRequest) GetHeightHint() uint32 { func (x *SpendRequest) GetHeightHint() uint32 {
if m != nil { if x != nil {
return m.HeightHint return x.HeightHint
} }
return 0 return 0
} }
type SpendDetails struct { type SpendDetails struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The outpoint was that spent. // The outpoint was that spent.
SpendingOutpoint *Outpoint `protobuf:"bytes,1,opt,name=spending_outpoint,json=spendingOutpoint,proto3" json:"spending_outpoint,omitempty"` SpendingOutpoint *Outpoint `protobuf:"bytes,1,opt,name=spending_outpoint,json=spendingOutpoint,proto3" json:"spending_outpoint,omitempty"`
// The raw bytes of the spending transaction. // The raw bytes of the spending transaction.
@ -408,123 +462,119 @@ type SpendDetails struct {
// The input of the spending transaction that fulfilled the spend request. // The input of the spending transaction that fulfilled the spend request.
SpendingInputIndex uint32 `protobuf:"varint,4,opt,name=spending_input_index,json=spendingInputIndex,proto3" json:"spending_input_index,omitempty"` SpendingInputIndex uint32 `protobuf:"varint,4,opt,name=spending_input_index,json=spendingInputIndex,proto3" json:"spending_input_index,omitempty"`
// The height at which the spending transaction was included in a block. // The height at which the spending transaction was included in a block.
SpendingHeight uint32 `protobuf:"varint,5,opt,name=spending_height,json=spendingHeight,proto3" json:"spending_height,omitempty"` SpendingHeight uint32 `protobuf:"varint,5,opt,name=spending_height,json=spendingHeight,proto3" json:"spending_height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SpendDetails) Reset() { *m = SpendDetails{} } func (x *SpendDetails) Reset() {
func (m *SpendDetails) String() string { return proto.CompactTextString(m) } *x = SpendDetails{}
func (*SpendDetails) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpendDetails) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpendDetails) ProtoMessage() {}
func (x *SpendDetails) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpendDetails.ProtoReflect.Descriptor instead.
func (*SpendDetails) Descriptor() ([]byte, []int) { func (*SpendDetails) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{6} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{6}
} }
func (m *SpendDetails) XXX_Unmarshal(b []byte) error { func (x *SpendDetails) GetSpendingOutpoint() *Outpoint {
return xxx_messageInfo_SpendDetails.Unmarshal(m, b) if x != nil {
} return x.SpendingOutpoint
func (m *SpendDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SpendDetails.Marshal(b, m, deterministic)
}
func (m *SpendDetails) XXX_Merge(src proto.Message) {
xxx_messageInfo_SpendDetails.Merge(m, src)
}
func (m *SpendDetails) XXX_Size() int {
return xxx_messageInfo_SpendDetails.Size(m)
}
func (m *SpendDetails) XXX_DiscardUnknown() {
xxx_messageInfo_SpendDetails.DiscardUnknown(m)
}
var xxx_messageInfo_SpendDetails proto.InternalMessageInfo
func (m *SpendDetails) GetSpendingOutpoint() *Outpoint {
if m != nil {
return m.SpendingOutpoint
} }
return nil return nil
} }
func (m *SpendDetails) GetRawSpendingTx() []byte { func (x *SpendDetails) GetRawSpendingTx() []byte {
if m != nil { if x != nil {
return m.RawSpendingTx return x.RawSpendingTx
} }
return nil return nil
} }
func (m *SpendDetails) GetSpendingTxHash() []byte { func (x *SpendDetails) GetSpendingTxHash() []byte {
if m != nil { if x != nil {
return m.SpendingTxHash return x.SpendingTxHash
} }
return nil return nil
} }
func (m *SpendDetails) GetSpendingInputIndex() uint32 { func (x *SpendDetails) GetSpendingInputIndex() uint32 {
if m != nil { if x != nil {
return m.SpendingInputIndex return x.SpendingInputIndex
} }
return 0 return 0
} }
func (m *SpendDetails) GetSpendingHeight() uint32 { func (x *SpendDetails) GetSpendingHeight() uint32 {
if m != nil { if x != nil {
return m.SpendingHeight return x.SpendingHeight
} }
return 0 return 0
} }
type SpendEvent struct { type SpendEvent struct {
// Types that are valid to be assigned to Event: state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Event:
// *SpendEvent_Spend // *SpendEvent_Spend
// *SpendEvent_Reorg // *SpendEvent_Reorg
Event isSpendEvent_Event `protobuf_oneof:"event"` Event isSpendEvent_Event `protobuf_oneof:"event"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SpendEvent) Reset() { *m = SpendEvent{} } func (x *SpendEvent) Reset() {
func (m *SpendEvent) String() string { return proto.CompactTextString(m) } *x = SpendEvent{}
func (*SpendEvent) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpendEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpendEvent) ProtoMessage() {}
func (x *SpendEvent) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpendEvent.ProtoReflect.Descriptor instead.
func (*SpendEvent) Descriptor() ([]byte, []int) { func (*SpendEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{7} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{7}
} }
func (m *SpendEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SpendEvent.Unmarshal(m, b)
}
func (m *SpendEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SpendEvent.Marshal(b, m, deterministic)
}
func (m *SpendEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_SpendEvent.Merge(m, src)
}
func (m *SpendEvent) XXX_Size() int {
return xxx_messageInfo_SpendEvent.Size(m)
}
func (m *SpendEvent) XXX_DiscardUnknown() {
xxx_messageInfo_SpendEvent.DiscardUnknown(m)
}
var xxx_messageInfo_SpendEvent proto.InternalMessageInfo
type isSpendEvent_Event interface {
isSpendEvent_Event()
}
type SpendEvent_Spend struct {
Spend *SpendDetails `protobuf:"bytes,1,opt,name=spend,proto3,oneof"`
}
type SpendEvent_Reorg struct {
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
}
func (*SpendEvent_Spend) isSpendEvent_Event() {}
func (*SpendEvent_Reorg) isSpendEvent_Event() {}
func (m *SpendEvent) GetEvent() isSpendEvent_Event { func (m *SpendEvent) GetEvent() isSpendEvent_Event {
if m != nil { if m != nil {
return m.Event return m.Event
@ -532,138 +582,380 @@ func (m *SpendEvent) GetEvent() isSpendEvent_Event {
return nil return nil
} }
func (m *SpendEvent) GetSpend() *SpendDetails { func (x *SpendEvent) GetSpend() *SpendDetails {
if x, ok := m.GetEvent().(*SpendEvent_Spend); ok { if x, ok := x.GetEvent().(*SpendEvent_Spend); ok {
return x.Spend return x.Spend
} }
return nil return nil
} }
func (m *SpendEvent) GetReorg() *Reorg { func (x *SpendEvent) GetReorg() *Reorg {
if x, ok := m.GetEvent().(*SpendEvent_Reorg); ok { if x, ok := x.GetEvent().(*SpendEvent_Reorg); ok {
return x.Reorg return x.Reorg
} }
return nil return nil
} }
// XXX_OneofWrappers is for the internal use of the proto package. type isSpendEvent_Event interface {
func (*SpendEvent) XXX_OneofWrappers() []interface{} { isSpendEvent_Event()
return []interface{}{
(*SpendEvent_Spend)(nil),
(*SpendEvent_Reorg)(nil),
}
} }
type SpendEvent_Spend struct {
//
//An event that includes the details of the spending transaction of the
//request (outpoint/output script).
Spend *SpendDetails `protobuf:"bytes,1,opt,name=spend,proto3,oneof"`
}
type SpendEvent_Reorg struct {
//
//An event sent when the spending transaction of the request was
//reorged out of the chain.
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
}
func (*SpendEvent_Spend) isSpendEvent_Event() {}
func (*SpendEvent_Reorg) isSpendEvent_Event() {}
type BlockEpoch struct { type BlockEpoch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The hash of the block. // The hash of the block.
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// The height of the block. // The height of the block.
Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *BlockEpoch) Reset() { *m = BlockEpoch{} } func (x *BlockEpoch) Reset() {
func (m *BlockEpoch) String() string { return proto.CompactTextString(m) } *x = BlockEpoch{}
func (*BlockEpoch) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BlockEpoch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BlockEpoch) ProtoMessage() {}
func (x *BlockEpoch) ProtoReflect() protoreflect.Message {
mi := &file_chainrpc_chainnotifier_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BlockEpoch.ProtoReflect.Descriptor instead.
func (*BlockEpoch) Descriptor() ([]byte, []int) { func (*BlockEpoch) Descriptor() ([]byte, []int) {
return fileDescriptor_b10e6f8a1c9d2638, []int{8} return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{8}
} }
func (m *BlockEpoch) XXX_Unmarshal(b []byte) error { func (x *BlockEpoch) GetHash() []byte {
return xxx_messageInfo_BlockEpoch.Unmarshal(m, b) if x != nil {
} return x.Hash
func (m *BlockEpoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BlockEpoch.Marshal(b, m, deterministic)
}
func (m *BlockEpoch) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockEpoch.Merge(m, src)
}
func (m *BlockEpoch) XXX_Size() int {
return xxx_messageInfo_BlockEpoch.Size(m)
}
func (m *BlockEpoch) XXX_DiscardUnknown() {
xxx_messageInfo_BlockEpoch.DiscardUnknown(m)
}
var xxx_messageInfo_BlockEpoch proto.InternalMessageInfo
func (m *BlockEpoch) GetHash() []byte {
if m != nil {
return m.Hash
} }
return nil return nil
} }
func (m *BlockEpoch) GetHeight() uint32 { func (x *BlockEpoch) GetHeight() uint32 {
if m != nil { if x != nil {
return m.Height return x.Height
} }
return 0 return 0
} }
func init() { var File_chainrpc_chainnotifier_proto protoreflect.FileDescriptor
proto.RegisterType((*ConfRequest)(nil), "chainrpc.ConfRequest")
proto.RegisterType((*ConfDetails)(nil), "chainrpc.ConfDetails") var file_chainrpc_chainnotifier_proto_rawDesc = []byte{
proto.RegisterType((*Reorg)(nil), "chainrpc.Reorg") 0x0a, 0x1c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e,
proto.RegisterType((*ConfEvent)(nil), "chainrpc.ConfEvent") 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
proto.RegisterType((*Outpoint)(nil), "chainrpc.Outpoint") 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x77, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66,
proto.RegisterType((*SpendRequest)(nil), "chainrpc.SpendRequest") 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18,
proto.RegisterType((*SpendDetails)(nil), "chainrpc.SpendDetails") 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73,
proto.RegisterType((*SpendEvent)(nil), "chainrpc.SpendEvent") 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x72,
proto.RegisterType((*BlockEpoch)(nil), "chainrpc.BlockEpoch") 0x69, 0x70, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x73,
0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x48, 0x69, 0x6e,
0x74, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x73, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x05, 0x72, 0x61, 0x77, 0x54, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78,
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x78,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x07, 0x0a, 0x05, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x22, 0x6a,
0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x63,
0x6f, 0x6e, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x65, 0x6f, 0x72,
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x6f, 0x72,
0x67, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x08, 0x4f, 0x75,
0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
0x22, 0x77, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x2e, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75,
0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68,
0x65, 0x69, 0x67, 0x68, 0x74, 0x48, 0x69, 0x6e, 0x74, 0x22, 0xfc, 0x01, 0x0a, 0x0c, 0x53, 0x70,
0x65, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x11, 0x73, 0x70,
0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x72,
0x61, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x61, 0x77, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x54, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f,
0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73,
0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a,
0x14, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x73, 0x70, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
0x27, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6e, 0x0a, 0x0a, 0x53, 0x70, 0x65, 0x6e,
0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x00, 0x52,
0x05, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x65, 0x6f, 0x72, 0x67, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x6f, 0x72, 0x67, 0x42,
0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65,
0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x32, 0xe7, 0x01, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x69,
0x66, 0x69, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4e, 0x74, 0x66,
0x6e, 0x12, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e,
0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12,
0x43, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x6e, 0x64,
0x4e, 0x74, 0x66, 0x6e, 0x12, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63,
0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x74, 0x66, 0x6e, 0x12, 0x14,
0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45,
0x70, 0x6f, 0x63, 0x68, 0x1a, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x30, 0x01, 0x42, 0x30, 0x5a, 0x2e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74,
0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("chainrpc/chainnotifier.proto", fileDescriptor_b10e6f8a1c9d2638) } var (
file_chainrpc_chainnotifier_proto_rawDescOnce sync.Once
file_chainrpc_chainnotifier_proto_rawDescData = file_chainrpc_chainnotifier_proto_rawDesc
)
var fileDescriptor_b10e6f8a1c9d2638 = []byte{ func file_chainrpc_chainnotifier_proto_rawDescGZIP() []byte {
// 574 bytes of a gzipped FileDescriptorProto file_chainrpc_chainnotifier_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0x13, 0x3f, file_chainrpc_chainnotifier_proto_rawDescData = protoimpl.X.CompressGZIP(file_chainrpc_chainnotifier_proto_rawDescData)
0x10, 0xed, 0xb6, 0xdd, 0xfc, 0x99, 0x24, 0xbf, 0xb4, 0xfe, 0xa5, 0x51, 0x5a, 0x40, 0x94, 0x3d, })
0xd0, 0x48, 0x48, 0x21, 0x0a, 0x1c, 0xb8, 0x21, 0x35, 0x14, 0x25, 0x97, 0x22, 0x6d, 0x7b, 0x5f, return file_chainrpc_chainnotifier_proto_rawDescData
0x6d, 0x37, 0x4e, 0xd6, 0xd0, 0xd8, 0x8b, 0xed, 0x90, 0xbd, 0xf2, 0x69, 0xf9, 0x12, 0x1c, 0x90, }
0x67, 0xed, 0x4d, 0x1a, 0x8a, 0x84, 0xb8, 0x79, 0x66, 0xde, 0x3e, 0xbf, 0xf1, 0x7b, 0x09, 0x3c,
0x4d, 0xd2, 0x98, 0x71, 0x99, 0x25, 0xaf, 0xf1, 0xc0, 0x85, 0x66, 0x73, 0x46, 0xe5, 0x20, 0x93, var file_chainrpc_chainnotifier_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
0x42, 0x0b, 0x52, 0x73, 0xd3, 0x60, 0x0d, 0x8d, 0xb1, 0xe0, 0xf3, 0x90, 0x7e, 0x5d, 0x51, 0xa5, var file_chainrpc_chainnotifier_proto_goTypes = []interface{}{
0x09, 0x81, 0x43, 0x9d, 0xb3, 0x59, 0xcf, 0x3b, 0xf7, 0xfa, 0xcd, 0x10, 0xcf, 0xa4, 0x0b, 0x15, (*ConfRequest)(nil), // 0: chainrpc.ConfRequest
0x95, 0x48, 0x96, 0xe9, 0xde, 0x3e, 0x76, 0x6d, 0x45, 0x9e, 0x40, 0x9d, 0xaf, 0x96, 0x51, 0x22, (*ConfDetails)(nil), // 1: chainrpc.ConfDetails
0xf8, 0x5c, 0xf5, 0x0e, 0xce, 0xbd, 0x7e, 0x2b, 0xac, 0xf1, 0xd5, 0xd2, 0xd0, 0x29, 0xf2, 0x1c, (*Reorg)(nil), // 2: chainrpc.Reorg
0x1a, 0x29, 0x65, 0x8b, 0x54, 0x47, 0x29, 0xe3, 0xba, 0x77, 0x88, 0x63, 0x28, 0x5a, 0x13, 0xc6, (*ConfEvent)(nil), // 3: chainrpc.ConfEvent
0x75, 0xf0, 0xdd, 0x2b, 0x6e, 0xfe, 0x40, 0x75, 0xcc, 0xee, 0x15, 0x39, 0x81, 0x8a, 0x8c, 0xd7, (*Outpoint)(nil), // 4: chainrpc.Outpoint
0x91, 0xce, 0xed, 0xdd, 0xbe, 0x8c, 0xd7, 0xb7, 0x39, 0x79, 0x06, 0x70, 0x77, 0x2f, 0x92, 0x2f, (*SpendRequest)(nil), // 5: chainrpc.SpendRequest
0x51, 0x1a, 0xab, 0xd4, 0x0a, 0xa8, 0x63, 0x67, 0x12, 0xab, 0x94, 0xbc, 0x80, 0xa6, 0x1d, 0x23, (*SpendDetails)(nil), // 6: chainrpc.SpendDetails
0xb3, 0x95, 0xd1, 0x28, 0x00, 0xd8, 0x22, 0xa7, 0x50, 0xd3, 0x79, 0xc4, 0xf8, 0x8c, 0xe6, 0x56, (*SpendEvent)(nil), // 7: chainrpc.SpendEvent
0x46, 0x55, 0xe7, 0x53, 0x53, 0x06, 0x55, 0xf0, 0x43, 0x2a, 0xe4, 0x22, 0xf8, 0x0c, 0x75, 0xa3, (*BlockEpoch)(nil), // 8: chainrpc.BlockEpoch
0xe5, 0xea, 0x1b, 0xe5, 0x9a, 0xbc, 0x82, 0x43, 0xb3, 0x13, 0xea, 0x68, 0x8c, 0x4e, 0x06, 0xee, }
0xad, 0x06, 0x5b, 0x72, 0x27, 0x7b, 0x21, 0x82, 0xc8, 0x05, 0xf8, 0xd2, 0x50, 0xa0, 0xb4, 0xc6, var file_chainrpc_chainnotifier_proto_depIdxs = []int32{
0xa8, 0xbd, 0x41, 0x23, 0xf3, 0x64, 0x2f, 0x2c, 0xe6, 0x97, 0x55, 0xf0, 0xa9, 0xa1, 0x0f, 0xde, 1, // 0: chainrpc.ConfEvent.conf:type_name -> chainrpc.ConfDetails
0x42, 0xed, 0xd3, 0x4a, 0x67, 0x82, 0x71, 0x7c, 0x6e, 0xdc, 0xcb, 0x3e, 0xb7, 0x39, 0x93, 0x0e, 2, // 1: chainrpc.ConfEvent.reorg:type_name -> chainrpc.Reorg
0xf8, 0x85, 0xd8, 0x7d, 0x14, 0x5b, 0x14, 0xc1, 0x1a, 0x9a, 0x37, 0x19, 0xe5, 0x33, 0x67, 0xd4, 4, // 2: chainrpc.SpendRequest.outpoint:type_name -> chainrpc.Outpoint
0x00, 0x6a, 0xc2, 0xb2, 0x58, 0xa1, 0x64, 0x73, 0xb5, 0xe3, 0x0f, 0x4b, 0xcc, 0x1f, 0x4d, 0xdc, 4, // 3: chainrpc.SpendDetails.spending_outpoint:type_name -> chainrpc.Outpoint
0xf1, 0xe9, 0xe0, 0x37, 0x9f, 0x7e, 0x7a, 0xf6, 0x66, 0x67, 0xd4, 0x7b, 0x38, 0x56, 0xa6, 0x66, 6, // 4: chainrpc.SpendEvent.spend:type_name -> chainrpc.SpendDetails
0x7c, 0x11, 0xfd, 0x85, 0x84, 0x23, 0x07, 0x2e, 0x97, 0x7e, 0x09, 0x6d, 0xe3, 0x74, 0x49, 0xa2, 2, // 5: chainrpc.SpendEvent.reorg:type_name -> chainrpc.Reorg
0x73, 0xab, 0xa9, 0x25, 0xe3, 0xf5, 0x8d, 0xed, 0xde, 0xe6, 0xa4, 0x0f, 0x47, 0x5b, 0x98, 0x22, 0, // 6: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:input_type -> chainrpc.ConfRequest
0x00, 0x07, 0x08, 0xfc, 0x4f, 0x95, 0x28, 0x4c, 0xc1, 0x10, 0x3a, 0x25, 0x92, 0xf1, 0x6c, 0xa5, 5, // 7: chainrpc.ChainNotifier.RegisterSpendNtfn:input_type -> chainrpc.SpendRequest
0x1f, 0xd8, 0x4d, 0xdc, 0x6c, 0x6a, 0x46, 0xe8, 0x3c, 0xb9, 0x80, 0x76, 0xf9, 0x85, 0x8d, 0x8e, 8, // 8: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:input_type -> chainrpc.BlockEpoch
0x8f, 0xe0, 0x92, 0xba, 0x48, 0x4f, 0xc0, 0x01, 0x50, 0x52, 0x11, 0x8d, 0x01, 0xf8, 0x38, 0xb7, 3, // 9: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:output_type -> chainrpc.ConfEvent
0xfb, 0x76, 0x37, 0xfb, 0x6e, 0x3f, 0x91, 0x31, 0x1d, 0x61, 0xff, 0x90, 0x8e, 0x77, 0x00, 0x97, 7, // 10: chainrpc.ChainNotifier.RegisterSpendNtfn:output_type -> chainrpc.SpendEvent
0x26, 0xbc, 0x57, 0x99, 0x48, 0xd2, 0x47, 0xf3, 0xd1, 0x85, 0x8a, 0x55, 0x5c, 0x04, 0xc4, 0x56, 8, // 11: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:output_type -> chainrpc.BlockEpoch
0xa3, 0x1f, 0x1e, 0xb4, 0xc6, 0x86, 0xfe, 0xda, 0xfe, 0xd6, 0xc9, 0x14, 0x4e, 0x43, 0xba, 0x60, 9, // [9:12] is the sub-list for method output_type
0x4a, 0x53, 0x69, 0xa2, 0xcb, 0xe4, 0x32, 0xd6, 0x4c, 0x70, 0x75, 0xad, 0xe7, 0x9c, 0xec, 0xe4, 6, // [6:9] is the sub-list for method input_type
0xda, 0xe6, 0xea, 0xec, 0xff, 0x87, 0x6d, 0x5c, 0x7b, 0xe8, 0x91, 0x31, 0x1c, 0x3b, 0x2a, 0xdc, 6, // [6:6] is the sub-list for extension type_name
0x14, 0x29, 0x76, 0xd7, 0x77, 0x1c, 0x9d, 0x9d, 0xbe, 0x23, 0xf9, 0x08, 0x5d, 0x47, 0xb2, 0xd9, 6, // [6:6] is the sub-list for extension extendee
0x11, 0x99, 0xb6, 0xbe, 0xd8, 0x4c, 0xce, 0x1e, 0xed, 0x0e, 0xbd, 0xbb, 0x0a, 0xfe, 0x89, 0xbd, 0, // [0:6] is the sub-list for field type_name
0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x65, 0xe6, 0xc2, 0xe4, 0xe4, 0x04, 0x00, 0x00, }
func init() { file_chainrpc_chainnotifier_proto_init() }
func file_chainrpc_chainnotifier_proto_init() {
if File_chainrpc_chainnotifier_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_chainrpc_chainnotifier_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfDetails); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Reorg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Outpoint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpendRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpendDetails); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpendEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chainrpc_chainnotifier_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BlockEpoch); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_chainrpc_chainnotifier_proto_msgTypes[3].OneofWrappers = []interface{}{
(*ConfEvent_Conf)(nil),
(*ConfEvent_Reorg)(nil),
}
file_chainrpc_chainnotifier_proto_msgTypes[7].OneofWrappers = []interface{}{
(*SpendEvent_Spend)(nil),
(*SpendEvent_Reorg)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_chainrpc_chainnotifier_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_chainrpc_chainnotifier_proto_goTypes,
DependencyIndexes: file_chainrpc_chainnotifier_proto_depIdxs,
MessageInfos: file_chainrpc_chainnotifier_proto_msgTypes,
}.Build()
File_chainrpc_chainnotifier_proto = out.File
file_chainrpc_chainnotifier_proto_rawDesc = nil
file_chainrpc_chainnotifier_proto_goTypes = nil
file_chainrpc_chainnotifier_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// ChainNotifierClient is the client API for ChainNotifier service. // ChainNotifierClient is the client API for ChainNotifier service.
// //
@ -700,10 +992,10 @@ type ChainNotifierClient interface {
} }
type chainNotifierClient struct { type chainNotifierClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewChainNotifierClient(cc *grpc.ClientConn) ChainNotifierClient { func NewChainNotifierClient(cc grpc.ClientConnInterface) ChainNotifierClient {
return &chainNotifierClient{cc} return &chainNotifierClient{cc}
} }
@ -839,13 +1131,13 @@ type ChainNotifierServer interface {
type UnimplementedChainNotifierServer struct { type UnimplementedChainNotifierServer struct {
} }
func (*UnimplementedChainNotifierServer) RegisterConfirmationsNtfn(req *ConfRequest, srv ChainNotifier_RegisterConfirmationsNtfnServer) error { func (*UnimplementedChainNotifierServer) RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error {
return status.Errorf(codes.Unimplemented, "method RegisterConfirmationsNtfn not implemented") return status.Errorf(codes.Unimplemented, "method RegisterConfirmationsNtfn not implemented")
} }
func (*UnimplementedChainNotifierServer) RegisterSpendNtfn(req *SpendRequest, srv ChainNotifier_RegisterSpendNtfnServer) error { func (*UnimplementedChainNotifierServer) RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error {
return status.Errorf(codes.Unimplemented, "method RegisterSpendNtfn not implemented") return status.Errorf(codes.Unimplemented, "method RegisterSpendNtfn not implemented")
} }
func (*UnimplementedChainNotifierServer) RegisterBlockEpochNtfn(req *BlockEpoch, srv ChainNotifier_RegisterBlockEpochNtfnServer) error { func (*UnimplementedChainNotifierServer) RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error {
return status.Errorf(codes.Unimplemented, "method RegisterBlockEpochNtfn not implemented") return status.Errorf(codes.Unimplemented, "method RegisterBlockEpochNtfn not implemented")
} }

@ -2,6 +2,8 @@ syntax = "proto3";
package chainrpc; package chainrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/chainrpc";
// ChainNotifier is a service that can be used to get information about the // ChainNotifier is a service that can be used to get information about the
// chain backend by registering notifiers for chain events. // chain backend by registering notifiers for chain events.
service ChainNotifier { service ChainNotifier {

@ -1,102 +1,126 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: invoicesrpc/invoices.proto // source: invoicesrpc/invoices.proto
package invoicesrpc package invoicesrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
lnrpc "github.com/lightningnetwork/lnd/lnrpc" lnrpc "github.com/lightningnetwork/lnd/lnrpc"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type CancelInvoiceMsg struct { type CancelInvoiceMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash corresponding to the (hold) invoice to cancel. // Hash corresponding to the (hold) invoice to cancel.
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *CancelInvoiceMsg) Reset() { *m = CancelInvoiceMsg{} } func (x *CancelInvoiceMsg) Reset() {
func (m *CancelInvoiceMsg) String() string { return proto.CompactTextString(m) } *x = CancelInvoiceMsg{}
func (*CancelInvoiceMsg) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CancelInvoiceMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CancelInvoiceMsg) ProtoMessage() {}
func (x *CancelInvoiceMsg) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CancelInvoiceMsg.ProtoReflect.Descriptor instead.
func (*CancelInvoiceMsg) Descriptor() ([]byte, []int) { func (*CancelInvoiceMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{0} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{0}
} }
func (m *CancelInvoiceMsg) XXX_Unmarshal(b []byte) error { func (x *CancelInvoiceMsg) GetPaymentHash() []byte {
return xxx_messageInfo_CancelInvoiceMsg.Unmarshal(m, b) if x != nil {
} return x.PaymentHash
func (m *CancelInvoiceMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelInvoiceMsg.Marshal(b, m, deterministic)
}
func (m *CancelInvoiceMsg) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelInvoiceMsg.Merge(m, src)
}
func (m *CancelInvoiceMsg) XXX_Size() int {
return xxx_messageInfo_CancelInvoiceMsg.Size(m)
}
func (m *CancelInvoiceMsg) XXX_DiscardUnknown() {
xxx_messageInfo_CancelInvoiceMsg.DiscardUnknown(m)
}
var xxx_messageInfo_CancelInvoiceMsg proto.InternalMessageInfo
func (m *CancelInvoiceMsg) GetPaymentHash() []byte {
if m != nil {
return m.PaymentHash
} }
return nil return nil
} }
type CancelInvoiceResp struct { type CancelInvoiceResp struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *CancelInvoiceResp) Reset() { *m = CancelInvoiceResp{} } func (x *CancelInvoiceResp) Reset() {
func (m *CancelInvoiceResp) String() string { return proto.CompactTextString(m) } *x = CancelInvoiceResp{}
func (*CancelInvoiceResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CancelInvoiceResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CancelInvoiceResp) ProtoMessage() {}
func (x *CancelInvoiceResp) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CancelInvoiceResp.ProtoReflect.Descriptor instead.
func (*CancelInvoiceResp) Descriptor() ([]byte, []int) { func (*CancelInvoiceResp) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{1} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{1}
} }
func (m *CancelInvoiceResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelInvoiceResp.Unmarshal(m, b)
}
func (m *CancelInvoiceResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelInvoiceResp.Marshal(b, m, deterministic)
}
func (m *CancelInvoiceResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelInvoiceResp.Merge(m, src)
}
func (m *CancelInvoiceResp) XXX_Size() int {
return xxx_messageInfo_CancelInvoiceResp.Size(m)
}
func (m *CancelInvoiceResp) XXX_DiscardUnknown() {
xxx_messageInfo_CancelInvoiceResp.DiscardUnknown(m)
}
var xxx_messageInfo_CancelInvoiceResp proto.InternalMessageInfo
type AddHoldInvoiceRequest struct { type AddHoldInvoiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//An optional memo to attach along with the invoice. Used for record keeping //An optional memo to attach along with the invoice. Used for record keeping
//purposes for the invoice's creator, and will also be set in the description //purposes for the invoice's creator, and will also be set in the description
@ -131,318 +155,528 @@ type AddHoldInvoiceRequest struct {
//invoice's destination. //invoice's destination.
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,8,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"` RouteHints []*lnrpc.RouteHint `protobuf:"bytes,8,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
// Whether this invoice should include routing hints for private channels. // Whether this invoice should include routing hints for private channels.
Private bool `protobuf:"varint,9,opt,name=private,proto3" json:"private,omitempty"` Private bool `protobuf:"varint,9,opt,name=private,proto3" json:"private,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *AddHoldInvoiceRequest) Reset() { *m = AddHoldInvoiceRequest{} } func (x *AddHoldInvoiceRequest) Reset() {
func (m *AddHoldInvoiceRequest) String() string { return proto.CompactTextString(m) } *x = AddHoldInvoiceRequest{}
func (*AddHoldInvoiceRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddHoldInvoiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddHoldInvoiceRequest) ProtoMessage() {}
func (x *AddHoldInvoiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddHoldInvoiceRequest.ProtoReflect.Descriptor instead.
func (*AddHoldInvoiceRequest) Descriptor() ([]byte, []int) { func (*AddHoldInvoiceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{2} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{2}
} }
func (m *AddHoldInvoiceRequest) XXX_Unmarshal(b []byte) error { func (x *AddHoldInvoiceRequest) GetMemo() string {
return xxx_messageInfo_AddHoldInvoiceRequest.Unmarshal(m, b) if x != nil {
} return x.Memo
func (m *AddHoldInvoiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddHoldInvoiceRequest.Marshal(b, m, deterministic)
}
func (m *AddHoldInvoiceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddHoldInvoiceRequest.Merge(m, src)
}
func (m *AddHoldInvoiceRequest) XXX_Size() int {
return xxx_messageInfo_AddHoldInvoiceRequest.Size(m)
}
func (m *AddHoldInvoiceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AddHoldInvoiceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AddHoldInvoiceRequest proto.InternalMessageInfo
func (m *AddHoldInvoiceRequest) GetMemo() string {
if m != nil {
return m.Memo
} }
return "" return ""
} }
func (m *AddHoldInvoiceRequest) GetHash() []byte { func (x *AddHoldInvoiceRequest) GetHash() []byte {
if m != nil { if x != nil {
return m.Hash return x.Hash
} }
return nil return nil
} }
func (m *AddHoldInvoiceRequest) GetValue() int64 { func (x *AddHoldInvoiceRequest) GetValue() int64 {
if m != nil { if x != nil {
return m.Value return x.Value
} }
return 0 return 0
} }
func (m *AddHoldInvoiceRequest) GetValueMsat() int64 { func (x *AddHoldInvoiceRequest) GetValueMsat() int64 {
if m != nil { if x != nil {
return m.ValueMsat return x.ValueMsat
} }
return 0 return 0
} }
func (m *AddHoldInvoiceRequest) GetDescriptionHash() []byte { func (x *AddHoldInvoiceRequest) GetDescriptionHash() []byte {
if m != nil { if x != nil {
return m.DescriptionHash return x.DescriptionHash
} }
return nil return nil
} }
func (m *AddHoldInvoiceRequest) GetExpiry() int64 { func (x *AddHoldInvoiceRequest) GetExpiry() int64 {
if m != nil { if x != nil {
return m.Expiry return x.Expiry
} }
return 0 return 0
} }
func (m *AddHoldInvoiceRequest) GetFallbackAddr() string { func (x *AddHoldInvoiceRequest) GetFallbackAddr() string {
if m != nil { if x != nil {
return m.FallbackAddr return x.FallbackAddr
} }
return "" return ""
} }
func (m *AddHoldInvoiceRequest) GetCltvExpiry() uint64 { func (x *AddHoldInvoiceRequest) GetCltvExpiry() uint64 {
if m != nil { if x != nil {
return m.CltvExpiry return x.CltvExpiry
} }
return 0 return 0
} }
func (m *AddHoldInvoiceRequest) GetRouteHints() []*lnrpc.RouteHint { func (x *AddHoldInvoiceRequest) GetRouteHints() []*lnrpc.RouteHint {
if m != nil { if x != nil {
return m.RouteHints return x.RouteHints
} }
return nil return nil
} }
func (m *AddHoldInvoiceRequest) GetPrivate() bool { func (x *AddHoldInvoiceRequest) GetPrivate() bool {
if m != nil { if x != nil {
return m.Private return x.Private
} }
return false return false
} }
type AddHoldInvoiceResp struct { type AddHoldInvoiceResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//A bare-bones invoice for a payment within the Lightning Network. With the //A bare-bones invoice for a payment within the Lightning Network. With the
//details of the invoice, the sender has all the data necessary to send a //details of the invoice, the sender has all the data necessary to send a
//payment to the recipient. //payment to the recipient.
PaymentRequest string `protobuf:"bytes,1,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"` PaymentRequest string `protobuf:"bytes,1,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *AddHoldInvoiceResp) Reset() { *m = AddHoldInvoiceResp{} } func (x *AddHoldInvoiceResp) Reset() {
func (m *AddHoldInvoiceResp) String() string { return proto.CompactTextString(m) } *x = AddHoldInvoiceResp{}
func (*AddHoldInvoiceResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddHoldInvoiceResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddHoldInvoiceResp) ProtoMessage() {}
func (x *AddHoldInvoiceResp) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddHoldInvoiceResp.ProtoReflect.Descriptor instead.
func (*AddHoldInvoiceResp) Descriptor() ([]byte, []int) { func (*AddHoldInvoiceResp) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{3} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{3}
} }
func (m *AddHoldInvoiceResp) XXX_Unmarshal(b []byte) error { func (x *AddHoldInvoiceResp) GetPaymentRequest() string {
return xxx_messageInfo_AddHoldInvoiceResp.Unmarshal(m, b) if x != nil {
} return x.PaymentRequest
func (m *AddHoldInvoiceResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddHoldInvoiceResp.Marshal(b, m, deterministic)
}
func (m *AddHoldInvoiceResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddHoldInvoiceResp.Merge(m, src)
}
func (m *AddHoldInvoiceResp) XXX_Size() int {
return xxx_messageInfo_AddHoldInvoiceResp.Size(m)
}
func (m *AddHoldInvoiceResp) XXX_DiscardUnknown() {
xxx_messageInfo_AddHoldInvoiceResp.DiscardUnknown(m)
}
var xxx_messageInfo_AddHoldInvoiceResp proto.InternalMessageInfo
func (m *AddHoldInvoiceResp) GetPaymentRequest() string {
if m != nil {
return m.PaymentRequest
} }
return "" return ""
} }
type SettleInvoiceMsg struct { type SettleInvoiceMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Externally discovered pre-image that should be used to settle the hold // Externally discovered pre-image that should be used to settle the hold
// invoice. // invoice.
Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"` Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SettleInvoiceMsg) Reset() { *m = SettleInvoiceMsg{} } func (x *SettleInvoiceMsg) Reset() {
func (m *SettleInvoiceMsg) String() string { return proto.CompactTextString(m) } *x = SettleInvoiceMsg{}
func (*SettleInvoiceMsg) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SettleInvoiceMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SettleInvoiceMsg) ProtoMessage() {}
func (x *SettleInvoiceMsg) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SettleInvoiceMsg.ProtoReflect.Descriptor instead.
func (*SettleInvoiceMsg) Descriptor() ([]byte, []int) { func (*SettleInvoiceMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{4} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{4}
} }
func (m *SettleInvoiceMsg) XXX_Unmarshal(b []byte) error { func (x *SettleInvoiceMsg) GetPreimage() []byte {
return xxx_messageInfo_SettleInvoiceMsg.Unmarshal(m, b) if x != nil {
} return x.Preimage
func (m *SettleInvoiceMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SettleInvoiceMsg.Marshal(b, m, deterministic)
}
func (m *SettleInvoiceMsg) XXX_Merge(src proto.Message) {
xxx_messageInfo_SettleInvoiceMsg.Merge(m, src)
}
func (m *SettleInvoiceMsg) XXX_Size() int {
return xxx_messageInfo_SettleInvoiceMsg.Size(m)
}
func (m *SettleInvoiceMsg) XXX_DiscardUnknown() {
xxx_messageInfo_SettleInvoiceMsg.DiscardUnknown(m)
}
var xxx_messageInfo_SettleInvoiceMsg proto.InternalMessageInfo
func (m *SettleInvoiceMsg) GetPreimage() []byte {
if m != nil {
return m.Preimage
} }
return nil return nil
} }
type SettleInvoiceResp struct { type SettleInvoiceResp struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *SettleInvoiceResp) Reset() { *m = SettleInvoiceResp{} } func (x *SettleInvoiceResp) Reset() {
func (m *SettleInvoiceResp) String() string { return proto.CompactTextString(m) } *x = SettleInvoiceResp{}
func (*SettleInvoiceResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SettleInvoiceResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SettleInvoiceResp) ProtoMessage() {}
func (x *SettleInvoiceResp) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SettleInvoiceResp.ProtoReflect.Descriptor instead.
func (*SettleInvoiceResp) Descriptor() ([]byte, []int) { func (*SettleInvoiceResp) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{5} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{5}
} }
func (m *SettleInvoiceResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SettleInvoiceResp.Unmarshal(m, b)
}
func (m *SettleInvoiceResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SettleInvoiceResp.Marshal(b, m, deterministic)
}
func (m *SettleInvoiceResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_SettleInvoiceResp.Merge(m, src)
}
func (m *SettleInvoiceResp) XXX_Size() int {
return xxx_messageInfo_SettleInvoiceResp.Size(m)
}
func (m *SettleInvoiceResp) XXX_DiscardUnknown() {
xxx_messageInfo_SettleInvoiceResp.DiscardUnknown(m)
}
var xxx_messageInfo_SettleInvoiceResp proto.InternalMessageInfo
type SubscribeSingleInvoiceRequest struct { type SubscribeSingleInvoiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash corresponding to the (hold) invoice to subscribe to. // Hash corresponding to the (hold) invoice to subscribe to.
RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"` RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SubscribeSingleInvoiceRequest) Reset() { *m = SubscribeSingleInvoiceRequest{} } func (x *SubscribeSingleInvoiceRequest) Reset() {
func (m *SubscribeSingleInvoiceRequest) String() string { return proto.CompactTextString(m) } *x = SubscribeSingleInvoiceRequest{}
func (*SubscribeSingleInvoiceRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_invoicesrpc_invoices_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscribeSingleInvoiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscribeSingleInvoiceRequest) ProtoMessage() {}
func (x *SubscribeSingleInvoiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_invoicesrpc_invoices_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscribeSingleInvoiceRequest.ProtoReflect.Descriptor instead.
func (*SubscribeSingleInvoiceRequest) Descriptor() ([]byte, []int) { func (*SubscribeSingleInvoiceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_090ab9c4958b987d, []int{6} return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{6}
} }
func (m *SubscribeSingleInvoiceRequest) XXX_Unmarshal(b []byte) error { func (x *SubscribeSingleInvoiceRequest) GetRHash() []byte {
return xxx_messageInfo_SubscribeSingleInvoiceRequest.Unmarshal(m, b) if x != nil {
} return x.RHash
func (m *SubscribeSingleInvoiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SubscribeSingleInvoiceRequest.Marshal(b, m, deterministic)
}
func (m *SubscribeSingleInvoiceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubscribeSingleInvoiceRequest.Merge(m, src)
}
func (m *SubscribeSingleInvoiceRequest) XXX_Size() int {
return xxx_messageInfo_SubscribeSingleInvoiceRequest.Size(m)
}
func (m *SubscribeSingleInvoiceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SubscribeSingleInvoiceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SubscribeSingleInvoiceRequest proto.InternalMessageInfo
func (m *SubscribeSingleInvoiceRequest) GetRHash() []byte {
if m != nil {
return m.RHash
} }
return nil return nil
} }
func init() { var File_invoicesrpc_invoices_proto protoreflect.FileDescriptor
proto.RegisterType((*CancelInvoiceMsg)(nil), "invoicesrpc.CancelInvoiceMsg")
proto.RegisterType((*CancelInvoiceResp)(nil), "invoicesrpc.CancelInvoiceResp") var file_invoicesrpc_invoices_proto_rawDesc = []byte{
proto.RegisterType((*AddHoldInvoiceRequest)(nil), "invoicesrpc.AddHoldInvoiceRequest") 0x0a, 0x1a, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e,
proto.RegisterType((*AddHoldInvoiceResp)(nil), "invoicesrpc.AddHoldInvoiceResp") 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x6e,
proto.RegisterType((*SettleInvoiceMsg)(nil), "invoicesrpc.SettleInvoiceMsg") 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x1a, 0x09, 0x72, 0x70, 0x63, 0x2e, 0x70,
proto.RegisterType((*SettleInvoiceResp)(nil), "invoicesrpc.SettleInvoiceResp") 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e,
proto.RegisterType((*SubscribeSingleInvoiceRequest)(nil), "invoicesrpc.SubscribeSingleInvoiceRequest") 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b,
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x13, 0x0a, 0x11, 0x43,
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x22, 0xca, 0x02, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65,
0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x12,
0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61,
0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61,
0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61,
0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x12,
0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x07,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79,
0x12, 0x31, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69,
0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x3d, 0x0a,
0x12, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52,
0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x10,
0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x13, 0x0a, 0x11,
0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x22, 0x3c, 0x0a, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69,
0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x32,
0xd9, 0x02, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x16,
0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69,
0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69,
0x63, 0x65, 0x30, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e,
0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73,
0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
0x65, 0x4d, 0x73, 0x67, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
0x73, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f,
0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x76,
0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64,
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0d, 0x53,
0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69,
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c,
0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x1e, 0x2e, 0x69, 0x6e,
0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65,
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x33, 0x5a, 0x31, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e,
0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("invoicesrpc/invoices.proto", fileDescriptor_090ab9c4958b987d) } var (
file_invoicesrpc_invoices_proto_rawDescOnce sync.Once
file_invoicesrpc_invoices_proto_rawDescData = file_invoicesrpc_invoices_proto_rawDesc
)
var fileDescriptor_090ab9c4958b987d = []byte{ func file_invoicesrpc_invoices_proto_rawDescGZIP() []byte {
// 523 bytes of a gzipped FileDescriptorProto file_invoicesrpc_invoices_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, file_invoicesrpc_invoices_proto_rawDescData = protoimpl.X.CompressGZIP(file_invoicesrpc_invoices_proto_rawDescData)
0x10, 0x95, 0xf3, 0xd5, 0x64, 0x92, 0xa6, 0x61, 0xa1, 0x95, 0x65, 0x29, 0x34, 0x98, 0x03, 0x81, })
0x83, 0x43, 0x5b, 0x71, 0x83, 0x43, 0x41, 0x48, 0x01, 0xa9, 0x1c, 0x1c, 0xc1, 0x81, 0x8b, 0xb5, return file_invoicesrpc_invoices_proto_rawDescData
0xb1, 0x17, 0x7b, 0xd5, 0xf5, 0x7a, 0xd9, 0xdd, 0x04, 0xfa, 0x17, 0xf9, 0x07, 0xfc, 0x1b, 0xe4, }
0xf5, 0xa6, 0xb2, 0x43, 0xdb, 0xdb, 0xcc, 0x9b, 0xd9, 0xe7, 0xa7, 0xf7, 0xc6, 0xe0, 0x51, 0xbe,
0x2d, 0x68, 0x4c, 0x94, 0x14, 0xf1, 0x62, 0x57, 0x07, 0x42, 0x16, 0xba, 0x40, 0xc3, 0xda, 0xcc, var file_invoicesrpc_invoices_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
0x1b, 0x48, 0x11, 0x57, 0xb8, 0xff, 0x06, 0x26, 0x1f, 0x30, 0x8f, 0x09, 0xfb, 0x54, 0xcd, 0xaf, var file_invoicesrpc_invoices_proto_goTypes = []interface{}{
0x54, 0x8a, 0x9e, 0xc1, 0x48, 0xe0, 0x9b, 0x9c, 0x70, 0x1d, 0x65, 0x58, 0x65, 0xae, 0x33, 0x73, (*CancelInvoiceMsg)(nil), // 0: invoicesrpc.CancelInvoiceMsg
0xe6, 0xa3, 0x70, 0x68, 0xb1, 0x25, 0x56, 0x99, 0xff, 0x18, 0x1e, 0x35, 0x9e, 0x85, 0x44, 0x09, (*CancelInvoiceResp)(nil), // 1: invoicesrpc.CancelInvoiceResp
0xff, 0x4f, 0x0b, 0x8e, 0x2f, 0x93, 0x64, 0x59, 0xb0, 0xe4, 0x16, 0xfe, 0xb9, 0x21, 0x4a, 0x23, (*AddHoldInvoiceRequest)(nil), // 2: invoicesrpc.AddHoldInvoiceRequest
0x04, 0x9d, 0x9c, 0xe4, 0x85, 0x61, 0x1a, 0x84, 0xa6, 0x2e, 0x31, 0xc3, 0xde, 0x32, 0xec, 0xa6, (*AddHoldInvoiceResp)(nil), // 3: invoicesrpc.AddHoldInvoiceResp
0x46, 0x4f, 0xa0, 0xbb, 0xc5, 0x6c, 0x43, 0xdc, 0xf6, 0xcc, 0x99, 0xb7, 0xc3, 0xaa, 0x41, 0x53, (*SettleInvoiceMsg)(nil), // 4: invoicesrpc.SettleInvoiceMsg
0x00, 0x53, 0x44, 0xb9, 0xc2, 0xda, 0x05, 0x33, 0x1a, 0x18, 0xe4, 0x4a, 0x61, 0x8d, 0x5e, 0xc2, (*SettleInvoiceResp)(nil), // 5: invoicesrpc.SettleInvoiceResp
0x24, 0x21, 0x2a, 0x96, 0x54, 0x68, 0x5a, 0xf0, 0x4a, 0x72, 0xc7, 0x90, 0x1e, 0xd5, 0xf0, 0x52, (*SubscribeSingleInvoiceRequest)(nil), // 6: invoicesrpc.SubscribeSingleInvoiceRequest
0x36, 0x3a, 0x81, 0x1e, 0xf9, 0x2d, 0xa8, 0xbc, 0x71, 0xbb, 0x86, 0xc5, 0x76, 0xe8, 0x39, 0x1c, (*lnrpc.RouteHint)(nil), // 7: lnrpc.RouteHint
0xfe, 0xc0, 0x8c, 0xad, 0x71, 0x7c, 0x1d, 0xe1, 0x24, 0x91, 0x6e, 0xcf, 0x08, 0x1d, 0xed, 0xc0, (*lnrpc.Invoice)(nil), // 8: lnrpc.Invoice
0xcb, 0x24, 0x91, 0xe8, 0x14, 0x86, 0x31, 0xd3, 0xdb, 0xc8, 0x32, 0x1c, 0xcc, 0x9c, 0x79, 0x27, }
0x84, 0x12, 0xfa, 0x58, 0xb1, 0x9c, 0xc1, 0x50, 0x16, 0x1b, 0x4d, 0xa2, 0x8c, 0x72, 0xad, 0xdc, var file_invoicesrpc_invoices_proto_depIdxs = []int32{
0xfe, 0xac, 0x3d, 0x1f, 0x9e, 0x4f, 0x02, 0xc6, 0x4b, 0xbb, 0xc3, 0x72, 0xb2, 0xa4, 0x5c, 0x87, 7, // 0: invoicesrpc.AddHoldInvoiceRequest.route_hints:type_name -> lnrpc.RouteHint
0x20, 0x77, 0xa5, 0x42, 0x2e, 0x1c, 0x08, 0x49, 0xb7, 0x58, 0x13, 0x77, 0x30, 0x73, 0xe6, 0xfd, 6, // 1: invoicesrpc.Invoices.SubscribeSingleInvoice:input_type -> invoicesrpc.SubscribeSingleInvoiceRequest
0x70, 0xd7, 0xfa, 0xef, 0x00, 0xed, 0x7b, 0xa9, 0x04, 0x7a, 0x01, 0x47, 0xbb, 0x68, 0x64, 0xe5, 0, // 2: invoicesrpc.Invoices.CancelInvoice:input_type -> invoicesrpc.CancelInvoiceMsg
0xad, 0xf5, 0x74, 0x6c, 0x61, 0xeb, 0xb8, 0x1f, 0xc0, 0x64, 0x45, 0xb4, 0x66, 0xa4, 0x96, 0xab, 2, // 3: invoicesrpc.Invoices.AddHoldInvoice:input_type -> invoicesrpc.AddHoldInvoiceRequest
0x07, 0x7d, 0x21, 0x09, 0xcd, 0x71, 0x4a, 0x6c, 0xa6, 0xb7, 0x7d, 0x19, 0x68, 0x63, 0xdf, 0x04, 4, // 4: invoicesrpc.Invoices.SettleInvoice:input_type -> invoicesrpc.SettleInvoiceMsg
0xfa, 0x16, 0xa6, 0xab, 0xcd, 0xba, 0xb4, 0x70, 0x4d, 0x56, 0x94, 0xa7, 0xb5, 0x69, 0x95, 0xeb, 8, // 5: invoicesrpc.Invoices.SubscribeSingleInvoice:output_type -> lnrpc.Invoice
0x31, 0xf4, 0x64, 0x54, 0x4b, 0xb1, 0x2b, 0x4b, 0x9b, 0x3f, 0x77, 0xfa, 0xce, 0xa4, 0x75, 0xfe, 1, // 6: invoicesrpc.Invoices.CancelInvoice:output_type -> invoicesrpc.CancelInvoiceResp
0xb7, 0x05, 0x7d, 0xbb, 0xaf, 0xd0, 0x37, 0x38, 0xb9, 0x9b, 0x0a, 0xbd, 0x0a, 0x6a, 0xa7, 0x19, 3, // 7: invoicesrpc.Invoices.AddHoldInvoice:output_type -> invoicesrpc.AddHoldInvoiceResp
0x3c, 0xf8, 0x3d, 0x6f, 0x6c, 0xcd, 0xb4, 0xf0, 0x6b, 0x07, 0x7d, 0x81, 0xc3, 0xc6, 0x21, 0xa2, 5, // 8: invoicesrpc.Invoices.SettleInvoice:output_type -> invoicesrpc.SettleInvoiceResp
0x69, 0x83, 0x6e, 0xff, 0xb6, 0xbd, 0xa7, 0xf7, 0x8f, 0x8d, 0xc1, 0x5f, 0x61, 0xdc, 0xb4, 0x1d, 5, // [5:9] is the sub-list for method output_type
0xf9, 0x8d, 0x17, 0x77, 0xde, 0xb7, 0x77, 0xfa, 0xe0, 0x8e, 0x12, 0xa5, 0xcc, 0x86, 0xbd, 0x7b, 1, // [1:5] is the sub-list for method input_type
0x32, 0xf7, 0xa3, 0xda, 0x93, 0xf9, 0x5f, 0x32, 0xef, 0x2f, 0xbe, 0x9f, 0xa5, 0x54, 0x67, 0x9b, 1, // [1:1] is the sub-list for extension type_name
0x75, 0x10, 0x17, 0xf9, 0x82, 0xd1, 0x34, 0xd3, 0x9c, 0xf2, 0x94, 0x13, 0xfd, 0xab, 0x90, 0xd7, 1, // [1:1] is the sub-list for extension extendee
0x0b, 0xc6, 0x93, 0x85, 0x71, 0x6a, 0x51, 0xa3, 0x59, 0xf7, 0xcc, 0x2f, 0x7f, 0xf1, 0x2f, 0x00, 0, // [0:1] is the sub-list for field type_name
0x00, 0xff, 0xff, 0xc3, 0xb1, 0x8c, 0x5e, 0x28, 0x04, 0x00, 0x00, }
func init() { file_invoicesrpc_invoices_proto_init() }
func file_invoicesrpc_invoices_proto_init() {
if File_invoicesrpc_invoices_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_invoicesrpc_invoices_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelInvoiceMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelInvoiceResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddHoldInvoiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddHoldInvoiceResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettleInvoiceMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettleInvoiceResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_invoicesrpc_invoices_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubscribeSingleInvoiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_invoicesrpc_invoices_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_invoicesrpc_invoices_proto_goTypes,
DependencyIndexes: file_invoicesrpc_invoices_proto_depIdxs,
MessageInfos: file_invoicesrpc_invoices_proto_msgTypes,
}.Build()
File_invoicesrpc_invoices_proto = out.File
file_invoicesrpc_invoices_proto_rawDesc = nil
file_invoicesrpc_invoices_proto_goTypes = nil
file_invoicesrpc_invoices_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// InvoicesClient is the client API for Invoices service. // InvoicesClient is the client API for Invoices service.
// //
@ -469,10 +703,10 @@ type InvoicesClient interface {
} }
type invoicesClient struct { type invoicesClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewInvoicesClient(cc *grpc.ClientConn) InvoicesClient { func NewInvoicesClient(cc grpc.ClientConnInterface) InvoicesClient {
return &invoicesClient{cc} return &invoicesClient{cc}
} }
@ -561,16 +795,16 @@ type InvoicesServer interface {
type UnimplementedInvoicesServer struct { type UnimplementedInvoicesServer struct {
} }
func (*UnimplementedInvoicesServer) SubscribeSingleInvoice(req *SubscribeSingleInvoiceRequest, srv Invoices_SubscribeSingleInvoiceServer) error { func (*UnimplementedInvoicesServer) SubscribeSingleInvoice(*SubscribeSingleInvoiceRequest, Invoices_SubscribeSingleInvoiceServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeSingleInvoice not implemented") return status.Errorf(codes.Unimplemented, "method SubscribeSingleInvoice not implemented")
} }
func (*UnimplementedInvoicesServer) CancelInvoice(ctx context.Context, req *CancelInvoiceMsg) (*CancelInvoiceResp, error) { func (*UnimplementedInvoicesServer) CancelInvoice(context.Context, *CancelInvoiceMsg) (*CancelInvoiceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelInvoice not implemented") return nil, status.Errorf(codes.Unimplemented, "method CancelInvoice not implemented")
} }
func (*UnimplementedInvoicesServer) AddHoldInvoice(ctx context.Context, req *AddHoldInvoiceRequest) (*AddHoldInvoiceResp, error) { func (*UnimplementedInvoicesServer) AddHoldInvoice(context.Context, *AddHoldInvoiceRequest) (*AddHoldInvoiceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddHoldInvoice not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddHoldInvoice not implemented")
} }
func (*UnimplementedInvoicesServer) SettleInvoice(ctx context.Context, req *SettleInvoiceMsg) (*SettleInvoiceResp, error) { func (*UnimplementedInvoicesServer) SettleInvoice(context.Context, *SettleInvoiceMsg) (*SettleInvoiceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettleInvoice not implemented") return nil, status.Errorf(codes.Unimplemented, "method SettleInvoice not implemented")
} }

@ -1,91 +1,168 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: lnclipb/lncli.proto // source: lnclipb/lncli.proto
package lnclipb package lnclipb
import ( import (
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
verrpc "github.com/lightningnetwork/lnd/lnrpc/verrpc" verrpc "github.com/lightningnetwork/lnd/lnrpc/verrpc"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type VersionResponse struct { type VersionResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The version information for lncli. // The version information for lncli.
Lncli *verrpc.Version `protobuf:"bytes,1,opt,name=lncli,proto3" json:"lncli,omitempty"` Lncli *verrpc.Version `protobuf:"bytes,1,opt,name=lncli,proto3" json:"lncli,omitempty"`
// The version information for lnd. // The version information for lnd.
Lnd *verrpc.Version `protobuf:"bytes,2,opt,name=lnd,proto3" json:"lnd,omitempty"` Lnd *verrpc.Version `protobuf:"bytes,2,opt,name=lnd,proto3" json:"lnd,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *VersionResponse) Reset() { *m = VersionResponse{} } func (x *VersionResponse) Reset() {
func (m *VersionResponse) String() string { return proto.CompactTextString(m) } *x = VersionResponse{}
func (*VersionResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_lnclipb_lncli_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VersionResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VersionResponse) ProtoMessage() {}
func (x *VersionResponse) ProtoReflect() protoreflect.Message {
mi := &file_lnclipb_lncli_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) Descriptor() ([]byte, []int) { func (*VersionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_88b54c9c61b986c4, []int{0} return file_lnclipb_lncli_proto_rawDescGZIP(), []int{0}
} }
func (m *VersionResponse) XXX_Unmarshal(b []byte) error { func (x *VersionResponse) GetLncli() *verrpc.Version {
return xxx_messageInfo_VersionResponse.Unmarshal(m, b) if x != nil {
} return x.Lncli
func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VersionResponse.Marshal(b, m, deterministic)
}
func (m *VersionResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_VersionResponse.Merge(m, src)
}
func (m *VersionResponse) XXX_Size() int {
return xxx_messageInfo_VersionResponse.Size(m)
}
func (m *VersionResponse) XXX_DiscardUnknown() {
xxx_messageInfo_VersionResponse.DiscardUnknown(m)
}
var xxx_messageInfo_VersionResponse proto.InternalMessageInfo
func (m *VersionResponse) GetLncli() *verrpc.Version {
if m != nil {
return m.Lncli
} }
return nil return nil
} }
func (m *VersionResponse) GetLnd() *verrpc.Version { func (x *VersionResponse) GetLnd() *verrpc.Version {
if m != nil { if x != nil {
return m.Lnd return x.Lnd
} }
return nil return nil
} }
func init() { var File_lnclipb_lncli_proto protoreflect.FileDescriptor
proto.RegisterType((*VersionResponse)(nil), "lnclipb.VersionResponse")
var file_lnclipb_lncli_proto_rawDesc = []byte{
0x0a, 0x13, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x70, 0x62, 0x2f, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x70, 0x62, 0x1a, 0x13,
0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x12, 0x21, 0x0a,
0x03, 0x6c, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x72,
0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6c, 0x6e, 0x64,
0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c,
0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f,
0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x6e, 0x63, 0x6c, 0x69, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("lnclipb/lncli.proto", fileDescriptor_88b54c9c61b986c4) } var (
file_lnclipb_lncli_proto_rawDescOnce sync.Once
file_lnclipb_lncli_proto_rawDescData = file_lnclipb_lncli_proto_rawDesc
)
var fileDescriptor_88b54c9c61b986c4 = []byte{ func file_lnclipb_lncli_proto_rawDescGZIP() []byte {
// 159 bytes of a gzipped FileDescriptorProto file_lnclipb_lncli_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xc9, 0x4b, 0xce, file_lnclipb_lncli_proto_rawDescData = protoimpl.X.CompressGZIP(file_lnclipb_lncli_proto_rawDescData)
0xc9, 0x2c, 0x48, 0xd2, 0x07, 0xd3, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xec, 0x50, 0x41, })
0x29, 0xe1, 0xb2, 0xd4, 0xa2, 0xa2, 0x82, 0x64, 0x7d, 0x08, 0x05, 0x91, 0x55, 0x8a, 0xe6, 0xe2, return file_lnclipb_lncli_proto_rawDescData
0x0f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x0b, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, }
0x52, 0xe5, 0x62, 0x05, 0x6b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0xe2, 0xd7, 0x83, 0x6a,
0x80, 0xa9, 0x83, 0xc8, 0x0a, 0x29, 0x72, 0x31, 0xe7, 0xe4, 0xa5, 0x48, 0x30, 0x61, 0x57, 0x04, var file_lnclipb_lncli_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
0x92, 0x73, 0xd2, 0x8f, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, var file_lnclipb_lncli_proto_goTypes = []interface{}{
0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0xc9, 0xcb, 0xcc, 0x4b, 0xcf, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, (*VersionResponse)(nil), // 0: lnclipb.VersionResponse
0xd6, 0xcf, 0xc9, 0x4b, 0xd1, 0xcf, 0xc9, 0x03, 0x39, 0x09, 0xea, 0xc4, 0x24, 0x36, 0xb0, 0xa3, (*verrpc.Version)(nil), // 1: verrpc.Version
0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xfc, 0x5e, 0x89, 0xc9, 0x00, 0x00, 0x00, }
var file_lnclipb_lncli_proto_depIdxs = []int32{
1, // 0: lnclipb.VersionResponse.lncli:type_name -> verrpc.Version
1, // 1: lnclipb.VersionResponse.lnd:type_name -> verrpc.Version
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_lnclipb_lncli_proto_init() }
func file_lnclipb_lncli_proto_init() {
if File_lnclipb_lncli_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_lnclipb_lncli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VersionResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_lnclipb_lncli_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_lnclipb_lncli_proto_goTypes,
DependencyIndexes: file_lnclipb_lncli_proto_depIdxs,
MessageInfos: file_lnclipb_lncli_proto_msgTypes,
}.Build()
File_lnclipb_lncli_proto = out.File
file_lnclipb_lncli_proto_rawDesc = nil
file_lnclipb_lncli_proto_goTypes = nil
file_lnclipb_lncli_proto_depIdxs = nil
} }

@ -261,6 +261,8 @@ http:
# stateservice.proto # stateservice.proto
- selector: lnrpc.State.SubscribeState - selector: lnrpc.State.SubscribeState
get: "/v1/state/subscribe" get: "/v1/state/subscribe"
- selector: lnrpc.State.GetState
get: "/v1/state"
# verrpc/verrpc.proto # verrpc/verrpc.proto
- selector: verrpc.Versioner.GetVersion - selector: verrpc.Versioner.GetVersion

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,79 +1,96 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: signrpc/signer.proto // source: signrpc/signer.proto
package signrpc package signrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type KeyLocator struct { type KeyLocator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The family of key being identified. // The family of key being identified.
KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"` KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
// The precise index of the key being identified. // The precise index of the key being identified.
KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"` KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *KeyLocator) Reset() { *m = KeyLocator{} } func (x *KeyLocator) Reset() {
func (m *KeyLocator) String() string { return proto.CompactTextString(m) } *x = KeyLocator{}
func (*KeyLocator) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyLocator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyLocator) ProtoMessage() {}
func (x *KeyLocator) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyLocator.ProtoReflect.Descriptor instead.
func (*KeyLocator) Descriptor() ([]byte, []int) { func (*KeyLocator) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{0} return file_signrpc_signer_proto_rawDescGZIP(), []int{0}
} }
func (m *KeyLocator) XXX_Unmarshal(b []byte) error { func (x *KeyLocator) GetKeyFamily() int32 {
return xxx_messageInfo_KeyLocator.Unmarshal(m, b) if x != nil {
} return x.KeyFamily
func (m *KeyLocator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyLocator.Marshal(b, m, deterministic)
}
func (m *KeyLocator) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyLocator.Merge(m, src)
}
func (m *KeyLocator) XXX_Size() int {
return xxx_messageInfo_KeyLocator.Size(m)
}
func (m *KeyLocator) XXX_DiscardUnknown() {
xxx_messageInfo_KeyLocator.DiscardUnknown(m)
}
var xxx_messageInfo_KeyLocator proto.InternalMessageInfo
func (m *KeyLocator) GetKeyFamily() int32 {
if m != nil {
return m.KeyFamily
} }
return 0 return 0
} }
func (m *KeyLocator) GetKeyIndex() int32 { func (x *KeyLocator) GetKeyIndex() int32 {
if m != nil { if x != nil {
return m.KeyIndex return x.KeyIndex
} }
return 0 return 0
} }
type KeyDescriptor struct { type KeyDescriptor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The raw bytes of the key being identified. Either this or the KeyLocator //The raw bytes of the key being identified. Either this or the KeyLocator
//must be specified. //must be specified.
@ -81,101 +98,117 @@ type KeyDescriptor struct {
// //
//The key locator that identifies which key to use for signing. Either this //The key locator that identifies which key to use for signing. Either this
//or the raw bytes of the target key must be specified. //or the raw bytes of the target key must be specified.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"` KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *KeyDescriptor) Reset() { *m = KeyDescriptor{} } func (x *KeyDescriptor) Reset() {
func (m *KeyDescriptor) String() string { return proto.CompactTextString(m) } *x = KeyDescriptor{}
func (*KeyDescriptor) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyDescriptor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyDescriptor) ProtoMessage() {}
func (x *KeyDescriptor) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyDescriptor.ProtoReflect.Descriptor instead.
func (*KeyDescriptor) Descriptor() ([]byte, []int) { func (*KeyDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{1} return file_signrpc_signer_proto_rawDescGZIP(), []int{1}
} }
func (m *KeyDescriptor) XXX_Unmarshal(b []byte) error { func (x *KeyDescriptor) GetRawKeyBytes() []byte {
return xxx_messageInfo_KeyDescriptor.Unmarshal(m, b) if x != nil {
} return x.RawKeyBytes
func (m *KeyDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyDescriptor.Marshal(b, m, deterministic)
}
func (m *KeyDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyDescriptor.Merge(m, src)
}
func (m *KeyDescriptor) XXX_Size() int {
return xxx_messageInfo_KeyDescriptor.Size(m)
}
func (m *KeyDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_KeyDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_KeyDescriptor proto.InternalMessageInfo
func (m *KeyDescriptor) GetRawKeyBytes() []byte {
if m != nil {
return m.RawKeyBytes
} }
return nil return nil
} }
func (m *KeyDescriptor) GetKeyLoc() *KeyLocator { func (x *KeyDescriptor) GetKeyLoc() *KeyLocator {
if m != nil { if x != nil {
return m.KeyLoc return x.KeyLoc
} }
return nil return nil
} }
type TxOut struct { type TxOut struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The value of the output being spent. // The value of the output being spent.
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// The script of the output being spent. // The script of the output being spent.
PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"` PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *TxOut) Reset() { *m = TxOut{} } func (x *TxOut) Reset() {
func (m *TxOut) String() string { return proto.CompactTextString(m) } *x = TxOut{}
func (*TxOut) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TxOut) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TxOut) ProtoMessage() {}
func (x *TxOut) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TxOut.ProtoReflect.Descriptor instead.
func (*TxOut) Descriptor() ([]byte, []int) { func (*TxOut) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{2} return file_signrpc_signer_proto_rawDescGZIP(), []int{2}
} }
func (m *TxOut) XXX_Unmarshal(b []byte) error { func (x *TxOut) GetValue() int64 {
return xxx_messageInfo_TxOut.Unmarshal(m, b) if x != nil {
} return x.Value
func (m *TxOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TxOut.Marshal(b, m, deterministic)
}
func (m *TxOut) XXX_Merge(src proto.Message) {
xxx_messageInfo_TxOut.Merge(m, src)
}
func (m *TxOut) XXX_Size() int {
return xxx_messageInfo_TxOut.Size(m)
}
func (m *TxOut) XXX_DiscardUnknown() {
xxx_messageInfo_TxOut.DiscardUnknown(m)
}
var xxx_messageInfo_TxOut proto.InternalMessageInfo
func (m *TxOut) GetValue() int64 {
if m != nil {
return m.Value
} }
return 0 return 0
} }
func (m *TxOut) GetPkScript() []byte { func (x *TxOut) GetPkScript() []byte {
if m != nil { if x != nil {
return m.PkScript return x.PkScript
} }
return nil return nil
} }
type SignDescriptor struct { type SignDescriptor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//A descriptor that precisely describes *which* key to use for signing. This //A descriptor that precisely describes *which* key to use for signing. This
//may provide the raw public key directly, or require the Signer to re-derive //may provide the raw public key directly, or require the Signer to re-derive
@ -217,359 +250,415 @@ type SignDescriptor struct {
Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"` Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
// //
//The target input within the transaction that should be signed. //The target input within the transaction that should be signed.
InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"` InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SignDescriptor) Reset() { *m = SignDescriptor{} } func (x *SignDescriptor) Reset() {
func (m *SignDescriptor) String() string { return proto.CompactTextString(m) } *x = SignDescriptor{}
func (*SignDescriptor) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignDescriptor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignDescriptor) ProtoMessage() {}
func (x *SignDescriptor) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignDescriptor.ProtoReflect.Descriptor instead.
func (*SignDescriptor) Descriptor() ([]byte, []int) { func (*SignDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{3} return file_signrpc_signer_proto_rawDescGZIP(), []int{3}
} }
func (m *SignDescriptor) XXX_Unmarshal(b []byte) error { func (x *SignDescriptor) GetKeyDesc() *KeyDescriptor {
return xxx_messageInfo_SignDescriptor.Unmarshal(m, b) if x != nil {
} return x.KeyDesc
func (m *SignDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignDescriptor.Marshal(b, m, deterministic)
}
func (m *SignDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignDescriptor.Merge(m, src)
}
func (m *SignDescriptor) XXX_Size() int {
return xxx_messageInfo_SignDescriptor.Size(m)
}
func (m *SignDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_SignDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_SignDescriptor proto.InternalMessageInfo
func (m *SignDescriptor) GetKeyDesc() *KeyDescriptor {
if m != nil {
return m.KeyDesc
} }
return nil return nil
} }
func (m *SignDescriptor) GetSingleTweak() []byte { func (x *SignDescriptor) GetSingleTweak() []byte {
if m != nil { if x != nil {
return m.SingleTweak return x.SingleTweak
} }
return nil return nil
} }
func (m *SignDescriptor) GetDoubleTweak() []byte { func (x *SignDescriptor) GetDoubleTweak() []byte {
if m != nil { if x != nil {
return m.DoubleTweak return x.DoubleTweak
} }
return nil return nil
} }
func (m *SignDescriptor) GetWitnessScript() []byte { func (x *SignDescriptor) GetWitnessScript() []byte {
if m != nil { if x != nil {
return m.WitnessScript return x.WitnessScript
} }
return nil return nil
} }
func (m *SignDescriptor) GetOutput() *TxOut { func (x *SignDescriptor) GetOutput() *TxOut {
if m != nil { if x != nil {
return m.Output return x.Output
} }
return nil return nil
} }
func (m *SignDescriptor) GetSighash() uint32 { func (x *SignDescriptor) GetSighash() uint32 {
if m != nil { if x != nil {
return m.Sighash return x.Sighash
} }
return 0 return 0
} }
func (m *SignDescriptor) GetInputIndex() int32 { func (x *SignDescriptor) GetInputIndex() int32 {
if m != nil { if x != nil {
return m.InputIndex return x.InputIndex
} }
return 0 return 0
} }
type SignReq struct { type SignReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The raw bytes of the transaction to be signed. // The raw bytes of the transaction to be signed.
RawTxBytes []byte `protobuf:"bytes,1,opt,name=raw_tx_bytes,json=rawTxBytes,proto3" json:"raw_tx_bytes,omitempty"` RawTxBytes []byte `protobuf:"bytes,1,opt,name=raw_tx_bytes,json=rawTxBytes,proto3" json:"raw_tx_bytes,omitempty"`
// A set of sign descriptors, for each input to be signed. // A set of sign descriptors, for each input to be signed.
SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"` SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SignReq) Reset() { *m = SignReq{} } func (x *SignReq) Reset() {
func (m *SignReq) String() string { return proto.CompactTextString(m) } *x = SignReq{}
func (*SignReq) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignReq) ProtoMessage() {}
func (x *SignReq) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignReq.ProtoReflect.Descriptor instead.
func (*SignReq) Descriptor() ([]byte, []int) { func (*SignReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{4} return file_signrpc_signer_proto_rawDescGZIP(), []int{4}
} }
func (m *SignReq) XXX_Unmarshal(b []byte) error { func (x *SignReq) GetRawTxBytes() []byte {
return xxx_messageInfo_SignReq.Unmarshal(m, b) if x != nil {
} return x.RawTxBytes
func (m *SignReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignReq.Marshal(b, m, deterministic)
}
func (m *SignReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignReq.Merge(m, src)
}
func (m *SignReq) XXX_Size() int {
return xxx_messageInfo_SignReq.Size(m)
}
func (m *SignReq) XXX_DiscardUnknown() {
xxx_messageInfo_SignReq.DiscardUnknown(m)
}
var xxx_messageInfo_SignReq proto.InternalMessageInfo
func (m *SignReq) GetRawTxBytes() []byte {
if m != nil {
return m.RawTxBytes
} }
return nil return nil
} }
func (m *SignReq) GetSignDescs() []*SignDescriptor { func (x *SignReq) GetSignDescs() []*SignDescriptor {
if m != nil { if x != nil {
return m.SignDescs return x.SignDescs
} }
return nil return nil
} }
type SignResp struct { type SignResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//A set of signatures realized in a fixed 64-byte format ordered in ascending //A set of signatures realized in a fixed 64-byte format ordered in ascending
//input order. //input order.
RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"` RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SignResp) Reset() { *m = SignResp{} } func (x *SignResp) Reset() {
func (m *SignResp) String() string { return proto.CompactTextString(m) } *x = SignResp{}
func (*SignResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignResp) ProtoMessage() {}
func (x *SignResp) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignResp.ProtoReflect.Descriptor instead.
func (*SignResp) Descriptor() ([]byte, []int) { func (*SignResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{5} return file_signrpc_signer_proto_rawDescGZIP(), []int{5}
} }
func (m *SignResp) XXX_Unmarshal(b []byte) error { func (x *SignResp) GetRawSigs() [][]byte {
return xxx_messageInfo_SignResp.Unmarshal(m, b) if x != nil {
} return x.RawSigs
func (m *SignResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignResp.Marshal(b, m, deterministic)
}
func (m *SignResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignResp.Merge(m, src)
}
func (m *SignResp) XXX_Size() int {
return xxx_messageInfo_SignResp.Size(m)
}
func (m *SignResp) XXX_DiscardUnknown() {
xxx_messageInfo_SignResp.DiscardUnknown(m)
}
var xxx_messageInfo_SignResp proto.InternalMessageInfo
func (m *SignResp) GetRawSigs() [][]byte {
if m != nil {
return m.RawSigs
} }
return nil return nil
} }
type InputScript struct { type InputScript struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The serializes witness stack for the specified input. // The serializes witness stack for the specified input.
Witness [][]byte `protobuf:"bytes,1,rep,name=witness,proto3" json:"witness,omitempty"` Witness [][]byte `protobuf:"bytes,1,rep,name=witness,proto3" json:"witness,omitempty"`
// //
//The optional sig script for the specified witness that will only be set if //The optional sig script for the specified witness that will only be set if
//the input specified is a nested p2sh witness program. //the input specified is a nested p2sh witness program.
SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"` SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *InputScript) Reset() { *m = InputScript{} } func (x *InputScript) Reset() {
func (m *InputScript) String() string { return proto.CompactTextString(m) } *x = InputScript{}
func (*InputScript) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InputScript) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InputScript) ProtoMessage() {}
func (x *InputScript) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InputScript.ProtoReflect.Descriptor instead.
func (*InputScript) Descriptor() ([]byte, []int) { func (*InputScript) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{6} return file_signrpc_signer_proto_rawDescGZIP(), []int{6}
} }
func (m *InputScript) XXX_Unmarshal(b []byte) error { func (x *InputScript) GetWitness() [][]byte {
return xxx_messageInfo_InputScript.Unmarshal(m, b) if x != nil {
} return x.Witness
func (m *InputScript) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InputScript.Marshal(b, m, deterministic)
}
func (m *InputScript) XXX_Merge(src proto.Message) {
xxx_messageInfo_InputScript.Merge(m, src)
}
func (m *InputScript) XXX_Size() int {
return xxx_messageInfo_InputScript.Size(m)
}
func (m *InputScript) XXX_DiscardUnknown() {
xxx_messageInfo_InputScript.DiscardUnknown(m)
}
var xxx_messageInfo_InputScript proto.InternalMessageInfo
func (m *InputScript) GetWitness() [][]byte {
if m != nil {
return m.Witness
} }
return nil return nil
} }
func (m *InputScript) GetSigScript() []byte { func (x *InputScript) GetSigScript() []byte {
if m != nil { if x != nil {
return m.SigScript return x.SigScript
} }
return nil return nil
} }
type InputScriptResp struct { type InputScriptResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The set of fully valid input scripts requested. // The set of fully valid input scripts requested.
InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"` InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *InputScriptResp) Reset() { *m = InputScriptResp{} } func (x *InputScriptResp) Reset() {
func (m *InputScriptResp) String() string { return proto.CompactTextString(m) } *x = InputScriptResp{}
func (*InputScriptResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InputScriptResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InputScriptResp) ProtoMessage() {}
func (x *InputScriptResp) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InputScriptResp.ProtoReflect.Descriptor instead.
func (*InputScriptResp) Descriptor() ([]byte, []int) { func (*InputScriptResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{7} return file_signrpc_signer_proto_rawDescGZIP(), []int{7}
} }
func (m *InputScriptResp) XXX_Unmarshal(b []byte) error { func (x *InputScriptResp) GetInputScripts() []*InputScript {
return xxx_messageInfo_InputScriptResp.Unmarshal(m, b) if x != nil {
} return x.InputScripts
func (m *InputScriptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InputScriptResp.Marshal(b, m, deterministic)
}
func (m *InputScriptResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_InputScriptResp.Merge(m, src)
}
func (m *InputScriptResp) XXX_Size() int {
return xxx_messageInfo_InputScriptResp.Size(m)
}
func (m *InputScriptResp) XXX_DiscardUnknown() {
xxx_messageInfo_InputScriptResp.DiscardUnknown(m)
}
var xxx_messageInfo_InputScriptResp proto.InternalMessageInfo
func (m *InputScriptResp) GetInputScripts() []*InputScript {
if m != nil {
return m.InputScripts
} }
return nil return nil
} }
type SignMessageReq struct { type SignMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The message to be signed. // The message to be signed.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// The key locator that identifies which key to use for signing. // The key locator that identifies which key to use for signing.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"` KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SignMessageReq) Reset() { *m = SignMessageReq{} } func (x *SignMessageReq) Reset() {
func (m *SignMessageReq) String() string { return proto.CompactTextString(m) } *x = SignMessageReq{}
func (*SignMessageReq) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignMessageReq) ProtoMessage() {}
func (x *SignMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignMessageReq.ProtoReflect.Descriptor instead.
func (*SignMessageReq) Descriptor() ([]byte, []int) { func (*SignMessageReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{8} return file_signrpc_signer_proto_rawDescGZIP(), []int{8}
} }
func (m *SignMessageReq) XXX_Unmarshal(b []byte) error { func (x *SignMessageReq) GetMsg() []byte {
return xxx_messageInfo_SignMessageReq.Unmarshal(m, b) if x != nil {
} return x.Msg
func (m *SignMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignMessageReq.Marshal(b, m, deterministic)
}
func (m *SignMessageReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignMessageReq.Merge(m, src)
}
func (m *SignMessageReq) XXX_Size() int {
return xxx_messageInfo_SignMessageReq.Size(m)
}
func (m *SignMessageReq) XXX_DiscardUnknown() {
xxx_messageInfo_SignMessageReq.DiscardUnknown(m)
}
var xxx_messageInfo_SignMessageReq proto.InternalMessageInfo
func (m *SignMessageReq) GetMsg() []byte {
if m != nil {
return m.Msg
} }
return nil return nil
} }
func (m *SignMessageReq) GetKeyLoc() *KeyLocator { func (x *SignMessageReq) GetKeyLoc() *KeyLocator {
if m != nil { if x != nil {
return m.KeyLoc return x.KeyLoc
} }
return nil return nil
} }
type SignMessageResp struct { type SignMessageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The signature for the given message in the fixed-size LN wire format. //The signature for the given message in the fixed-size LN wire format.
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SignMessageResp) Reset() { *m = SignMessageResp{} } func (x *SignMessageResp) Reset() {
func (m *SignMessageResp) String() string { return proto.CompactTextString(m) } *x = SignMessageResp{}
func (*SignMessageResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignMessageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignMessageResp) ProtoMessage() {}
func (x *SignMessageResp) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignMessageResp.ProtoReflect.Descriptor instead.
func (*SignMessageResp) Descriptor() ([]byte, []int) { func (*SignMessageResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{9} return file_signrpc_signer_proto_rawDescGZIP(), []int{9}
} }
func (m *SignMessageResp) XXX_Unmarshal(b []byte) error { func (x *SignMessageResp) GetSignature() []byte {
return xxx_messageInfo_SignMessageResp.Unmarshal(m, b) if x != nil {
} return x.Signature
func (m *SignMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignMessageResp.Marshal(b, m, deterministic)
}
func (m *SignMessageResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignMessageResp.Merge(m, src)
}
func (m *SignMessageResp) XXX_Size() int {
return xxx_messageInfo_SignMessageResp.Size(m)
}
func (m *SignMessageResp) XXX_DiscardUnknown() {
xxx_messageInfo_SignMessageResp.DiscardUnknown(m)
}
var xxx_messageInfo_SignMessageResp proto.InternalMessageInfo
func (m *SignMessageResp) GetSignature() []byte {
if m != nil {
return m.Signature
} }
return nil return nil
} }
type VerifyMessageReq struct { type VerifyMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The message over which the signature is to be verified. // The message over which the signature is to be verified.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// //
@ -577,282 +666,603 @@ type VerifyMessageReq struct {
//message. //message.
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
// The public key the signature has to be valid for. // The public key the signature has to be valid for.
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *VerifyMessageReq) Reset() { *m = VerifyMessageReq{} } func (x *VerifyMessageReq) Reset() {
func (m *VerifyMessageReq) String() string { return proto.CompactTextString(m) } *x = VerifyMessageReq{}
func (*VerifyMessageReq) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyMessageReq) ProtoMessage() {}
func (x *VerifyMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyMessageReq.ProtoReflect.Descriptor instead.
func (*VerifyMessageReq) Descriptor() ([]byte, []int) { func (*VerifyMessageReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{10} return file_signrpc_signer_proto_rawDescGZIP(), []int{10}
} }
func (m *VerifyMessageReq) XXX_Unmarshal(b []byte) error { func (x *VerifyMessageReq) GetMsg() []byte {
return xxx_messageInfo_VerifyMessageReq.Unmarshal(m, b) if x != nil {
} return x.Msg
func (m *VerifyMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VerifyMessageReq.Marshal(b, m, deterministic)
}
func (m *VerifyMessageReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_VerifyMessageReq.Merge(m, src)
}
func (m *VerifyMessageReq) XXX_Size() int {
return xxx_messageInfo_VerifyMessageReq.Size(m)
}
func (m *VerifyMessageReq) XXX_DiscardUnknown() {
xxx_messageInfo_VerifyMessageReq.DiscardUnknown(m)
}
var xxx_messageInfo_VerifyMessageReq proto.InternalMessageInfo
func (m *VerifyMessageReq) GetMsg() []byte {
if m != nil {
return m.Msg
} }
return nil return nil
} }
func (m *VerifyMessageReq) GetSignature() []byte { func (x *VerifyMessageReq) GetSignature() []byte {
if m != nil { if x != nil {
return m.Signature return x.Signature
} }
return nil return nil
} }
func (m *VerifyMessageReq) GetPubkey() []byte { func (x *VerifyMessageReq) GetPubkey() []byte {
if m != nil { if x != nil {
return m.Pubkey return x.Pubkey
} }
return nil return nil
} }
type VerifyMessageResp struct { type VerifyMessageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the signature was valid over the given message. // Whether the signature was valid over the given message.
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *VerifyMessageResp) Reset() { *m = VerifyMessageResp{} } func (x *VerifyMessageResp) Reset() {
func (m *VerifyMessageResp) String() string { return proto.CompactTextString(m) } *x = VerifyMessageResp{}
func (*VerifyMessageResp) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyMessageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyMessageResp) ProtoMessage() {}
func (x *VerifyMessageResp) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyMessageResp.ProtoReflect.Descriptor instead.
func (*VerifyMessageResp) Descriptor() ([]byte, []int) { func (*VerifyMessageResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{11} return file_signrpc_signer_proto_rawDescGZIP(), []int{11}
} }
func (m *VerifyMessageResp) XXX_Unmarshal(b []byte) error { func (x *VerifyMessageResp) GetValid() bool {
return xxx_messageInfo_VerifyMessageResp.Unmarshal(m, b) if x != nil {
} return x.Valid
func (m *VerifyMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VerifyMessageResp.Marshal(b, m, deterministic)
}
func (m *VerifyMessageResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_VerifyMessageResp.Merge(m, src)
}
func (m *VerifyMessageResp) XXX_Size() int {
return xxx_messageInfo_VerifyMessageResp.Size(m)
}
func (m *VerifyMessageResp) XXX_DiscardUnknown() {
xxx_messageInfo_VerifyMessageResp.DiscardUnknown(m)
}
var xxx_messageInfo_VerifyMessageResp proto.InternalMessageInfo
func (m *VerifyMessageResp) GetValid() bool {
if m != nil {
return m.Valid
} }
return false return false
} }
type SharedKeyRequest struct { type SharedKeyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The ephemeral public key to use for the DH key derivation. // The ephemeral public key to use for the DH key derivation.
EphemeralPubkey []byte `protobuf:"bytes,1,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3" json:"ephemeral_pubkey,omitempty"` EphemeralPubkey []byte `protobuf:"bytes,1,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3" json:"ephemeral_pubkey,omitempty"`
// //
//Deprecated. The optional key locator of the local key that should be used. //Deprecated. The optional key locator of the local key that should be used.
//If this parameter is not set then the node's identity private key will be //If this parameter is not set then the node's identity private key will be
//used. //used.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"` // Deprecated: Do not use. //
// Deprecated: Do not use.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
// //
//A key descriptor describes the key used for performing ECDH. Either a key //A key descriptor describes the key used for performing ECDH. Either a key
//locator or a raw public key is expected, if neither is supplied, defaults to //locator or a raw public key is expected, if neither is supplied, defaults to
//the node's identity private key. //the node's identity private key.
KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"` KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SharedKeyRequest) Reset() { *m = SharedKeyRequest{} } func (x *SharedKeyRequest) Reset() {
func (m *SharedKeyRequest) String() string { return proto.CompactTextString(m) } *x = SharedKeyRequest{}
func (*SharedKeyRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SharedKeyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SharedKeyRequest) ProtoMessage() {}
func (x *SharedKeyRequest) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SharedKeyRequest.ProtoReflect.Descriptor instead.
func (*SharedKeyRequest) Descriptor() ([]byte, []int) { func (*SharedKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{12} return file_signrpc_signer_proto_rawDescGZIP(), []int{12}
} }
func (m *SharedKeyRequest) XXX_Unmarshal(b []byte) error { func (x *SharedKeyRequest) GetEphemeralPubkey() []byte {
return xxx_messageInfo_SharedKeyRequest.Unmarshal(m, b) if x != nil {
} return x.EphemeralPubkey
func (m *SharedKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SharedKeyRequest.Marshal(b, m, deterministic)
}
func (m *SharedKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SharedKeyRequest.Merge(m, src)
}
func (m *SharedKeyRequest) XXX_Size() int {
return xxx_messageInfo_SharedKeyRequest.Size(m)
}
func (m *SharedKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SharedKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SharedKeyRequest proto.InternalMessageInfo
func (m *SharedKeyRequest) GetEphemeralPubkey() []byte {
if m != nil {
return m.EphemeralPubkey
} }
return nil return nil
} }
// Deprecated: Do not use. // Deprecated: Do not use.
func (m *SharedKeyRequest) GetKeyLoc() *KeyLocator { func (x *SharedKeyRequest) GetKeyLoc() *KeyLocator {
if m != nil { if x != nil {
return m.KeyLoc return x.KeyLoc
} }
return nil return nil
} }
func (m *SharedKeyRequest) GetKeyDesc() *KeyDescriptor { func (x *SharedKeyRequest) GetKeyDesc() *KeyDescriptor {
if m != nil { if x != nil {
return m.KeyDesc return x.KeyDesc
} }
return nil return nil
} }
type SharedKeyResponse struct { type SharedKeyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The shared public key, hashed with sha256. // The shared public key, hashed with sha256.
SharedKey []byte `protobuf:"bytes,1,opt,name=shared_key,json=sharedKey,proto3" json:"shared_key,omitempty"` SharedKey []byte `protobuf:"bytes,1,opt,name=shared_key,json=sharedKey,proto3" json:"shared_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *SharedKeyResponse) Reset() { *m = SharedKeyResponse{} } func (x *SharedKeyResponse) Reset() {
func (m *SharedKeyResponse) String() string { return proto.CompactTextString(m) } *x = SharedKeyResponse{}
func (*SharedKeyResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_signrpc_signer_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SharedKeyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SharedKeyResponse) ProtoMessage() {}
func (x *SharedKeyResponse) ProtoReflect() protoreflect.Message {
mi := &file_signrpc_signer_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SharedKeyResponse.ProtoReflect.Descriptor instead.
func (*SharedKeyResponse) Descriptor() ([]byte, []int) { func (*SharedKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{13} return file_signrpc_signer_proto_rawDescGZIP(), []int{13}
} }
func (m *SharedKeyResponse) XXX_Unmarshal(b []byte) error { func (x *SharedKeyResponse) GetSharedKey() []byte {
return xxx_messageInfo_SharedKeyResponse.Unmarshal(m, b) if x != nil {
} return x.SharedKey
func (m *SharedKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SharedKeyResponse.Marshal(b, m, deterministic)
}
func (m *SharedKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SharedKeyResponse.Merge(m, src)
}
func (m *SharedKeyResponse) XXX_Size() int {
return xxx_messageInfo_SharedKeyResponse.Size(m)
}
func (m *SharedKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SharedKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SharedKeyResponse proto.InternalMessageInfo
func (m *SharedKeyResponse) GetSharedKey() []byte {
if m != nil {
return m.SharedKey
} }
return nil return nil
} }
func init() { var File_signrpc_signer_proto protoreflect.FileDescriptor
proto.RegisterType((*KeyLocator)(nil), "signrpc.KeyLocator")
proto.RegisterType((*KeyDescriptor)(nil), "signrpc.KeyDescriptor") var file_signrpc_signer_proto_rawDesc = []byte{
proto.RegisterType((*TxOut)(nil), "signrpc.TxOut") 0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
proto.RegisterType((*SignDescriptor)(nil), "signrpc.SignDescriptor") 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x22,
proto.RegisterType((*SignReq)(nil), "signrpc.SignReq") 0x48, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a,
proto.RegisterType((*SignResp)(nil), "signrpc.SignResp") 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
proto.RegisterType((*InputScript)(nil), "signrpc.InputScript") 0x05, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09,
proto.RegisterType((*InputScriptResp)(nil), "signrpc.InputScriptResp") 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
proto.RegisterType((*SignMessageReq)(nil), "signrpc.SignMessageReq") 0x08, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x61, 0x0a, 0x0d, 0x4b, 0x65, 0x79,
proto.RegisterType((*SignMessageResp)(nil), "signrpc.SignMessageResp") 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x61,
proto.RegisterType((*VerifyMessageReq)(nil), "signrpc.VerifyMessageReq") 0x77, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
proto.RegisterType((*VerifyMessageResp)(nil), "signrpc.VerifyMessageResp") 0x0c, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c,
proto.RegisterType((*SharedKeyRequest)(nil), "signrpc.SharedKeyRequest") 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
proto.RegisterType((*SharedKeyResponse)(nil), "signrpc.SharedKeyResponse") 0x13, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63,
0x61, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x22, 0x3a, 0x0a, 0x05,
0x54, 0x78, 0x4f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70,
0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08,
0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x93, 0x02, 0x0a, 0x0e, 0x53, 0x69, 0x67,
0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x6b,
0x65, 0x79, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21,
0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x77, 0x65, 0x61,
0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x77, 0x65, 0x61,
0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x54,
0x77, 0x65, 0x61, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x5f,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x77, 0x69,
0x74, 0x6e, 0x65, 0x73, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x6f,
0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x69,
0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74,
0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x69, 0x67, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a,
0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x63,
0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x61, 0x77,
0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0a, 0x72, 0x61, 0x77, 0x54, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x73,
0x69, 0x67, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x44, 0x65,
0x73, 0x63, 0x73, 0x22, 0x25, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
0x19, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0c, 0x52, 0x07, 0x72, 0x61, 0x77, 0x53, 0x69, 0x67, 0x73, 0x22, 0x46, 0x0a, 0x0b, 0x49, 0x6e,
0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74,
0x6e, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e,
0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x53, 0x63, 0x72, 0x69,
0x70, 0x74, 0x22, 0x4c, 0x0a, 0x0f, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73,
0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69,
0x70, 0x74, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73,
0x22, 0x50, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x12, 0x2c, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x6f, 0x63, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4c,
0x6f, 0x63, 0x22, 0x2f, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22,
0x29, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x53,
0x68, 0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x29, 0x0a, 0x10, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x70, 0x68, 0x65, 0x6d,
0x65, 0x72, 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x07, 0x6b, 0x65,
0x79, 0x5f, 0x6c, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x69,
0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x12, 0x31, 0x0a, 0x08,
0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x22,
0x32, 0x0a, 0x11, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64,
0x4b, 0x65, 0x79, 0x32, 0xd4, 0x02, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x34,
0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x61, 0x77, 0x12,
0x10, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
0x71, 0x1a, 0x11, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49,
0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x2e, 0x73, 0x69, 0x67,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73,
0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69,
0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18,
0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69,
0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x67, 0x6e,
0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x56,
0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x48, 0x0a, 0x0f, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64,
0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x68,
0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4b,
0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69,
0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e,
0x72, 0x70, 0x63, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("signrpc/signer.proto", fileDescriptor_4ecd772f6c7ffacf) } var (
file_signrpc_signer_proto_rawDescOnce sync.Once
file_signrpc_signer_proto_rawDescData = file_signrpc_signer_proto_rawDesc
)
var fileDescriptor_4ecd772f6c7ffacf = []byte{ func file_signrpc_signer_proto_rawDescGZIP() []byte {
// 775 bytes of a gzipped FileDescriptorProto file_signrpc_signer_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xed, 0x8e, 0xdb, 0x44, file_signrpc_signer_proto_rawDescData = protoimpl.X.CompressGZIP(file_signrpc_signer_proto_rawDescData)
0x14, 0x55, 0x12, 0x36, 0xc9, 0x5e, 0x27, 0xbb, 0xd9, 0x61, 0x55, 0xdc, 0x05, 0xc4, 0x62, 0xa9, })
0x68, 0x2b, 0x41, 0x02, 0x01, 0x21, 0xc1, 0x2f, 0xb4, 0x54, 0xab, 0x56, 0x29, 0x6a, 0xe5, 0xac, return file_signrpc_signer_proto_rawDescData
0xf8, 0xd1, 0x3f, 0x96, 0xe3, 0xdc, 0x3a, 0x23, 0x3b, 0xf6, 0xec, 0xcc, 0xb8, 0x8e, 0x9f, 0x83, }
0x37, 0xe0, 0x99, 0x78, 0x20, 0x34, 0x1f, 0x71, 0xec, 0x14, 0x50, 0xf9, 0xb5, 0xbe, 0xc7, 0x77,
0xce, 0x3d, 0x7b, 0xce, 0x9d, 0x18, 0x2e, 0x05, 0x8d, 0x33, 0xce, 0xa2, 0x99, 0xfa, 0x8b, 0x7c, var file_signrpc_signer_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
0xca, 0x78, 0x2e, 0x73, 0x32, 0xb0, 0xa8, 0xf7, 0x1c, 0x60, 0x81, 0xd5, 0xcb, 0x3c, 0x0a, 0x65, var file_signrpc_signer_proto_goTypes = []interface{}{
0xce, 0xc9, 0xe7, 0x00, 0x09, 0x56, 0xc1, 0xdb, 0x70, 0x4b, 0xd3, 0xca, 0xed, 0x5c, 0x77, 0x6e, (*KeyLocator)(nil), // 0: signrpc.KeyLocator
0x4e, 0xfc, 0xd3, 0x04, 0xab, 0x3b, 0x0d, 0x90, 0x4f, 0x41, 0x15, 0x01, 0xcd, 0xd6, 0xb8, 0x73, (*KeyDescriptor)(nil), // 1: signrpc.KeyDescriptor
0xbb, 0xfa, 0xed, 0x30, 0xc1, 0xea, 0x85, 0xaa, 0xbd, 0x10, 0xc6, 0x0b, 0xac, 0x9e, 0xa1, 0x88, (*TxOut)(nil), // 2: signrpc.TxOut
0x38, 0x65, 0x8a, 0xcc, 0x83, 0x31, 0x0f, 0xcb, 0x40, 0x9d, 0x58, 0x55, 0x12, 0x85, 0xe6, 0x1b, (*SignDescriptor)(nil), // 3: signrpc.SignDescriptor
0xf9, 0x0e, 0x0f, 0xcb, 0x05, 0x56, 0xb7, 0x0a, 0x22, 0x5f, 0xc3, 0x40, 0xbd, 0x4f, 0xf3, 0x48, (*SignReq)(nil), // 4: signrpc.SignReq
0xf3, 0x39, 0xf3, 0x8f, 0xa7, 0x56, 0xd9, 0xf4, 0x20, 0xcb, 0xef, 0x27, 0xfa, 0xd9, 0xfb, 0x19, (*SignResp)(nil), // 5: signrpc.SignResp
0x4e, 0xee, 0x77, 0xaf, 0x0a, 0x49, 0x2e, 0xe1, 0xe4, 0x5d, 0x98, 0x16, 0xa8, 0x29, 0x7b, 0xbe, (*InputScript)(nil), // 6: signrpc.InputScript
0x29, 0x94, 0x3c, 0x96, 0x04, 0x66, 0xbe, 0xa6, 0x1b, 0xf9, 0x43, 0x96, 0x2c, 0x75, 0xed, 0xfd, (*InputScriptResp)(nil), // 7: signrpc.InputScriptResp
0xd1, 0x85, 0xb3, 0x25, 0x8d, 0xb3, 0x86, 0xc0, 0xef, 0x40, 0xa9, 0x0f, 0xd6, 0x28, 0x22, 0x4d, (*SignMessageReq)(nil), // 8: signrpc.SignMessageReq
0xe4, 0xcc, 0x1f, 0x35, 0xa7, 0x1f, 0x3a, 0x7d, 0x25, 0x52, 0x95, 0xe4, 0x4b, 0x18, 0x09, 0x9a, (*SignMessageResp)(nil), // 9: signrpc.SignMessageResp
0xc5, 0x29, 0x06, 0xb2, 0xc4, 0x30, 0xb1, 0x53, 0x1c, 0x83, 0xdd, 0x2b, 0x48, 0xb5, 0xac, 0xf3, (*VerifyMessageReq)(nil), // 10: signrpc.VerifyMessageReq
0x62, 0x55, 0xb7, 0xf4, 0x4c, 0x8b, 0xc1, 0x4c, 0xcb, 0x13, 0x38, 0x2b, 0xa9, 0xcc, 0x50, 0x88, (*VerifyMessageResp)(nil), // 11: signrpc.VerifyMessageResp
0xbd, 0xda, 0x8f, 0x74, 0xd3, 0xd8, 0xa2, 0x46, 0x32, 0xf9, 0x0a, 0xfa, 0x79, 0x21, 0x59, 0x21, (*SharedKeyRequest)(nil), // 12: signrpc.SharedKeyRequest
0xdd, 0x13, 0xad, 0xee, 0xac, 0x56, 0xa7, 0x5d, 0xf0, 0xed, 0x5b, 0xe2, 0x82, 0x8a, 0x73, 0x13, (*SharedKeyResponse)(nil), // 13: signrpc.SharedKeyResponse
0x8a, 0x8d, 0x3b, 0xb8, 0xee, 0xdc, 0x8c, 0xfd, 0x7d, 0x49, 0xbe, 0x00, 0x87, 0x66, 0xac, 0x90, }
0x36, 0xb2, 0xa1, 0x8e, 0x0c, 0x34, 0x64, 0x42, 0x8b, 0x60, 0xa0, 0x4c, 0xf1, 0xf1, 0x81, 0x5c, var file_signrpc_signer_proto_depIdxs = []int32{
0xc3, 0x48, 0xc5, 0x25, 0x77, 0xad, 0xb4, 0x80, 0x87, 0xe5, 0xfd, 0xce, 0x84, 0xf5, 0x23, 0x80, 0, // 0: signrpc.KeyDescriptor.key_loc:type_name -> signrpc.KeyLocator
0x12, 0xa0, 0x0d, 0x13, 0x6e, 0xf7, 0xba, 0x77, 0xe3, 0xcc, 0x3f, 0xa9, 0x35, 0xb5, 0xcd, 0xf5, 1, // 1: signrpc.SignDescriptor.key_desc:type_name -> signrpc.KeyDescriptor
0x4f, 0x85, 0xad, 0x85, 0xf7, 0x04, 0x86, 0x66, 0x88, 0x60, 0xe4, 0x31, 0x0c, 0xd5, 0x14, 0x41, 2, // 2: signrpc.SignDescriptor.output:type_name -> signrpc.TxOut
0x63, 0x35, 0xa1, 0x77, 0x33, 0xf2, 0x07, 0x3c, 0x2c, 0x97, 0x34, 0x16, 0xde, 0x1d, 0x38, 0x2f, 3, // 3: signrpc.SignReq.sign_descs:type_name -> signrpc.SignDescriptor
0x94, 0x32, 0xfb, 0xdf, 0xbb, 0x30, 0xb0, 0x76, 0xec, 0x1b, 0x6d, 0xa9, 0xb6, 0x54, 0xd0, 0xb8, 6, // 4: signrpc.InputScriptResp.input_scripts:type_name -> signrpc.InputScript
0x1d, 0xb4, 0x1a, 0x67, 0x93, 0x7e, 0x09, 0xe7, 0x0d, 0x1e, 0x3d, 0xf5, 0x27, 0x18, 0x1b, 0x1f, 0, // 5: signrpc.SignMessageReq.key_loc:type_name -> signrpc.KeyLocator
0xcc, 0x19, 0xc3, 0xe8, 0xcc, 0x2f, 0x6b, 0xf1, 0xcd, 0x03, 0x23, 0x7a, 0x28, 0x84, 0xf7, 0xda, 0, // 6: signrpc.SharedKeyRequest.key_loc:type_name -> signrpc.KeyLocator
0xac, 0xcd, 0x6f, 0x28, 0x44, 0x18, 0xa3, 0x32, 0x6a, 0x02, 0xbd, 0xad, 0x88, 0xad, 0x3f, 0xea, 1, // 7: signrpc.SharedKeyRequest.key_desc:type_name -> signrpc.KeyDescriptor
0xf1, 0x7f, 0x6e, 0xf1, 0x0c, 0xce, 0x5b, 0x8c, 0x82, 0x91, 0xcf, 0x40, 0xdb, 0x15, 0xca, 0x82, 4, // 8: signrpc.Signer.SignOutputRaw:input_type -> signrpc.SignReq
0xa3, 0x25, 0x3e, 0x00, 0xde, 0x1b, 0x98, 0xfc, 0x8e, 0x9c, 0xbe, 0xad, 0xfe, 0x53, 0x44, 0x8b, 4, // 9: signrpc.Signer.ComputeInputScript:input_type -> signrpc.SignReq
0xa3, 0x7b, 0xc4, 0x41, 0x1e, 0x41, 0x9f, 0x15, 0xab, 0x04, 0x2b, 0xbb, 0x8f, 0xb6, 0xf2, 0x9e, 8, // 10: signrpc.Signer.SignMessage:input_type -> signrpc.SignMessageReq
0xc2, 0xc5, 0x11, 0xb7, 0x60, 0xf6, 0x7a, 0xd1, 0xb5, 0xa6, 0x1f, 0xfa, 0xa6, 0xf0, 0xfe, 0xec, 10, // 11: signrpc.Signer.VerifyMessage:input_type -> signrpc.VerifyMessageReq
0xc0, 0x64, 0xb9, 0x09, 0x39, 0xae, 0x17, 0x58, 0xf9, 0xf8, 0x50, 0xa0, 0x90, 0xe4, 0x29, 0x4c, 12, // 12: signrpc.Signer.DeriveSharedKey:input_type -> signrpc.SharedKeyRequest
0x90, 0x6d, 0x70, 0x8b, 0x3c, 0x4c, 0x03, 0x3b, 0xc1, 0x88, 0x3a, 0xaf, 0xf1, 0xd7, 0x1a, 0x26, 5, // 13: signrpc.Signer.SignOutputRaw:output_type -> signrpc.SignResp
0xdf, 0x7e, 0x88, 0x4b, 0xb7, 0x5d, 0xb7, 0xb3, 0x77, 0xaa, 0x75, 0x41, 0x7b, 0x1f, 0x74, 0x41, 7, // 14: signrpc.Signer.ComputeInputScript:output_type -> signrpc.InputScriptResp
0xbd, 0x39, 0x5c, 0x34, 0x34, 0x0a, 0x96, 0x67, 0x02, 0xf5, 0xc2, 0x68, 0x30, 0x38, 0xc8, 0x3b, 9, // 15: signrpc.Signer.SignMessage:output_type -> signrpc.SignMessageResp
0x15, 0xfb, 0xb6, 0xf9, 0x5f, 0x5d, 0xe8, 0x2f, 0xf5, 0xaf, 0x23, 0xf9, 0x01, 0xc6, 0xea, 0xe9, 11, // 16: signrpc.Signer.VerifyMessage:output_type -> signrpc.VerifyMessageResp
0x95, 0xbe, 0x58, 0x7e, 0x58, 0x92, 0x49, 0x6b, 0xbf, 0x7d, 0x7c, 0xb8, 0xba, 0x38, 0x42, 0x04, 13, // 17: signrpc.Signer.DeriveSharedKey:output_type -> signrpc.SharedKeyResponse
0x23, 0xbf, 0x00, 0xf9, 0x35, 0xdf, 0xb2, 0x42, 0x62, 0x73, 0x81, 0xdf, 0x3f, 0xea, 0xfe, 0xe3, 13, // [13:18] is the sub-list for method output_type
0xbe, 0x19, 0x06, 0xa7, 0xb1, 0x13, 0xa4, 0x7d, 0xab, 0x0e, 0xb1, 0x37, 0x18, 0x8e, 0x57, 0xe8, 8, // [8:13] is the sub-list for method input_type
0x0e, 0xc6, 0xad, 0x20, 0xc9, 0xe3, 0xba, 0xf5, 0x78, 0x79, 0xae, 0xae, 0xfe, 0xed, 0x95, 0x60, 8, // [8:8] is the sub-list for extension type_name
0xe4, 0x39, 0x9c, 0x3f, 0x43, 0x4e, 0xdf, 0x61, 0x6d, 0x63, 0x83, 0xe9, 0x38, 0xfe, 0x06, 0xd3, 8, // [8:8] is the sub-list for extension extendee
0x7b, 0xae, 0xdf, 0xce, 0xde, 0x7c, 0x13, 0x53, 0xb9, 0x29, 0x56, 0xd3, 0x28, 0xdf, 0xce, 0x52, 0, // [0:8] is the sub-list for field type_name
0x1a, 0x6f, 0x64, 0x46, 0xb3, 0x38, 0x43, 0x59, 0xe6, 0x3c, 0x99, 0xa5, 0xd9, 0x7a, 0x96, 0xd6, }
0x5f, 0x26, 0xce, 0xa2, 0x55, 0x5f, 0x7f, 0x9b, 0xbe, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x7d,
0x28, 0x4a, 0xad, 0xb3, 0x06, 0x00, 0x00, func init() { file_signrpc_signer_proto_init() }
func file_signrpc_signer_proto_init() {
if File_signrpc_signer_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_signrpc_signer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyLocator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyDescriptor); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TxOut); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignDescriptor); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputScript); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputScriptResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignMessageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyMessageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SharedKeyRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_signrpc_signer_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SharedKeyResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_signrpc_signer_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_signrpc_signer_proto_goTypes,
DependencyIndexes: file_signrpc_signer_proto_depIdxs,
MessageInfos: file_signrpc_signer_proto_msgTypes,
}.Build()
File_signrpc_signer_proto = out.File
file_signrpc_signer_proto_rawDesc = nil
file_signrpc_signer_proto_goTypes = nil
file_signrpc_signer_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// SignerClient is the client API for Signer service. // SignerClient is the client API for Signer service.
// //
@ -907,10 +1317,10 @@ type SignerClient interface {
} }
type signerClient struct { type signerClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewSignerClient(cc *grpc.ClientConn) SignerClient { func NewSignerClient(cc grpc.ClientConnInterface) SignerClient {
return &signerClient{cc} return &signerClient{cc}
} }
@ -1013,19 +1423,19 @@ type SignerServer interface {
type UnimplementedSignerServer struct { type UnimplementedSignerServer struct {
} }
func (*UnimplementedSignerServer) SignOutputRaw(ctx context.Context, req *SignReq) (*SignResp, error) { func (*UnimplementedSignerServer) SignOutputRaw(context.Context, *SignReq) (*SignResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignOutputRaw not implemented") return nil, status.Errorf(codes.Unimplemented, "method SignOutputRaw not implemented")
} }
func (*UnimplementedSignerServer) ComputeInputScript(ctx context.Context, req *SignReq) (*InputScriptResp, error) { func (*UnimplementedSignerServer) ComputeInputScript(context.Context, *SignReq) (*InputScriptResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ComputeInputScript not implemented") return nil, status.Errorf(codes.Unimplemented, "method ComputeInputScript not implemented")
} }
func (*UnimplementedSignerServer) SignMessage(ctx context.Context, req *SignMessageReq) (*SignMessageResp, error) { func (*UnimplementedSignerServer) SignMessage(context.Context, *SignMessageReq) (*SignMessageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented") return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented")
} }
func (*UnimplementedSignerServer) VerifyMessage(ctx context.Context, req *VerifyMessageReq) (*VerifyMessageResp, error) { func (*UnimplementedSignerServer) VerifyMessage(context.Context, *VerifyMessageReq) (*VerifyMessageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method VerifyMessage not implemented") return nil, status.Errorf(codes.Unimplemented, "method VerifyMessage not implemented")
} }
func (*UnimplementedSignerServer) DeriveSharedKey(ctx context.Context, req *SharedKeyRequest) (*SharedKeyResponse, error) { func (*UnimplementedSignerServer) DeriveSharedKey(context.Context, *SharedKeyRequest) (*SharedKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeriveSharedKey not implemented") return nil, status.Errorf(codes.Unimplemented, "method DeriveSharedKey not implemented")
} }

@ -1,165 +1,414 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: stateservice.proto // source: stateservice.proto
package lnrpc package lnrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type WalletState int32 type WalletState int32
const ( const (
WalletState_NON_EXISTING WalletState = 0 WalletState_NON_EXISTING WalletState = 0
WalletState_LOCKED WalletState = 1 WalletState_LOCKED WalletState = 1
WalletState_UNLOCKED WalletState = 2 WalletState_UNLOCKED WalletState = 2
WalletState_RPC_ACTIVE WalletState = 3 WalletState_RPC_ACTIVE WalletState = 3
WalletState_WAITING_TO_START WalletState = 255
) )
var WalletState_name = map[int32]string{ // Enum value maps for WalletState.
0: "NON_EXISTING", var (
1: "LOCKED", WalletState_name = map[int32]string{
2: "UNLOCKED", 0: "NON_EXISTING",
3: "RPC_ACTIVE", 1: "LOCKED",
} 2: "UNLOCKED",
3: "RPC_ACTIVE",
255: "WAITING_TO_START",
}
WalletState_value = map[string]int32{
"NON_EXISTING": 0,
"LOCKED": 1,
"UNLOCKED": 2,
"RPC_ACTIVE": 3,
"WAITING_TO_START": 255,
}
)
var WalletState_value = map[string]int32{ func (x WalletState) Enum() *WalletState {
"NON_EXISTING": 0, p := new(WalletState)
"LOCKED": 1, *p = x
"UNLOCKED": 2, return p
"RPC_ACTIVE": 3,
} }
func (x WalletState) String() string { func (x WalletState) String() string {
return proto.EnumName(WalletState_name, int32(x)) return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
} }
func (WalletState) Descriptor() protoreflect.EnumDescriptor {
return file_stateservice_proto_enumTypes[0].Descriptor()
}
func (WalletState) Type() protoreflect.EnumType {
return &file_stateservice_proto_enumTypes[0]
}
func (x WalletState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use WalletState.Descriptor instead.
func (WalletState) EnumDescriptor() ([]byte, []int) { func (WalletState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_9cd64a11048f05dd, []int{0} return file_stateservice_proto_rawDescGZIP(), []int{0}
} }
type SubscribeStateRequest struct { type SubscribeStateRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *SubscribeStateRequest) Reset() { *m = SubscribeStateRequest{} } func (x *SubscribeStateRequest) Reset() {
func (m *SubscribeStateRequest) String() string { return proto.CompactTextString(m) } *x = SubscribeStateRequest{}
func (*SubscribeStateRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_stateservice_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscribeStateRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscribeStateRequest) ProtoMessage() {}
func (x *SubscribeStateRequest) ProtoReflect() protoreflect.Message {
mi := &file_stateservice_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscribeStateRequest.ProtoReflect.Descriptor instead.
func (*SubscribeStateRequest) Descriptor() ([]byte, []int) { func (*SubscribeStateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9cd64a11048f05dd, []int{0} return file_stateservice_proto_rawDescGZIP(), []int{0}
} }
func (m *SubscribeStateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SubscribeStateRequest.Unmarshal(m, b)
}
func (m *SubscribeStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SubscribeStateRequest.Marshal(b, m, deterministic)
}
func (m *SubscribeStateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubscribeStateRequest.Merge(m, src)
}
func (m *SubscribeStateRequest) XXX_Size() int {
return xxx_messageInfo_SubscribeStateRequest.Size(m)
}
func (m *SubscribeStateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SubscribeStateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SubscribeStateRequest proto.InternalMessageInfo
type SubscribeStateResponse struct { type SubscribeStateResponse struct {
State WalletState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.WalletState" json:"state,omitempty"` state protoimpl.MessageState
XXX_NoUnkeyedLiteral struct{} `json:"-"` sizeCache protoimpl.SizeCache
XXX_unrecognized []byte `json:"-"` unknownFields protoimpl.UnknownFields
XXX_sizecache int32 `json:"-"`
State WalletState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.WalletState" json:"state,omitempty"`
} }
func (m *SubscribeStateResponse) Reset() { *m = SubscribeStateResponse{} } func (x *SubscribeStateResponse) Reset() {
func (m *SubscribeStateResponse) String() string { return proto.CompactTextString(m) } *x = SubscribeStateResponse{}
func (*SubscribeStateResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_stateservice_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscribeStateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscribeStateResponse) ProtoMessage() {}
func (x *SubscribeStateResponse) ProtoReflect() protoreflect.Message {
mi := &file_stateservice_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscribeStateResponse.ProtoReflect.Descriptor instead.
func (*SubscribeStateResponse) Descriptor() ([]byte, []int) { func (*SubscribeStateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9cd64a11048f05dd, []int{1} return file_stateservice_proto_rawDescGZIP(), []int{1}
} }
func (m *SubscribeStateResponse) XXX_Unmarshal(b []byte) error { func (x *SubscribeStateResponse) GetState() WalletState {
return xxx_messageInfo_SubscribeStateResponse.Unmarshal(m, b) if x != nil {
} return x.State
func (m *SubscribeStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SubscribeStateResponse.Marshal(b, m, deterministic)
}
func (m *SubscribeStateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubscribeStateResponse.Merge(m, src)
}
func (m *SubscribeStateResponse) XXX_Size() int {
return xxx_messageInfo_SubscribeStateResponse.Size(m)
}
func (m *SubscribeStateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SubscribeStateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SubscribeStateResponse proto.InternalMessageInfo
func (m *SubscribeStateResponse) GetState() WalletState {
if m != nil {
return m.State
} }
return WalletState_NON_EXISTING return WalletState_NON_EXISTING
} }
func init() { type GetStateRequest struct {
proto.RegisterEnum("lnrpc.WalletState", WalletState_name, WalletState_value) state protoimpl.MessageState
proto.RegisterType((*SubscribeStateRequest)(nil), "lnrpc.SubscribeStateRequest") sizeCache protoimpl.SizeCache
proto.RegisterType((*SubscribeStateResponse)(nil), "lnrpc.SubscribeStateResponse") unknownFields protoimpl.UnknownFields
} }
func init() { proto.RegisterFile("stateservice.proto", fileDescriptor_9cd64a11048f05dd) } func (x *GetStateRequest) Reset() {
*x = GetStateRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_stateservice_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
var fileDescriptor_9cd64a11048f05dd = []byte{ func (x *GetStateRequest) String() string {
// 245 bytes of a gzipped FileDescriptorProto return protoimpl.X.MessageStringOf(x)
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x2e, 0x49, 0x2c, }
0x49, 0x2d, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62,
0xcd, 0xc9, 0x2b, 0x2a, 0x48, 0x56, 0x12, 0xe7, 0x12, 0x0d, 0x2e, 0x4d, 0x2a, 0x4e, 0x2e, 0xca, func (*GetStateRequest) ProtoMessage() {}
0x4c, 0x4a, 0x0d, 0x06, 0xa9, 0x0a, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0x72, 0xe2, 0x12,
0x43, 0x97, 0x28, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0xd2, 0xe0, 0x62, 0x05, 0x9b, 0x27, 0xc1, func (x *GetStateRequest) ProtoReflect() protoreflect.Message {
0xa8, 0xc0, 0xa8, 0xc1, 0x67, 0x24, 0xa4, 0x07, 0x36, 0x49, 0x2f, 0x3c, 0x31, 0x27, 0x27, 0xb5, mi := &file_stateservice_proto_msgTypes[2]
0x04, 0xa2, 0x14, 0xa2, 0x40, 0xcb, 0x93, 0x8b, 0x1b, 0x49, 0x54, 0x48, 0x80, 0x8b, 0xc7, 0xcf, if protoimpl.UnsafeEnabled && x != nil {
0xdf, 0x2f, 0xde, 0x35, 0xc2, 0x33, 0x38, 0xc4, 0xd3, 0xcf, 0x5d, 0x80, 0x41, 0x88, 0x8b, 0x8b, ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
0xcd, 0xc7, 0xdf, 0xd9, 0xdb, 0xd5, 0x45, 0x80, 0x51, 0x88, 0x87, 0x8b, 0x23, 0xd4, 0x0f, 0xca, if ms.LoadMessageInfo() == nil {
0x63, 0x12, 0xe2, 0xe3, 0xe2, 0x0a, 0x0a, 0x70, 0x8e, 0x77, 0x74, 0x0e, 0xf1, 0x0c, 0x73, 0x15, ms.StoreMessageInfo(mi)
0x60, 0x36, 0x8a, 0xe0, 0x62, 0x85, 0x18, 0xe2, 0xcf, 0xc5, 0x87, 0xea, 0x2e, 0x21, 0x19, 0xa8, }
0x03, 0xb0, 0xfa, 0x43, 0x4a, 0x16, 0x87, 0x2c, 0xc4, 0x33, 0x06, 0x8c, 0x4e, 0xea, 0x51, 0xaa, return ms
0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x39, 0x99, 0xe9, 0x19, 0x25, }
0x79, 0x99, 0x79, 0xe9, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0x39, 0x79, 0x29, 0xfa, return mi.MessageOf(x)
0x60, 0x13, 0x92, 0xd8, 0xc0, 0x01, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x75, 0x6a, 0x2f, }
0xe2, 0x4e, 0x01, 0x00, 0x00,
// Deprecated: Use GetStateRequest.ProtoReflect.Descriptor instead.
func (*GetStateRequest) Descriptor() ([]byte, []int) {
return file_stateservice_proto_rawDescGZIP(), []int{2}
}
type GetStateResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
State WalletState `protobuf:"varint,1,opt,name=State,proto3,enum=lnrpc.WalletState" json:"State,omitempty"`
}
func (x *GetStateResponse) Reset() {
*x = GetStateResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_stateservice_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStateResponse) ProtoMessage() {}
func (x *GetStateResponse) ProtoReflect() protoreflect.Message {
mi := &file_stateservice_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStateResponse.ProtoReflect.Descriptor instead.
func (*GetStateResponse) Descriptor() ([]byte, []int) {
return file_stateservice_proto_rawDescGZIP(), []int{3}
}
func (x *GetStateResponse) GetState() WalletState {
if x != nil {
return x.State
}
return WalletState_NON_EXISTING
}
var File_stateservice_proto protoreflect.FileDescriptor
var file_stateservice_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x17, 0x0a, 0x15, 0x53,
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28,
0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74,
0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53,
0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x10, 0x47,
0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61,
0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x60, 0x0a, 0x0b, 0x57, 0x61, 0x6c,
0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x4e, 0x5f,
0x45, 0x58, 0x49, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f,
0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b,
0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x50, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49,
0x56, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f,
0x54, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0xff, 0x01, 0x32, 0x95, 0x01, 0x0a, 0x05,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75,
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61,
0x74, 0x65, 0x12, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f,
0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_stateservice_proto_rawDescOnce sync.Once
file_stateservice_proto_rawDescData = file_stateservice_proto_rawDesc
)
func file_stateservice_proto_rawDescGZIP() []byte {
file_stateservice_proto_rawDescOnce.Do(func() {
file_stateservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_stateservice_proto_rawDescData)
})
return file_stateservice_proto_rawDescData
}
var file_stateservice_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_stateservice_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_stateservice_proto_goTypes = []interface{}{
(WalletState)(0), // 0: lnrpc.WalletState
(*SubscribeStateRequest)(nil), // 1: lnrpc.SubscribeStateRequest
(*SubscribeStateResponse)(nil), // 2: lnrpc.SubscribeStateResponse
(*GetStateRequest)(nil), // 3: lnrpc.GetStateRequest
(*GetStateResponse)(nil), // 4: lnrpc.GetStateResponse
}
var file_stateservice_proto_depIdxs = []int32{
0, // 0: lnrpc.SubscribeStateResponse.state:type_name -> lnrpc.WalletState
0, // 1: lnrpc.GetStateResponse.State:type_name -> lnrpc.WalletState
1, // 2: lnrpc.State.SubscribeState:input_type -> lnrpc.SubscribeStateRequest
3, // 3: lnrpc.State.GetState:input_type -> lnrpc.GetStateRequest
2, // 4: lnrpc.State.SubscribeState:output_type -> lnrpc.SubscribeStateResponse
4, // 5: lnrpc.State.GetState:output_type -> lnrpc.GetStateResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_stateservice_proto_init() }
func file_stateservice_proto_init() {
if File_stateservice_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_stateservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubscribeStateRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stateservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubscribeStateResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stateservice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStateRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stateservice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStateResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stateservice_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_stateservice_proto_goTypes,
DependencyIndexes: file_stateservice_proto_depIdxs,
EnumInfos: file_stateservice_proto_enumTypes,
MessageInfos: file_stateservice_proto_msgTypes,
}.Build()
File_stateservice_proto = out.File
file_stateservice_proto_rawDesc = nil
file_stateservice_proto_goTypes = nil
file_stateservice_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// StateClient is the client API for State service. // StateClient is the client API for State service.
// //
@ -168,13 +417,16 @@ type StateClient interface {
// SubscribeState subscribes to the state of the wallet. The current wallet // SubscribeState subscribes to the state of the wallet. The current wallet
// state will always be delivered immediately. // state will always be delivered immediately.
SubscribeState(ctx context.Context, in *SubscribeStateRequest, opts ...grpc.CallOption) (State_SubscribeStateClient, error) SubscribeState(ctx context.Context, in *SubscribeStateRequest, opts ...grpc.CallOption) (State_SubscribeStateClient, error)
// GetState returns the current wallet state without streaming further
// changes.
GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error)
} }
type stateClient struct { type stateClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewStateClient(cc *grpc.ClientConn) StateClient { func NewStateClient(cc grpc.ClientConnInterface) StateClient {
return &stateClient{cc} return &stateClient{cc}
} }
@ -210,20 +462,35 @@ func (x *stateSubscribeStateClient) Recv() (*SubscribeStateResponse, error) {
return m, nil return m, nil
} }
func (c *stateClient) GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error) {
out := new(GetStateResponse)
err := c.cc.Invoke(ctx, "/lnrpc.State/GetState", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// StateServer is the server API for State service. // StateServer is the server API for State service.
type StateServer interface { type StateServer interface {
// SubscribeState subscribes to the state of the wallet. The current wallet // SubscribeState subscribes to the state of the wallet. The current wallet
// state will always be delivered immediately. // state will always be delivered immediately.
SubscribeState(*SubscribeStateRequest, State_SubscribeStateServer) error SubscribeState(*SubscribeStateRequest, State_SubscribeStateServer) error
// GetState returns the current wallet state without streaming further
// changes.
GetState(context.Context, *GetStateRequest) (*GetStateResponse, error)
} }
// UnimplementedStateServer can be embedded to have forward compatible implementations. // UnimplementedStateServer can be embedded to have forward compatible implementations.
type UnimplementedStateServer struct { type UnimplementedStateServer struct {
} }
func (*UnimplementedStateServer) SubscribeState(req *SubscribeStateRequest, srv State_SubscribeStateServer) error { func (*UnimplementedStateServer) SubscribeState(*SubscribeStateRequest, State_SubscribeStateServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeState not implemented") return status.Errorf(codes.Unimplemented, "method SubscribeState not implemented")
} }
func (*UnimplementedStateServer) GetState(context.Context, *GetStateRequest) (*GetStateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented")
}
func RegisterStateServer(s *grpc.Server, srv StateServer) { func RegisterStateServer(s *grpc.Server, srv StateServer) {
s.RegisterService(&_State_serviceDesc, srv) s.RegisterService(&_State_serviceDesc, srv)
@ -250,10 +517,33 @@ func (x *stateSubscribeStateServer) Send(m *SubscribeStateResponse) error {
return x.ServerStream.SendMsg(m) return x.ServerStream.SendMsg(m)
} }
func _State_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetStateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StateServer).GetState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/lnrpc.State/GetState",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StateServer).GetState(ctx, req.(*GetStateRequest))
}
return interceptor(ctx, in, info, handler)
}
var _State_serviceDesc = grpc.ServiceDesc{ var _State_serviceDesc = grpc.ServiceDesc{
ServiceName: "lnrpc.State", ServiceName: "lnrpc.State",
HandlerType: (*StateServer)(nil), HandlerType: (*StateServer)(nil),
Methods: []grpc.MethodDesc{}, Methods: []grpc.MethodDesc{
{
MethodName: "GetState",
Handler: _State_GetState_Handler,
},
},
Streams: []grpc.StreamDesc{ Streams: []grpc.StreamDesc{
{ {
StreamName: "SubscribeState", StreamName: "SubscribeState",

@ -48,6 +48,24 @@ func request_State_SubscribeState_0(ctx context.Context, marshaler runtime.Marsh
} }
func request_State_GetState_0(ctx context.Context, marshaler runtime.Marshaler, client StateClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetStateRequest
var metadata runtime.ServerMetadata
msg, err := client.GetState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_State_GetState_0(ctx context.Context, marshaler runtime.Marshaler, server StateServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetStateRequest
var metadata runtime.ServerMetadata
msg, err := server.GetState(ctx, &protoReq)
return msg, metadata, err
}
// RegisterStateHandlerServer registers the http handlers for service State to "mux". // RegisterStateHandlerServer registers the http handlers for service State to "mux".
// UnaryRPC :call StateServer directly. // UnaryRPC :call StateServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -60,6 +78,26 @@ func RegisterStateHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
}) })
mux.Handle("GET", pattern_State_GetState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_State_GetState_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_State_GetState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@ -121,13 +159,37 @@ func RegisterStateHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_State_GetState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_State_GetState_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_State_GetState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
var ( var (
pattern_State_SubscribeState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "state", "subscribe"}, "", runtime.AssumeColonVerbOpt(true))) pattern_State_SubscribeState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "state", "subscribe"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_State_GetState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "state"}, "", runtime.AssumeColonVerbOpt(true)))
) )
var ( var (
forward_State_SubscribeState_0 = runtime.ForwardResponseStream forward_State_SubscribeState_0 = runtime.ForwardResponseStream
forward_State_GetState_0 = runtime.ForwardResponseMessage
) )

@ -29,6 +29,10 @@ service State {
// state will always be delivered immediately. // state will always be delivered immediately.
rpc SubscribeState (SubscribeStateRequest) rpc SubscribeState (SubscribeStateRequest)
returns (stream SubscribeStateResponse); returns (stream SubscribeStateResponse);
// GetState returns the current wallet state without streaming further
// changes.
rpc GetState (GetStateRequest) returns (GetStateResponse);
} }
enum WalletState { enum WalletState {
@ -36,6 +40,8 @@ enum WalletState {
LOCKED = 1; LOCKED = 1;
UNLOCKED = 2; UNLOCKED = 2;
RPC_ACTIVE = 3; RPC_ACTIVE = 3;
WAITING_TO_START = 255;
} }
message SubscribeStateRequest { message SubscribeStateRequest {
@ -44,3 +50,10 @@ message SubscribeStateRequest {
message SubscribeStateResponse { message SubscribeStateResponse {
WalletState state = 1; WalletState state = 1;
} }
message GetStateRequest {
}
message GetStateResponse {
WalletState State = 1;
}

@ -11,6 +11,29 @@
"application/json" "application/json"
], ],
"paths": { "paths": {
"/v1/state": {
"get": {
"summary": "GetState returns the current wallet state without streaming further\nchanges.",
"operationId": "GetState",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/lnrpcGetStateResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"State"
]
}
},
"/v1/state/subscribe": { "/v1/state/subscribe": {
"get": { "get": {
"summary": "SubscribeState subscribes to the state of the wallet. The current wallet\nstate will always be delivered immediately.", "summary": "SubscribeState subscribes to the state of the wallet. The current wallet\nstate will always be delivered immediately.",
@ -45,6 +68,14 @@
} }
}, },
"definitions": { "definitions": {
"lnrpcGetStateResponse": {
"type": "object",
"properties": {
"State": {
"$ref": "#/definitions/lnrpcWalletState"
}
}
},
"lnrpcSubscribeStateResponse": { "lnrpcSubscribeStateResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -59,7 +90,8 @@
"NON_EXISTING", "NON_EXISTING",
"LOCKED", "LOCKED",
"UNLOCKED", "UNLOCKED",
"RPC_ACTIVE" "RPC_ACTIVE",
"WAITING_TO_START"
], ],
"default": "NON_EXISTING" "default": "NON_EXISTING"
}, },

@ -1,61 +1,77 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: verrpc/verrpc.proto // source: verrpc/verrpc.proto
package verrpc package verrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type VersionRequest struct { type VersionRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *VersionRequest) Reset() { *m = VersionRequest{} } func (x *VersionRequest) Reset() {
func (m *VersionRequest) String() string { return proto.CompactTextString(m) } *x = VersionRequest{}
func (*VersionRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_verrpc_verrpc_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VersionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VersionRequest) ProtoMessage() {}
func (x *VersionRequest) ProtoReflect() protoreflect.Message {
mi := &file_verrpc_verrpc_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
func (*VersionRequest) Descriptor() ([]byte, []int) { func (*VersionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_494312204cefa0e6, []int{0} return file_verrpc_verrpc_proto_rawDescGZIP(), []int{0}
} }
func (m *VersionRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VersionRequest.Unmarshal(m, b)
}
func (m *VersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VersionRequest.Marshal(b, m, deterministic)
}
func (m *VersionRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_VersionRequest.Merge(m, src)
}
func (m *VersionRequest) XXX_Size() int {
return xxx_messageInfo_VersionRequest.Size(m)
}
func (m *VersionRequest) XXX_DiscardUnknown() {
xxx_messageInfo_VersionRequest.DiscardUnknown(m)
}
var xxx_messageInfo_VersionRequest proto.InternalMessageInfo
type Version struct { type Version struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A verbose description of the daemon's commit. // A verbose description of the daemon's commit.
Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"` Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"`
// The SHA1 commit hash that the daemon is compiled with. // The SHA1 commit hash that the daemon is compiled with.
@ -73,137 +89,223 @@ type Version struct {
// The list of build tags that were supplied during compilation. // The list of build tags that were supplied during compilation.
BuildTags []string `protobuf:"bytes,8,rep,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` BuildTags []string `protobuf:"bytes,8,rep,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"`
// The version of go that compiled the executable. // The version of go that compiled the executable.
GoVersion string `protobuf:"bytes,9,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` GoVersion string `protobuf:"bytes,9,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Version) Reset() { *m = Version{} } func (x *Version) Reset() {
func (m *Version) String() string { return proto.CompactTextString(m) } *x = Version{}
func (*Version) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_verrpc_verrpc_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Version) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Version) ProtoMessage() {}
func (x *Version) ProtoReflect() protoreflect.Message {
mi := &file_verrpc_verrpc_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Version.ProtoReflect.Descriptor instead.
func (*Version) Descriptor() ([]byte, []int) { func (*Version) Descriptor() ([]byte, []int) {
return fileDescriptor_494312204cefa0e6, []int{1} return file_verrpc_verrpc_proto_rawDescGZIP(), []int{1}
} }
func (m *Version) XXX_Unmarshal(b []byte) error { func (x *Version) GetCommit() string {
return xxx_messageInfo_Version.Unmarshal(m, b) if x != nil {
} return x.Commit
func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Version.Marshal(b, m, deterministic)
}
func (m *Version) XXX_Merge(src proto.Message) {
xxx_messageInfo_Version.Merge(m, src)
}
func (m *Version) XXX_Size() int {
return xxx_messageInfo_Version.Size(m)
}
func (m *Version) XXX_DiscardUnknown() {
xxx_messageInfo_Version.DiscardUnknown(m)
}
var xxx_messageInfo_Version proto.InternalMessageInfo
func (m *Version) GetCommit() string {
if m != nil {
return m.Commit
} }
return "" return ""
} }
func (m *Version) GetCommitHash() string { func (x *Version) GetCommitHash() string {
if m != nil { if x != nil {
return m.CommitHash return x.CommitHash
} }
return "" return ""
} }
func (m *Version) GetVersion() string { func (x *Version) GetVersion() string {
if m != nil { if x != nil {
return m.Version return x.Version
} }
return "" return ""
} }
func (m *Version) GetAppMajor() uint32 { func (x *Version) GetAppMajor() uint32 {
if m != nil { if x != nil {
return m.AppMajor return x.AppMajor
} }
return 0 return 0
} }
func (m *Version) GetAppMinor() uint32 { func (x *Version) GetAppMinor() uint32 {
if m != nil { if x != nil {
return m.AppMinor return x.AppMinor
} }
return 0 return 0
} }
func (m *Version) GetAppPatch() uint32 { func (x *Version) GetAppPatch() uint32 {
if m != nil { if x != nil {
return m.AppPatch return x.AppPatch
} }
return 0 return 0
} }
func (m *Version) GetAppPreRelease() string { func (x *Version) GetAppPreRelease() string {
if m != nil { if x != nil {
return m.AppPreRelease return x.AppPreRelease
} }
return "" return ""
} }
func (m *Version) GetBuildTags() []string { func (x *Version) GetBuildTags() []string {
if m != nil { if x != nil {
return m.BuildTags return x.BuildTags
} }
return nil return nil
} }
func (m *Version) GetGoVersion() string { func (x *Version) GetGoVersion() string {
if m != nil { if x != nil {
return m.GoVersion return x.GoVersion
} }
return "" return ""
} }
func init() { var File_verrpc_verrpc_proto protoreflect.FileDescriptor
proto.RegisterType((*VersionRequest)(nil), "verrpc.VersionRequest")
proto.RegisterType((*Version)(nil), "verrpc.Version") var file_verrpc_verrpc_proto_rawDesc = []byte{
0x0a, 0x13, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x22, 0x10, 0x0a,
0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x99, 0x02, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61,
0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b,
0x0a, 0x09, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x08, 0x61, 0x70, 0x70, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x61,
0x70, 0x70, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
0x61, 0x70, 0x70, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x5f,
0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x70, 0x70,
0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x5f, 0x70, 0x72, 0x65,
0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x61, 0x70, 0x70, 0x50, 0x72, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x1d, 0x0a,
0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a,
0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x42, 0x0a, 0x09, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f,
0x2e, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42,
0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69,
0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c,
0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("verrpc/verrpc.proto", fileDescriptor_494312204cefa0e6) } var (
file_verrpc_verrpc_proto_rawDescOnce sync.Once
file_verrpc_verrpc_proto_rawDescData = file_verrpc_verrpc_proto_rawDesc
)
var fileDescriptor_494312204cefa0e6 = []byte{ func file_verrpc_verrpc_proto_rawDescGZIP() []byte {
// 300 bytes of a gzipped FileDescriptorProto file_verrpc_verrpc_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x51, 0x4b, 0xf3, 0x30, file_verrpc_verrpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_verrpc_verrpc_proto_rawDescData)
0x14, 0x86, 0xd9, 0xf6, 0x7d, 0xdd, 0x72, 0x64, 0x4e, 0x22, 0x48, 0x50, 0xc4, 0xb1, 0x0b, 0xd9, })
0x85, 0xb4, 0xa0, 0xf8, 0x07, 0x76, 0xa3, 0x37, 0x82, 0x14, 0xf1, 0xc2, 0x9b, 0x92, 0x75, 0x87, return file_verrpc_verrpc_proto_rawDescData
0x34, 0xda, 0x26, 0x31, 0xc9, 0xe6, 0x6f, 0xf1, 0xdf, 0x4a, 0x93, 0xae, 0x43, 0xaf, 0x7a, 0x9e, }
0xf7, 0x29, 0xa7, 0xe5, 0x3d, 0x70, 0xba, 0x43, 0x6b, 0x4d, 0x99, 0xc5, 0x47, 0x6a, 0xac, 0xf6,
0x9a, 0x26, 0x91, 0x16, 0x27, 0x70, 0xfc, 0x8a, 0xd6, 0x49, 0xad, 0x72, 0xfc, 0xdc, 0xa2, 0xf3, var file_verrpc_verrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
0x8b, 0xef, 0x21, 0x8c, 0xbb, 0x88, 0x9e, 0x41, 0x52, 0xea, 0xa6, 0x91, 0x9e, 0x0d, 0xe6, 0x83, var file_verrpc_verrpc_proto_goTypes = []interface{}{
0x25, 0xc9, 0x3b, 0xa2, 0x57, 0x70, 0x14, 0xa7, 0xa2, 0xe2, 0xae, 0x62, 0xc3, 0x20, 0x21, 0x46, (*VersionRequest)(nil), // 0: verrpc.VersionRequest
0x8f, 0xdc, 0x55, 0x94, 0xc1, 0x78, 0x17, 0x77, 0xb0, 0x51, 0x90, 0x7b, 0xa4, 0x17, 0x40, 0xb8, (*Version)(nil), // 1: verrpc.Version
0x31, 0x45, 0xc3, 0xdf, 0xb5, 0x65, 0xff, 0xe6, 0x83, 0xe5, 0x34, 0x9f, 0x70, 0x63, 0x9e, 0x5a, }
0xee, 0xa5, 0x54, 0xda, 0xb2, 0xff, 0x07, 0xd9, 0xf2, 0x5e, 0x1a, 0xee, 0xcb, 0x8a, 0x25, 0xbd, var file_verrpc_verrpc_proto_depIdxs = []int32{
0x7c, 0x6e, 0x99, 0x5e, 0xc3, 0x2c, 0x48, 0x8b, 0x85, 0xc5, 0x1a, 0xb9, 0x43, 0x36, 0x0e, 0x1f, 0, // 0: verrpc.Versioner.GetVersion:input_type -> verrpc.VersionRequest
0x9e, 0xb6, 0xaf, 0x58, 0xcc, 0x63, 0x48, 0x2f, 0x01, 0xd6, 0x5b, 0x59, 0x6f, 0x0a, 0xcf, 0x85, 1, // 1: verrpc.Versioner.GetVersion:output_type -> verrpc.Version
0x63, 0x93, 0xf9, 0x68, 0x49, 0x72, 0x12, 0x92, 0x17, 0x2e, 0x5c, 0xab, 0x85, 0x2e, 0xf6, 0xbf, 1, // [1:2] is the sub-list for method output_type
0x4e, 0xc2, 0x06, 0x22, 0x74, 0xd7, 0xc7, 0xed, 0x0a, 0x48, 0x37, 0xa2, 0xa5, 0xf7, 0x00, 0x0f, 0, // [0:1] is the sub-list for method input_type
0xe8, 0xfb, 0xaa, 0xd2, 0xae, 0xdf, 0xdf, 0x75, 0x9e, 0xcf, 0xfe, 0xe4, 0xab, 0xf4, 0xed, 0x46, 0, // [0:0] is the sub-list for extension type_name
0x48, 0x5f, 0x6d, 0xd7, 0x69, 0xa9, 0x9b, 0xac, 0x96, 0xa2, 0xf2, 0x4a, 0x2a, 0xa1, 0xd0, 0x7f, 0, // [0:0] is the sub-list for extension extendee
0x69, 0xfb, 0x91, 0xd5, 0x6a, 0x93, 0xd5, 0xea, 0x70, 0xaf, 0x75, 0x12, 0x0e, 0x76, 0xf7, 0x13, 0, // [0:0] is the sub-list for field type_name
0x00, 0x00, 0xff, 0xff, 0x00, 0x3d, 0xb5, 0x81, 0xc7, 0x01, 0x00, 0x00, }
func init() { file_verrpc_verrpc_proto_init() }
func file_verrpc_verrpc_proto_init() {
if File_verrpc_verrpc_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_verrpc_verrpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VersionRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_verrpc_verrpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Version); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_verrpc_verrpc_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_verrpc_verrpc_proto_goTypes,
DependencyIndexes: file_verrpc_verrpc_proto_depIdxs,
MessageInfos: file_verrpc_verrpc_proto_msgTypes,
}.Build()
File_verrpc_verrpc_proto = out.File
file_verrpc_verrpc_proto_rawDesc = nil
file_verrpc_verrpc_proto_goTypes = nil
file_verrpc_verrpc_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// VersionerClient is the client API for Versioner service. // VersionerClient is the client API for Versioner service.
// //
@ -216,10 +318,10 @@ type VersionerClient interface {
} }
type versionerClient struct { type versionerClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewVersionerClient(cc *grpc.ClientConn) VersionerClient { func NewVersionerClient(cc grpc.ClientConnInterface) VersionerClient {
return &versionerClient{cc} return &versionerClient{cc}
} }
@ -244,7 +346,7 @@ type VersionerServer interface {
type UnimplementedVersionerServer struct { type UnimplementedVersionerServer struct {
} }
func (*UnimplementedVersionerServer) GetVersion(ctx context.Context, req *VersionRequest) (*Version, error) { func (*UnimplementedVersionerServer) GetVersion(context.Context, *VersionRequest) (*Version, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented")
} }

File diff suppressed because it is too large Load Diff

@ -1,30 +1,39 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: walletunlocker.proto // source: walletunlocker.proto
package lnrpc package lnrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type GenSeedRequest struct { type GenSeedRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//aezeed_passphrase is an optional user provided passphrase that will be used //aezeed_passphrase is an optional user provided passphrase that will be used
//to encrypt the generated aezeed cipher seed. When using REST, this field //to encrypt the generated aezeed cipher seed. When using REST, this field
@ -34,52 +43,60 @@ type GenSeedRequest struct {
//seed_entropy is an optional 16-bytes generated via CSPRNG. If not //seed_entropy is an optional 16-bytes generated via CSPRNG. If not
//specified, then a fresh set of randomness will be used to create the seed. //specified, then a fresh set of randomness will be used to create the seed.
//When using REST, this field must be encoded as base64. //When using REST, this field must be encoded as base64.
SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"` SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *GenSeedRequest) Reset() { *m = GenSeedRequest{} } func (x *GenSeedRequest) Reset() {
func (m *GenSeedRequest) String() string { return proto.CompactTextString(m) } *x = GenSeedRequest{}
func (*GenSeedRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GenSeedRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GenSeedRequest) ProtoMessage() {}
func (x *GenSeedRequest) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GenSeedRequest.ProtoReflect.Descriptor instead.
func (*GenSeedRequest) Descriptor() ([]byte, []int) { func (*GenSeedRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{0} return file_walletunlocker_proto_rawDescGZIP(), []int{0}
} }
func (m *GenSeedRequest) XXX_Unmarshal(b []byte) error { func (x *GenSeedRequest) GetAezeedPassphrase() []byte {
return xxx_messageInfo_GenSeedRequest.Unmarshal(m, b) if x != nil {
} return x.AezeedPassphrase
func (m *GenSeedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GenSeedRequest.Marshal(b, m, deterministic)
}
func (m *GenSeedRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenSeedRequest.Merge(m, src)
}
func (m *GenSeedRequest) XXX_Size() int {
return xxx_messageInfo_GenSeedRequest.Size(m)
}
func (m *GenSeedRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GenSeedRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GenSeedRequest proto.InternalMessageInfo
func (m *GenSeedRequest) GetAezeedPassphrase() []byte {
if m != nil {
return m.AezeedPassphrase
} }
return nil return nil
} }
func (m *GenSeedRequest) GetSeedEntropy() []byte { func (x *GenSeedRequest) GetSeedEntropy() []byte {
if m != nil { if x != nil {
return m.SeedEntropy return x.SeedEntropy
} }
return nil return nil
} }
type GenSeedResponse struct { type GenSeedResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed //cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
//cipher seed obtained by the user. This field is optional, as if not //cipher seed obtained by the user. This field is optional, as if not
@ -90,52 +107,60 @@ type GenSeedResponse struct {
// //
//enciphered_seed are the raw aezeed cipher seed bytes. This is the raw //enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
//cipher text before run through our mnemonic encoding scheme. //cipher text before run through our mnemonic encoding scheme.
EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"` EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *GenSeedResponse) Reset() { *m = GenSeedResponse{} } func (x *GenSeedResponse) Reset() {
func (m *GenSeedResponse) String() string { return proto.CompactTextString(m) } *x = GenSeedResponse{}
func (*GenSeedResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GenSeedResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GenSeedResponse) ProtoMessage() {}
func (x *GenSeedResponse) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GenSeedResponse.ProtoReflect.Descriptor instead.
func (*GenSeedResponse) Descriptor() ([]byte, []int) { func (*GenSeedResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{1} return file_walletunlocker_proto_rawDescGZIP(), []int{1}
} }
func (m *GenSeedResponse) XXX_Unmarshal(b []byte) error { func (x *GenSeedResponse) GetCipherSeedMnemonic() []string {
return xxx_messageInfo_GenSeedResponse.Unmarshal(m, b) if x != nil {
} return x.CipherSeedMnemonic
func (m *GenSeedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GenSeedResponse.Marshal(b, m, deterministic)
}
func (m *GenSeedResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenSeedResponse.Merge(m, src)
}
func (m *GenSeedResponse) XXX_Size() int {
return xxx_messageInfo_GenSeedResponse.Size(m)
}
func (m *GenSeedResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GenSeedResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GenSeedResponse proto.InternalMessageInfo
func (m *GenSeedResponse) GetCipherSeedMnemonic() []string {
if m != nil {
return m.CipherSeedMnemonic
} }
return nil return nil
} }
func (m *GenSeedResponse) GetEncipheredSeed() []byte { func (x *GenSeedResponse) GetEncipheredSeed() []byte {
if m != nil { if x != nil {
return m.EncipheredSeed return x.EncipheredSeed
} }
return nil return nil
} }
type InitWalletRequest struct { type InitWalletRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//wallet_password is the passphrase that should be used to encrypt the //wallet_password is the passphrase that should be used to encrypt the
//wallet. This MUST be at least 8 chars in length. After creation, this //wallet. This MUST be at least 8 chars in length. After creation, this
@ -172,125 +197,141 @@ type InitWalletRequest struct {
//any *.macaroon files in its filesystem. If this parameter is set, then the //any *.macaroon files in its filesystem. If this parameter is set, then the
//admin macaroon returned in the response MUST be stored by the caller of the //admin macaroon returned in the response MUST be stored by the caller of the
//RPC as otherwise all access to the daemon will be lost! //RPC as otherwise all access to the daemon will be lost!
StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"` StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *InitWalletRequest) Reset() { *m = InitWalletRequest{} } func (x *InitWalletRequest) Reset() {
func (m *InitWalletRequest) String() string { return proto.CompactTextString(m) } *x = InitWalletRequest{}
func (*InitWalletRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InitWalletRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InitWalletRequest) ProtoMessage() {}
func (x *InitWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InitWalletRequest.ProtoReflect.Descriptor instead.
func (*InitWalletRequest) Descriptor() ([]byte, []int) { func (*InitWalletRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{2} return file_walletunlocker_proto_rawDescGZIP(), []int{2}
} }
func (m *InitWalletRequest) XXX_Unmarshal(b []byte) error { func (x *InitWalletRequest) GetWalletPassword() []byte {
return xxx_messageInfo_InitWalletRequest.Unmarshal(m, b) if x != nil {
} return x.WalletPassword
func (m *InitWalletRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InitWalletRequest.Marshal(b, m, deterministic)
}
func (m *InitWalletRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_InitWalletRequest.Merge(m, src)
}
func (m *InitWalletRequest) XXX_Size() int {
return xxx_messageInfo_InitWalletRequest.Size(m)
}
func (m *InitWalletRequest) XXX_DiscardUnknown() {
xxx_messageInfo_InitWalletRequest.DiscardUnknown(m)
}
var xxx_messageInfo_InitWalletRequest proto.InternalMessageInfo
func (m *InitWalletRequest) GetWalletPassword() []byte {
if m != nil {
return m.WalletPassword
} }
return nil return nil
} }
func (m *InitWalletRequest) GetCipherSeedMnemonic() []string { func (x *InitWalletRequest) GetCipherSeedMnemonic() []string {
if m != nil { if x != nil {
return m.CipherSeedMnemonic return x.CipherSeedMnemonic
} }
return nil return nil
} }
func (m *InitWalletRequest) GetAezeedPassphrase() []byte { func (x *InitWalletRequest) GetAezeedPassphrase() []byte {
if m != nil { if x != nil {
return m.AezeedPassphrase return x.AezeedPassphrase
} }
return nil return nil
} }
func (m *InitWalletRequest) GetRecoveryWindow() int32 { func (x *InitWalletRequest) GetRecoveryWindow() int32 {
if m != nil { if x != nil {
return m.RecoveryWindow return x.RecoveryWindow
} }
return 0 return 0
} }
func (m *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot { func (x *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
if m != nil { if x != nil {
return m.ChannelBackups return x.ChannelBackups
} }
return nil return nil
} }
func (m *InitWalletRequest) GetStatelessInit() bool { func (x *InitWalletRequest) GetStatelessInit() bool {
if m != nil { if x != nil {
return m.StatelessInit return x.StatelessInit
} }
return false return false
} }
type InitWalletResponse struct { type InitWalletResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The binary serialized admin macaroon that can be used to access the daemon //The binary serialized admin macaroon that can be used to access the daemon
//after creating the wallet. If the stateless_init parameter was set to true, //after creating the wallet. If the stateless_init parameter was set to true,
//this is the ONLY copy of the macaroon and MUST be stored safely by the //this is the ONLY copy of the macaroon and MUST be stored safely by the
//caller. Otherwise a copy of this macaroon is also persisted on disk by the //caller. Otherwise a copy of this macaroon is also persisted on disk by the
//daemon, together with other macaroon files. //daemon, together with other macaroon files.
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *InitWalletResponse) Reset() { *m = InitWalletResponse{} } func (x *InitWalletResponse) Reset() {
func (m *InitWalletResponse) String() string { return proto.CompactTextString(m) } *x = InitWalletResponse{}
func (*InitWalletResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InitWalletResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InitWalletResponse) ProtoMessage() {}
func (x *InitWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InitWalletResponse.ProtoReflect.Descriptor instead.
func (*InitWalletResponse) Descriptor() ([]byte, []int) { func (*InitWalletResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{3} return file_walletunlocker_proto_rawDescGZIP(), []int{3}
} }
func (m *InitWalletResponse) XXX_Unmarshal(b []byte) error { func (x *InitWalletResponse) GetAdminMacaroon() []byte {
return xxx_messageInfo_InitWalletResponse.Unmarshal(m, b) if x != nil {
} return x.AdminMacaroon
func (m *InitWalletResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InitWalletResponse.Marshal(b, m, deterministic)
}
func (m *InitWalletResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_InitWalletResponse.Merge(m, src)
}
func (m *InitWalletResponse) XXX_Size() int {
return xxx_messageInfo_InitWalletResponse.Size(m)
}
func (m *InitWalletResponse) XXX_DiscardUnknown() {
xxx_messageInfo_InitWalletResponse.DiscardUnknown(m)
}
var xxx_messageInfo_InitWalletResponse proto.InternalMessageInfo
func (m *InitWalletResponse) GetAdminMacaroon() []byte {
if m != nil {
return m.AdminMacaroon
} }
return nil return nil
} }
type UnlockWalletRequest struct { type UnlockWalletRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//wallet_password should be the current valid passphrase for the daemon. This //wallet_password should be the current valid passphrase for the daemon. This
//will be required to decrypt on-disk material that the daemon requires to //will be required to decrypt on-disk material that the daemon requires to
@ -314,97 +355,112 @@ type UnlockWalletRequest struct {
// //
//stateless_init is an optional argument instructing the daemon NOT to create //stateless_init is an optional argument instructing the daemon NOT to create
//any *.macaroon files in its file system. //any *.macaroon files in its file system.
StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"` StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *UnlockWalletRequest) Reset() { *m = UnlockWalletRequest{} } func (x *UnlockWalletRequest) Reset() {
func (m *UnlockWalletRequest) String() string { return proto.CompactTextString(m) } *x = UnlockWalletRequest{}
func (*UnlockWalletRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UnlockWalletRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnlockWalletRequest) ProtoMessage() {}
func (x *UnlockWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnlockWalletRequest.ProtoReflect.Descriptor instead.
func (*UnlockWalletRequest) Descriptor() ([]byte, []int) { func (*UnlockWalletRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{4} return file_walletunlocker_proto_rawDescGZIP(), []int{4}
} }
func (m *UnlockWalletRequest) XXX_Unmarshal(b []byte) error { func (x *UnlockWalletRequest) GetWalletPassword() []byte {
return xxx_messageInfo_UnlockWalletRequest.Unmarshal(m, b) if x != nil {
} return x.WalletPassword
func (m *UnlockWalletRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UnlockWalletRequest.Marshal(b, m, deterministic)
}
func (m *UnlockWalletRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UnlockWalletRequest.Merge(m, src)
}
func (m *UnlockWalletRequest) XXX_Size() int {
return xxx_messageInfo_UnlockWalletRequest.Size(m)
}
func (m *UnlockWalletRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UnlockWalletRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UnlockWalletRequest proto.InternalMessageInfo
func (m *UnlockWalletRequest) GetWalletPassword() []byte {
if m != nil {
return m.WalletPassword
} }
return nil return nil
} }
func (m *UnlockWalletRequest) GetRecoveryWindow() int32 { func (x *UnlockWalletRequest) GetRecoveryWindow() int32 {
if m != nil { if x != nil {
return m.RecoveryWindow return x.RecoveryWindow
} }
return 0 return 0
} }
func (m *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot { func (x *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
if m != nil { if x != nil {
return m.ChannelBackups return x.ChannelBackups
} }
return nil return nil
} }
func (m *UnlockWalletRequest) GetStatelessInit() bool { func (x *UnlockWalletRequest) GetStatelessInit() bool {
if m != nil { if x != nil {
return m.StatelessInit return x.StatelessInit
} }
return false return false
} }
type UnlockWalletResponse struct { type UnlockWalletResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *UnlockWalletResponse) Reset() { *m = UnlockWalletResponse{} } func (x *UnlockWalletResponse) Reset() {
func (m *UnlockWalletResponse) String() string { return proto.CompactTextString(m) } *x = UnlockWalletResponse{}
func (*UnlockWalletResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UnlockWalletResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnlockWalletResponse) ProtoMessage() {}
func (x *UnlockWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnlockWalletResponse.ProtoReflect.Descriptor instead.
func (*UnlockWalletResponse) Descriptor() ([]byte, []int) { func (*UnlockWalletResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{5} return file_walletunlocker_proto_rawDescGZIP(), []int{5}
} }
func (m *UnlockWalletResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnlockWalletResponse.Unmarshal(m, b)
}
func (m *UnlockWalletResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UnlockWalletResponse.Marshal(b, m, deterministic)
}
func (m *UnlockWalletResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_UnlockWalletResponse.Merge(m, src)
}
func (m *UnlockWalletResponse) XXX_Size() int {
return xxx_messageInfo_UnlockWalletResponse.Size(m)
}
func (m *UnlockWalletResponse) XXX_DiscardUnknown() {
xxx_messageInfo_UnlockWalletResponse.DiscardUnknown(m)
}
var xxx_messageInfo_UnlockWalletResponse proto.InternalMessageInfo
type ChangePasswordRequest struct { type ChangePasswordRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//current_password should be the current valid passphrase used to unlock the //current_password should be the current valid passphrase used to unlock the
//daemon. When using REST, this field must be encoded as base64. //daemon. When using REST, this field must be encoded as base64.
@ -423,66 +479,74 @@ type ChangePasswordRequest struct {
//new_macaroon_root_key is an optional argument instructing the daemon to //new_macaroon_root_key is an optional argument instructing the daemon to
//rotate the macaroon root key when set to true. This will invalidate all //rotate the macaroon root key when set to true. This will invalidate all
//previously generated macaroons. //previously generated macaroons.
NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"` NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } func (x *ChangePasswordRequest) Reset() {
func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) } *x = ChangePasswordRequest{}
func (*ChangePasswordRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChangePasswordRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChangePasswordRequest) ProtoMessage() {}
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{6} return file_walletunlocker_proto_rawDescGZIP(), []int{6}
} }
func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { func (x *ChangePasswordRequest) GetCurrentPassword() []byte {
return xxx_messageInfo_ChangePasswordRequest.Unmarshal(m, b) if x != nil {
} return x.CurrentPassword
func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic)
}
func (m *ChangePasswordRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChangePasswordRequest.Merge(m, src)
}
func (m *ChangePasswordRequest) XXX_Size() int {
return xxx_messageInfo_ChangePasswordRequest.Size(m)
}
func (m *ChangePasswordRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo
func (m *ChangePasswordRequest) GetCurrentPassword() []byte {
if m != nil {
return m.CurrentPassword
} }
return nil return nil
} }
func (m *ChangePasswordRequest) GetNewPassword() []byte { func (x *ChangePasswordRequest) GetNewPassword() []byte {
if m != nil { if x != nil {
return m.NewPassword return x.NewPassword
} }
return nil return nil
} }
func (m *ChangePasswordRequest) GetStatelessInit() bool { func (x *ChangePasswordRequest) GetStatelessInit() bool {
if m != nil { if x != nil {
return m.StatelessInit return x.StatelessInit
} }
return false return false
} }
func (m *ChangePasswordRequest) GetNewMacaroonRootKey() bool { func (x *ChangePasswordRequest) GetNewMacaroonRootKey() bool {
if m != nil { if x != nil {
return m.NewMacaroonRootKey return x.NewMacaroonRootKey
} }
return false return false
} }
type ChangePasswordResponse struct { type ChangePasswordResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The binary serialized admin macaroon that can be used to access the daemon //The binary serialized admin macaroon that can be used to access the daemon
//after rotating the macaroon root key. If both the stateless_init and //after rotating the macaroon root key. If both the stateless_init and
@ -490,106 +554,317 @@ type ChangePasswordResponse struct {
//the macaroon that was created from the new root key and MUST be stored //the macaroon that was created from the new root key and MUST be stored
//safely by the caller. Otherwise a copy of this macaroon is also persisted on //safely by the caller. Otherwise a copy of this macaroon is also persisted on
//disk by the daemon, together with other macaroon files. //disk by the daemon, together with other macaroon files.
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} } func (x *ChangePasswordResponse) Reset() {
func (m *ChangePasswordResponse) String() string { return proto.CompactTextString(m) } *x = ChangePasswordResponse{}
func (*ChangePasswordResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_walletunlocker_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChangePasswordResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChangePasswordResponse) ProtoMessage() {}
func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
mi := &file_walletunlocker_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead.
func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { func (*ChangePasswordResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{7} return file_walletunlocker_proto_rawDescGZIP(), []int{7}
} }
func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error { func (x *ChangePasswordResponse) GetAdminMacaroon() []byte {
return xxx_messageInfo_ChangePasswordResponse.Unmarshal(m, b) if x != nil {
} return x.AdminMacaroon
func (m *ChangePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChangePasswordResponse.Marshal(b, m, deterministic)
}
func (m *ChangePasswordResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChangePasswordResponse.Merge(m, src)
}
func (m *ChangePasswordResponse) XXX_Size() int {
return xxx_messageInfo_ChangePasswordResponse.Size(m)
}
func (m *ChangePasswordResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ChangePasswordResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ChangePasswordResponse proto.InternalMessageInfo
func (m *ChangePasswordResponse) GetAdminMacaroon() []byte {
if m != nil {
return m.AdminMacaroon
} }
return nil return nil
} }
func init() { var File_walletunlocker_proto protoreflect.FileDescriptor
proto.RegisterType((*GenSeedRequest)(nil), "lnrpc.GenSeedRequest")
proto.RegisterType((*GenSeedResponse)(nil), "lnrpc.GenSeedResponse") var file_walletunlocker_proto_rawDesc = []byte{
proto.RegisterType((*InitWalletRequest)(nil), "lnrpc.InitWalletRequest") 0x0a, 0x14, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72,
proto.RegisterType((*InitWalletResponse)(nil), "lnrpc.InitWalletResponse") 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x1a, 0x09, 0x72,
proto.RegisterType((*UnlockWalletRequest)(nil), "lnrpc.UnlockWalletRequest") 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x53,
proto.RegisterType((*UnlockWalletResponse)(nil), "lnrpc.UnlockWalletResponse") 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x65,
proto.RegisterType((*ChangePasswordRequest)(nil), "lnrpc.ChangePasswordRequest") 0x7a, 0x65, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18,
proto.RegisterType((*ChangePasswordResponse)(nil), "lnrpc.ChangePasswordResponse") 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x65, 0x7a, 0x65, 0x65, 0x64, 0x50, 0x61, 0x73,
0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x65, 0x64, 0x5f,
0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73,
0x65, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x22, 0x6c, 0x0a, 0x0f, 0x47, 0x65,
0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a,
0x14, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x5f, 0x6d, 0x6e, 0x65,
0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x69, 0x70,
0x68, 0x65, 0x72, 0x53, 0x65, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12,
0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x69, 0x70, 0x68,
0x65, 0x72, 0x65, 0x64, 0x53, 0x65, 0x65, 0x64, 0x22, 0xaf, 0x02, 0x0a, 0x11, 0x49, 0x6e, 0x69,
0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27,
0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x50,
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x69, 0x70, 0x68, 0x65,
0x72, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x5f, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18,
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x65, 0x65,
0x64, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x65, 0x7a,
0x65, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x65, 0x7a, 0x65, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73,
0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65,
0x72, 0x79, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12,
0x42, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75,
0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73,
0x68, 0x6f, 0x74, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b,
0x75, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x61,
0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x22, 0x3b, 0x0a, 0x12, 0x49, 0x6e,
0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d,
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f,
0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74,
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f,
0x76, 0x65, 0x72, 0x79, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x57, 0x69, 0x6e, 0x64, 0x6f,
0x77, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x62, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61,
0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65,
0x73, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73,
0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x22, 0x16, 0x0a, 0x14,
0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50,
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77,
0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0e,
0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49,
0x6e, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72,
0x6f, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x52, 0x12, 0x6e, 0x65, 0x77, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52,
0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x3f, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d,
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x32, 0xa5, 0x02, 0x0a, 0x0e, 0x57, 0x61, 0x6c, 0x6c,
0x65, 0x74, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65,
0x6e, 0x53, 0x65, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65,
0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c,
0x65, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57,
0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c,
0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63,
0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x6e, 0x6c, 0x6f,
0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50,
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69,
0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c,
0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("walletunlocker.proto", fileDescriptor_76e3ed10ed53e4fd) } var (
file_walletunlocker_proto_rawDescOnce sync.Once
file_walletunlocker_proto_rawDescData = file_walletunlocker_proto_rawDesc
)
var fileDescriptor_76e3ed10ed53e4fd = []byte{ func file_walletunlocker_proto_rawDescGZIP() []byte {
// 599 bytes of a gzipped FileDescriptorProto file_walletunlocker_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdd, 0x6a, 0xdb, 0x4c, file_walletunlocker_proto_rawDescData = protoimpl.X.CompressGZIP(file_walletunlocker_proto_rawDescData)
0x10, 0x86, 0x91, 0x9d, 0xe4, 0xfb, 0x32, 0x71, 0xe4, 0x64, 0x9b, 0x04, 0xc5, 0x6d, 0xc1, 0x11, })
0x04, 0xbb, 0x14, 0x9c, 0x36, 0x3d, 0x29, 0xf4, 0xa0, 0x34, 0xa5, 0x84, 0x52, 0x02, 0x41, 0x21, return file_walletunlocker_proto_rawDescData
0x04, 0x7a, 0xa2, 0x6e, 0xa4, 0xc1, 0x12, 0x96, 0x67, 0xd5, 0xdd, 0x75, 0x85, 0x7b, 0x3f, 0x3d, }
0xee, 0x25, 0xf4, 0x1e, 0x7a, 0x45, 0x45, 0xab, 0xb5, 0xf3, 0x63, 0x19, 0xfa, 0x73, 0xfa, 0xcc,
0xcc, 0xee, 0xbc, 0xef, 0xcc, 0x2e, 0xec, 0x14, 0x3c, 0xcb, 0x50, 0x4f, 0x28, 0x13, 0xd1, 0x08, var file_walletunlocker_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
0xe5, 0x20, 0x97, 0x42, 0x0b, 0xb6, 0x9a, 0x91, 0xcc, 0xa3, 0xce, 0xba, 0xcc, 0xa3, 0x8a, 0xf8, var file_walletunlocker_proto_goTypes = []interface{}{
0x9f, 0xc0, 0x3d, 0x45, 0xba, 0x40, 0x8c, 0x03, 0xfc, 0x3c, 0x41, 0xa5, 0xd9, 0x53, 0xd8, 0xe6, (*GenSeedRequest)(nil), // 0: lnrpc.GenSeedRequest
0xf8, 0x15, 0x31, 0x0e, 0x73, 0xae, 0x54, 0x9e, 0x48, 0xae, 0xd0, 0x73, 0xba, 0x4e, 0xbf, 0x15, (*GenSeedResponse)(nil), // 1: lnrpc.GenSeedResponse
0x6c, 0x55, 0x81, 0xf3, 0x39, 0x67, 0x07, 0xd0, 0x52, 0x65, 0x2a, 0x92, 0x96, 0x22, 0x9f, 0x7a, (*InitWalletRequest)(nil), // 2: lnrpc.InitWalletRequest
0x0d, 0x93, 0xb7, 0x51, 0xb2, 0x77, 0x15, 0xf2, 0x33, 0x68, 0xcf, 0x6f, 0x50, 0xb9, 0x20, 0x85, (*InitWalletResponse)(nil), // 3: lnrpc.InitWalletResponse
0xec, 0x19, 0xec, 0x44, 0x69, 0x9e, 0xa0, 0x0c, 0x4d, 0xf1, 0x98, 0x70, 0x2c, 0x28, 0x8d, 0x3c, (*UnlockWalletRequest)(nil), // 4: lnrpc.UnlockWalletRequest
0xa7, 0xdb, 0xec, 0xaf, 0x07, 0xac, 0x8a, 0x95, 0x15, 0x67, 0x36, 0xc2, 0x7a, 0xd0, 0x46, 0xaa, (*UnlockWalletResponse)(nil), // 5: lnrpc.UnlockWalletResponse
0x38, 0xc6, 0xa6, 0xca, 0x5e, 0xe5, 0xde, 0xe0, 0xb2, 0xc0, 0xff, 0xde, 0x80, 0xed, 0xf7, 0x94, (*ChangePasswordRequest)(nil), // 6: lnrpc.ChangePasswordRequest
0xea, 0x2b, 0x23, 0x7f, 0xa6, 0xa9, 0x07, 0xed, 0xca, 0x0f, 0xa3, 0xa9, 0x10, 0x32, 0xb6, 0x8a, (*ChangePasswordResponse)(nil), // 7: lnrpc.ChangePasswordResponse
0xdc, 0x0a, 0x9f, 0x5b, 0xba, 0xb4, 0xb3, 0xc6, 0xd2, 0xce, 0x6a, 0xed, 0x6a, 0x2e, 0xb1, 0xab, (*ChanBackupSnapshot)(nil), // 8: lnrpc.ChanBackupSnapshot
0x07, 0x6d, 0x89, 0x91, 0xf8, 0x82, 0x72, 0x1a, 0x16, 0x29, 0xc5, 0xa2, 0xf0, 0x56, 0xba, 0x4e, }
0x7f, 0x35, 0x70, 0x67, 0xf8, 0xca, 0x50, 0x76, 0x02, 0xed, 0x28, 0xe1, 0x44, 0x98, 0x85, 0xd7, var file_walletunlocker_proto_depIdxs = []int32{
0x3c, 0x1a, 0x4d, 0x72, 0xe5, 0xad, 0x76, 0x9d, 0xfe, 0xc6, 0xf1, 0xfe, 0xc0, 0x8c, 0x70, 0xf0, 8, // 0: lnrpc.InitWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot
0x36, 0xe1, 0x74, 0x62, 0x22, 0x17, 0xc4, 0x73, 0x95, 0x08, 0x1d, 0xb8, 0xb6, 0xa2, 0xc2, 0x8a, 8, // 1: lnrpc.UnlockWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot
0x1d, 0x82, 0xab, 0x34, 0xd7, 0x98, 0xa1, 0x52, 0x61, 0x4a, 0xa9, 0xf6, 0xd6, 0xba, 0x4e, 0xff, 0, // 2: lnrpc.WalletUnlocker.GenSeed:input_type -> lnrpc.GenSeedRequest
0xff, 0x60, 0x73, 0x4e, 0x4b, 0xa3, 0xfc, 0x57, 0xc0, 0x6e, 0x1b, 0x66, 0x47, 0x74, 0x08, 0x2e, 2, // 3: lnrpc.WalletUnlocker.InitWallet:input_type -> lnrpc.InitWalletRequest
0x8f, 0xc7, 0x29, 0x85, 0x63, 0x1e, 0x71, 0x29, 0x04, 0x59, 0xc3, 0x36, 0x0d, 0x3d, 0xb3, 0xd0, 4, // 4: lnrpc.WalletUnlocker.UnlockWallet:input_type -> lnrpc.UnlockWalletRequest
0xff, 0xe9, 0xc0, 0x83, 0x4b, 0xb3, 0x63, 0x7f, 0x69, 0x78, 0x8d, 0x23, 0x8d, 0xdf, 0x75, 0xa4, 6, // 5: lnrpc.WalletUnlocker.ChangePassword:input_type -> lnrpc.ChangePasswordRequest
0xf9, 0xef, 0x8e, 0xac, 0xd4, 0x39, 0xb2, 0x07, 0x3b, 0x77, 0x35, 0x55, 0x9e, 0xf8, 0x3f, 0x1c, 1, // 6: lnrpc.WalletUnlocker.GenSeed:output_type -> lnrpc.GenSeedResponse
0xd8, 0x2d, 0x6f, 0x19, 0xe2, 0xac, 0xfd, 0x99, 0xdc, 0x27, 0xb0, 0x15, 0x4d, 0xa4, 0x44, 0x5a, 3, // 7: lnrpc.WalletUnlocker.InitWallet:output_type -> lnrpc.InitWalletResponse
0xd0, 0xdb, 0xb6, 0x7c, 0x2e, 0xf8, 0x00, 0x5a, 0x84, 0xc5, 0x4d, 0x9a, 0x7d, 0x31, 0x84, 0xc5, 5, // 8: lnrpc.WalletUnlocker.UnlockWallet:output_type -> lnrpc.UnlockWalletResponse
0x3c, 0x65, 0xb1, 0xcd, 0x66, 0x4d, 0x9b, 0xec, 0x39, 0xec, 0x96, 0x27, 0xcd, 0x06, 0x14, 0x4a, 7, // 9: lnrpc.WalletUnlocker.ChangePassword:output_type -> lnrpc.ChangePasswordResponse
0x21, 0x74, 0x38, 0xc2, 0xa9, 0x15, 0xc5, 0x08, 0x8b, 0xd9, 0x9c, 0x02, 0x21, 0xf4, 0x07, 0x9c, 6, // [6:10] is the sub-list for method output_type
0xfa, 0xaf, 0x61, 0xef, 0xbe, 0x80, 0x3f, 0x9a, 0xf7, 0xf1, 0xb7, 0x06, 0xb8, 0x95, 0x2b, 0x97, 2, // [2:6] is the sub-list for method input_type
0xf6, 0x67, 0x61, 0x2f, 0xe1, 0x3f, 0xfb, 0xbe, 0xd9, 0xae, 0x1d, 0xc5, 0xdd, 0x1f, 0xa5, 0xb3, 2, // [2:2] is the sub-list for extension type_name
0x77, 0x1f, 0xdb, 0x3b, 0xdf, 0x00, 0xdc, 0x6c, 0x1e, 0xf3, 0x6c, 0xd6, 0xc2, 0xeb, 0xed, 0xec, 2, // [2:2] is the sub-list for extension extendee
0xd7, 0x44, 0xec, 0x11, 0xa7, 0xd0, 0xba, 0x3d, 0x2a, 0xd6, 0xb1, 0xa9, 0x35, 0x3b, 0xd9, 0x79, 0, // [0:2] is the sub-list for field type_name
0x58, 0x1b, 0xb3, 0x07, 0x9d, 0x81, 0x7b, 0xd7, 0x19, 0xf6, 0xe8, 0xd6, 0x5e, 0x2d, 0x4c, 0xbc, }
0xf3, 0x78, 0x49, 0xb4, 0x3a, 0xee, 0xa4, 0xf7, 0xf1, 0x70, 0x98, 0xea, 0x64, 0x72, 0x3d, 0x88,
0xc4, 0xf8, 0x28, 0x4b, 0x87, 0x89, 0xa6, 0x94, 0x86, 0x84, 0xba, 0x10, 0x72, 0x74, 0x94, 0x51, func init() { file_walletunlocker_proto_init() }
0x7c, 0x64, 0xea, 0xaf, 0xd7, 0xcc, 0x37, 0xfc, 0xe2, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, func file_walletunlocker_proto_init() {
0x7a, 0x3b, 0x08, 0xb0, 0x05, 0x00, 0x00, if File_walletunlocker_proto != nil {
return
}
file_rpc_proto_init()
if !protoimpl.UnsafeEnabled {
file_walletunlocker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GenSeedRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GenSeedResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InitWalletRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InitWalletResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnlockWalletRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnlockWalletResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_walletunlocker_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_walletunlocker_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_walletunlocker_proto_goTypes,
DependencyIndexes: file_walletunlocker_proto_depIdxs,
MessageInfos: file_walletunlocker_proto_msgTypes,
}.Build()
File_walletunlocker_proto = out.File
file_walletunlocker_proto_rawDesc = nil
file_walletunlocker_proto_goTypes = nil
file_walletunlocker_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// WalletUnlockerClient is the client API for WalletUnlocker service. // WalletUnlockerClient is the client API for WalletUnlocker service.
// //
@ -630,10 +905,10 @@ type WalletUnlockerClient interface {
} }
type walletUnlockerClient struct { type walletUnlockerClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewWalletUnlockerClient(cc *grpc.ClientConn) WalletUnlockerClient { func NewWalletUnlockerClient(cc grpc.ClientConnInterface) WalletUnlockerClient {
return &walletUnlockerClient{cc} return &walletUnlockerClient{cc}
} }
@ -713,16 +988,16 @@ type WalletUnlockerServer interface {
type UnimplementedWalletUnlockerServer struct { type UnimplementedWalletUnlockerServer struct {
} }
func (*UnimplementedWalletUnlockerServer) GenSeed(ctx context.Context, req *GenSeedRequest) (*GenSeedResponse, error) { func (*UnimplementedWalletUnlockerServer) GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented") return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented")
} }
func (*UnimplementedWalletUnlockerServer) InitWallet(ctx context.Context, req *InitWalletRequest) (*InitWalletResponse, error) { func (*UnimplementedWalletUnlockerServer) InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InitWallet not implemented") return nil, status.Errorf(codes.Unimplemented, "method InitWallet not implemented")
} }
func (*UnimplementedWalletUnlockerServer) UnlockWallet(ctx context.Context, req *UnlockWalletRequest) (*UnlockWalletResponse, error) { func (*UnimplementedWalletUnlockerServer) UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnlockWallet not implemented") return nil, status.Errorf(codes.Unimplemented, "method UnlockWallet not implemented")
} }
func (*UnimplementedWalletUnlockerServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ChangePasswordResponse, error) { func (*UnimplementedWalletUnlockerServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
} }

@ -1,150 +1,248 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: watchtowerrpc/watchtower.proto // source: watchtowerrpc/watchtower.proto
package watchtowerrpc package watchtowerrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type GetInfoRequest struct { type GetInfoRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *GetInfoRequest) Reset() { *m = GetInfoRequest{} } func (x *GetInfoRequest) Reset() {
func (m *GetInfoRequest) String() string { return proto.CompactTextString(m) } *x = GetInfoRequest{}
func (*GetInfoRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_watchtowerrpc_watchtower_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInfoRequest) ProtoMessage() {}
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_watchtowerrpc_watchtower_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
func (*GetInfoRequest) Descriptor() ([]byte, []int) { func (*GetInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9f019c0e859ad3d6, []int{0} return file_watchtowerrpc_watchtower_proto_rawDescGZIP(), []int{0}
} }
func (m *GetInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetInfoRequest.Unmarshal(m, b)
}
func (m *GetInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetInfoRequest.Marshal(b, m, deterministic)
}
func (m *GetInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetInfoRequest.Merge(m, src)
}
func (m *GetInfoRequest) XXX_Size() int {
return xxx_messageInfo_GetInfoRequest.Size(m)
}
func (m *GetInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetInfoRequest proto.InternalMessageInfo
type GetInfoResponse struct { type GetInfoResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The public key of the watchtower. // The public key of the watchtower.
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// The listening addresses of the watchtower. // The listening addresses of the watchtower.
Listeners []string `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"` Listeners []string `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"`
// The URIs of the watchtower. // The URIs of the watchtower.
Uris []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"` Uris []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *GetInfoResponse) Reset() { *m = GetInfoResponse{} } func (x *GetInfoResponse) Reset() {
func (m *GetInfoResponse) String() string { return proto.CompactTextString(m) } *x = GetInfoResponse{}
func (*GetInfoResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_watchtowerrpc_watchtower_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInfoResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInfoResponse) ProtoMessage() {}
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_watchtowerrpc_watchtower_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
func (*GetInfoResponse) Descriptor() ([]byte, []int) { func (*GetInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9f019c0e859ad3d6, []int{1} return file_watchtowerrpc_watchtower_proto_rawDescGZIP(), []int{1}
} }
func (m *GetInfoResponse) XXX_Unmarshal(b []byte) error { func (x *GetInfoResponse) GetPubkey() []byte {
return xxx_messageInfo_GetInfoResponse.Unmarshal(m, b) if x != nil {
} return x.Pubkey
func (m *GetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetInfoResponse.Marshal(b, m, deterministic)
}
func (m *GetInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetInfoResponse.Merge(m, src)
}
func (m *GetInfoResponse) XXX_Size() int {
return xxx_messageInfo_GetInfoResponse.Size(m)
}
func (m *GetInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetInfoResponse proto.InternalMessageInfo
func (m *GetInfoResponse) GetPubkey() []byte {
if m != nil {
return m.Pubkey
} }
return nil return nil
} }
func (m *GetInfoResponse) GetListeners() []string { func (x *GetInfoResponse) GetListeners() []string {
if m != nil { if x != nil {
return m.Listeners return x.Listeners
} }
return nil return nil
} }
func (m *GetInfoResponse) GetUris() []string { func (x *GetInfoResponse) GetUris() []string {
if m != nil { if x != nil {
return m.Uris return x.Uris
} }
return nil return nil
} }
func init() { var File_watchtowerrpc_watchtower_proto protoreflect.FileDescriptor
proto.RegisterType((*GetInfoRequest)(nil), "watchtowerrpc.GetInfoRequest")
proto.RegisterType((*GetInfoResponse)(nil), "watchtowerrpc.GetInfoResponse") var file_watchtowerrpc_watchtower_proto_rawDesc = []byte{
0x0a, 0x1e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2f,
0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0d, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x22,
0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09,
0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72,
0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73, 0x32, 0x56,
0x0a, 0x0a, 0x57, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x07,
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74,
0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f,
0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f,
0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("watchtowerrpc/watchtower.proto", fileDescriptor_9f019c0e859ad3d6) } var (
file_watchtowerrpc_watchtower_proto_rawDescOnce sync.Once
file_watchtowerrpc_watchtower_proto_rawDescData = file_watchtowerrpc_watchtower_proto_rawDesc
)
var fileDescriptor_9f019c0e859ad3d6 = []byte{ func file_watchtowerrpc_watchtower_proto_rawDescGZIP() []byte {
// 213 bytes of a gzipped FileDescriptorProto file_watchtowerrpc_watchtower_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x4f, 0x2c, 0x49, file_watchtowerrpc_watchtower_proto_rawDescData = protoimpl.X.CompressGZIP(file_watchtowerrpc_watchtower_proto_rawDescData)
0xce, 0x28, 0xc9, 0x2f, 0x4f, 0x2d, 0x2a, 0x2a, 0x48, 0xd6, 0x47, 0xf0, 0xf4, 0x0a, 0x8a, 0xf2, })
0x4b, 0xf2, 0x85, 0x78, 0x51, 0xe4, 0x95, 0x04, 0xb8, 0xf8, 0xdc, 0x53, 0x4b, 0x3c, 0xf3, 0xd2, return file_watchtowerrpc_watchtower_proto_rawDescData
0xf2, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x94, 0xa2, 0xb9, 0xf8, 0xe1, 0x22, 0xc5, 0x05, }
0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x62, 0x5c, 0x6c, 0x05, 0xa5, 0x49, 0xd9, 0xa9, 0x95, 0x12, 0x8c,
0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x50, 0x9e, 0x90, 0x0c, 0x17, 0x67, 0x4e, 0x66, 0x71, 0x49, 0x6a, var file_watchtowerrpc_watchtower_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
0x5e, 0x6a, 0x51, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0x67, 0x10, 0x42, 0x40, 0x48, 0x88, 0x8b, var file_watchtowerrpc_watchtower_proto_goTypes = []interface{}{
0xa5, 0xb4, 0x28, 0xb3, 0x58, 0x82, 0x19, 0x2c, 0x01, 0x66, 0x1b, 0x85, 0x71, 0x71, 0x85, 0xc3, (*GetInfoRequest)(nil), // 0: watchtowerrpc.GetInfoRequest
0xed, 0x17, 0xf2, 0xe0, 0x62, 0x87, 0x5a, 0x25, 0x24, 0xab, 0x87, 0xe2, 0x2e, 0x3d, 0x54, 0x47, (*GetInfoResponse)(nil), // 1: watchtowerrpc.GetInfoResponse
0x49, 0xc9, 0xe1, 0x92, 0x86, 0xb8, 0xd0, 0xc9, 0x34, 0xca, 0x38, 0x3d, 0xb3, 0x24, 0xa3, 0x34, }
0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x27, 0x33, 0x3d, 0xa3, 0x24, 0x2f, 0x33, 0x2f, 0x3d, 0x2f, var file_watchtowerrpc_watchtower_proto_depIdxs = []int32{
0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x3f, 0x27, 0x2f, 0x45, 0x3f, 0x27, 0x0f, 0x35, 0x3c, 0x8a, 0, // 0: watchtowerrpc.Watchtower.GetInfo:input_type -> watchtowerrpc.GetInfoRequest
0x0a, 0x92, 0x93, 0xd8, 0xc0, 0x61, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x23, 0x0b, 1, // 1: watchtowerrpc.Watchtower.GetInfo:output_type -> watchtowerrpc.GetInfoResponse
0x68, 0x35, 0x01, 0x00, 0x00, 1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_watchtowerrpc_watchtower_proto_init() }
func file_watchtowerrpc_watchtower_proto_init() {
if File_watchtowerrpc_watchtower_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_watchtowerrpc_watchtower_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_watchtowerrpc_watchtower_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInfoResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_watchtowerrpc_watchtower_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_watchtowerrpc_watchtower_proto_goTypes,
DependencyIndexes: file_watchtowerrpc_watchtower_proto_depIdxs,
MessageInfos: file_watchtowerrpc_watchtower_proto_msgTypes,
}.Build()
File_watchtowerrpc_watchtower_proto = out.File
file_watchtowerrpc_watchtower_proto_rawDesc = nil
file_watchtowerrpc_watchtower_proto_goTypes = nil
file_watchtowerrpc_watchtower_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// WatchtowerClient is the client API for Watchtower service. // WatchtowerClient is the client API for Watchtower service.
// //
@ -158,10 +256,10 @@ type WatchtowerClient interface {
} }
type watchtowerClient struct { type watchtowerClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewWatchtowerClient(cc *grpc.ClientConn) WatchtowerClient { func NewWatchtowerClient(cc grpc.ClientConnInterface) WatchtowerClient {
return &watchtowerClient{cc} return &watchtowerClient{cc}
} }
@ -187,7 +285,7 @@ type WatchtowerServer interface {
type UnimplementedWatchtowerServer struct { type UnimplementedWatchtowerServer struct {
} }
func (*UnimplementedWatchtowerServer) GetInfo(ctx context.Context, req *GetInfoRequest) (*GetInfoResponse, error) { func (*UnimplementedWatchtowerServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
} }

@ -1,28 +1,33 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.6.1
// source: wtclientrpc/wtclient.proto // source: wtclientrpc/wtclient.proto
package wtclientrpc package wtclientrpc
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
math "math" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion that a sufficiently up-to-date version
// is compatible with the proto package it is being compiled against. // of the legacy proto package is being used.
// A compilation error at this line likely means your copy of the const _ = proto.ProtoPackageIsVersion4
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type PolicyType int32 type PolicyType int32
@ -33,237 +38,300 @@ const (
PolicyType_ANCHOR PolicyType = 1 PolicyType_ANCHOR PolicyType = 1
) )
var PolicyType_name = map[int32]string{ // Enum value maps for PolicyType.
0: "LEGACY", var (
1: "ANCHOR", PolicyType_name = map[int32]string{
} 0: "LEGACY",
1: "ANCHOR",
}
PolicyType_value = map[string]int32{
"LEGACY": 0,
"ANCHOR": 1,
}
)
var PolicyType_value = map[string]int32{ func (x PolicyType) Enum() *PolicyType {
"LEGACY": 0, p := new(PolicyType)
"ANCHOR": 1, *p = x
return p
} }
func (x PolicyType) String() string { func (x PolicyType) String() string {
return proto.EnumName(PolicyType_name, int32(x)) return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
} }
func (PolicyType) Descriptor() protoreflect.EnumDescriptor {
return file_wtclientrpc_wtclient_proto_enumTypes[0].Descriptor()
}
func (PolicyType) Type() protoreflect.EnumType {
return &file_wtclientrpc_wtclient_proto_enumTypes[0]
}
func (x PolicyType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PolicyType.Descriptor instead.
func (PolicyType) EnumDescriptor() ([]byte, []int) { func (PolicyType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{0} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{0}
} }
type AddTowerRequest struct { type AddTowerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identifying public key of the watchtower to add. // The identifying public key of the watchtower to add.
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// A network address the watchtower is reachable over. // A network address the watchtower is reachable over.
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *AddTowerRequest) Reset() { *m = AddTowerRequest{} } func (x *AddTowerRequest) Reset() {
func (m *AddTowerRequest) String() string { return proto.CompactTextString(m) } *x = AddTowerRequest{}
func (*AddTowerRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddTowerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddTowerRequest) ProtoMessage() {}
func (x *AddTowerRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddTowerRequest.ProtoReflect.Descriptor instead.
func (*AddTowerRequest) Descriptor() ([]byte, []int) { func (*AddTowerRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{0} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{0}
} }
func (m *AddTowerRequest) XXX_Unmarshal(b []byte) error { func (x *AddTowerRequest) GetPubkey() []byte {
return xxx_messageInfo_AddTowerRequest.Unmarshal(m, b) if x != nil {
} return x.Pubkey
func (m *AddTowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddTowerRequest.Marshal(b, m, deterministic)
}
func (m *AddTowerRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddTowerRequest.Merge(m, src)
}
func (m *AddTowerRequest) XXX_Size() int {
return xxx_messageInfo_AddTowerRequest.Size(m)
}
func (m *AddTowerRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AddTowerRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AddTowerRequest proto.InternalMessageInfo
func (m *AddTowerRequest) GetPubkey() []byte {
if m != nil {
return m.Pubkey
} }
return nil return nil
} }
func (m *AddTowerRequest) GetAddress() string { func (x *AddTowerRequest) GetAddress() string {
if m != nil { if x != nil {
return m.Address return x.Address
} }
return "" return ""
} }
type AddTowerResponse struct { type AddTowerResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *AddTowerResponse) Reset() { *m = AddTowerResponse{} } func (x *AddTowerResponse) Reset() {
func (m *AddTowerResponse) String() string { return proto.CompactTextString(m) } *x = AddTowerResponse{}
func (*AddTowerResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddTowerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddTowerResponse) ProtoMessage() {}
func (x *AddTowerResponse) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddTowerResponse.ProtoReflect.Descriptor instead.
func (*AddTowerResponse) Descriptor() ([]byte, []int) { func (*AddTowerResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{1} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{1}
} }
func (m *AddTowerResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddTowerResponse.Unmarshal(m, b)
}
func (m *AddTowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddTowerResponse.Marshal(b, m, deterministic)
}
func (m *AddTowerResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddTowerResponse.Merge(m, src)
}
func (m *AddTowerResponse) XXX_Size() int {
return xxx_messageInfo_AddTowerResponse.Size(m)
}
func (m *AddTowerResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AddTowerResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AddTowerResponse proto.InternalMessageInfo
type RemoveTowerRequest struct { type RemoveTowerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identifying public key of the watchtower to remove. // The identifying public key of the watchtower to remove.
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// //
//If set, then the record for this address will be removed, indicating that is //If set, then the record for this address will be removed, indicating that is
//is stale. Otherwise, the watchtower will no longer be used for future //is stale. Otherwise, the watchtower will no longer be used for future
//session negotiations and backups. //session negotiations and backups.
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RemoveTowerRequest) Reset() { *m = RemoveTowerRequest{} } func (x *RemoveTowerRequest) Reset() {
func (m *RemoveTowerRequest) String() string { return proto.CompactTextString(m) } *x = RemoveTowerRequest{}
func (*RemoveTowerRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveTowerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveTowerRequest) ProtoMessage() {}
func (x *RemoveTowerRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RemoveTowerRequest.ProtoReflect.Descriptor instead.
func (*RemoveTowerRequest) Descriptor() ([]byte, []int) { func (*RemoveTowerRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{2} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{2}
} }
func (m *RemoveTowerRequest) XXX_Unmarshal(b []byte) error { func (x *RemoveTowerRequest) GetPubkey() []byte {
return xxx_messageInfo_RemoveTowerRequest.Unmarshal(m, b) if x != nil {
} return x.Pubkey
func (m *RemoveTowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RemoveTowerRequest.Marshal(b, m, deterministic)
}
func (m *RemoveTowerRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RemoveTowerRequest.Merge(m, src)
}
func (m *RemoveTowerRequest) XXX_Size() int {
return xxx_messageInfo_RemoveTowerRequest.Size(m)
}
func (m *RemoveTowerRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RemoveTowerRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RemoveTowerRequest proto.InternalMessageInfo
func (m *RemoveTowerRequest) GetPubkey() []byte {
if m != nil {
return m.Pubkey
} }
return nil return nil
} }
func (m *RemoveTowerRequest) GetAddress() string { func (x *RemoveTowerRequest) GetAddress() string {
if m != nil { if x != nil {
return m.Address return x.Address
} }
return "" return ""
} }
type RemoveTowerResponse struct { type RemoveTowerResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *RemoveTowerResponse) Reset() { *m = RemoveTowerResponse{} } func (x *RemoveTowerResponse) Reset() {
func (m *RemoveTowerResponse) String() string { return proto.CompactTextString(m) } *x = RemoveTowerResponse{}
func (*RemoveTowerResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveTowerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveTowerResponse) ProtoMessage() {}
func (x *RemoveTowerResponse) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RemoveTowerResponse.ProtoReflect.Descriptor instead.
func (*RemoveTowerResponse) Descriptor() ([]byte, []int) { func (*RemoveTowerResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{3} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{3}
} }
func (m *RemoveTowerResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveTowerResponse.Unmarshal(m, b)
}
func (m *RemoveTowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RemoveTowerResponse.Marshal(b, m, deterministic)
}
func (m *RemoveTowerResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RemoveTowerResponse.Merge(m, src)
}
func (m *RemoveTowerResponse) XXX_Size() int {
return xxx_messageInfo_RemoveTowerResponse.Size(m)
}
func (m *RemoveTowerResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RemoveTowerResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RemoveTowerResponse proto.InternalMessageInfo
type GetTowerInfoRequest struct { type GetTowerInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identifying public key of the watchtower to retrieve information for. // The identifying public key of the watchtower to retrieve information for.
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// Whether we should include sessions with the watchtower in the response. // Whether we should include sessions with the watchtower in the response.
IncludeSessions bool `protobuf:"varint,2,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"` IncludeSessions bool `protobuf:"varint,2,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *GetTowerInfoRequest) Reset() { *m = GetTowerInfoRequest{} } func (x *GetTowerInfoRequest) Reset() {
func (m *GetTowerInfoRequest) String() string { return proto.CompactTextString(m) } *x = GetTowerInfoRequest{}
func (*GetTowerInfoRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetTowerInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTowerInfoRequest) ProtoMessage() {}
func (x *GetTowerInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetTowerInfoRequest.ProtoReflect.Descriptor instead.
func (*GetTowerInfoRequest) Descriptor() ([]byte, []int) { func (*GetTowerInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{4} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{4}
} }
func (m *GetTowerInfoRequest) XXX_Unmarshal(b []byte) error { func (x *GetTowerInfoRequest) GetPubkey() []byte {
return xxx_messageInfo_GetTowerInfoRequest.Unmarshal(m, b) if x != nil {
} return x.Pubkey
func (m *GetTowerInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetTowerInfoRequest.Marshal(b, m, deterministic)
}
func (m *GetTowerInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetTowerInfoRequest.Merge(m, src)
}
func (m *GetTowerInfoRequest) XXX_Size() int {
return xxx_messageInfo_GetTowerInfoRequest.Size(m)
}
func (m *GetTowerInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetTowerInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetTowerInfoRequest proto.InternalMessageInfo
func (m *GetTowerInfoRequest) GetPubkey() []byte {
if m != nil {
return m.Pubkey
} }
return nil return nil
} }
func (m *GetTowerInfoRequest) GetIncludeSessions() bool { func (x *GetTowerInfoRequest) GetIncludeSessions() bool {
if m != nil { if x != nil {
return m.IncludeSessions return x.IncludeSessions
} }
return false return false
} }
type TowerSession struct { type TowerSession struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The total number of successful backups that have been made to the //The total number of successful backups that have been made to the
//watchtower session. //watchtower session.
@ -278,78 +346,88 @@ type TowerSession struct {
//Deprecated, use sweep_sat_per_vbyte. //Deprecated, use sweep_sat_per_vbyte.
//The fee rate, in satoshis per vbyte, that will be used by the watchtower for //The fee rate, in satoshis per vbyte, that will be used by the watchtower for
//the justice transaction in the event of a channel breach. //the justice transaction in the event of a channel breach.
SweepSatPerByte uint32 `protobuf:"varint,4,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"` // Deprecated: Do not use. //
// Deprecated: Do not use.
SweepSatPerByte uint32 `protobuf:"varint,4,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
// //
//The fee rate, in satoshis per vbyte, that will be used by the watchtower for //The fee rate, in satoshis per vbyte, that will be used by the watchtower for
//the justice transaction in the event of a channel breach. //the justice transaction in the event of a channel breach.
SweepSatPerVbyte uint32 `protobuf:"varint,5,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"` SweepSatPerVbyte uint32 `protobuf:"varint,5,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *TowerSession) Reset() { *m = TowerSession{} } func (x *TowerSession) Reset() {
func (m *TowerSession) String() string { return proto.CompactTextString(m) } *x = TowerSession{}
func (*TowerSession) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TowerSession) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TowerSession) ProtoMessage() {}
func (x *TowerSession) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TowerSession.ProtoReflect.Descriptor instead.
func (*TowerSession) Descriptor() ([]byte, []int) { func (*TowerSession) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{5} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{5}
} }
func (m *TowerSession) XXX_Unmarshal(b []byte) error { func (x *TowerSession) GetNumBackups() uint32 {
return xxx_messageInfo_TowerSession.Unmarshal(m, b) if x != nil {
} return x.NumBackups
func (m *TowerSession) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TowerSession.Marshal(b, m, deterministic)
}
func (m *TowerSession) XXX_Merge(src proto.Message) {
xxx_messageInfo_TowerSession.Merge(m, src)
}
func (m *TowerSession) XXX_Size() int {
return xxx_messageInfo_TowerSession.Size(m)
}
func (m *TowerSession) XXX_DiscardUnknown() {
xxx_messageInfo_TowerSession.DiscardUnknown(m)
}
var xxx_messageInfo_TowerSession proto.InternalMessageInfo
func (m *TowerSession) GetNumBackups() uint32 {
if m != nil {
return m.NumBackups
} }
return 0 return 0
} }
func (m *TowerSession) GetNumPendingBackups() uint32 { func (x *TowerSession) GetNumPendingBackups() uint32 {
if m != nil { if x != nil {
return m.NumPendingBackups return x.NumPendingBackups
} }
return 0 return 0
} }
func (m *TowerSession) GetMaxBackups() uint32 { func (x *TowerSession) GetMaxBackups() uint32 {
if m != nil { if x != nil {
return m.MaxBackups return x.MaxBackups
} }
return 0 return 0
} }
// Deprecated: Do not use. // Deprecated: Do not use.
func (m *TowerSession) GetSweepSatPerByte() uint32 { func (x *TowerSession) GetSweepSatPerByte() uint32 {
if m != nil { if x != nil {
return m.SweepSatPerByte return x.SweepSatPerByte
} }
return 0 return 0
} }
func (m *TowerSession) GetSweepSatPerVbyte() uint32 { func (x *TowerSession) GetSweepSatPerVbyte() uint32 {
if m != nil { if x != nil {
return m.SweepSatPerVbyte return x.SweepSatPerVbyte
} }
return 0 return 0
} }
type Tower struct { type Tower struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identifying public key of the watchtower. // The identifying public key of the watchtower.
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
// The list of addresses the watchtower is reachable over. // The list of addresses the watchtower is reachable over.
@ -359,184 +437,215 @@ type Tower struct {
// The number of sessions that have been negotiated with the watchtower. // The number of sessions that have been negotiated with the watchtower.
NumSessions uint32 `protobuf:"varint,4,opt,name=num_sessions,json=numSessions,proto3" json:"num_sessions,omitempty"` NumSessions uint32 `protobuf:"varint,4,opt,name=num_sessions,json=numSessions,proto3" json:"num_sessions,omitempty"`
// The list of sessions that have been negotiated with the watchtower. // The list of sessions that have been negotiated with the watchtower.
Sessions []*TowerSession `protobuf:"bytes,5,rep,name=sessions,proto3" json:"sessions,omitempty"` Sessions []*TowerSession `protobuf:"bytes,5,rep,name=sessions,proto3" json:"sessions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Tower) Reset() { *m = Tower{} } func (x *Tower) Reset() {
func (m *Tower) String() string { return proto.CompactTextString(m) } *x = Tower{}
func (*Tower) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tower) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tower) ProtoMessage() {}
func (x *Tower) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Tower.ProtoReflect.Descriptor instead.
func (*Tower) Descriptor() ([]byte, []int) { func (*Tower) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{6} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{6}
} }
func (m *Tower) XXX_Unmarshal(b []byte) error { func (x *Tower) GetPubkey() []byte {
return xxx_messageInfo_Tower.Unmarshal(m, b) if x != nil {
} return x.Pubkey
func (m *Tower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Tower.Marshal(b, m, deterministic)
}
func (m *Tower) XXX_Merge(src proto.Message) {
xxx_messageInfo_Tower.Merge(m, src)
}
func (m *Tower) XXX_Size() int {
return xxx_messageInfo_Tower.Size(m)
}
func (m *Tower) XXX_DiscardUnknown() {
xxx_messageInfo_Tower.DiscardUnknown(m)
}
var xxx_messageInfo_Tower proto.InternalMessageInfo
func (m *Tower) GetPubkey() []byte {
if m != nil {
return m.Pubkey
} }
return nil return nil
} }
func (m *Tower) GetAddresses() []string { func (x *Tower) GetAddresses() []string {
if m != nil { if x != nil {
return m.Addresses return x.Addresses
} }
return nil return nil
} }
func (m *Tower) GetActiveSessionCandidate() bool { func (x *Tower) GetActiveSessionCandidate() bool {
if m != nil { if x != nil {
return m.ActiveSessionCandidate return x.ActiveSessionCandidate
} }
return false return false
} }
func (m *Tower) GetNumSessions() uint32 { func (x *Tower) GetNumSessions() uint32 {
if m != nil { if x != nil {
return m.NumSessions return x.NumSessions
} }
return 0 return 0
} }
func (m *Tower) GetSessions() []*TowerSession { func (x *Tower) GetSessions() []*TowerSession {
if m != nil { if x != nil {
return m.Sessions return x.Sessions
} }
return nil return nil
} }
type ListTowersRequest struct { type ListTowersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether we should include sessions with the watchtower in the response. // Whether we should include sessions with the watchtower in the response.
IncludeSessions bool `protobuf:"varint,1,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"` IncludeSessions bool `protobuf:"varint,1,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ListTowersRequest) Reset() { *m = ListTowersRequest{} } func (x *ListTowersRequest) Reset() {
func (m *ListTowersRequest) String() string { return proto.CompactTextString(m) } *x = ListTowersRequest{}
func (*ListTowersRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListTowersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListTowersRequest) ProtoMessage() {}
func (x *ListTowersRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListTowersRequest.ProtoReflect.Descriptor instead.
func (*ListTowersRequest) Descriptor() ([]byte, []int) { func (*ListTowersRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{7} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{7}
} }
func (m *ListTowersRequest) XXX_Unmarshal(b []byte) error { func (x *ListTowersRequest) GetIncludeSessions() bool {
return xxx_messageInfo_ListTowersRequest.Unmarshal(m, b) if x != nil {
} return x.IncludeSessions
func (m *ListTowersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTowersRequest.Marshal(b, m, deterministic)
}
func (m *ListTowersRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTowersRequest.Merge(m, src)
}
func (m *ListTowersRequest) XXX_Size() int {
return xxx_messageInfo_ListTowersRequest.Size(m)
}
func (m *ListTowersRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListTowersRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListTowersRequest proto.InternalMessageInfo
func (m *ListTowersRequest) GetIncludeSessions() bool {
if m != nil {
return m.IncludeSessions
} }
return false return false
} }
type ListTowersResponse struct { type ListTowersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of watchtowers available for new backups. // The list of watchtowers available for new backups.
Towers []*Tower `protobuf:"bytes,1,rep,name=towers,proto3" json:"towers,omitempty"` Towers []*Tower `protobuf:"bytes,1,rep,name=towers,proto3" json:"towers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ListTowersResponse) Reset() { *m = ListTowersResponse{} } func (x *ListTowersResponse) Reset() {
func (m *ListTowersResponse) String() string { return proto.CompactTextString(m) } *x = ListTowersResponse{}
func (*ListTowersResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListTowersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListTowersResponse) ProtoMessage() {}
func (x *ListTowersResponse) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListTowersResponse.ProtoReflect.Descriptor instead.
func (*ListTowersResponse) Descriptor() ([]byte, []int) { func (*ListTowersResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{8} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{8}
} }
func (m *ListTowersResponse) XXX_Unmarshal(b []byte) error { func (x *ListTowersResponse) GetTowers() []*Tower {
return xxx_messageInfo_ListTowersResponse.Unmarshal(m, b) if x != nil {
} return x.Towers
func (m *ListTowersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTowersResponse.Marshal(b, m, deterministic)
}
func (m *ListTowersResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTowersResponse.Merge(m, src)
}
func (m *ListTowersResponse) XXX_Size() int {
return xxx_messageInfo_ListTowersResponse.Size(m)
}
func (m *ListTowersResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListTowersResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListTowersResponse proto.InternalMessageInfo
func (m *ListTowersResponse) GetTowers() []*Tower {
if m != nil {
return m.Towers
} }
return nil return nil
} }
type StatsRequest struct { type StatsRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` state protoimpl.MessageState
XXX_unrecognized []byte `json:"-"` sizeCache protoimpl.SizeCache
XXX_sizecache int32 `json:"-"` unknownFields protoimpl.UnknownFields
} }
func (m *StatsRequest) Reset() { *m = StatsRequest{} } func (x *StatsRequest) Reset() {
func (m *StatsRequest) String() string { return proto.CompactTextString(m) } *x = StatsRequest{}
func (*StatsRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatsRequest) ProtoMessage() {}
func (x *StatsRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.
func (*StatsRequest) Descriptor() ([]byte, []int) { func (*StatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{9} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{9}
} }
func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatsRequest.Unmarshal(m, b)
}
func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatsRequest.Marshal(b, m, deterministic)
}
func (m *StatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatsRequest.Merge(m, src)
}
func (m *StatsRequest) XXX_Size() int {
return xxx_messageInfo_StatsRequest.Size(m)
}
func (m *StatsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_StatsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_StatsRequest proto.InternalMessageInfo
type StatsResponse struct { type StatsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The total number of backups made to all active and exhausted watchtower //The total number of backups made to all active and exhausted watchtower
//sessions. //sessions.
@ -552,114 +661,130 @@ type StatsResponse struct {
// The total number of new sessions made to watchtowers. // The total number of new sessions made to watchtowers.
NumSessionsAcquired uint32 `protobuf:"varint,4,opt,name=num_sessions_acquired,json=numSessionsAcquired,proto3" json:"num_sessions_acquired,omitempty"` NumSessionsAcquired uint32 `protobuf:"varint,4,opt,name=num_sessions_acquired,json=numSessionsAcquired,proto3" json:"num_sessions_acquired,omitempty"`
// The total number of watchtower sessions that have been exhausted. // The total number of watchtower sessions that have been exhausted.
NumSessionsExhausted uint32 `protobuf:"varint,5,opt,name=num_sessions_exhausted,json=numSessionsExhausted,proto3" json:"num_sessions_exhausted,omitempty"` NumSessionsExhausted uint32 `protobuf:"varint,5,opt,name=num_sessions_exhausted,json=numSessionsExhausted,proto3" json:"num_sessions_exhausted,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *StatsResponse) Reset() { *m = StatsResponse{} } func (x *StatsResponse) Reset() {
func (m *StatsResponse) String() string { return proto.CompactTextString(m) } *x = StatsResponse{}
func (*StatsResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatsResponse) ProtoMessage() {}
func (x *StatsResponse) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.
func (*StatsResponse) Descriptor() ([]byte, []int) { func (*StatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{10} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{10}
} }
func (m *StatsResponse) XXX_Unmarshal(b []byte) error { func (x *StatsResponse) GetNumBackups() uint32 {
return xxx_messageInfo_StatsResponse.Unmarshal(m, b) if x != nil {
} return x.NumBackups
func (m *StatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatsResponse.Marshal(b, m, deterministic)
}
func (m *StatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatsResponse.Merge(m, src)
}
func (m *StatsResponse) XXX_Size() int {
return xxx_messageInfo_StatsResponse.Size(m)
}
func (m *StatsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StatsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StatsResponse proto.InternalMessageInfo
func (m *StatsResponse) GetNumBackups() uint32 {
if m != nil {
return m.NumBackups
} }
return 0 return 0
} }
func (m *StatsResponse) GetNumPendingBackups() uint32 { func (x *StatsResponse) GetNumPendingBackups() uint32 {
if m != nil { if x != nil {
return m.NumPendingBackups return x.NumPendingBackups
} }
return 0 return 0
} }
func (m *StatsResponse) GetNumFailedBackups() uint32 { func (x *StatsResponse) GetNumFailedBackups() uint32 {
if m != nil { if x != nil {
return m.NumFailedBackups return x.NumFailedBackups
} }
return 0 return 0
} }
func (m *StatsResponse) GetNumSessionsAcquired() uint32 { func (x *StatsResponse) GetNumSessionsAcquired() uint32 {
if m != nil { if x != nil {
return m.NumSessionsAcquired return x.NumSessionsAcquired
} }
return 0 return 0
} }
func (m *StatsResponse) GetNumSessionsExhausted() uint32 { func (x *StatsResponse) GetNumSessionsExhausted() uint32 {
if m != nil { if x != nil {
return m.NumSessionsExhausted return x.NumSessionsExhausted
} }
return 0 return 0
} }
type PolicyRequest struct { type PolicyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The client type from which to retrieve the active offering policy. //The client type from which to retrieve the active offering policy.
PolicyType PolicyType `protobuf:"varint,1,opt,name=policy_type,json=policyType,proto3,enum=wtclientrpc.PolicyType" json:"policy_type,omitempty"` PolicyType PolicyType `protobuf:"varint,1,opt,name=policy_type,json=policyType,proto3,enum=wtclientrpc.PolicyType" json:"policy_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *PolicyRequest) Reset() { *m = PolicyRequest{} } func (x *PolicyRequest) Reset() {
func (m *PolicyRequest) String() string { return proto.CompactTextString(m) } *x = PolicyRequest{}
func (*PolicyRequest) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PolicyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyRequest) ProtoMessage() {}
func (x *PolicyRequest) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyRequest.ProtoReflect.Descriptor instead.
func (*PolicyRequest) Descriptor() ([]byte, []int) { func (*PolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{11} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{11}
} }
func (m *PolicyRequest) XXX_Unmarshal(b []byte) error { func (x *PolicyRequest) GetPolicyType() PolicyType {
return xxx_messageInfo_PolicyRequest.Unmarshal(m, b) if x != nil {
} return x.PolicyType
func (m *PolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PolicyRequest.Marshal(b, m, deterministic)
}
func (m *PolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PolicyRequest.Merge(m, src)
}
func (m *PolicyRequest) XXX_Size() int {
return xxx_messageInfo_PolicyRequest.Size(m)
}
func (m *PolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PolicyRequest proto.InternalMessageInfo
func (m *PolicyRequest) GetPolicyType() PolicyType {
if m != nil {
return m.PolicyType
} }
return PolicyType_LEGACY return PolicyType_LEGACY
} }
type PolicyResponse struct { type PolicyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// //
//The maximum number of updates each session we negotiate with watchtowers //The maximum number of updates each session we negotiate with watchtowers
//should allow. //should allow.
@ -668,141 +793,439 @@ type PolicyResponse struct {
//Deprecated, use sweep_sat_per_vbyte. //Deprecated, use sweep_sat_per_vbyte.
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for //The fee rate, in satoshis per vbyte, that will be used by watchtowers for
//justice transactions in response to channel breaches. //justice transactions in response to channel breaches.
SweepSatPerByte uint32 `protobuf:"varint,2,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"` // Deprecated: Do not use. //
// Deprecated: Do not use.
SweepSatPerByte uint32 `protobuf:"varint,2,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
// //
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for //The fee rate, in satoshis per vbyte, that will be used by watchtowers for
//justice transactions in response to channel breaches. //justice transactions in response to channel breaches.
SweepSatPerVbyte uint32 `protobuf:"varint,3,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"` SweepSatPerVbyte uint32 `protobuf:"varint,3,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *PolicyResponse) Reset() { *m = PolicyResponse{} } func (x *PolicyResponse) Reset() {
func (m *PolicyResponse) String() string { return proto.CompactTextString(m) } *x = PolicyResponse{}
func (*PolicyResponse) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PolicyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyResponse) ProtoMessage() {}
func (x *PolicyResponse) ProtoReflect() protoreflect.Message {
mi := &file_wtclientrpc_wtclient_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyResponse.ProtoReflect.Descriptor instead.
func (*PolicyResponse) Descriptor() ([]byte, []int) { func (*PolicyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b5f4e7d95a641af2, []int{12} return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{12}
} }
func (m *PolicyResponse) XXX_Unmarshal(b []byte) error { func (x *PolicyResponse) GetMaxUpdates() uint32 {
return xxx_messageInfo_PolicyResponse.Unmarshal(m, b) if x != nil {
} return x.MaxUpdates
func (m *PolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PolicyResponse.Marshal(b, m, deterministic)
}
func (m *PolicyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PolicyResponse.Merge(m, src)
}
func (m *PolicyResponse) XXX_Size() int {
return xxx_messageInfo_PolicyResponse.Size(m)
}
func (m *PolicyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PolicyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PolicyResponse proto.InternalMessageInfo
func (m *PolicyResponse) GetMaxUpdates() uint32 {
if m != nil {
return m.MaxUpdates
} }
return 0 return 0
} }
// Deprecated: Do not use. // Deprecated: Do not use.
func (m *PolicyResponse) GetSweepSatPerByte() uint32 { func (x *PolicyResponse) GetSweepSatPerByte() uint32 {
if m != nil { if x != nil {
return m.SweepSatPerByte return x.SweepSatPerByte
} }
return 0 return 0
} }
func (m *PolicyResponse) GetSweepSatPerVbyte() uint32 { func (x *PolicyResponse) GetSweepSatPerVbyte() uint32 {
if m != nil { if x != nil {
return m.SweepSatPerVbyte return x.SweepSatPerVbyte
} }
return 0 return 0
} }
func init() { var File_wtclientrpc_wtclient_proto protoreflect.FileDescriptor
proto.RegisterEnum("wtclientrpc.PolicyType", PolicyType_name, PolicyType_value)
proto.RegisterType((*AddTowerRequest)(nil), "wtclientrpc.AddTowerRequest") var file_wtclientrpc_wtclient_proto_rawDesc = []byte{
proto.RegisterType((*AddTowerResponse)(nil), "wtclientrpc.AddTowerResponse") 0x0a, 0x1a, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x74,
proto.RegisterType((*RemoveTowerRequest)(nil), "wtclientrpc.RemoveTowerRequest") 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x77, 0x74,
proto.RegisterType((*RemoveTowerResponse)(nil), "wtclientrpc.RemoveTowerResponse") 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x22, 0x43, 0x0a, 0x0f, 0x41, 0x64, 0x64,
proto.RegisterType((*GetTowerInfoRequest)(nil), "wtclientrpc.GetTowerInfoRequest") 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
proto.RegisterType((*TowerSession)(nil), "wtclientrpc.TowerSession") 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75,
proto.RegisterType((*Tower)(nil), "wtclientrpc.Tower") 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
proto.RegisterType((*ListTowersRequest)(nil), "wtclientrpc.ListTowersRequest") 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x12,
proto.RegisterType((*ListTowersResponse)(nil), "wtclientrpc.ListTowersResponse") 0x0a, 0x10, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
proto.RegisterType((*StatsRequest)(nil), "wtclientrpc.StatsRequest") 0x73, 0x65, 0x22, 0x46, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65,
proto.RegisterType((*StatsResponse)(nil), "wtclientrpc.StatsResponse") 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b,
proto.RegisterType((*PolicyRequest)(nil), "wtclientrpc.PolicyRequest") 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
proto.RegisterType((*PolicyResponse)(nil), "wtclientrpc.PolicyResponse") 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65,
0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x58, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c,
0x75, 0x64, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x0c,
0x54, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b,
0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a,
0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x50,
0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x1f, 0x0a,
0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2f,
0x0a, 0x12, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f,
0x73, 0x77, 0x65, 0x65, 0x70, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12,
0x2d, 0x0a, 0x13, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72,
0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x77,
0x65, 0x65, 0x70, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x22, 0xd1,
0x01, 0x0a, 0x05, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x38,
0x0a, 0x18, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x5f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x16, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43,
0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b,
0x6e, 0x75, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x73,
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x77, 0x65,
0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75,
0x64, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x74, 0x6f, 0x77, 0x65,
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69,
0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x74, 0x6f,
0x77, 0x65, 0x72, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x22, 0xf8, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6e, 0x75, 0x6d,
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x70,
0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x66,
0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x75, 0x6d,
0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, 0x73,
0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x6e, 0x75, 0x6d, 0x53, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x22,
0x49, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x38, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a,
0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0e, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a,
0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2f,
0x0a, 0x12, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f,
0x73, 0x77, 0x65, 0x65, 0x70, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12,
0x2d, 0x0a, 0x13, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72,
0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x77,
0x65, 0x65, 0x70, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x2a, 0x24,
0x0a, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06,
0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4e, 0x43, 0x48,
0x4f, 0x52, 0x10, 0x01, 0x32, 0xc5, 0x03, 0x0a, 0x10, 0x57, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f,
0x77, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x08, 0x41, 0x64, 0x64,
0x54, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70,
0x63, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65,
0x72, 0x12, 0x1f, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2e,
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63,
0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x77, 0x65,
0x72, 0x73, 0x12, 0x1e, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70,
0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x53, 0x74, 0x61,
0x74, 0x73, 0x12, 0x19, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x12, 0x1a, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70,
0x63, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1b, 0x2e, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74,
0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f,
0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70,
0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
func init() { proto.RegisterFile("wtclientrpc/wtclient.proto", fileDescriptor_b5f4e7d95a641af2) } var (
file_wtclientrpc_wtclient_proto_rawDescOnce sync.Once
file_wtclientrpc_wtclient_proto_rawDescData = file_wtclientrpc_wtclient_proto_rawDesc
)
var fileDescriptor_b5f4e7d95a641af2 = []byte{ func file_wtclientrpc_wtclient_proto_rawDescGZIP() []byte {
// 765 bytes of a gzipped FileDescriptorProto file_wtclientrpc_wtclient_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xdd, 0x6e, 0xda, 0x48, file_wtclientrpc_wtclient_proto_rawDescData = protoimpl.X.CompressGZIP(file_wtclientrpc_wtclient_proto_rawDescData)
0x14, 0x5e, 0xc3, 0xc2, 0x92, 0x03, 0x49, 0xc8, 0xb0, 0xc9, 0xb2, 0xde, 0xec, 0xc2, 0x5a, 0xbd, })
0xa0, 0x51, 0x0b, 0x2a, 0x69, 0xa5, 0x5c, 0x45, 0x05, 0x9a, 0xa4, 0x91, 0xd2, 0x16, 0x39, 0xe9, return file_wtclientrpc_wtclient_proto_rawDescData
0xef, 0x8d, 0x35, 0xd8, 0x13, 0xb0, 0x82, 0xc7, 0x8e, 0x3d, 0x0e, 0xf0, 0x18, 0x7d, 0xa8, 0x3e, }
0x40, 0xdf, 0xa0, 0x8f, 0xd1, 0xcb, 0xca, 0xe3, 0xb1, 0xb1, 0x13, 0xa3, 0xaa, 0x6a, 0xef, 0xec,
0xf3, 0x7d, 0xf3, 0x79, 0xce, 0x77, 0x7e, 0x0c, 0xf2, 0x8c, 0xe9, 0x53, 0x93, 0x50, 0xe6, 0x3a, var file_wtclientrpc_wtclient_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
0x7a, 0x27, 0x7a, 0x6e, 0x3b, 0xae, 0xcd, 0x6c, 0x54, 0x4e, 0x60, 0xca, 0x00, 0x36, 0x7b, 0x86, var file_wtclientrpc_wtclient_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
0x71, 0x61, 0xcf, 0x88, 0xab, 0x92, 0x6b, 0x9f, 0x78, 0x0c, 0xed, 0x40, 0xd1, 0xf1, 0x47, 0x57, var file_wtclientrpc_wtclient_proto_goTypes = []interface{}{
0x64, 0x51, 0x97, 0x9a, 0x52, 0xab, 0xa2, 0x8a, 0x37, 0x54, 0x87, 0x3f, 0xb0, 0x61, 0xb8, 0xc4, (PolicyType)(0), // 0: wtclientrpc.PolicyType
0xf3, 0xea, 0xb9, 0xa6, 0xd4, 0x5a, 0x53, 0xa3, 0x57, 0x05, 0x41, 0x75, 0x29, 0xe2, 0x39, 0x36, (*AddTowerRequest)(nil), // 1: wtclientrpc.AddTowerRequest
0xf5, 0x88, 0x72, 0x0c, 0x48, 0x25, 0x96, 0x7d, 0x43, 0x7e, 0x52, 0x7b, 0x1b, 0x6a, 0x29, 0x1d, (*AddTowerResponse)(nil), // 2: wtclientrpc.AddTowerResponse
0x21, 0xff, 0x0e, 0x6a, 0x27, 0x84, 0xf1, 0xd8, 0x29, 0xbd, 0xb4, 0xbf, 0xa7, 0x7f, 0x1f, 0xaa, (*RemoveTowerRequest)(nil), // 3: wtclientrpc.RemoveTowerRequest
0x26, 0xd5, 0xa7, 0xbe, 0x41, 0x34, 0x8f, 0x78, 0x9e, 0x69, 0xd3, 0xf0, 0x43, 0x25, 0x75, 0x53, (*RemoveTowerResponse)(nil), // 4: wtclientrpc.RemoveTowerResponse
0xc4, 0xcf, 0x45, 0x58, 0xf9, 0x22, 0x41, 0x85, 0xeb, 0x8a, 0x08, 0x6a, 0x40, 0x99, 0xfa, 0x96, (*GetTowerInfoRequest)(nil), // 5: wtclientrpc.GetTowerInfoRequest
0x36, 0xc2, 0xfa, 0x95, 0xef, 0x78, 0x5c, 0x78, 0x5d, 0x05, 0xea, 0x5b, 0xfd, 0x30, 0x82, 0xda, (*TowerSession)(nil), // 6: wtclientrpc.TowerSession
0x50, 0x0b, 0x08, 0x0e, 0xa1, 0x86, 0x49, 0xc7, 0x31, 0x31, 0xc7, 0x89, 0x5b, 0xd4, 0xb7, 0x86, (*Tower)(nil), // 7: wtclientrpc.Tower
0x21, 0x12, 0xf1, 0x1b, 0x50, 0xb6, 0xf0, 0x3c, 0xe6, 0xe5, 0x43, 0x41, 0x0b, 0xcf, 0x23, 0x42, (*ListTowersRequest)(nil), // 8: wtclientrpc.ListTowersRequest
0x07, 0x90, 0x37, 0x23, 0xc4, 0xd1, 0x3c, 0xcc, 0x34, 0x87, 0xb8, 0xda, 0x68, 0xc1, 0x48, 0xfd, (*ListTowersResponse)(nil), // 9: wtclientrpc.ListTowersResponse
0xf7, 0x80, 0xd7, 0xcf, 0xd5, 0x25, 0x75, 0x93, 0xa3, 0xe7, 0x98, 0x0d, 0x89, 0xdb, 0x5f, 0x30, (*StatsRequest)(nil), // 10: wtclientrpc.StatsRequest
0x82, 0x1e, 0x42, 0x2d, 0x7d, 0xe0, 0x86, 0x9f, 0x28, 0x70, 0xe5, 0x6a, 0x82, 0xfd, 0x26, 0x88, (*StatsResponse)(nil), // 11: wtclientrpc.StatsResponse
0x2b, 0x9f, 0x25, 0x28, 0xf0, 0x14, 0x57, 0xfa, 0xb5, 0x0b, 0x6b, 0xa2, 0x00, 0x24, 0x48, 0x24, (*PolicyRequest)(nil), // 12: wtclientrpc.PolicyRequest
0xdf, 0x5a, 0x53, 0x97, 0x01, 0x74, 0x00, 0x75, 0xac, 0x33, 0xf3, 0x26, 0x36, 0x53, 0xd3, 0x31, (*PolicyResponse)(nil), // 13: wtclientrpc.PolicyResponse
0x35, 0x4c, 0x03, 0x33, 0xc2, 0xb3, 0x29, 0xa9, 0x3b, 0x21, 0x2e, 0x2c, 0x1c, 0x44, 0x28, 0xfa, }
0x1f, 0x2a, 0x81, 0x55, 0x71, 0x0d, 0x78, 0x4e, 0x6a, 0xe0, 0x6f, 0xe4, 0x3f, 0x7a, 0x02, 0xa5, var file_wtclientrpc_wtclient_proto_depIdxs = []int32{
0x18, 0x2e, 0x34, 0xf3, 0xad, 0x72, 0xf7, 0xef, 0x76, 0xa2, 0x63, 0xdb, 0xc9, 0xda, 0xa8, 0x31, 6, // 0: wtclientrpc.Tower.sessions:type_name -> wtclientrpc.TowerSession
0x55, 0x39, 0x84, 0xad, 0x33, 0xd3, 0x0b, 0x3b, 0xc2, 0x8b, 0xda, 0x21, 0xab, 0xec, 0x52, 0x76, 7, // 1: wtclientrpc.ListTowersResponse.towers:type_name -> wtclientrpc.Tower
0xd9, 0x9f, 0x02, 0x4a, 0x9e, 0x0f, 0xdb, 0x0c, 0xed, 0x41, 0x91, 0xf1, 0x48, 0x5d, 0xe2, 0x57, 0, // 2: wtclientrpc.PolicyRequest.policy_type:type_name -> wtclientrpc.PolicyType
0x41, 0x77, 0xaf, 0xa2, 0x0a, 0x86, 0xb2, 0x01, 0x95, 0x73, 0x86, 0x59, 0xf4, 0x71, 0xe5, 0xab, 1, // 3: wtclientrpc.WatchtowerClient.AddTower:input_type -> wtclientrpc.AddTowerRequest
0x04, 0xeb, 0x22, 0x20, 0xd4, 0x7e, 0x79, 0x27, 0x3d, 0x00, 0x14, 0xf0, 0x2f, 0xb1, 0x39, 0x25, 3, // 4: wtclientrpc.WatchtowerClient.RemoveTower:input_type -> wtclientrpc.RemoveTowerRequest
0xc6, 0xad, 0x86, 0xaa, 0x52, 0xdf, 0x3a, 0xe6, 0x40, 0xc4, 0xee, 0xc2, 0x76, 0xd2, 0x7c, 0x0d, 8, // 5: wtclientrpc.WatchtowerClient.ListTowers:input_type -> wtclientrpc.ListTowersRequest
0xeb, 0xd7, 0xbe, 0xe9, 0x12, 0x43, 0x54, 0xa1, 0x96, 0xa8, 0x42, 0x4f, 0x40, 0xe8, 0x31, 0xec, 5, // 6: wtclientrpc.WatchtowerClient.GetTowerInfo:input_type -> wtclientrpc.GetTowerInfoRequest
0xa4, 0xce, 0x90, 0xf9, 0x04, 0xfb, 0x1e, 0x23, 0x86, 0x68, 0xae, 0x3f, 0x13, 0x87, 0x8e, 0x22, 10, // 7: wtclientrpc.WatchtowerClient.Stats:input_type -> wtclientrpc.StatsRequest
0x4c, 0x39, 0x85, 0xf5, 0xa1, 0x3d, 0x35, 0xf5, 0x45, 0x54, 0x88, 0x03, 0x28, 0x3b, 0x3c, 0xa0, 12, // 8: wtclientrpc.WatchtowerClient.Policy:input_type -> wtclientrpc.PolicyRequest
0xb1, 0x85, 0x43, 0x78, 0xe6, 0x1b, 0xdd, 0xbf, 0x52, 0x66, 0x86, 0x07, 0x2e, 0x16, 0x0e, 0x51, 2, // 9: wtclientrpc.WatchtowerClient.AddTower:output_type -> wtclientrpc.AddTowerResponse
0xc1, 0x89, 0x9f, 0x95, 0x8f, 0x12, 0x6c, 0x44, 0x5a, 0x4b, 0x1b, 0x83, 0xf9, 0xf1, 0x9d, 0xa0, 4, // 10: wtclientrpc.WatchtowerClient.RemoveTower:output_type -> wtclientrpc.RemoveTowerResponse
0xa5, 0x62, 0x1b, 0x2d, 0x3c, 0x7f, 0x1d, 0x46, 0x56, 0xcc, 0x4f, 0xee, 0x87, 0xe7, 0x27, 0x9f, 9, // 11: wtclientrpc.WatchtowerClient.ListTowers:output_type -> wtclientrpc.ListTowersResponse
0x3d, 0x3f, 0x7b, 0xf7, 0x00, 0x96, 0xb7, 0x45, 0x00, 0xc5, 0xb3, 0xa3, 0x93, 0xde, 0xe0, 0x7d, 7, // 12: wtclientrpc.WatchtowerClient.GetTowerInfo:output_type -> wtclientrpc.Tower
0xf5, 0xb7, 0xe0, 0xb9, 0xf7, 0x72, 0xf0, 0xfc, 0x95, 0x5a, 0x95, 0xba, 0x9f, 0xf2, 0x50, 0x7d, 11, // 13: wtclientrpc.WatchtowerClient.Stats:output_type -> wtclientrpc.StatsResponse
0x8b, 0x99, 0x3e, 0xe1, 0xfd, 0x31, 0xe0, 0x89, 0xa2, 0x13, 0x28, 0x45, 0xab, 0x12, 0xed, 0xa6, 13, // 14: wtclientrpc.WatchtowerClient.Policy:output_type -> wtclientrpc.PolicyResponse
0xf2, 0xbf, 0xb5, 0x86, 0xe5, 0x7f, 0x57, 0xa0, 0xc2, 0x84, 0x21, 0x94, 0x13, 0x7b, 0x11, 0x35, 9, // [9:15] is the sub-list for method output_type
0x52, 0xec, 0xbb, 0x9b, 0x57, 0x6e, 0xae, 0x26, 0x08, 0xc5, 0x17, 0x00, 0xcb, 0x09, 0x40, 0xff, 3, // [3:9] is the sub-list for method input_type
0xa5, 0xf8, 0x77, 0x46, 0x4b, 0x6e, 0xac, 0xc4, 0x85, 0xdc, 0x33, 0xa8, 0x24, 0x37, 0x34, 0x4a, 3, // [3:3] is the sub-list for extension type_name
0x5f, 0x20, 0x63, 0x79, 0xcb, 0x19, 0xc3, 0x85, 0x0e, 0xa1, 0xc0, 0x67, 0x08, 0xa5, 0x97, 0x40, 3, // [3:3] is the sub-list for extension extendee
0x72, 0xd0, 0x64, 0x39, 0x0b, 0x12, 0xb7, 0xe8, 0x41, 0x31, 0x2c, 0x15, 0x92, 0x33, 0xba, 0x2d, 0, // [0:3] is the sub-list for field type_name
0x52, 0xf8, 0x27, 0x13, 0x0b, 0x25, 0xfa, 0xfb, 0x1f, 0x1e, 0x8d, 0x4d, 0x36, 0xf1, 0x47, 0x6d, }
0xdd, 0xb6, 0x3a, 0x53, 0x73, 0x3c, 0x61, 0xd4, 0xa4, 0x63, 0x4a, 0xd8, 0xcc, 0x76, 0xaf, 0x3a,
0x53, 0x6a, 0x74, 0xa6, 0x34, 0xf9, 0x9f, 0x75, 0x1d, 0x7d, 0x54, 0xe4, 0xff, 0xda, 0xfd, 0x6f, func init() { file_wtclientrpc_wtclient_proto_init() }
0x01, 0x00, 0x00, 0xff, 0xff, 0x49, 0xcd, 0xe9, 0xf8, 0x89, 0x07, 0x00, 0x00, func file_wtclientrpc_wtclient_proto_init() {
if File_wtclientrpc_wtclient_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_wtclientrpc_wtclient_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddTowerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddTowerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveTowerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveTowerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTowerInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TowerSession); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Tower); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListTowersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListTowersResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PolicyRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_wtclientrpc_wtclient_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PolicyResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_wtclientrpc_wtclient_proto_rawDesc,
NumEnums: 1,
NumMessages: 13,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_wtclientrpc_wtclient_proto_goTypes,
DependencyIndexes: file_wtclientrpc_wtclient_proto_depIdxs,
EnumInfos: file_wtclientrpc_wtclient_proto_enumTypes,
MessageInfos: file_wtclientrpc_wtclient_proto_msgTypes,
}.Build()
File_wtclientrpc_wtclient_proto = out.File
file_wtclientrpc_wtclient_proto_rawDesc = nil
file_wtclientrpc_wtclient_proto_goTypes = nil
file_wtclientrpc_wtclient_proto_depIdxs = nil
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConn var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4 const _ = grpc.SupportPackageIsVersion6
// WatchtowerClientClient is the client API for WatchtowerClient service. // WatchtowerClientClient is the client API for WatchtowerClient service.
// //
@ -831,10 +1254,10 @@ type WatchtowerClientClient interface {
} }
type watchtowerClientClient struct { type watchtowerClientClient struct {
cc *grpc.ClientConn cc grpc.ClientConnInterface
} }
func NewWatchtowerClientClient(cc *grpc.ClientConn) WatchtowerClientClient { func NewWatchtowerClientClient(cc grpc.ClientConnInterface) WatchtowerClientClient {
return &watchtowerClientClient{cc} return &watchtowerClientClient{cc}
} }
@ -920,22 +1343,22 @@ type WatchtowerClientServer interface {
type UnimplementedWatchtowerClientServer struct { type UnimplementedWatchtowerClientServer struct {
} }
func (*UnimplementedWatchtowerClientServer) AddTower(ctx context.Context, req *AddTowerRequest) (*AddTowerResponse, error) { func (*UnimplementedWatchtowerClientServer) AddTower(context.Context, *AddTowerRequest) (*AddTowerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddTower not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddTower not implemented")
} }
func (*UnimplementedWatchtowerClientServer) RemoveTower(ctx context.Context, req *RemoveTowerRequest) (*RemoveTowerResponse, error) { func (*UnimplementedWatchtowerClientServer) RemoveTower(context.Context, *RemoveTowerRequest) (*RemoveTowerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveTower not implemented") return nil, status.Errorf(codes.Unimplemented, "method RemoveTower not implemented")
} }
func (*UnimplementedWatchtowerClientServer) ListTowers(ctx context.Context, req *ListTowersRequest) (*ListTowersResponse, error) { func (*UnimplementedWatchtowerClientServer) ListTowers(context.Context, *ListTowersRequest) (*ListTowersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListTowers not implemented") return nil, status.Errorf(codes.Unimplemented, "method ListTowers not implemented")
} }
func (*UnimplementedWatchtowerClientServer) GetTowerInfo(ctx context.Context, req *GetTowerInfoRequest) (*Tower, error) { func (*UnimplementedWatchtowerClientServer) GetTowerInfo(context.Context, *GetTowerInfoRequest) (*Tower, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTowerInfo not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetTowerInfo not implemented")
} }
func (*UnimplementedWatchtowerClientServer) Stats(ctx context.Context, req *StatsRequest) (*StatsResponse, error) { func (*UnimplementedWatchtowerClientServer) Stats(context.Context, *StatsRequest) (*StatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented") return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented")
} }
func (*UnimplementedWatchtowerClientServer) Policy(ctx context.Context, req *PolicyRequest) (*PolicyResponse, error) { func (*UnimplementedWatchtowerClientServer) Policy(context.Context, *PolicyRequest) (*PolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Policy not implemented") return nil, status.Errorf(codes.Unimplemented, "method Policy not implemented")
} }

@ -93,10 +93,10 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string) (
fmt.Errorf("unable to create temp directory: %v", err) fmt.Errorf("unable to create temp directory: %v", err)
} }
zmqBlockAddr := fmt.Sprintf("tcp://127.0.0.1:%d", nextAvailablePort()) zmqBlockAddr := fmt.Sprintf("tcp://127.0.0.1:%d", NextAvailablePort())
zmqTxAddr := fmt.Sprintf("tcp://127.0.0.1:%d", nextAvailablePort()) zmqTxAddr := fmt.Sprintf("tcp://127.0.0.1:%d", NextAvailablePort())
rpcPort := nextAvailablePort() rpcPort := NextAvailablePort()
p2pPort := nextAvailablePort() p2pPort := NextAvailablePort()
cmdArgs := []string{ cmdArgs := []string{
"-datadir=" + tempBitcoindDir, "-datadir=" + tempBitcoindDir,

@ -37,7 +37,7 @@ type feeEstimates struct {
// startFeeService spins up a go-routine to serve fee estimates. // startFeeService spins up a go-routine to serve fee estimates.
func startFeeService() *feeService { func startFeeService() *feeService {
port := nextAvailablePort() port := NextAvailablePort()
f := feeService{ f := feeService{
url: fmt.Sprintf("http://localhost:%v/fee-estimates.json", port), url: fmt.Sprintf("http://localhost:%v/fee-estimates.json", port),
} }

@ -21,6 +21,7 @@ import (
"github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd" "github.com/lightningnetwork/lnd"
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
"github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntest/wait" "github.com/lightningnetwork/lnd/lntest/wait"
"github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/lightningnetwork/lnd/lnwallet/chainfee"
@ -61,9 +62,9 @@ type NetworkHarness struct {
Alice *HarnessNode Alice *HarnessNode
Bob *HarnessNode Bob *HarnessNode
// useEtcd is set to true if new nodes are to be created with an // embeddedEtcd is set to true if new nodes are to be created with an
// embedded etcd backend instead of just bbolt. // embedded etcd backend instead of just bbolt.
useEtcd bool embeddedEtcd bool
// Channel for transmitting stderr output from failed lightning node // Channel for transmitting stderr output from failed lightning node
// to main process. // to main process.
@ -83,7 +84,7 @@ type NetworkHarness struct {
// current repo. This will save developers from having to manually `go install` // current repo. This will save developers from having to manually `go install`
// within the repo each time before changes // within the repo each time before changes
func NewNetworkHarness(r *rpctest.Harness, b BackendConfig, lndBinary string, func NewNetworkHarness(r *rpctest.Harness, b BackendConfig, lndBinary string,
useEtcd bool) (*NetworkHarness, error) { embeddedEtcd bool) (*NetworkHarness, error) {
feeService := startFeeService() feeService := startFeeService()
@ -97,7 +98,7 @@ func NewNetworkHarness(r *rpctest.Harness, b BackendConfig, lndBinary string,
feeService: feeService, feeService: feeService,
quit: make(chan struct{}), quit: make(chan struct{}),
lndBinary: lndBinary, lndBinary: lndBinary,
useEtcd: useEtcd, embeddedEtcd: embeddedEtcd,
} }
return &n, nil return &n, nil
} }
@ -270,11 +271,70 @@ func (n *NetworkHarness) Stop() {
n.feeService.stop() n.feeService.stop()
} }
// extraArgsEtcd returns extra args for configuring LND to use an external etcd
// database (for remote channel DB and wallet DB).
func extraArgsEtcd(etcdCfg *etcd.Config, name string, cluster bool) []string {
extraArgs := []string{
"--db.backend=etcd",
fmt.Sprintf("--db.etcd.host=%v", etcdCfg.Host),
fmt.Sprintf("--db.etcd.user=%v", etcdCfg.User),
fmt.Sprintf("--db.etcd.pass=%v", etcdCfg.Pass),
fmt.Sprintf("--db.etcd.namespace=%v", etcdCfg.Namespace),
}
if etcdCfg.InsecureSkipVerify {
extraArgs = append(extraArgs, "--db.etcd.insecure_skip_verify")
}
if cluster {
extraArgs = append(extraArgs, "--cluster.enable-leader-election")
extraArgs = append(
extraArgs, fmt.Sprintf("--cluster.id=%v", name),
)
}
return extraArgs
}
// NewNodeWithSeedEtcd starts a new node with seed that'll use an external
// etcd database as its (remote) channel and wallet DB. The passsed cluster
// flag indicates that we'd like the node to join the cluster leader election.
func (n *NetworkHarness) NewNodeWithSeedEtcd(name string, etcdCfg *etcd.Config,
password []byte, entropy []byte, statelessInit, cluster bool) (
*HarnessNode, []string, []byte, error) {
// We don't want to use the embedded etcd instance.
const embeddedEtcd = false
extraArgs := extraArgsEtcd(etcdCfg, name, cluster)
return n.newNodeWithSeed(
name, extraArgs, password, entropy, statelessInit, embeddedEtcd,
)
}
// NewNodeWithSeedEtcd starts a new node with seed that'll use an external
// etcd database as its (remote) channel and wallet DB. The passsed cluster
// flag indicates that we'd like the node to join the cluster leader election.
// If the wait flag is false then we won't wait until RPC is available (this is
// useful when the node is not expected to become the leader right away).
func (n *NetworkHarness) NewNodeEtcd(name string, etcdCfg *etcd.Config,
password []byte, cluster, wait bool) (*HarnessNode, error) {
// We don't want to use the embedded etcd instance.
const embeddedEtcd = false
extraArgs := extraArgsEtcd(etcdCfg, name, cluster)
return n.newNode(name, extraArgs, true, password, embeddedEtcd, wait)
}
// NewNode fully initializes a returns a new HarnessNode bound to the // NewNode fully initializes a returns a new HarnessNode bound to the
// current instance of the network harness. The created node is running, but // current instance of the network harness. The created node is running, but
// not yet connected to other nodes within the network. // not yet connected to other nodes within the network.
func (n *NetworkHarness) NewNode(name string, extraArgs []string) (*HarnessNode, error) { func (n *NetworkHarness) NewNode(name string, extraArgs []string) (*HarnessNode,
return n.newNode(name, extraArgs, false, nil) error) {
return n.newNode(name, extraArgs, false, nil, n.embeddedEtcd, true)
} }
// NewNodeWithSeed fully initializes a new HarnessNode after creating a fresh // NewNodeWithSeed fully initializes a new HarnessNode after creating a fresh
@ -285,7 +345,18 @@ func (n *NetworkHarness) NewNodeWithSeed(name string, extraArgs []string,
password []byte, statelessInit bool) (*HarnessNode, []string, []byte, password []byte, statelessInit bool) (*HarnessNode, []string, []byte,
error) { error) {
node, err := n.newNode(name, extraArgs, true, password) return n.newNodeWithSeed(
name, extraArgs, password, nil, statelessInit, n.embeddedEtcd,
)
}
func (n *NetworkHarness) newNodeWithSeed(name string, extraArgs []string,
password, entropy []byte, statelessInit, embeddedEtcd bool) (
*HarnessNode, []string, []byte, error) {
node, err := n.newNode(
name, extraArgs, true, password, embeddedEtcd, true,
)
if err != nil { if err != nil {
return nil, nil, nil, err return nil, nil, nil, err
} }
@ -296,6 +367,7 @@ func (n *NetworkHarness) NewNodeWithSeed(name string, extraArgs []string,
// same password as the internal wallet. // same password as the internal wallet.
genSeedReq := &lnrpc.GenSeedRequest{ genSeedReq := &lnrpc.GenSeedRequest{
AezeedPassphrase: password, AezeedPassphrase: password,
SeedEntropy: entropy,
} }
ctxt, cancel := context.WithTimeout(ctxb, DefaultTimeout) ctxt, cancel := context.WithTimeout(ctxb, DefaultTimeout)
@ -345,7 +417,9 @@ func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string,
password []byte, mnemonic []string, recoveryWindow int32, password []byte, mnemonic []string, recoveryWindow int32,
chanBackups *lnrpc.ChanBackupSnapshot) (*HarnessNode, error) { chanBackups *lnrpc.ChanBackupSnapshot) (*HarnessNode, error) {
node, err := n.newNode(name, extraArgs, true, password) node, err := n.newNode(
name, extraArgs, true, password, n.embeddedEtcd, true,
)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -375,7 +449,8 @@ func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string,
// can be used immediately. Otherwise, the node will require an additional // can be used immediately. Otherwise, the node will require an additional
// initialization phase where the wallet is either created or restored. // initialization phase where the wallet is either created or restored.
func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool, func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool,
password []byte) (*HarnessNode, error) { password []byte, embeddedEtcd, wait bool) (
*HarnessNode, error) {
node, err := newNode(NodeConfig{ node, err := newNode(NodeConfig{
Name: name, Name: name,
@ -386,7 +461,7 @@ func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool,
NetParams: n.netParams, NetParams: n.netParams,
ExtraArgs: extraArgs, ExtraArgs: extraArgs,
FeeURL: n.feeService.url, FeeURL: n.feeService.url,
Etcd: n.useEtcd, Etcd: embeddedEtcd,
}) })
if err != nil { if err != nil {
return nil, err return nil, err
@ -398,7 +473,8 @@ func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool,
n.activeNodes[node.NodeID] = node n.activeNodes[node.NodeID] = node
n.mtx.Unlock() n.mtx.Unlock()
if err := node.start(n.lndBinary, n.lndErrorChan); err != nil { err = node.start(n.lndBinary, n.lndErrorChan, wait)
if err != nil {
return nil, err return nil, err
} }
@ -684,7 +760,7 @@ func (n *NetworkHarness) RestartNodeNoUnlock(node *HarnessNode,
} }
} }
return node.start(n.lndBinary, n.lndErrorChan) return node.start(n.lndBinary, n.lndErrorChan, true)
} }
// SuspendNode stops the given node and returns a callback that can be used to // SuspendNode stops the given node and returns a callback that can be used to
@ -695,7 +771,7 @@ func (n *NetworkHarness) SuspendNode(node *HarnessNode) (func() error, error) {
} }
restart := func() error { restart := func() error {
return node.start(n.lndBinary, n.lndErrorChan) return node.start(n.lndBinary, n.lndErrorChan, true)
} }
return restart, nil return restart, nil
@ -712,6 +788,11 @@ func (n *NetworkHarness) ShutdownNode(node *HarnessNode) error {
return nil return nil
} }
// KillNode kills the node (but won't wait for the node process to stop).
func (n *NetworkHarness) KillNode(node *HarnessNode) error {
return node.kill()
}
// StopNode stops the target node, but doesn't yet clean up its directories. // StopNode stops the target node, but doesn't yet clean up its directories.
// This can be used to temporarily bring a node down during a test, to be later // This can be used to temporarily bring a node down during a test, to be later
// started up again. // started up again.

@ -108,7 +108,7 @@ func testSendPaymentAMP(net *lntest.NetworkHarness, t *harnessTest) {
// Assert that the invoice is settled for the total payment amount and // Assert that the invoice is settled for the total payment amount and
// has the correct payment address. // has the correct payment address.
require.True(t.t, rpcInvoice.Settled) require.True(t.t, rpcInvoice.Settled) // nolint:staticcheck
require.Equal(t.t, lnrpc.Invoice_SETTLED, rpcInvoice.State) require.Equal(t.t, lnrpc.Invoice_SETTLED, rpcInvoice.State)
require.Equal(t.t, int64(paymentAmt), rpcInvoice.AmtPaidSat) require.Equal(t.t, int64(paymentAmt), rpcInvoice.AmtPaidSat)
require.Equal(t.t, int64(paymentAmt*1000), rpcInvoice.AmtPaidMsat) require.Equal(t.t, int64(paymentAmt*1000), rpcInvoice.AmtPaidMsat)
@ -294,7 +294,7 @@ func testSendToRouteAMP(net *lntest.NetworkHarness, t *harnessTest) {
// Assert that the invoice is settled for the total payment amount and // Assert that the invoice is settled for the total payment amount and
// has the correct payment address. // has the correct payment address.
require.True(t.t, rpcInvoice.Settled) require.True(t.t, rpcInvoice.Settled) // nolint:staticcheck
require.Equal(t.t, lnrpc.Invoice_SETTLED, rpcInvoice.State) require.Equal(t.t, lnrpc.Invoice_SETTLED, rpcInvoice.State)
require.Equal(t.t, int64(paymentAmt), rpcInvoice.AmtPaidSat) require.Equal(t.t, int64(paymentAmt), rpcInvoice.AmtPaidSat)
require.Equal(t.t, int64(paymentAmt*1000), rpcInvoice.AmtPaidMsat) require.Equal(t.t, int64(paymentAmt*1000), rpcInvoice.AmtPaidMsat)

@ -0,0 +1,191 @@
// +build kvdb_etcd
package itest
import (
"context"
"io/ioutil"
"testing"
"time"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/channeldb/kvdb"
"github.com/lightningnetwork/lnd/cluster"
"github.com/lightningnetwork/lnd/lncfg"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lntest"
)
func assertLeader(ht *harnessTest, observer cluster.LeaderElector,
expected string) {
leader, err := observer.Leader(context.Background())
if err != nil {
ht.Fatalf("Unable to query leader: %v", err)
}
if leader != expected {
ht.Fatalf("Leader should be '%v', got: '%v'", expected, leader)
}
}
// testEtcdFailover tests that in a cluster setup where two LND nodes form a
// single cluster (sharing the same identity) one can hand over the leader role
// to the other (failing over after graceful shutdown or forceful abort).
func testEtcdFailover(net *lntest.NetworkHarness, ht *harnessTest) {
testCases := []struct {
name string
kill bool
}{{
name: "failover after shutdown",
kill: false,
}, {
name: "failover after abort",
kill: true,
}}
for _, test := range testCases {
test := test
ht.t.Run(test.name, func(t1 *testing.T) {
ht1 := newHarnessTest(t1, ht.lndHarness)
ht1.RunTestCase(&testCase{
name: test.name,
test: func(_ *lntest.NetworkHarness,
tt *harnessTest) {
testEtcdFailoverCase(net, tt, test.kill)
},
})
})
}
}
func testEtcdFailoverCase(net *lntest.NetworkHarness, ht *harnessTest,
kill bool) {
ctxb := context.Background()
tmpDir, err := ioutil.TempDir("", "etcd")
etcdCfg, cleanup, err := kvdb.StartEtcdTestBackend(
tmpDir, uint16(lntest.NextAvailablePort()),
uint16(lntest.NextAvailablePort()),
)
if err != nil {
ht.Fatalf("Failed to start etcd instance: %v", err)
}
defer cleanup()
observer, err := cluster.MakeLeaderElector(
ctxb, cluster.EtcdLeaderElector, "observer",
lncfg.DefaultEtcdElectionPrefix, etcdCfg,
)
if err != nil {
ht.Fatalf("Cannot start election observer")
}
password := []byte("the quick brown fox jumps the lazy dog")
entropy := [16]byte{1, 2, 3}
stateless := false
cluster := true
carol1, _, _, err := net.NewNodeWithSeedEtcd(
"Carol-1", etcdCfg, password, entropy[:], stateless, cluster,
)
if err != nil {
ht.Fatalf("unable to start Carol-1: %v", err)
}
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
info1, err := carol1.GetInfo(ctxt, &lnrpc.GetInfoRequest{})
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
if err := net.ConnectNodes(ctxt, carol1, net.Alice); err != nil {
ht.Fatalf("unable to connect Carol to Alice: %v", err)
}
// Open a channel with 100k satoshis between Carol and Alice with Alice
// being the sole funder of the channel.
chanAmt := btcutil.Amount(100000)
ctxt, _ = context.WithTimeout(ctxb, channelOpenTimeout)
_ = openChannelAndAssert(
ctxt, ht, net, net.Alice, carol1,
lntest.OpenChannelParams{
Amt: chanAmt,
},
)
// At this point Carol-1 is the elected leader, while Carol-2 will wait
// to become the leader when Carol-1 stops.
carol2, err := net.NewNodeEtcd(
"Carol-2", etcdCfg, password, cluster, false,
)
if err != nil {
ht.Fatalf("Unable to start Carol-2: %v", err)
}
assertLeader(ht, observer, "Carol-1")
amt := btcutil.Amount(1000)
payReqs, _, _, err := createPayReqs(carol1, amt, 2)
if err != nil {
ht.Fatalf("Carol-2 is unable to create payment requests: %v",
err)
}
sendAndAssertSuccess(ctxb, ht, net.Alice, &routerrpc.SendPaymentRequest{
PaymentRequest: payReqs[0],
TimeoutSeconds: 60,
FeeLimitSat: noFeeLimitMsat,
})
// Shut down or kill Carol-1 and wait for Carol-2 to become the leader.
var failoverTimeout time.Duration
if kill {
err = net.KillNode(carol1)
if err != nil {
ht.Fatalf("Can't kill Carol-1: %v", err)
}
failoverTimeout = 2 * time.Minute
} else {
shutdownAndAssert(net, ht, carol1)
failoverTimeout = 30 * time.Second
}
err = carol2.WaitUntilLeader(failoverTimeout)
if err != nil {
ht.Fatalf("Waiting for Carol-2 to become the leader failed: %v",
err)
}
assertLeader(ht, observer, "Carol-2")
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
err = carol2.Unlock(ctxt, &lnrpc.UnlockWalletRequest{
WalletPassword: password,
})
if err != nil {
ht.Fatalf("Unlocking Carol-2 was not successful: %v", err)
}
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
// Make sure Carol-1 and Carol-2 have the same identity.
info2, err := carol2.GetInfo(ctxt, &lnrpc.GetInfoRequest{})
if info1.IdentityPubkey != info2.IdentityPubkey {
ht.Fatalf("Carol-1 and Carol-2 must have the same identity: "+
"%v vs %v", info1.IdentityPubkey, info2.IdentityPubkey)
}
// Now let Alice pay the second invoice but this time we expect Carol-2
// to receive the payment.
sendAndAssertSuccess(ctxb, ht, net.Alice, &routerrpc.SendPaymentRequest{
PaymentRequest: payReqs[1],
TimeoutSeconds: 60,
FeeLimitSat: noFeeLimitMsat,
})
shutdownAndAssert(net, ht, carol2)
}

@ -188,7 +188,7 @@ func basicChannelFundingTest(t *harnessTest, net *lntest.NetworkHarness,
lnwire.NewMSatFromSatoshis(remote), lnwire.NewMSatFromSatoshis(remote),
) )
// Deprecated fields. // Deprecated fields.
newResp.Balance += int64(local) newResp.Balance += int64(local) // nolint:staticcheck
assertChannelBalanceResp(t, node, newResp) assertChannelBalanceResp(t, node, newResp)
} }

@ -220,7 +220,7 @@ func assertOnChainInvoiceState(ctx context.Context, t *harnessTest,
}) })
require.NoError(t.t, err) require.NoError(t.t, err)
require.True(t.t, inv.Settled, "expected erroneously settled invoice") require.True(t.t, inv.Settled, "expected erroneously settled invoice") // nolint:staticcheck
for _, htlc := range inv.Htlcs { for _, htlc := range inv.Htlcs {
require.Equal(t.t, lnrpc.InvoiceHTLCState_SETTLED, htlc.State, require.Equal(t.t, lnrpc.InvoiceHTLCState_SETTLED, htlc.State,
"expected htlcs to be erroneously settled") "expected htlcs to be erroneously settled")

@ -0,0 +1,11 @@
// +build !kvdb_etcd
package itest
import (
"github.com/lightningnetwork/lnd/lntest"
)
// testEtcdFailover is an empty itest when LND is not compiled with etcd
// support.
func testEtcdFailover(net *lntest.NetworkHarness, ht *harnessTest) {}

@ -86,7 +86,7 @@ func testSingleHopInvoice(net *lntest.NetworkHarness, t *harnessTest) {
if err != nil { if err != nil {
t.Fatalf("unable to lookup invoice: %v", err) t.Fatalf("unable to lookup invoice: %v", err)
} }
if !dbInvoice.Settled { if !dbInvoice.Settled { // nolint:staticcheck
t.Fatalf("bob's invoice should be marked as settled: %v", t.Fatalf("bob's invoice should be marked as settled: %v",
spew.Sdump(dbInvoice)) spew.Sdump(dbInvoice))
} }

@ -48,6 +48,7 @@ import (
"github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing" "github.com/lightningnetwork/lnd/routing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
) )
const ( const (
@ -1219,12 +1220,11 @@ func channelCommitType(node *lntest.HarnessNode,
// assertChannelBalanceResp makes a ChannelBalance request and checks the // assertChannelBalanceResp makes a ChannelBalance request and checks the
// returned response matches the expected. // returned response matches the expected.
func assertChannelBalanceResp(t *harnessTest, func assertChannelBalanceResp(t *harnessTest,
node *lntest.HarnessNode, expected *lnrpc.ChannelBalanceResponse) { node *lntest.HarnessNode,
expected *lnrpc.ChannelBalanceResponse) { // nolint:interfacer
resp := getChannelBalance(t, node) resp := getChannelBalance(t, node)
require.Equal( require.True(t.t, proto.Equal(expected, resp), "balance is incorrect")
t.t, expected, resp, "balance is incorrect",
)
} }
// getChannelBalance gets the channel balance. // getChannelBalance gets the channel balance.
@ -5642,7 +5642,7 @@ func testSingleHopSendToRouteCase(net *lntest.NetworkHarness, t *harnessTest,
} }
sendToRouteStream := func() { sendToRouteStream := func() {
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout) ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
alicePayStream, err := carol.SendToRoute(ctxt) alicePayStream, err := carol.SendToRoute(ctxt) // nolint:staticcheck
if err != nil { if err != nil {
t.Fatalf("unable to create payment stream for "+ t.Fatalf("unable to create payment stream for "+
"carol: %v", err) "carol: %v", err)
@ -12672,20 +12672,20 @@ func testQueryRoutes(net *lntest.NetworkHarness, t *harnessTest) {
lnwire.MilliSatoshi(len(route.Hops)-1) * feePerHopMSat lnwire.MilliSatoshi(len(route.Hops)-1) * feePerHopMSat
expectedTotalAmtMSat := (paymentAmt * mSat) + expectedTotalFeesMSat expectedTotalAmtMSat := (paymentAmt * mSat) + expectedTotalFeesMSat
if route.TotalFees != route.TotalFeesMsat/mSat { if route.TotalFees != route.TotalFeesMsat/mSat { // nolint:staticcheck
t.Fatalf("route %v: total fees %v (msat) does not "+ t.Fatalf("route %v: total fees %v (msat) does not "+
"round down to %v (sat)", "round down to %v (sat)",
i, route.TotalFeesMsat, route.TotalFees) i, route.TotalFeesMsat, route.TotalFees) // nolint:staticcheck
} }
if route.TotalFeesMsat != int64(expectedTotalFeesMSat) { if route.TotalFeesMsat != int64(expectedTotalFeesMSat) {
t.Fatalf("route %v: total fees in msat expected %v got %v", t.Fatalf("route %v: total fees in msat expected %v got %v",
i, expectedTotalFeesMSat, route.TotalFeesMsat) i, expectedTotalFeesMSat, route.TotalFeesMsat)
} }
if route.TotalAmt != route.TotalAmtMsat/mSat { if route.TotalAmt != route.TotalAmtMsat/mSat { // nolint:staticcheck
t.Fatalf("route %v: total amt %v (msat) does not "+ t.Fatalf("route %v: total amt %v (msat) does not "+
"round down to %v (sat)", "round down to %v (sat)",
i, route.TotalAmtMsat, route.TotalAmt) i, route.TotalAmtMsat, route.TotalAmt) // nolint:staticcheck
} }
if route.TotalAmtMsat != int64(expectedTotalAmtMSat) { if route.TotalAmtMsat != int64(expectedTotalAmtMSat) {
t.Fatalf("route %v: total amt in msat expected %v got %v", t.Fatalf("route %v: total amt in msat expected %v got %v",
@ -12698,20 +12698,20 @@ func testQueryRoutes(net *lntest.NetworkHarness, t *harnessTest) {
for j, hop := range route.Hops[:len(route.Hops)-1] { for j, hop := range route.Hops[:len(route.Hops)-1] {
expectedAmtToForwardMSat -= feePerHopMSat expectedAmtToForwardMSat -= feePerHopMSat
if hop.Fee != hop.FeeMsat/mSat { if hop.Fee != hop.FeeMsat/mSat { // nolint:staticcheck
t.Fatalf("route %v hop %v: fee %v (msat) does not "+ t.Fatalf("route %v hop %v: fee %v (msat) does not "+
"round down to %v (sat)", "round down to %v (sat)",
i, j, hop.FeeMsat, hop.Fee) i, j, hop.FeeMsat, hop.Fee) // nolint:staticcheck
} }
if hop.FeeMsat != int64(feePerHopMSat) { if hop.FeeMsat != int64(feePerHopMSat) {
t.Fatalf("route %v hop %v: fee in msat expected %v got %v", t.Fatalf("route %v hop %v: fee in msat expected %v got %v",
i, j, feePerHopMSat, hop.FeeMsat) i, j, feePerHopMSat, hop.FeeMsat)
} }
if hop.AmtToForward != hop.AmtToForwardMsat/mSat { if hop.AmtToForward != hop.AmtToForwardMsat/mSat { // nolint:staticcheck
t.Fatalf("route %v hop %v: amt to forward %v (msat) does not "+ t.Fatalf("route %v hop %v: amt to forward %v (msat) does not "+
"round down to %v (sat)", "round down to %v (sat)",
i, j, hop.AmtToForwardMsat, hop.AmtToForward) i, j, hop.AmtToForwardMsat, hop.AmtToForward) // nolint:staticcheck
} }
if hop.AmtToForwardMsat != int64(expectedAmtToForwardMSat) { if hop.AmtToForwardMsat != int64(expectedAmtToForwardMSat) {
t.Fatalf("route %v hop %v: amt to forward in msat "+ t.Fatalf("route %v hop %v: amt to forward in msat "+
@ -12723,15 +12723,15 @@ func testQueryRoutes(net *lntest.NetworkHarness, t *harnessTest) {
// payment amount. // payment amount.
hop := route.Hops[len(route.Hops)-1] hop := route.Hops[len(route.Hops)-1]
if hop.Fee != 0 || hop.FeeMsat != 0 { if hop.Fee != 0 || hop.FeeMsat != 0 { // nolint:staticcheck
t.Fatalf("route %v hop %v: fee expected 0 got %v (sat) %v (msat)", t.Fatalf("route %v hop %v: fee expected 0 got %v (sat) %v (msat)",
i, len(route.Hops)-1, hop.Fee, hop.FeeMsat) i, len(route.Hops)-1, hop.Fee, hop.FeeMsat) // nolint:staticcheck
} }
if hop.AmtToForward != hop.AmtToForwardMsat/mSat { if hop.AmtToForward != hop.AmtToForwardMsat/mSat { // nolint:staticcheck
t.Fatalf("route %v hop %v: amt to forward %v (msat) does not "+ t.Fatalf("route %v hop %v: amt to forward %v (msat) does not "+
"round down to %v (sat)", "round down to %v (sat)",
i, len(route.Hops)-1, hop.AmtToForwardMsat, hop.AmtToForward) i, len(route.Hops)-1, hop.AmtToForwardMsat, hop.AmtToForward) // nolint:staticcheck
} }
if hop.AmtToForwardMsat != paymentAmt*mSat { if hop.AmtToForwardMsat != paymentAmt*mSat {
t.Fatalf("route %v hop %v: amt to forward in msat "+ t.Fatalf("route %v hop %v: amt to forward in msat "+
@ -12787,13 +12787,7 @@ func testMissionControlCfg(t *testing.T, node *lntest.HarnessNode) {
ctxb, &routerrpc.GetMissionControlConfigRequest{}, ctxb, &routerrpc.GetMissionControlConfigRequest{},
) )
require.NoError(t, err) require.NoError(t, err)
require.True(t, proto.Equal(cfg, resp.Config))
// Set the hidden fields on the cfg we set so that we can use require
// equal rather than comparing field by field.
cfg.XXX_sizecache = resp.XXX_sizecache
cfg.XXX_NoUnkeyedLiteral = resp.XXX_NoUnkeyedLiteral
cfg.XXX_unrecognized = resp.XXX_unrecognized
require.Equal(t, cfg, resp.Config)
_, err = node.RouterClient.SetMissionControlConfig( _, err = node.RouterClient.SetMissionControlConfig(
ctxb, &routerrpc.SetMissionControlConfigRequest{ ctxb, &routerrpc.SetMissionControlConfigRequest{

@ -315,4 +315,8 @@ var allTestCases = []*testCase{
name: "wallet import pubkey", name: "wallet import pubkey",
test: testWalletImportPubKey, test: testWalletImportPubKey,
}, },
{
name: "etcd_failover",
test: testEtcdFailover,
},
} }

@ -275,3 +275,4 @@
<time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeInvoices]: context canceled <time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeInvoices]: context canceled
<time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeChannelGraph]: context deadline exceeded <time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeChannelGraph]: context deadline exceeded
<time> [ERR] RPCS: [/invoicesrpc.Invoices/SubscribeSingleInvoice]: context canceled <time> [ERR] RPCS: [/invoicesrpc.Invoices/SubscribeSingleInvoice]: context canceled
<time> [ERR] RPCS: [/lnrpc.State/SubscribeState]: context canceled

@ -91,10 +91,10 @@ var (
) )
) )
// nextAvailablePort returns the first port that is available for listening by // NextAvailablePort returns the first port that is available for listening by
// a new node. It panics if no port is found and the maximum available TCP port // a new node. It panics if no port is found and the maximum available TCP port
// is reached. // is reached.
func nextAvailablePort() int { func NextAvailablePort() int {
port := atomic.AddUint32(&lastPort, 1) port := atomic.AddUint32(&lastPort, 1)
for port < 65535 { for port < 65535 {
// If there are no errors while attempting to listen on this // If there are no errors while attempting to listen on this
@ -148,18 +148,18 @@ func GetBtcdBinary() string {
// addresses with unique ports and should be used to overwrite rpctest's default // addresses with unique ports and should be used to overwrite rpctest's default
// generator which is prone to use colliding ports. // generator which is prone to use colliding ports.
func GenerateBtcdListenerAddresses() (string, string) { func GenerateBtcdListenerAddresses() (string, string) {
return fmt.Sprintf(listenerFormat, nextAvailablePort()), return fmt.Sprintf(listenerFormat, NextAvailablePort()),
fmt.Sprintf(listenerFormat, nextAvailablePort()) fmt.Sprintf(listenerFormat, NextAvailablePort())
} }
// generateListeningPorts returns four ints representing ports to listen on // generateListeningPorts returns four ints representing ports to listen on
// designated for the current lightning network test. This returns the next // designated for the current lightning network test. This returns the next
// available ports for the p2p, rpc, rest and profiling services. // available ports for the p2p, rpc, rest and profiling services.
func generateListeningPorts() (int, int, int, int) { func generateListeningPorts() (int, int, int, int) {
p2p := nextAvailablePort() p2p := NextAvailablePort()
rpc := nextAvailablePort() rpc := NextAvailablePort()
rest := nextAvailablePort() rest := NextAvailablePort()
profile := nextAvailablePort() profile := NextAvailablePort()
return p2p, rpc, rest, profile return p2p, rpc, rest, profile
} }
@ -303,16 +303,15 @@ func (cfg NodeConfig) genArgs() []string {
args = append( args = append(
args, fmt.Sprintf( args, fmt.Sprintf(
"--db.etcd.embedded_client_port=%v", "--db.etcd.embedded_client_port=%v",
nextAvailablePort(), NextAvailablePort(),
), ),
) )
args = append( args = append(
args, fmt.Sprintf( args, fmt.Sprintf(
"--db.etcd.embedded_peer_port=%v", "--db.etcd.embedded_peer_port=%v",
nextAvailablePort(), NextAvailablePort(),
), ),
) )
args = append(args, "--db.etcd.embedded")
} }
if cfg.FeeURL != "" { if cfg.FeeURL != "" {
@ -535,7 +534,9 @@ func (hn *HarnessNode) InvoiceMacPath() string {
// //
// This may not clean up properly if an error is returned, so the caller should // This may not clean up properly if an error is returned, so the caller should
// call shutdown() regardless of the return value. // call shutdown() regardless of the return value.
func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error { func (hn *HarnessNode) start(lndBinary string, lndError chan<- error,
wait bool) error {
hn.quit = make(chan struct{}) hn.quit = make(chan struct{})
args := hn.Cfg.genArgs() args := hn.Cfg.genArgs()
@ -643,6 +644,12 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error {
return err return err
} }
// We may want to skip waiting for the node to come up (eg. the node
// is waiting to become the leader).
if !wait {
return nil
}
// Since Stop uses the LightningClient to stop the node, if we fail to get a // Since Stop uses the LightningClient to stop the node, if we fail to get a
// connected client, we have to kill the process. // connected client, we have to kill the process.
useMacaroons := !hn.Cfg.HasSeed useMacaroons := !hn.Cfg.HasSeed
@ -652,6 +659,88 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error {
return err return err
} }
if err := hn.waitUntilStarted(conn, DefaultTimeout); err != nil {
return err
}
// If the node was created with a seed, we will need to perform an
// additional step to unlock the wallet. The connection returned will
// only use the TLS certs, and can only perform operations necessary to
// unlock the daemon.
if hn.Cfg.HasSeed {
hn.WalletUnlockerClient = lnrpc.NewWalletUnlockerClient(conn)
return nil
}
return hn.initLightningClient(conn)
}
// waitUntilStarted waits until the wallet state flips from "WAITING_TO_START".
func (hn *HarnessNode) waitUntilStarted(conn grpc.ClientConnInterface,
timeout time.Duration) error {
stateClient := lnrpc.NewStateClient(conn)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
stateStream, err := stateClient.SubscribeState(
ctx, &lnrpc.SubscribeStateRequest{},
)
if err != nil {
return err
}
errChan := make(chan error, 1)
started := make(chan struct{})
go func() {
for {
resp, err := stateStream.Recv()
if err != nil {
errChan <- err
}
if resp.State != lnrpc.WalletState_WAITING_TO_START {
close(started)
return
}
}
}()
select {
case <-started:
case err = <-errChan:
case <-time.After(timeout):
return fmt.Errorf("WaitUntilLeader timed out")
}
return err
}
// WaitUntilLeader attempts to finish the start procedure by initiating an RPC
// connection and setting up the wallet unlocker client. This is needed when
// a node that has recently been started was waiting to become the leader and
// we're at the point when we expect that it is the leader now (awaiting unlock).
func (hn *HarnessNode) WaitUntilLeader(timeout time.Duration) error {
var (
conn *grpc.ClientConn
connErr error
)
startTs := time.Now()
if err := wait.NoError(func() error {
conn, connErr = hn.ConnectRPC(!hn.Cfg.HasSeed)
return connErr
}, timeout); err != nil {
return err
}
timeout -= time.Since(startTs)
if err := hn.waitUntilStarted(conn, timeout); err != nil {
return err
}
// If the node was created with a seed, we will need to perform an // If the node was created with a seed, we will need to perform an
// additional step to unlock the wallet. The connection returned will // additional step to unlock the wallet. The connection returned will
// only use the TLS certs, and can only perform operations necessary to // only use the TLS certs, and can only perform operations necessary to
@ -667,7 +756,7 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error {
// initClientWhenReady waits until the main gRPC server is detected as active, // initClientWhenReady waits until the main gRPC server is detected as active,
// then complete the normal HarnessNode gRPC connection creation. This can be // then complete the normal HarnessNode gRPC connection creation. This can be
// used it a node has just been unlocked, or has its wallet state initialized. // used it a node has just been unlocked, or has its wallet state initialized.
func (hn *HarnessNode) initClientWhenReady() error { func (hn *HarnessNode) initClientWhenReady(timeout time.Duration) error {
var ( var (
conn *grpc.ClientConn conn *grpc.ClientConn
connErr error connErr error
@ -675,7 +764,7 @@ func (hn *HarnessNode) initClientWhenReady() error {
if err := wait.NoError(func() error { if err := wait.NoError(func() error {
conn, connErr = hn.ConnectRPC(true) conn, connErr = hn.ConnectRPC(true)
return connErr return connErr
}, DefaultTimeout); err != nil { }, timeout); err != nil {
return err return err
} }
@ -784,7 +873,7 @@ func (hn *HarnessNode) Unlock(ctx context.Context,
// Now that the wallet has been unlocked, we'll wait for the RPC client // Now that the wallet has been unlocked, we'll wait for the RPC client
// to be ready, then establish the normal gRPC connection. // to be ready, then establish the normal gRPC connection.
return hn.initClientWhenReady() return hn.initClientWhenReady(DefaultTimeout)
} }
// initLightningClient constructs the grpc LightningClient from the given client // initLightningClient constructs the grpc LightningClient from the given client
@ -1058,6 +1147,11 @@ func (hn *HarnessNode) shutdown() error {
return nil return nil
} }
// kill kills the lnd process
func (hn *HarnessNode) kill() error {
return hn.cmd.Process.Kill()
}
// closeChanWatchRequest is a request to the lightningNetworkWatcher to be // closeChanWatchRequest is a request to the lightningNetworkWatcher to be
// notified once it's detected within the test Lightning Network, that a // notified once it's detected within the test Lightning Network, that a
// channel has either been added or closed. // channel has either been added or closed.

@ -19,12 +19,14 @@ import (
"github.com/btcsuite/btcutil/psbt" "github.com/btcsuite/btcutil/psbt"
"github.com/btcsuite/btcwallet/chain" "github.com/btcsuite/btcwallet/chain"
"github.com/btcsuite/btcwallet/waddrmgr" "github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/wallet"
base "github.com/btcsuite/btcwallet/wallet" base "github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wallet/txauthor" "github.com/btcsuite/btcwallet/wallet/txauthor"
"github.com/btcsuite/btcwallet/wallet/txrules" "github.com/btcsuite/btcwallet/wallet/txrules"
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
"github.com/btcsuite/btcwallet/wtxmgr" "github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightningnetwork/lnd/blockcache" "github.com/lightningnetwork/lnd/blockcache"
"github.com/lightningnetwork/lnd/channeldb/kvdb"
"github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/lightningnetwork/lnd/lnwallet/chainfee"
@ -37,6 +39,13 @@ const (
// UnconfirmedHeight is the special case end height that is used to // UnconfirmedHeight is the special case end height that is used to
// obtain unconfirmed transactions from ListTransactionDetails. // obtain unconfirmed transactions from ListTransactionDetails.
UnconfirmedHeight int32 = -1 UnconfirmedHeight int32 = -1
// walletMetaBucket is used to store wallet metadata.
walletMetaBucket = "lnwallet"
// walletReadyKey is used to indicate that the wallet has been
// initialized.
walletReadyKey = "ready"
) )
var ( var (
@ -87,9 +96,6 @@ var _ lnwallet.BlockChainIO = (*BtcWallet)(nil)
// New returns a new fully initialized instance of BtcWallet given a valid // New returns a new fully initialized instance of BtcWallet given a valid
// configuration struct. // configuration struct.
func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) { func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) {
// Ensure the wallet exists or create it when the create flag is set.
netDir := NetworkDir(cfg.DataDir, cfg.NetParams)
// Create the key scope for the coin type being managed by this wallet. // Create the key scope for the coin type being managed by this wallet.
chainKeyScope := waddrmgr.KeyScope{ chainKeyScope := waddrmgr.KeyScope{
Purpose: keychain.BIP0043Purpose, Purpose: keychain.BIP0043Purpose,
@ -108,10 +114,13 @@ func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) {
} else { } else {
pubPass = cfg.PublicPass pubPass = cfg.PublicPass
} }
loader := base.NewLoader(
cfg.NetParams, netDir, cfg.NoFreelistSync, loader, err := NewWalletLoader(
cfg.DBTimeOut, cfg.RecoveryWindow, cfg.NetParams, cfg.RecoveryWindow, cfg.LoaderOptions...,
) )
if err != nil {
return nil, err
}
walletExists, err := loader.WalletExists() walletExists, err := loader.WalletExists()
if err != nil { if err != nil {
return nil, err return nil, err
@ -149,6 +158,104 @@ func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) {
}, nil }, nil
} }
// loaderCfg holds optional wallet loader configuration.
type loaderCfg struct {
dbDirPath string
noFreelistSync bool
dbTimeout time.Duration
useLocalDB bool
externalDB kvdb.Backend
}
// LoaderOption is a functional option to update the optional loader config.
type LoaderOption func(*loaderCfg)
// LoaderWithLocalWalletDB configures the wallet loader to use the local db.
func LoaderWithLocalWalletDB(dbDirPath string, noFreelistSync bool,
dbTimeout time.Duration) LoaderOption {
return func(cfg *loaderCfg) {
cfg.dbDirPath = dbDirPath
cfg.noFreelistSync = noFreelistSync
cfg.dbTimeout = dbTimeout
cfg.useLocalDB = true
}
}
// LoaderWithExternalWalletDB configures the wallet loadr to use an external db.
func LoaderWithExternalWalletDB(db kvdb.Backend) LoaderOption {
return func(cfg *loaderCfg) {
cfg.externalDB = db
}
}
// NewWalletLoader constructs a wallet loader.
func NewWalletLoader(chainParams *chaincfg.Params, recoveryWindow uint32,
opts ...LoaderOption) (*wallet.Loader, error) {
cfg := &loaderCfg{}
// Apply all functional options.
for _, o := range opts {
o(cfg)
}
if cfg.externalDB != nil && cfg.useLocalDB {
return nil, fmt.Errorf("wallet can either be in the local or " +
"an external db")
}
if cfg.externalDB != nil {
loader, err := base.NewLoaderWithDB(
chainParams, recoveryWindow, cfg.externalDB,
func() (bool, error) {
return externalWalletExists(cfg.externalDB)
},
)
if err != nil {
return nil, err
}
// Decorate wallet db with out own key such that we
// can always check whether the wallet exists or not.
loader.OnWalletCreated(onWalletCreated)
return loader, nil
}
return base.NewLoader(
chainParams, cfg.dbDirPath, cfg.noFreelistSync,
cfg.dbTimeout, recoveryWindow,
), nil
}
// externalWalletExists is a helper function that we use to template btcwallet's
// Loader in order to be able check if the wallet database has been initialized
// in an external DB.
func externalWalletExists(db kvdb.Backend) (bool, error) {
exists := false
err := kvdb.View(db, func(tx kvdb.RTx) error {
metaBucket := tx.ReadBucket([]byte(walletMetaBucket))
if metaBucket != nil {
walletReady := metaBucket.Get([]byte(walletReadyKey))
exists = string(walletReady) == walletReadyKey
}
return nil
}, func() {})
return exists, err
}
// onWalletCreated is executed when btcwallet creates the wallet the first time.
func onWalletCreated(tx kvdb.RwTx) error {
metaBucket, err := tx.CreateTopLevelBucket([]byte(walletMetaBucket))
if err != nil {
return err
}
return metaBucket.Put([]byte(walletReadyKey), []byte(walletReadyKey))
}
// BackEnd returns the underlying ChainService's name as a string. // BackEnd returns the underlying ChainService's name as a string.
// //
// This is a part of the WalletController interface. // This is a part of the WalletController interface.

@ -28,10 +28,6 @@ var (
// Config is a struct which houses configuration parameters which modify the // Config is a struct which houses configuration parameters which modify the
// instance of BtcWallet generated by the New() function. // instance of BtcWallet generated by the New() function.
type Config struct { type Config struct {
// DataDir is the name of the directory where the wallet's persistent
// state should be stored.
DataDir string
// LogDir is the name of the directory which should be used to store // LogDir is the name of the directory which should be used to store
// generated log files. // generated log files.
LogDir string LogDir string
@ -76,14 +72,8 @@ type Config struct {
// normally when creating the BtcWallet. // normally when creating the BtcWallet.
Wallet *wallet.Wallet Wallet *wallet.Wallet
// NoFreelistSync, if true, prevents the database from syncing its // LoaderOptions holds functional wallet db loader options.
// freelist to disk, resulting in improved performance at the expense of LoaderOptions []LoaderOption
// increased startup time.
NoFreelistSync bool
// DBTimeOut specifies the timeout value to use when opening the wallet
// database.
DBTimeOut time.Duration
} }
// NetworkDir returns the directory name of a network directory to hold wallet // NetworkDir returns the directory name of a network directory to hold wallet

@ -3427,12 +3427,16 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
aliceWalletConfig := &btcwallet.Config{ aliceWalletConfig := &btcwallet.Config{
PrivatePass: []byte("alice-pass"), PrivatePass: []byte("alice-pass"),
HdSeed: aliceSeedBytes, HdSeed: aliceSeedBytes,
DataDir: tempTestDirAlice,
NetParams: netParams, NetParams: netParams,
ChainSource: aliceClient, ChainSource: aliceClient,
CoinType: keychain.CoinTypeTestnet, CoinType: keychain.CoinTypeTestnet,
// wallet starts in recovery mode // wallet starts in recovery mode
RecoveryWindow: 2, RecoveryWindow: 2,
LoaderOptions: []btcwallet.LoaderOption{
btcwallet.LoaderWithLocalWalletDB(
tempTestDirAlice, false, time.Minute,
),
},
} }
aliceWalletController, err = walletDriver.New( aliceWalletController, err = walletDriver.New(
aliceWalletConfig, blockCache, aliceWalletConfig, blockCache,
@ -3454,12 +3458,16 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
bobWalletConfig := &btcwallet.Config{ bobWalletConfig := &btcwallet.Config{
PrivatePass: []byte("bob-pass"), PrivatePass: []byte("bob-pass"),
HdSeed: bobSeedBytes, HdSeed: bobSeedBytes,
DataDir: tempTestDirBob,
NetParams: netParams, NetParams: netParams,
ChainSource: bobClient, ChainSource: bobClient,
CoinType: keychain.CoinTypeTestnet, CoinType: keychain.CoinTypeTestnet,
// wallet starts without recovery mode // wallet starts without recovery mode
RecoveryWindow: 0, RecoveryWindow: 0,
LoaderOptions: []btcwallet.LoaderOption{
btcwallet.LoaderWithLocalWalletDB(
tempTestDirBob, false, time.Minute,
),
},
} }
bobWalletController, err = walletDriver.New( bobWalletController, err = walletDriver.New(
bobWalletConfig, blockCache, bobWalletConfig, blockCache,

2
log.go

@ -14,6 +14,7 @@ import (
"github.com/lightningnetwork/lnd/chanfitness" "github.com/lightningnetwork/lnd/chanfitness"
"github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channelnotifier" "github.com/lightningnetwork/lnd/channelnotifier"
"github.com/lightningnetwork/lnd/cluster"
"github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/contractcourt"
"github.com/lightningnetwork/lnd/discovery" "github.com/lightningnetwork/lnd/discovery"
"github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/funding"
@ -157,6 +158,7 @@ func SetupLoggers(root *build.RotatingLogWriter, interceptor signal.Interceptor)
AddSubLogger(root, chainreg.Subsystem, interceptor, chainreg.UseLogger) AddSubLogger(root, chainreg.Subsystem, interceptor, chainreg.UseLogger)
AddSubLogger(root, chanacceptor.Subsystem, interceptor, chanacceptor.UseLogger) AddSubLogger(root, chanacceptor.Subsystem, interceptor, chanacceptor.UseLogger)
AddSubLogger(root, funding.Subsystem, interceptor, funding.UseLogger) AddSubLogger(root, funding.Subsystem, interceptor, funding.UseLogger)
AddSubLogger(root, cluster.Subsystem, interceptor, cluster.UseLogger)
} }
// AddSubLogger is a helper method to conveniently create and register the // AddSubLogger is a helper method to conveniently create and register the

@ -21,10 +21,16 @@ import (
type rpcState uint8 type rpcState uint8
const ( const (
// waitingToStart indicates that we're at the beginning of the startup
// process. In a cluster evironment this may mean that we're waiting to
// become the leader in which case RPC calls will be disabled until
// this instance has been elected as leader.
waitingToStart rpcState = iota
// walletNotCreated is the starting state if the RPC server is active, // walletNotCreated is the starting state if the RPC server is active,
// but the wallet is not yet created. In this state we'll only allow // but the wallet is not yet created. In this state we'll only allow
// calls to the WalletUnlockerService. // calls to the WalletUnlockerService.
walletNotCreated rpcState = iota walletNotCreated
// walletLocked indicates the RPC server is active, but the wallet is // walletLocked indicates the RPC server is active, but the wallet is
// locked. In this state we'll only allow calls to the // locked. In this state we'll only allow calls to the
@ -40,6 +46,11 @@ const (
) )
var ( var (
// ErrWaitingToStart is returned if LND is still wating to start,
// possibly blocked until elected as the leader.
ErrWaitingToStart = fmt.Errorf("waiting to start, RPC services not " +
"available")
// ErrNoWallet is returned if the wallet does not exist. // ErrNoWallet is returned if the wallet does not exist.
ErrNoWallet = fmt.Errorf("wallet not created, create one to enable " + ErrNoWallet = fmt.Errorf("wallet not created, create one to enable " +
"full RPC access") "full RPC access")
@ -71,6 +82,7 @@ var (
// The State service must be available at all times, even // The State service must be available at all times, even
// before we can check macaroons, so we whitelist it. // before we can check macaroons, so we whitelist it.
"/lnrpc.State/SubscribeState": {}, "/lnrpc.State/SubscribeState": {},
"/lnrpc.State/GetState": {},
} }
) )
@ -110,16 +122,9 @@ type InterceptorChain struct {
var _ lnrpc.StateServer = (*InterceptorChain)(nil) var _ lnrpc.StateServer = (*InterceptorChain)(nil)
// NewInterceptorChain creates a new InterceptorChain. // NewInterceptorChain creates a new InterceptorChain.
func NewInterceptorChain(log btclog.Logger, noMacaroons, func NewInterceptorChain(log btclog.Logger, noMacaroons bool) *InterceptorChain {
walletExists bool) *InterceptorChain {
startState := walletNotCreated
if walletExists {
startState = walletLocked
}
return &InterceptorChain{ return &InterceptorChain{
state: startState, state: waitingToStart,
ntfnServer: subscribe.NewServer(), ntfnServer: subscribe.NewServer(),
noMacaroons: noMacaroons, noMacaroons: noMacaroons,
permissionMap: make(map[string][]bakery.Op), permissionMap: make(map[string][]bakery.Op),
@ -150,6 +155,26 @@ func (r *InterceptorChain) Stop() error {
return err return err
} }
// SetWalletNotCreated moves the RPC state from either waitingToStart to
// walletNotCreated.
func (r *InterceptorChain) SetWalletNotCreated() {
r.Lock()
defer r.Unlock()
r.state = walletNotCreated
_ = r.ntfnServer.SendUpdate(r.state)
}
// SetWalletLocked moves the RPC state from either walletNotCreated to
// walletLocked.
func (r *InterceptorChain) SetWalletLocked() {
r.Lock()
defer r.Unlock()
r.state = walletLocked
_ = r.ntfnServer.SendUpdate(r.state)
}
// SetWalletUnlocked moves the RPC state from either walletNotCreated or // SetWalletUnlocked moves the RPC state from either walletNotCreated or
// walletLocked to walletUnlocked. // walletLocked to walletUnlocked.
func (r *InterceptorChain) SetWalletUnlocked() { func (r *InterceptorChain) SetWalletUnlocked() {
@ -169,6 +194,31 @@ func (r *InterceptorChain) SetRPCActive() {
_ = r.ntfnServer.SendUpdate(r.state) _ = r.ntfnServer.SendUpdate(r.state)
} }
// rpcStateToWalletState converts rpcState to lnrpc.WalletState. Returns
// WAITING_TO_START and an error on conversion error.
func rpcStateToWalletState(state rpcState) (lnrpc.WalletState, error) {
const defaultState = lnrpc.WalletState_WAITING_TO_START
var walletState lnrpc.WalletState
switch state {
case waitingToStart:
walletState = lnrpc.WalletState_WAITING_TO_START
case walletNotCreated:
walletState = lnrpc.WalletState_NON_EXISTING
case walletLocked:
walletState = lnrpc.WalletState_LOCKED
case walletUnlocked:
walletState = lnrpc.WalletState_UNLOCKED
case rpcActive:
walletState = lnrpc.WalletState_RPC_ACTIVE
default:
return defaultState, fmt.Errorf("unknown wallet state %v", state)
}
return walletState, nil
}
// SubscribeState subscribes to the state of the wallet. The current wallet // SubscribeState subscribes to the state of the wallet. The current wallet
// state will always be delivered immediately. // state will always be delivered immediately.
// //
@ -177,23 +227,14 @@ func (r *InterceptorChain) SubscribeState(req *lnrpc.SubscribeStateRequest,
stream lnrpc.State_SubscribeStateServer) error { stream lnrpc.State_SubscribeStateServer) error {
sendStateUpdate := func(state rpcState) error { sendStateUpdate := func(state rpcState) error {
resp := &lnrpc.SubscribeStateResponse{} walletState, err := rpcStateToWalletState(state)
switch state { if err != nil {
case walletNotCreated: return err
resp.State = lnrpc.WalletState_NON_EXISTING
case walletLocked:
resp.State = lnrpc.WalletState_LOCKED
case walletUnlocked:
resp.State = lnrpc.WalletState_UNLOCKED
case rpcActive:
resp.State = lnrpc.WalletState_RPC_ACTIVE
default:
return fmt.Errorf("unknown wallet "+
"state %v", state)
} }
return stream.Send(resp) return stream.Send(&lnrpc.SubscribeStateResponse{
State: walletState,
})
} }
// Subscribe to state updates. // Subscribe to state updates.
@ -237,6 +278,24 @@ func (r *InterceptorChain) SubscribeState(req *lnrpc.SubscribeStateRequest,
} }
} }
// GetState returns he current wallet state.
func (r *InterceptorChain) GetState(_ context.Context,
req *lnrpc.GetStateRequest) (*lnrpc.GetStateResponse, error) {
r.RLock()
state := r.state
r.RUnlock()
walletState, err := rpcStateToWalletState(state)
if err != nil {
return nil, err
}
return &lnrpc.GetStateResponse{
State: walletState,
}, nil
}
// AddMacaroonService adds a macaroon service to the interceptor. After this is // AddMacaroonService adds a macaroon service to the interceptor. After this is
// done every RPC call made will have to pass a valid macaroon to be accepted. // done every RPC call made will have to pass a valid macaroon to be accepted.
func (r *InterceptorChain) AddMacaroonService(svc *macaroons.Service) { func (r *InterceptorChain) AddMacaroonService(svc *macaroons.Service) {
@ -459,6 +518,11 @@ func (r *InterceptorChain) checkRPCState(srv interface{}) error {
switch state { switch state {
// Do not accept any RPC calls (unless to the state service) until LND
// has not started.
case waitingToStart:
return ErrWaitingToStart
// If the wallet does not exists, only calls to the WalletUnlocker are // If the wallet does not exists, only calls to the WalletUnlocker are
// accepted. // accepted.
case walletNotCreated: case walletNotCreated:

@ -1122,7 +1122,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
// Calculate an appropriate fee rate for this transaction. // Calculate an appropriate fee rate for this transaction.
feePerKw, err := calculateFeeRate( feePerKw, err := calculateFeeRate(
uint64(in.SatPerByte), in.SatPerVbyte, uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
uint32(in.TargetConf), r.server.cc.FeeEstimator, uint32(in.TargetConf), r.server.cc.FeeEstimator,
) )
if err != nil { if err != nil {
@ -1330,7 +1330,7 @@ func (r *rpcServer) SendMany(ctx context.Context,
// Calculate an appropriate fee rate for this transaction. // Calculate an appropriate fee rate for this transaction.
feePerKw, err := calculateFeeRate( feePerKw, err := calculateFeeRate(
uint64(in.SatPerByte), in.SatPerVbyte, uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
uint32(in.TargetConf), r.server.cc.FeeEstimator, uint32(in.TargetConf), r.server.cc.FeeEstimator,
) )
if err != nil { if err != nil {
@ -1731,7 +1731,7 @@ func newPsbtAssembler(req *lnrpc.OpenChannelRequest, normalizedMinConfs int32,
"minimum confirmation is not supported for PSBT " + "minimum confirmation is not supported for PSBT " +
"funding") "funding")
} }
if req.SatPerByte != 0 || req.SatPerVbyte != 0 || req.TargetConf != 0 { if req.SatPerByte != 0 || req.SatPerVbyte != 0 || req.TargetConf != 0 { // nolint:staticcheck
return nil, fmt.Errorf("specifying fee estimation parameters " + return nil, fmt.Errorf("specifying fee estimation parameters " +
"is not supported for PSBT funding") "is not supported for PSBT funding")
} }
@ -1862,7 +1862,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
// key object. For all sync call, byte slices are expected to be encoded // key object. For all sync call, byte slices are expected to be encoded
// as hex strings. // as hex strings.
case isSync: case isSync:
keyBytes, err := hex.DecodeString(in.NodePubkeyString) keyBytes, err := hex.DecodeString(in.NodePubkeyString) // nolint:staticcheck
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -1884,7 +1884,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
// Calculate an appropriate fee rate for this transaction. // Calculate an appropriate fee rate for this transaction.
feeRate, err := calculateFeeRate( feeRate, err := calculateFeeRate(
uint64(in.SatPerByte), in.SatPerVbyte, uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
uint32(in.TargetConf), r.server.cc.FeeEstimator, uint32(in.TargetConf), r.server.cc.FeeEstimator,
) )
if err != nil { if err != nil {
@ -2087,7 +2087,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
// If force closing a channel, the fee set in the commitment transaction // If force closing a channel, the fee set in the commitment transaction
// is used. // is used.
if in.Force && (in.SatPerByte != 0 || in.SatPerVbyte != 0 || if in.Force && (in.SatPerByte != 0 || in.SatPerVbyte != 0 || // nolint:staticcheck
in.TargetConf != 0) { in.TargetConf != 0) {
return fmt.Errorf("force closing a channel uses a pre-defined fee") return fmt.Errorf("force closing a channel uses a pre-defined fee")
@ -2222,7 +2222,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
// an appropriate fee rate for the cooperative closure // an appropriate fee rate for the cooperative closure
// transaction. // transaction.
feeRate, err := calculateFeeRate( feeRate, err := calculateFeeRate(
uint64(in.SatPerByte), in.SatPerVbyte, uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
uint32(in.TargetConf), r.server.cc.FeeEstimator, uint32(in.TargetConf), r.server.cc.FeeEstimator,
) )
if err != nil { if err != nil {

@ -1066,6 +1066,20 @@ litecoin.node=ltcd
; If non zero, LND will use this as peer port for the embedded etcd instance. ; If non zero, LND will use this as peer port for the embedded etcd instance.
; db.etcd.embedded_peer_port=1235 ; db.etcd.embedded_peer_port=1235
[cluster]
; Enables leader election if set.
; cluster.enable-leader-election=true
; Leader elector to use. Valid values: "etcd" (default).
; cluster.leader-elector=etcd
; Election key prefix when using etcd leader elector. Defaults to "/leader/".
; cluster.etcd-election-prefix=/leader/
; Identifier for this node inside the cluster (used in leader election).
; Defaults to the hostname.
; cluster.id=example.com
[bolt] [bolt]
; If true, prevents the database from syncing its freelist to disk. ; If true, prevents the database from syncing its freelist to disk.
; db.bolt.nofreelistsync=1 ; db.bolt.nofreelistsync=1

@ -137,12 +137,16 @@ type UnlockerService struct {
// resetWalletTransactions indicates that the wallet state should be // resetWalletTransactions indicates that the wallet state should be
// reset on unlock to force a full chain rescan. // reset on unlock to force a full chain rescan.
resetWalletTransactions bool resetWalletTransactions bool
// LoaderOpts holds the functional options for the wallet loader.
loaderOpts []btcwallet.LoaderOption
} }
// New creates and returns a new UnlockerService. // New creates and returns a new UnlockerService.
func New(chainDir string, params *chaincfg.Params, noFreelistSync bool, func New(chainDir string, params *chaincfg.Params, noFreelistSync bool,
macaroonFiles []string, dbTimeout time.Duration, macaroonFiles []string, dbTimeout time.Duration,
resetWalletTransactions bool) *UnlockerService { resetWalletTransactions bool,
loaderOpts []btcwallet.LoaderOption) *UnlockerService {
return &UnlockerService{ return &UnlockerService{
InitMsgs: make(chan *WalletInitMsg, 1), InitMsgs: make(chan *WalletInitMsg, 1),
@ -157,17 +161,31 @@ func New(chainDir string, params *chaincfg.Params, noFreelistSync bool,
dbTimeout: dbTimeout, dbTimeout: dbTimeout,
noFreelistSync: noFreelistSync, noFreelistSync: noFreelistSync,
resetWalletTransactions: resetWalletTransactions, resetWalletTransactions: resetWalletTransactions,
loaderOpts: loaderOpts,
} }
} }
// SetLoaderOpts can be used to inject wallet loader options after the unlocker
// service has been hooked to the main RPC server.
func (u *UnlockerService) SetLoaderOpts(loaderOpts []btcwallet.LoaderOption) {
u.loaderOpts = loaderOpts
}
func (u *UnlockerService) newLoader(recoveryWindow uint32) (*wallet.Loader,
error) {
return btcwallet.NewWalletLoader(
u.netParams, recoveryWindow, u.loaderOpts...,
)
}
// WalletExists returns whether a wallet exists on the file path the // WalletExists returns whether a wallet exists on the file path the
// UnlockerService is using. // UnlockerService is using.
func (u *UnlockerService) WalletExists() (bool, error) { func (u *UnlockerService) WalletExists() (bool, error) {
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams) loader, err := u.newLoader(0)
loader := wallet.NewLoader( if err != nil {
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0, return false, err
) }
return loader.WalletExists() return loader.WalletExists()
} }
@ -184,10 +202,11 @@ func (u *UnlockerService) GenSeed(_ context.Context,
// Before we start, we'll ensure that the wallet hasn't already created // Before we start, we'll ensure that the wallet hasn't already created
// so we don't show a *new* seed to the user if one already exists. // so we don't show a *new* seed to the user if one already exists.
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams) loader, err := u.newLoader(0)
loader := wallet.NewLoader( if err != nil {
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0, return nil, err
) }
walletExists, err := loader.WalletExists() walletExists, err := loader.WalletExists()
if err != nil { if err != nil {
return nil, err return nil, err
@ -315,11 +334,10 @@ func (u *UnlockerService) InitWallet(ctx context.Context,
// We'll then open up the directory that will be used to store the // We'll then open up the directory that will be used to store the
// wallet's files so we can check if the wallet already exists. // wallet's files so we can check if the wallet already exists.
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams) loader, err := u.newLoader(uint32(recoveryWindow))
loader := wallet.NewLoader( if err != nil {
u.netParams, netDir, u.noFreelistSync, return nil, err
u.dbTimeout, uint32(recoveryWindow), }
)
walletExists, err := loader.WalletExists() walletExists, err := loader.WalletExists()
if err != nil { if err != nil {
@ -392,11 +410,10 @@ func (u *UnlockerService) UnlockWallet(ctx context.Context,
password := in.WalletPassword password := in.WalletPassword
recoveryWindow := uint32(in.RecoveryWindow) recoveryWindow := uint32(in.RecoveryWindow)
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams) loader, err := u.newLoader(recoveryWindow)
loader := wallet.NewLoader( if err != nil {
u.netParams, netDir, u.noFreelistSync, return nil, err
u.dbTimeout, recoveryWindow, }
)
// Check if wallet already exists. // Check if wallet already exists.
walletExists, err := loader.WalletExists() walletExists, err := loader.WalletExists()
@ -492,10 +509,10 @@ func (u *UnlockerService) UnlockWallet(ctx context.Context,
func (u *UnlockerService) ChangePassword(ctx context.Context, func (u *UnlockerService) ChangePassword(ctx context.Context,
in *lnrpc.ChangePasswordRequest) (*lnrpc.ChangePasswordResponse, error) { in *lnrpc.ChangePasswordRequest) (*lnrpc.ChangePasswordResponse, error) {
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams) loader, err := u.newLoader(0)
loader := wallet.NewLoader( if err != nil {
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0, return nil, err
) }
// First, we'll make sure the wallet exists for the specific chain and // First, we'll make sure the wallet exists for the specific chain and
// network. // network.
@ -572,6 +589,7 @@ func (u *UnlockerService) ChangePassword(ctx context.Context,
// then close it again. // then close it again.
// Attempt to open the macaroon DB, unlock it and then change // Attempt to open the macaroon DB, unlock it and then change
// the passphrase. // the passphrase.
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
macaroonService, err := macaroons.NewService( macaroonService, err := macaroons.NewService(
netDir, "lnd", in.StatelessInit, u.dbTimeout, netDir, "lnd", in.StatelessInit, u.dbTimeout,
) )

@ -48,6 +48,13 @@ var (
) )
) )
func testLoaderOpts(testDir string) []btcwallet.LoaderOption {
dbDir := btcwallet.NetworkDir(testDir, testNetParams)
return []btcwallet.LoaderOption{
btcwallet.LoaderWithLocalWalletDB(dbDir, true, time.Minute),
}
}
func createTestWallet(t *testing.T, dir string, netParams *chaincfg.Params) { func createTestWallet(t *testing.T, dir string, netParams *chaincfg.Params) {
createTestWalletWithPw(t, testPassword, testPassword, dir, netParams) createTestWalletWithPw(t, testPassword, testPassword, dir, netParams)
} }
@ -148,7 +155,7 @@ func TestGenSeed(t *testing.T) {
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
// Now that the service has been created, we'll ask it to generate a // Now that the service has been created, we'll ask it to generate a
@ -186,7 +193,7 @@ func TestGenSeedGenerateEntropy(t *testing.T) {
}() }()
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
// Now that the service has been created, we'll ask it to generate a // Now that the service has been created, we'll ask it to generate a
@ -223,7 +230,7 @@ func TestGenSeedInvalidEntropy(t *testing.T) {
}() }()
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
// Now that the service has been created, we'll ask it to generate a // Now that the service has been created, we'll ask it to generate a
@ -257,7 +264,7 @@ func TestInitWallet(t *testing.T) {
// Create new UnlockerService. // Create new UnlockerService.
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
// Once we have the unlocker service created, we'll now instantiate a // Once we have the unlocker service created, we'll now instantiate a
@ -346,7 +353,7 @@ func TestCreateWalletInvalidEntropy(t *testing.T) {
// Create new UnlockerService. // Create new UnlockerService.
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
// We'll attempt to init the wallet with an invalid cipher seed and // We'll attempt to init the wallet with an invalid cipher seed and
@ -379,7 +386,7 @@ func TestUnlockWallet(t *testing.T) {
// unlock. // unlock.
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout, testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
true, true, testLoaderOpts(testDir),
) )
ctx := context.Background() ctx := context.Background()
@ -471,7 +478,7 @@ func TestChangeWalletPasswordNewRootkey(t *testing.T) {
// Create a new UnlockerService with our temp files. // Create a new UnlockerService with our temp files.
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, tempFiles, kvdb.DefaultDBTimeout, testDir, testNetParams, true, tempFiles, kvdb.DefaultDBTimeout,
false, false, testLoaderOpts(testDir),
) )
ctx := context.Background() ctx := context.Background()
@ -583,7 +590,7 @@ func TestChangeWalletPasswordStateless(t *testing.T) {
service := walletunlocker.New( service := walletunlocker.New(
testDir, testNetParams, true, []string{ testDir, testNetParams, true, []string{
tempMacFile, nonExistingFile, tempMacFile, nonExistingFile,
}, kvdb.DefaultDBTimeout, false, }, kvdb.DefaultDBTimeout, false, testLoaderOpts(testDir),
) )
// Create a wallet we can try to unlock. We use the default password // Create a wallet we can try to unlock. We use the default password