Merge pull request #4998 from bhandras/leader_election
cluster: leader election using etcd backend
This commit is contained in:
commit
6d66133459
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -249,8 +249,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
pinned_dep:
|
||||
- google.golang.org/grpc v1.24.0
|
||||
- github.com/golang/protobuf v1.3.2
|
||||
- google.golang.org/grpc v1.29.1
|
||||
- github.com/golang/protobuf v1.4.3
|
||||
|
||||
steps:
|
||||
- name: git checkout
|
||||
|
@ -106,14 +106,13 @@ type Config struct {
|
||||
// optional.
|
||||
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
|
||||
// TCP connections to Bitcoin peers in the event of a pruned block being
|
||||
// requested.
|
||||
Dialer chain.Dialer
|
||||
|
||||
// LoaderOptions holds functional wallet db loader options.
|
||||
LoaderOptions []btcwallet.LoaderOption
|
||||
}
|
||||
|
||||
const (
|
||||
@ -283,11 +282,10 @@ func NewChainControl(cfg *Config, blockCache *blockcache.BlockCache) (
|
||||
PublicPass: cfg.PublicWalletPw,
|
||||
Birthday: cfg.Birthday,
|
||||
RecoveryWindow: cfg.RecoveryWindow,
|
||||
DataDir: homeChainConfig.ChainDir,
|
||||
NetParams: cfg.ActiveNetParams.Params,
|
||||
CoinType: cfg.ActiveNetParams.CoinType,
|
||||
Wallet: cfg.Wallet,
|
||||
DBTimeOut: cfg.DBTimeOut,
|
||||
LoaderOptions: cfg.LoaderOptions,
|
||||
}
|
||||
|
||||
var err error
|
||||
|
@ -169,7 +169,7 @@ func (r *RPCAcceptor) Run() error {
|
||||
defer r.wg.Wait()
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// occur into the error channel provided.
|
||||
func (r *RPCAcceptor) receiveResponses(errChan chan error,
|
||||
responses chan lnrpc.ChannelAcceptResponse) {
|
||||
responses chan *lnrpc.ChannelAcceptResponse) {
|
||||
|
||||
for {
|
||||
resp, err := r.receive()
|
||||
@ -205,7 +205,7 @@ func (r *RPCAcceptor) receiveResponses(errChan chan error,
|
||||
var pendingID [32]byte
|
||||
copy(pendingID[:], resp.PendingChanId)
|
||||
|
||||
openChanResp := lnrpc.ChannelAcceptResponse{
|
||||
openChanResp := &lnrpc.ChannelAcceptResponse{
|
||||
Accept: resp.Accept,
|
||||
PendingChanId: pendingID[:],
|
||||
Error: resp.Error,
|
||||
@ -236,7 +236,7 @@ func (r *RPCAcceptor) receiveResponses(errChan chan error,
|
||||
// Accept() function, dispatching them to our acceptor stream and coordinating
|
||||
// return of responses to their callers.
|
||||
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
|
||||
// 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
|
||||
// error to send to the peer, and any validation errors that occurred.
|
||||
func (r *RPCAcceptor) validateAcceptorResponse(dustLimit btcutil.Amount,
|
||||
req lnrpc.ChannelAcceptResponse) (bool, error, lnwire.DeliveryAddress,
|
||||
req *lnrpc.ChannelAcceptResponse) (bool, error, lnwire.DeliveryAddress,
|
||||
error) {
|
||||
|
||||
channelStr := hex.EncodeToString(req.PendingChanId)
|
||||
|
@ -27,7 +27,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
dustLimit btcutil.Amount
|
||||
response lnrpc.ChannelAcceptResponse
|
||||
response *lnrpc.ChannelAcceptResponse
|
||||
accept bool
|
||||
acceptorErr error
|
||||
error error
|
||||
@ -35,7 +35,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "accepted with error",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: true,
|
||||
Error: customError.Error(),
|
||||
},
|
||||
@ -45,7 +45,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "custom error too long",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: false,
|
||||
Error: strings.Repeat(" ", maxErrorLength+1),
|
||||
},
|
||||
@ -55,7 +55,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "accepted",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: true,
|
||||
UpfrontShutdown: validAddr,
|
||||
},
|
||||
@ -66,7 +66,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "rejected with error",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: false,
|
||||
Error: customError.Error(),
|
||||
},
|
||||
@ -76,7 +76,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "rejected with no error",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: false,
|
||||
},
|
||||
accept: false,
|
||||
@ -85,7 +85,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "invalid upfront shutdown",
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: true,
|
||||
UpfrontShutdown: "invalid addr",
|
||||
},
|
||||
@ -96,7 +96,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
{
|
||||
name: "reserve too low",
|
||||
dustLimit: 100,
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: true,
|
||||
ReserveSat: 10,
|
||||
},
|
||||
@ -107,7 +107,7 @@ func TestValidateAcceptorResponse(t *testing.T) {
|
||||
{
|
||||
name: "max htlcs too high",
|
||||
dustLimit: 100,
|
||||
response: lnrpc.ChannelAcceptResponse{
|
||||
response: &lnrpc.ChannelAcceptResponse{
|
||||
Accept: true,
|
||||
MaxHtlcCount: 1 + input.MaxHTLCNumber/2,
|
||||
},
|
||||
|
@ -1,6 +1,7 @@
|
||||
package kvdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@ -253,7 +254,14 @@ func GetTestBackend(path, name string) (Backend, func(), error) {
|
||||
}
|
||||
return db, empty, nil
|
||||
} 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")
|
||||
|
@ -33,30 +33,3 @@ type BoltConfig struct {
|
||||
|
||||
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 {
|
||||
var bucketKey []byte
|
||||
|
||||
rootID := makeBucketID([]byte(""))
|
||||
rootID := makeBucketID([]byte(etcdDefaultRootBucketId))
|
||||
parent := rootID[:]
|
||||
|
||||
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
|
||||
// passed key and bucket list.
|
||||
func vkey(key string, buckets ...string) string {
|
||||
rootID := makeBucketID([]byte(""))
|
||||
rootID := makeBucketID([]byte(etcdDefaultRootBucketId))
|
||||
bucket := rootID[:]
|
||||
|
||||
for _, bucketName := range buckets {
|
||||
|
28
channeldb/kvdb/etcd/config.go
Normal file
28
channeldb/kvdb/etcd/config.go
Normal file
@ -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"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/coreos/etcd/clientv3/namespace"
|
||||
"github.com/coreos/etcd/pkg/transport"
|
||||
"go.etcd.io/etcd/clientv3"
|
||||
"go.etcd.io/etcd/clientv3/namespace"
|
||||
"go.etcd.io/etcd/pkg/transport"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -23,6 +23,10 @@ const (
|
||||
|
||||
// etcdLongTimeout is a timeout for longer taking etcd operatons.
|
||||
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
|
||||
@ -116,7 +120,8 @@ func (c *commitStatsCollector) callback(succ bool, stats CommitStats) {
|
||||
|
||||
// db holds a reference to the etcd client connection.
|
||||
type db struct {
|
||||
config BackendConfig
|
||||
cfg Config
|
||||
ctx context.Context
|
||||
cli *clientv3.Client
|
||||
commitStatsCollector *commitStatsCollector
|
||||
txQueue *commitQueue
|
||||
@ -125,66 +130,23 @@ type db struct {
|
||||
// Enforce db implements the walletdb.DB interface.
|
||||
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
|
||||
// config. If etcd connection cannot be estabished, then returns error.
|
||||
func newEtcdBackend(config BackendConfig) (*db, error) {
|
||||
if config.Ctx == nil {
|
||||
config.Ctx = context.Background()
|
||||
}
|
||||
|
||||
func newEtcdBackend(ctx context.Context, cfg Config) (*db, error) {
|
||||
clientCfg := clientv3.Config{
|
||||
Context: config.Ctx,
|
||||
Endpoints: []string{config.Host},
|
||||
Context: ctx,
|
||||
Endpoints: []string{cfg.Host},
|
||||
DialTimeout: etcdConnectionTimeout,
|
||||
Username: config.User,
|
||||
Password: config.Pass,
|
||||
Username: cfg.User,
|
||||
Password: cfg.Pass,
|
||||
MaxCallSendMsgSize: 16384*1024 - 1,
|
||||
}
|
||||
|
||||
if !config.DisableTLS {
|
||||
if !cfg.DisableTLS {
|
||||
tlsInfo := transport.TLSInfo{
|
||||
CertFile: config.CertFile,
|
||||
KeyFile: config.KeyFile,
|
||||
InsecureSkipVerify: config.InsecureSkipVerify,
|
||||
CertFile: cfg.CertFile,
|
||||
KeyFile: cfg.KeyFile,
|
||||
InsecureSkipVerify: cfg.InsecureSkipVerify,
|
||||
}
|
||||
|
||||
tlsConfig, err := tlsInfo.ClientConfig()
|
||||
@ -201,17 +163,18 @@ func newEtcdBackend(config BackendConfig) (*db, error) {
|
||||
}
|
||||
|
||||
// Apply the namespace.
|
||||
cli.KV = namespace.NewKV(cli.KV, config.Namespace)
|
||||
cli.Watcher = namespace.NewWatcher(cli.Watcher, config.Namespace)
|
||||
cli.Lease = namespace.NewLease(cli.Lease, config.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)
|
||||
|
||||
backend := &db{
|
||||
cfg: cfg,
|
||||
ctx: ctx,
|
||||
cli: cli,
|
||||
config: config,
|
||||
txQueue: NewCommitQueue(config.Ctx),
|
||||
txQueue: NewCommitQueue(ctx),
|
||||
}
|
||||
|
||||
if config.CollectCommitStats {
|
||||
if cfg.CollectStats {
|
||||
backend.commitStatsCollector = newCommitStatsColletor()
|
||||
}
|
||||
|
||||
@ -221,10 +184,10 @@ func newEtcdBackend(config BackendConfig) (*db, error) {
|
||||
// getSTMOptions creats all STM options based on the backend config.
|
||||
func (db *db) getSTMOptions() []STMOptionFunc {
|
||||
opts := []STMOptionFunc{
|
||||
WithAbortContext(db.config.Ctx),
|
||||
WithAbortContext(db.ctx),
|
||||
}
|
||||
|
||||
if db.config.CollectCommitStats {
|
||||
if db.cfg.CollectStats {
|
||||
opts = append(opts,
|
||||
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 {
|
||||
apply := func(stm STM) error {
|
||||
reset()
|
||||
return f(newReadWriteTx(stm, db.config.Prefix))
|
||||
return f(newReadWriteTx(stm, etcdDefaultRootBucketId))
|
||||
}
|
||||
|
||||
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 {
|
||||
apply := func(stm STM) error {
|
||||
reset()
|
||||
return f(newReadWriteTx(stm, db.config.Prefix))
|
||||
return f(newReadWriteTx(stm, etcdDefaultRootBucketId))
|
||||
}
|
||||
|
||||
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) {
|
||||
return newReadWriteTx(
|
||||
NewSTM(db.cli, db.txQueue, db.getSTMOptions()...),
|
||||
db.config.Prefix,
|
||||
etcdDefaultRootBucketId,
|
||||
), nil
|
||||
}
|
||||
|
||||
@ -286,7 +249,7 @@ func (db *db) BeginReadWriteTx() (walletdb.ReadWriteTx, error) {
|
||||
func (db *db) BeginReadTx() (walletdb.ReadTx, error) {
|
||||
return newReadWriteTx(
|
||||
NewSTM(db.cli, db.txQueue, db.getSTMOptions()...),
|
||||
db.config.Prefix,
|
||||
etcdDefaultRootBucketId,
|
||||
), nil
|
||||
}
|
||||
|
||||
@ -294,7 +257,7 @@ func (db *db) BeginReadTx() (walletdb.ReadTx, error) {
|
||||
// start a read-only transaction to perform all operations.
|
||||
// This function is part of the walletdb.Db interface implementation.
|
||||
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()
|
||||
|
||||
readCloser, err := db.cli.Snapshot(ctx)
|
||||
|
@ -17,7 +17,7 @@ func TestCopy(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -53,10 +53,9 @@ func TestAbortContext(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
config := f.BackendConfig()
|
||||
config.Ctx = ctx
|
||||
|
||||
// Pass abort context and abort right away.
|
||||
db, err := newEtcdBackend(config)
|
||||
db, err := newEtcdBackend(ctx, config)
|
||||
require.NoError(t, err)
|
||||
cancel()
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
@ -13,45 +14,55 @@ const (
|
||||
)
|
||||
|
||||
// parseArgs parses the arguments from the walletdb Open/Create methods.
|
||||
func parseArgs(funcName string, args ...interface{}) (*BackendConfig, error) {
|
||||
if len(args) != 1 {
|
||||
return nil, fmt.Errorf("invalid number of arguments to %s.%s -- "+
|
||||
"expected: etcd.BackendConfig",
|
||||
func parseArgs(funcName string, args ...interface{}) (context.Context,
|
||||
*Config, error) {
|
||||
|
||||
if len(args) != 2 {
|
||||
return nil, nil, fmt.Errorf("invalid number of arguments to "+
|
||||
"%s.%s -- expected: context.Context, etcd.Config",
|
||||
dbType, funcName,
|
||||
)
|
||||
}
|
||||
|
||||
config, ok := args[0].(BackendConfig)
|
||||
ctx, ok := args[0].(context.Context)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("argument to %s.%s is invalid -- "+
|
||||
"expected: etcd.BackendConfig",
|
||||
return nil, nil, fmt.Errorf("argument 0 to %s.%s is invalid "+
|
||||
"-- expected: context.Context",
|
||||
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
|
||||
// creates, initializes, and opens a database for use.
|
||||
func createDBDriver(args ...interface{}) (walletdb.DB, error) {
|
||||
config, err := parseArgs("Create", args...)
|
||||
ctx, config, err := parseArgs("Create", args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return newEtcdBackend(*config)
|
||||
return newEtcdBackend(ctx, *config)
|
||||
}
|
||||
|
||||
// openDBDriver is the callback provided during driver registration that opens
|
||||
// an existing database for use.
|
||||
func openDBDriver(args ...interface{}) (walletdb.DB, error) {
|
||||
config, err := parseArgs("Open", args...)
|
||||
ctx, config, err := parseArgs("Open", args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return newEtcdBackend(*config)
|
||||
return newEtcdBackend(ctx, *config)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -3,14 +3,13 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/coreos/etcd/embed"
|
||||
"go.etcd.io/etcd/embed"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -62,7 +61,7 @@ func getFreePort() int {
|
||||
// listening on random open ports. Returns the backend config and a cleanup
|
||||
// func that will stop the etcd instance.
|
||||
func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
|
||||
*BackendConfig, func(), error) {
|
||||
*Config, func(), error) {
|
||||
|
||||
cfg := embed.NewConfig()
|
||||
cfg.Dir = path
|
||||
@ -98,19 +97,13 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
|
||||
fmt.Errorf("etcd failed to start after: %v", readyTimeout)
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
connConfig := &BackendConfig{
|
||||
Ctx: ctx,
|
||||
Host: "http://" + peerURL,
|
||||
User: "user",
|
||||
Pass: "pass",
|
||||
connConfig := &Config{
|
||||
Host: "http://" + clientURL,
|
||||
InsecureSkipVerify: true,
|
||||
Namespace: defaultNamespace,
|
||||
}
|
||||
|
||||
return connConfig, func() {
|
||||
cancel()
|
||||
etcd.Close()
|
||||
}, nil
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/coreos/etcd/clientv3/namespace"
|
||||
"go.etcd.io/etcd/clientv3"
|
||||
"go.etcd.io/etcd/clientv3/namespace"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -22,14 +22,14 @@ const (
|
||||
type EtcdTestFixture struct {
|
||||
t *testing.T
|
||||
cli *clientv3.Client
|
||||
config *BackendConfig
|
||||
config *Config
|
||||
cleanup func()
|
||||
}
|
||||
|
||||
// NewTestEtcdInstance creates an embedded etcd instance for testing, listening
|
||||
// on random open ports. Returns the connection config and a cleanup func that
|
||||
// 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()
|
||||
|
||||
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
|
||||
// etcd instance.
|
||||
func (f *EtcdTestFixture) BackendConfig() BackendConfig {
|
||||
func (f *EtcdTestFixture) BackendConfig() Config {
|
||||
return *f.config
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"testing"
|
||||
@ -17,7 +18,7 @@ func TestBucketCreation(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -98,7 +99,7 @@ func TestBucketDeletion(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -208,7 +209,7 @@ func TestBucketForEach(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -284,7 +285,7 @@ func TestBucketForEachWithError(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -374,7 +375,7 @@ func TestBucketSequence(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -413,7 +414,7 @@ func TestKeyClash(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
// First:
|
||||
@ -481,7 +482,7 @@ func TestBucketCreateDelete(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
@ -15,7 +16,7 @@ func TestReadCursorEmptyInterval(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = db.Update(func(tx walletdb.ReadWriteTx) error {
|
||||
@ -59,7 +60,7 @@ func TestReadCursorNonEmptyInterval(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
testKeyValues := []KV{
|
||||
@ -136,7 +137,7 @@ func TestReadWriteCursor(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
testKeyValues := []KV{
|
||||
@ -300,7 +301,7 @@ func TestReadWriteCursorWithBucketAndValue(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
// Pre-store the first half of the interval.
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
@ -15,7 +16,7 @@ func TestTxManualCommit(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
tx, err := db.BeginReadWriteTx()
|
||||
@ -55,7 +56,7 @@ func TestTxRollback(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
tx, err := db.BeginReadWriteTx()
|
||||
@ -79,7 +80,7 @@ func TestChangeDuringManualTx(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
tx, err := db.BeginReadWriteTx()
|
||||
@ -108,7 +109,7 @@ func TestChangeDuringUpdate(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
defer f.Cleanup()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(context.TODO(), f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
count := 0
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
v3 "github.com/coreos/etcd/clientv3"
|
||||
v3 "go.etcd.io/etcd/clientv3"
|
||||
)
|
||||
|
||||
type CommitStats struct {
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
@ -21,13 +22,16 @@ func TestPutToEmpty(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
f := NewEtcdTestFixture(t)
|
||||
txQueue := NewCommitQueue(f.config.Ctx)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
txQueue := NewCommitQueue(ctx)
|
||||
defer func() {
|
||||
cancel()
|
||||
f.Cleanup()
|
||||
txQueue.Wait()
|
||||
}()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(ctx, f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
apply := func(stm STM) error {
|
||||
@ -45,8 +49,11 @@ func TestGetPutDel(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
f := NewEtcdTestFixture(t)
|
||||
txQueue := NewCommitQueue(f.config.Ctx)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
txQueue := NewCommitQueue(ctx)
|
||||
defer func() {
|
||||
cancel()
|
||||
f.Cleanup()
|
||||
txQueue.Wait()
|
||||
}()
|
||||
@ -63,7 +70,7 @@ func TestGetPutDel(t *testing.T) {
|
||||
f.Put(kv.key, kv.val)
|
||||
}
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(ctx, f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
apply := func(stm STM) error {
|
||||
@ -128,8 +135,11 @@ func TestFirstLastNextPrev(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
f := NewEtcdTestFixture(t)
|
||||
txQueue := NewCommitQueue(f.config.Ctx)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
txQueue := NewCommitQueue(ctx)
|
||||
defer func() {
|
||||
cancel()
|
||||
f.Cleanup()
|
||||
txQueue.Wait()
|
||||
}()
|
||||
@ -145,7 +155,7 @@ func TestFirstLastNextPrev(t *testing.T) {
|
||||
f.Put(kv.key, kv.val)
|
||||
}
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(ctx, f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
apply := func(stm STM) error {
|
||||
@ -283,13 +293,16 @@ func TestCommitError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
f := NewEtcdTestFixture(t)
|
||||
txQueue := NewCommitQueue(f.config.Ctx)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
txQueue := NewCommitQueue(ctx)
|
||||
defer func() {
|
||||
cancel()
|
||||
f.Cleanup()
|
||||
txQueue.Wait()
|
||||
}()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(ctx, f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
// Preset DB state.
|
||||
@ -328,13 +341,16 @@ func TestManualTxError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
f := NewEtcdTestFixture(t)
|
||||
txQueue := NewCommitQueue(f.config.Ctx)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
txQueue := NewCommitQueue(ctx)
|
||||
defer func() {
|
||||
cancel()
|
||||
f.Cleanup()
|
||||
txQueue.Wait()
|
||||
}()
|
||||
|
||||
db, err := newEtcdBackend(f.BackendConfig())
|
||||
db, err := newEtcdBackend(ctx, f.BackendConfig())
|
||||
require.NoError(t, err)
|
||||
|
||||
// Preset DB state.
|
||||
|
@ -3,6 +3,7 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb/walletdbtest"
|
||||
@ -13,5 +14,6 @@ import (
|
||||
func TestWalletDBInterface(t *testing.T) {
|
||||
f := NewEtcdTestFixture(t)
|
||||
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
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
|
||||
)
|
||||
|
||||
@ -12,49 +10,12 @@ import (
|
||||
// defined, allowing testing our database code with etcd backend.
|
||||
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
|
||||
// storig the database at the passed path.
|
||||
func GetEtcdTestBackend(path string, clientPort, peerPort uint16) (
|
||||
Backend, func(), error) {
|
||||
func StartEtcdTestBackend(path string, clientPort, peerPort uint16) (
|
||||
*etcd.Config, func(), error) {
|
||||
|
||||
empty := func() {}
|
||||
|
||||
config, cleanup, err := etcd.NewEmbeddedEtcdInstance(
|
||||
return etcd.NewEmbeddedEtcdInstance(
|
||||
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
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
|
||||
)
|
||||
|
||||
// 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")
|
||||
|
||||
// GetEtcdBackend is a stub returning nil and errEtcdNotAvailable error.
|
||||
func GetEtcdBackend(ctx context.Context, prefix string,
|
||||
etcdConfig *EtcdConfig) (Backend, 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) {
|
||||
// StartEtcdTestBackend is a stub returning nil, and errEtcdNotAvailable error.
|
||||
func StartEtcdTestBackend(path string, clientPort, peerPort uint16) (
|
||||
*etcd.Config, func(), error) {
|
||||
|
||||
return nil, func() {}, errEtcdNotAvailable
|
||||
}
|
||||
|
112
cluster/etcd_elector.go
Normal file
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())
|
||||
}
|
46
cluster/etcd_elector_factory.go
Normal file
46
cluster/etcd_elector_factory.go
Normal file
@ -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)
|
||||
}
|
104
cluster/etcd_elector_test.go
Normal file
104
cluster/etcd_elector_test.go
Normal file
@ -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
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
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
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 " +
|
||||
"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 " +
|
||||
"supported for PSBT funding")
|
||||
}
|
||||
|
@ -366,6 +366,8 @@ type Config struct {
|
||||
|
||||
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
|
||||
// hooked up to.
|
||||
LogWriter *build.RotatingLogWriter
|
||||
@ -532,6 +534,7 @@ func DefaultConfig() Config {
|
||||
MaxCommitFeeRateAnchors: lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte,
|
||||
LogWriter: build.NewRotatingLogWriter(),
|
||||
DB: lncfg.DefaultDB(),
|
||||
Cluster: lncfg.DefaultCluster(),
|
||||
registeredChains: chainreg.NewChainRegistry(),
|
||||
ActiveNetParams: chainreg.BitcoinTestNetParams,
|
||||
ChannelCommitInterval: defaultChannelCommitInterval,
|
||||
@ -1372,6 +1375,7 @@ func ValidateConfig(cfg Config, usageMessage string,
|
||||
cfg.Caches,
|
||||
cfg.WtClient,
|
||||
cfg.DB,
|
||||
cfg.Cluster,
|
||||
cfg.HealthChecks,
|
||||
)
|
||||
if err != nil {
|
||||
@ -1398,10 +1402,6 @@ func (c *Config) localDatabaseDir() string {
|
||||
lncfg.NormalizeNetwork(c.ActiveNetParams.Name))
|
||||
}
|
||||
|
||||
func (c *Config) networkName() string {
|
||||
return lncfg.NormalizeNetwork(c.ActiveNetParams.Name)
|
||||
}
|
||||
|
||||
// CleanAndExpandPath expands environment variables and leading ~ in the
|
||||
// passed path, cleans the result, and returns it.
|
||||
// This function is taken from https://github.com/btcsuite/btcd
|
||||
|
34
go.mod
34
go.mod
@ -5,38 +5,34 @@ require (
|
||||
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e // indirect
|
||||
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82
|
||||
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/btcutil 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/txrules v1.0.0
|
||||
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/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-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
|
||||
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/fsnotify/fsnotify v1.4.9 // indirect
|
||||
github.com/go-errors/errors v1.0.1
|
||||
github.com/go-openapi/strfmt v0.19.5 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/btree v1.0.0 // indirect
|
||||
github.com/golang/protobuf v1.4.3
|
||||
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/grpc-gateway v1.14.3
|
||||
github.com/jackpal/gateway v1.0.5
|
||||
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad
|
||||
github.com/jedib0t/go-pretty v4.3.0+incompatible
|
||||
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/json-iterator/go v1.1.9 // 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/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec
|
||||
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/lnd/cert v1.0.3
|
||||
github.com/lightningnetwork/lnd/clock v1.0.1
|
||||
@ -57,26 +53,24 @@ require (
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/prometheus/client_golang v0.9.3
|
||||
github.com/soheilhy/cmux v0.1.4 // indirect
|
||||
github.com/prometheus/client_golang v1.0.0
|
||||
github.com/stretchr/testify v1.5.1
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02
|
||||
github.com/urfave/cli v1.18.0
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
github.com/urfave/cli v1.20.0
|
||||
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
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
|
||||
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
|
||||
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/macaroon-bakery.v2 v2.0.1
|
||||
gopkg.in/macaroon.v2 v2.0.0
|
||||
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
|
||||
@ -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
|
||||
|
||||
// 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
|
||||
|
142
go.sum
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/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/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/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=
|
||||
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 v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
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-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.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.20210401013323-36a96f6a0025 h1:aoVqvZk4mLyF3WZbqEVPq+vXnwL2wekZg4P4mjYJNLs=
|
||||
github.com/btcsuite/btcd v0.21.0-beta.0.20210401013323-36a96f6a0025/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
|
||||
github.com/btcsuite/btcd v0.21.0-beta.0.20210426180113-7eba688b65e5 h1:Y0v9TA1ZLSs2TNFRSrpcGk00GWq1fenVL6FsuD3dCKI=
|
||||
github.com/btcsuite/btcd v0.21.0-beta.0.20210426180113-7eba688b65e5/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/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||
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/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/btcwallet v0.11.1-0.20210421021904-50978fcf79f8 h1:oNhbEF2hWQOHf8SIaUPZJH6Xq+9LQ6PMqCT9eiBVObE=
|
||||
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 h1:e+sUdZhAtb40Rp0vmJQ6xBdBoi7KFn3Mg6h+SGpCrMU=
|
||||
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.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=
|
||||
@ -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/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk=
|
||||
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/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/etcd v3.3.22+incompatible h1:AnRMUyVdVvh1k7lHe61YEd227+CLoNogQuAypztGSK4=
|
||||
github.com/coreos/etcd v3.3.22+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
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-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/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/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 v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
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/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/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/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/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20=
|
||||
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-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.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/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||
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-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
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/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/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/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
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/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.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
|
||||
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/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
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.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.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/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/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/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.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
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.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/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/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
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/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
|
||||
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/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI=
|
||||
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/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
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/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U=
|
||||
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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
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.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/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d h1:QWD/5MPnaZfUVP7P8wLa4M8Td2DI7XXHXt2vhVtUgGI=
|
||||
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 h1:RZJ8H4ueU/aQ9pFtx5wqsuD3B/DezrewJeVwDKKYY8E=
|
||||
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/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/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY=
|
||||
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/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
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/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
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-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 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
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/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.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
||||
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/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.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8=
|
||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||
github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
|
||||
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-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
|
||||
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/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM=
|
||||
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
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-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY=
|
||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
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/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
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.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/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.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
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/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
|
||||
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/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/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY=
|
||||
github.com/urfave/cli v1.18.0 h1:m9MfmZWX7bwr9kUcs/Asr95j0IVXzGNNc+/5ku2m26Q=
|
||||
github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
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/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
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/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/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/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/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/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/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
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-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-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-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-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-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-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/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=
|
||||
@ -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-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-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-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-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.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.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/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-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-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
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/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-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.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-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/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
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.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.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/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/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/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo=
|
||||
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/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/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/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.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=
|
||||
|
74
lncfg/cluster.go
Normal file
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)
|
42
lncfg/db.go
42
lncfg/db.go
@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
|
||||
)
|
||||
|
||||
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."`
|
||||
|
||||
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."`
|
||||
}
|
||||
@ -56,6 +57,27 @@ func (db *DB) Validate() error {
|
||||
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
|
||||
// backends for the daemon. The two backends we expose are the local database
|
||||
// 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
|
||||
// local database will ALWAYS be non-nil, while the remote database will only
|
||||
// be populated if etcd is specified.
|
||||
func (db *DB) GetBackends(ctx context.Context, dbPath string,
|
||||
networkName string) (*DatabaseBackends, error) {
|
||||
func (db *DB) GetBackends(ctx context.Context, dbPath string) (
|
||||
*DatabaseBackends, error) {
|
||||
|
||||
var (
|
||||
localDB, remoteDB kvdb.Backend
|
||||
@ -82,17 +104,9 @@ func (db *DB) GetBackends(ctx context.Context, dbPath string,
|
||||
)
|
||||
|
||||
if db.Backend == EtcdBackend {
|
||||
if db.Etcd.Embedded {
|
||||
remoteDB, _, err = kvdb.GetEtcdTestBackend(
|
||||
dbPath, db.Etcd.EmbeddedClientPort,
|
||||
db.Etcd.EmbeddedPeerPort,
|
||||
)
|
||||
} else {
|
||||
// Prefix will separate key/values in the db.
|
||||
remoteDB, err = kvdb.GetEtcdBackend(
|
||||
ctx, networkName, db.Etcd,
|
||||
)
|
||||
}
|
||||
remoteDB, err = kvdb.Open(
|
||||
kvdb.EtcdBackendName, ctx, db.Etcd,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
164
lnd.go
164
lnd.go
@ -234,17 +234,13 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
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)
|
||||
// Run configuration dependent DB pre-initialization. Note that this
|
||||
// needs to be done early and once during the startup process, before
|
||||
// any DB access.
|
||||
if err := cfg.DB.Init(ctx, cfg.localDatabaseDir()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer cleanUp()
|
||||
|
||||
// Only process macaroons if --no-macaroons isn't set.
|
||||
serverOpts, restDialOpts, restListen, cleanUp, err := getTLSConfig(cfg)
|
||||
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
|
||||
// will be used to log the API calls invoked on the GRPC server.
|
||||
interceptorChain := rpcperms.NewInterceptorChain(
|
||||
rpcsLog, cfg.NoMacaroons, walletExists,
|
||||
rpcsLog, cfg.NoMacaroons,
|
||||
)
|
||||
if err := interceptorChain.Start(); err != nil {
|
||||
return err
|
||||
@ -350,13 +338,14 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
grpcServer := grpc.NewServer(serverOpts...)
|
||||
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
|
||||
// it can be used to query for the current state of the wallet.
|
||||
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
|
||||
// exported by the rpcServer.
|
||||
rpcServer := newRPCServer(
|
||||
@ -389,11 +378,111 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
}
|
||||
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
|
||||
// started with the --noseedbackup flag, we use the default password
|
||||
// for wallet encryption.
|
||||
if !cfg.NoSeedBackup {
|
||||
params, err := waitForWalletPassword(cfg, pwService, interceptor.ShutdownChannel())
|
||||
params, err := waitForWalletPassword(
|
||||
cfg, pwService, []btcwallet.LoaderOption{loaderOpt},
|
||||
interceptor.ShutdownChannel(),
|
||||
)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("unable to set up wallet password "+
|
||||
"listeners: %v", err)
|
||||
@ -543,7 +632,6 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
Birthday: walletInitParams.Birthday,
|
||||
RecoveryWindow: walletInitParams.RecoveryWindow,
|
||||
Wallet: walletInitParams.Wallet,
|
||||
DBTimeOut: cfg.DB.Bolt.DBTimeout,
|
||||
NeutrinoCS: neutrinoCS,
|
||||
ActiveNetParams: cfg.ActiveNetParams,
|
||||
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)
|
||||
},
|
||||
BlockCacheSize: cfg.BlockCacheSize,
|
||||
LoaderOptions: []btcwallet.LoaderOption{
|
||||
loaderOpt,
|
||||
},
|
||||
}
|
||||
|
||||
activeChainControl, cleanup, err := chainreg.NewChainControl(
|
||||
@ -1157,10 +1248,11 @@ func createWalletUnlockerService(cfg *Config) *walletunlocker.UnlockerService {
|
||||
macaroonFiles := []string{
|
||||
cfg.AdminMacPath, cfg.ReadMacPath, cfg.InvoiceMacPath,
|
||||
}
|
||||
|
||||
return walletunlocker.New(
|
||||
chainConfig.ChainDir, cfg.ActiveNetParams.Params,
|
||||
!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.
|
||||
func waitForWalletPassword(cfg *Config,
|
||||
pwService *walletunlocker.UnlockerService,
|
||||
shutdownChan <-chan struct{}) (*WalletUnlockParams, error) {
|
||||
|
||||
chainConfig := cfg.Bitcoin
|
||||
if cfg.registeredChains.PrimaryChain() == chainreg.LitecoinChain {
|
||||
chainConfig = cfg.Litecoin
|
||||
}
|
||||
loaderOpts []btcwallet.LoaderOption, shutdownChan <-chan struct{}) (
|
||||
*WalletUnlockParams, error) {
|
||||
|
||||
// Wait for user to provide the password.
|
||||
ltndLog.Infof("Waiting for wallet encryption password. Use `lncli " +
|
||||
@ -1364,13 +1452,13 @@ func waitForWalletPassword(cfg *Config,
|
||||
keychain.KeyDerivationVersion)
|
||||
}
|
||||
|
||||
netDir := btcwallet.NetworkDir(
|
||||
chainConfig.ChainDir, cfg.ActiveNetParams.Params,
|
||||
)
|
||||
loader := wallet.NewLoader(
|
||||
cfg.ActiveNetParams.Params, netDir, !cfg.SyncFreelist,
|
||||
cfg.DB.Bolt.DBTimeout, recoveryWindow,
|
||||
loader, err := btcwallet.NewWalletLoader(
|
||||
cfg.ActiveNetParams.Params, recoveryWindow,
|
||||
loaderOpts...,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// With the seed, we can now use the wallet loader to create
|
||||
// the wallet, then pass it back to avoid unlocking it again.
|
||||
@ -1455,9 +1543,7 @@ func initializeDatabases(ctx context.Context,
|
||||
|
||||
startOpenTime := time.Now()
|
||||
|
||||
databaseBackends, err := cfg.DB.GetBackends(
|
||||
ctx, cfg.localDatabaseDir(), cfg.networkName(),
|
||||
)
|
||||
databaseBackends, err := cfg.DB.GetBackends(ctx, cfg.localDatabaseDir())
|
||||
if err != nil {
|
||||
return nil, nil, nil, fmt.Errorf("unable to obtain database "+
|
||||
"backends: %v", err)
|
||||
|
@ -1,444 +1,726 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: autopilotrpc/autopilot.proto
|
||||
|
||||
package autopilotrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type StatusRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
|
||||
func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatusRequest) ProtoMessage() {}
|
||||
func (x *StatusRequest) Reset() {
|
||||
*x = StatusRequest{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Indicates whether the autopilot is active or not.
|
||||
Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
||||
func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatusResponse) ProtoMessage() {}
|
||||
func (x *StatusResponse) Reset() {
|
||||
*x = StatusResponse{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{1}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatusResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *StatusResponse) GetActive() bool {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ModifyStatusRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Whether the autopilot agent should be enabled or not.
|
||||
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ModifyStatusRequest) Reset() { *m = ModifyStatusRequest{} }
|
||||
func (m *ModifyStatusRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ModifyStatusRequest) ProtoMessage() {}
|
||||
func (x *ModifyStatusRequest) Reset() {
|
||||
*x = ModifyStatusRequest{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{2}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *ModifyStatusRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ModifyStatusRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ModifyStatusRequest) GetEnable() bool {
|
||||
if x != nil {
|
||||
return x.Enable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ModifyStatusResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *ModifyStatusResponse) Reset() { *m = ModifyStatusResponse{} }
|
||||
func (m *ModifyStatusResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ModifyStatusResponse) ProtoMessage() {}
|
||||
func (x *ModifyStatusResponse) Reset() {
|
||||
*x = ModifyStatusResponse{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Pubkeys []string `protobuf:"bytes,1,rep,name=pubkeys,proto3" json:"pubkeys,omitempty"`
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
IgnoreLocalState bool `protobuf:"varint,2,opt,name=ignore_local_state,json=ignoreLocalState,proto3" json:"ignore_local_state,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryScoresRequest) Reset() { *m = QueryScoresRequest{} }
|
||||
func (m *QueryScoresRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryScoresRequest) ProtoMessage() {}
|
||||
func (x *QueryScoresRequest) Reset() {
|
||||
*x = QueryScoresRequest{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{4}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *QueryScoresRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QueryScoresRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *QueryScoresRequest) GetPubkeys() []string {
|
||||
if x != nil {
|
||||
return x.Pubkeys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryScoresRequest) GetIgnoreLocalState() bool {
|
||||
if m != nil {
|
||||
return m.IgnoreLocalState
|
||||
func (x *QueryScoresRequest) GetIgnoreLocalState() bool {
|
||||
if x != nil {
|
||||
return x.IgnoreLocalState
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type QueryScoresResponse struct {
|
||||
Results []*QueryScoresResponse_HeuristicResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Results []*QueryScoresResponse_HeuristicResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryScoresResponse) Reset() { *m = QueryScoresResponse{} }
|
||||
func (m *QueryScoresResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryScoresResponse) ProtoMessage() {}
|
||||
func (x *QueryScoresResponse) Reset() {
|
||||
*x = QueryScoresResponse{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{5}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (m *QueryScoresResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QueryScoresResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *QueryScoresResponse) GetResults() []*QueryScoresResponse_HeuristicResult {
|
||||
if x != nil {
|
||||
return x.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SetScoresRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The name of the heuristic to provide scores to.
|
||||
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
|
||||
//[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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (m *SetScoresRequest) Reset() { *m = SetScoresRequest{} }
|
||||
func (m *SetScoresRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetScoresRequest) ProtoMessage() {}
|
||||
func (x *SetScoresRequest) Reset() {
|
||||
*x = SetScoresRequest{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{6}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *SetScoresRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetScoresRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SetScoresRequest) GetHeuristic() string {
|
||||
if x != nil {
|
||||
return x.Heuristic
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SetScoresRequest) GetScores() map[string]float64 {
|
||||
if m != nil {
|
||||
return m.Scores
|
||||
func (x *SetScoresRequest) GetScores() map[string]float64 {
|
||||
if x != nil {
|
||||
return x.Scores
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SetScoresResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *SetScoresResponse) Reset() { *m = SetScoresResponse{} }
|
||||
func (m *SetScoresResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetScoresResponse) ProtoMessage() {}
|
||||
func (x *SetScoresResponse) Reset() {
|
||||
*x = SetScoresResponse{}
|
||||
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) {
|
||||
return fileDescriptor_e0b9dc347a92e084, []int{7}
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (m *SetScoresResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetScoresResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SetScoresResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SetScoresResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SetScoresResponse) XXX_Merge(src proto.Message) {
|
||||
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)
|
||||
type QueryScoresResponse_HeuristicResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SetScoresResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*StatusRequest)(nil), "autopilotrpc.StatusRequest")
|
||||
proto.RegisterType((*StatusResponse)(nil), "autopilotrpc.StatusResponse")
|
||||
proto.RegisterType((*ModifyStatusRequest)(nil), "autopilotrpc.ModifyStatusRequest")
|
||||
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 (x *QueryScoresResponse_HeuristicResult) Reset() {
|
||||
*x = QueryScoresResponse_HeuristicResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_autopilotrpc_autopilot_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("autopilotrpc/autopilot.proto", fileDescriptor_e0b9dc347a92e084) }
|
||||
func (x *QueryScoresResponse_HeuristicResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
var fileDescriptor_e0b9dc347a92e084 = []byte{
|
||||
// 468 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x8b, 0xd3, 0x40,
|
||||
0x14, 0xc7, 0x49, 0x16, 0xbb, 0xe6, 0x75, 0x75, 0xeb, 0x74, 0x59, 0x42, 0x2c, 0xda, 0xcd, 0xa9,
|
||||
0x88, 0xa6, 0x58, 0x3d, 0xa8, 0xe0, 0xc1, 0x15, 0x41, 0x70, 0x3d, 0x38, 0x65, 0x2f, 0x22, 0x2c,
|
||||
0x69, 0x76, 0x6c, 0x87, 0x8e, 0x33, 0x71, 0xe6, 0xcd, 0x4a, 0xfe, 0x21, 0xaf, 0xfe, 0x0d, 0x1e,
|
||||
0xfd, 0xaf, 0xa4, 0x99, 0xa4, 0x26, 0xa5, 0x56, 0x84, 0xbd, 0xe5, 0xbd, 0xef, 0x9b, 0xcf, 0x9b,
|
||||
0xf7, 0x23, 0x03, 0x83, 0xd4, 0xa2, 0xca, 0xb9, 0x50, 0xa8, 0xf3, 0x6c, 0xbc, 0x36, 0x92, 0x5c,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0x4e, 0x39, 0x5b, 0x09, 0xab, 0x34, 0x2c, 0xfe, 0xee, 0x43, 0xbf, 0x85, 0xaf, 0x8a, 0x7a, 0x07,
|
||||
0xfb, 0x9a, 0x19, 0x2b, 0xd0, 0xf1, 0xbb, 0x93, 0xc7, 0x49, 0xb3, 0x2f, 0xc9, 0x96, 0x33, 0xc9,
|
||||
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,
|
||||
0x7a, 0x0e, 0xdd, 0x86, 0x9b, 0xf4, 0x60, 0x6f, 0xc9, 0x8a, 0x2a, 0xfb, 0xea, 0x93, 0x1c, 0xc1,
|
||||
0x8d, 0xab, 0x54, 0x58, 0xd7, 0x2f, 0x8f, 0x3a, 0xe3, 0x85, 0xff, 0xcc, 0x8b, 0x7f, 0x78, 0xd0,
|
||||
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,
|
||||
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,
|
||||
0x39, 0x83, 0x60, 0xdd, 0x12, 0x72, 0x6f, 0xf7, 0x38, 0xa2, 0xfb, 0x7f, 0xd5, 0x1d, 0xed, 0xf4,
|
||||
0xe9, 0xc7, 0xc9, 0x9c, 0xe3, 0xc2, 0xce, 0x92, 0x4c, 0x7d, 0x19, 0x0b, 0x3e, 0x5f, 0xa0, 0xe4,
|
||||
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,
|
||||
0x86, 0x04, 0x00, 0x00,
|
||||
func (*QueryScoresResponse_HeuristicResult) ProtoMessage() {}
|
||||
|
||||
func (x *QueryScoresResponse_HeuristicResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_autopilotrpc_autopilot_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 QueryScoresResponse_HeuristicResult.ProtoReflect.Descriptor instead.
|
||||
func (*QueryScoresResponse_HeuristicResult) Descriptor() ([]byte, []int) {
|
||||
return file_autopilotrpc_autopilot_proto_rawDescGZIP(), []int{5, 0}
|
||||
}
|
||||
|
||||
func (x *QueryScoresResponse_HeuristicResult) GetHeuristic() string {
|
||||
if x != nil {
|
||||
return x.Heuristic
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *QueryScoresResponse_HeuristicResult) GetScores() map[string]float64 {
|
||||
if x != nil {
|
||||
return x.Scores
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -463,10 +745,10 @@ type AutopilotClient interface {
|
||||
}
|
||||
|
||||
type autopilotClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAutopilotClient(cc *grpc.ClientConn) AutopilotClient {
|
||||
func NewAutopilotClient(cc grpc.ClientConnInterface) AutopilotClient {
|
||||
return &autopilotClient{cc}
|
||||
}
|
||||
|
||||
@ -530,16 +812,16 @@ type AutopilotServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -1,30 +1,39 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: chainrpc/chainnotifier.proto
|
||||
|
||||
package chainrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type ConfRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//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
|
||||
@ -44,66 +53,74 @@ type ConfRequest struct {
|
||||
//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
|
||||
//broadcast height of the transaction/output script.
|
||||
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:"-"`
|
||||
HeightHint uint32 `protobuf:"varint,4,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ConfRequest) Reset() { *m = ConfRequest{} }
|
||||
func (m *ConfRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConfRequest) ProtoMessage() {}
|
||||
func (x *ConfRequest) Reset() {
|
||||
*x = ConfRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{0}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *ConfRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ConfRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ConfRequest) GetTxid() []byte {
|
||||
if x != nil {
|
||||
return x.Txid
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfRequest) GetScript() []byte {
|
||||
if m != nil {
|
||||
return m.Script
|
||||
func (x *ConfRequest) GetScript() []byte {
|
||||
if x != nil {
|
||||
return x.Script
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfRequest) GetNumConfs() uint32 {
|
||||
if m != nil {
|
||||
return m.NumConfs
|
||||
func (x *ConfRequest) GetNumConfs() uint32 {
|
||||
if x != nil {
|
||||
return x.NumConfs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ConfRequest) GetHeightHint() uint32 {
|
||||
if m != nil {
|
||||
return m.HeightHint
|
||||
func (x *ConfRequest) GetHeightHint() uint32 {
|
||||
if x != nil {
|
||||
return x.HeightHint
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ConfDetails struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The raw bytes of the confirmed transaction.
|
||||
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.
|
||||
@ -112,147 +129,150 @@ type ConfDetails struct {
|
||||
// in.
|
||||
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.
|
||||
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:"-"`
|
||||
TxIndex uint32 `protobuf:"varint,4,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ConfDetails) Reset() { *m = ConfDetails{} }
|
||||
func (m *ConfDetails) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConfDetails) ProtoMessage() {}
|
||||
func (x *ConfDetails) Reset() {
|
||||
*x = ConfDetails{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{1}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *ConfDetails) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ConfDetails.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ConfDetails) GetRawTx() []byte {
|
||||
if x != nil {
|
||||
return x.RawTx
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfDetails) GetBlockHash() []byte {
|
||||
if m != nil {
|
||||
return m.BlockHash
|
||||
func (x *ConfDetails) GetBlockHash() []byte {
|
||||
if x != nil {
|
||||
return x.BlockHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfDetails) GetBlockHeight() uint32 {
|
||||
if m != nil {
|
||||
return m.BlockHeight
|
||||
func (x *ConfDetails) GetBlockHeight() uint32 {
|
||||
if x != nil {
|
||||
return x.BlockHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ConfDetails) GetTxIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.TxIndex
|
||||
func (x *ConfDetails) GetTxIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.TxIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Reorg struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *Reorg) Reset() { *m = Reorg{} }
|
||||
func (m *Reorg) String() string { return proto.CompactTextString(m) }
|
||||
func (*Reorg) ProtoMessage() {}
|
||||
func (x *Reorg) Reset() {
|
||||
*x = Reorg{}
|
||||
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) {
|
||||
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 {
|
||||
// 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_Reorg
|
||||
Event isConfEvent_Event `protobuf_oneof:"event"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Event isConfEvent_Event `protobuf_oneof:"event"`
|
||||
}
|
||||
|
||||
func (m *ConfEvent) Reset() { *m = ConfEvent{} }
|
||||
func (m *ConfEvent) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConfEvent) ProtoMessage() {}
|
||||
func (x *ConfEvent) Reset() {
|
||||
*x = ConfEvent{}
|
||||
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) {
|
||||
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 {
|
||||
if m != nil {
|
||||
return m.Event
|
||||
@ -260,78 +280,104 @@ func (m *ConfEvent) GetEvent() isConfEvent_Event {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfEvent) GetConf() *ConfDetails {
|
||||
if x, ok := m.GetEvent().(*ConfEvent_Conf); ok {
|
||||
func (x *ConfEvent) GetConf() *ConfDetails {
|
||||
if x, ok := x.GetEvent().(*ConfEvent_Conf); ok {
|
||||
return x.Conf
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConfEvent) GetReorg() *Reorg {
|
||||
if x, ok := m.GetEvent().(*ConfEvent_Reorg); ok {
|
||||
func (x *ConfEvent) GetReorg() *Reorg {
|
||||
if x, ok := x.GetEvent().(*ConfEvent_Reorg); ok {
|
||||
return x.Reorg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*ConfEvent) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*ConfEvent_Conf)(nil),
|
||||
(*ConfEvent_Reorg)(nil),
|
||||
}
|
||||
type isConfEvent_Event interface {
|
||||
isConfEvent_Event()
|
||||
}
|
||||
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The hash of the transaction.
|
||||
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
// The index of the output within the transaction.
|
||||
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Outpoint) Reset() { *m = Outpoint{} }
|
||||
func (m *Outpoint) String() string { return proto.CompactTextString(m) }
|
||||
func (*Outpoint) ProtoMessage() {}
|
||||
func (x *Outpoint) Reset() {
|
||||
*x = Outpoint{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{4}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *Outpoint) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Outpoint.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *Outpoint) GetHash() []byte {
|
||||
if x != nil {
|
||||
return x.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Outpoint) GetIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
func (x *Outpoint) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
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
|
||||
//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
|
||||
//have been spent. This should in most cases be set to the broadcast height of
|
||||
//the outpoint/output script.
|
||||
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:"-"`
|
||||
HeightHint uint32 `protobuf:"varint,3,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SpendRequest) Reset() { *m = SpendRequest{} }
|
||||
func (m *SpendRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SpendRequest) ProtoMessage() {}
|
||||
func (x *SpendRequest) Reset() {
|
||||
*x = SpendRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{5}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (m *SpendRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SpendRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SpendRequest) GetOutpoint() *Outpoint {
|
||||
if x != nil {
|
||||
return x.Outpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendRequest) GetScript() []byte {
|
||||
if m != nil {
|
||||
return m.Script
|
||||
func (x *SpendRequest) GetScript() []byte {
|
||||
if x != nil {
|
||||
return x.Script
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendRequest) GetHeightHint() uint32 {
|
||||
if m != nil {
|
||||
return m.HeightHint
|
||||
func (x *SpendRequest) GetHeightHint() uint32 {
|
||||
if x != nil {
|
||||
return x.HeightHint
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SpendDetails struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The outpoint was that spent.
|
||||
SpendingOutpoint *Outpoint `protobuf:"bytes,1,opt,name=spending_outpoint,json=spendingOutpoint,proto3" json:"spending_outpoint,omitempty"`
|
||||
// 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.
|
||||
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.
|
||||
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:"-"`
|
||||
SpendingHeight uint32 `protobuf:"varint,5,opt,name=spending_height,json=spendingHeight,proto3" json:"spending_height,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SpendDetails) Reset() { *m = SpendDetails{} }
|
||||
func (m *SpendDetails) String() string { return proto.CompactTextString(m) }
|
||||
func (*SpendDetails) ProtoMessage() {}
|
||||
func (x *SpendDetails) Reset() {
|
||||
*x = SpendDetails{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{6}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *SpendDetails) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SpendDetails.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SpendDetails) GetSpendingOutpoint() *Outpoint {
|
||||
if x != nil {
|
||||
return x.SpendingOutpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendDetails) GetRawSpendingTx() []byte {
|
||||
if m != nil {
|
||||
return m.RawSpendingTx
|
||||
func (x *SpendDetails) GetRawSpendingTx() []byte {
|
||||
if x != nil {
|
||||
return x.RawSpendingTx
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendDetails) GetSpendingTxHash() []byte {
|
||||
if m != nil {
|
||||
return m.SpendingTxHash
|
||||
func (x *SpendDetails) GetSpendingTxHash() []byte {
|
||||
if x != nil {
|
||||
return x.SpendingTxHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendDetails) GetSpendingInputIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.SpendingInputIndex
|
||||
func (x *SpendDetails) GetSpendingInputIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.SpendingInputIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SpendDetails) GetSpendingHeight() uint32 {
|
||||
if m != nil {
|
||||
return m.SpendingHeight
|
||||
func (x *SpendDetails) GetSpendingHeight() uint32 {
|
||||
if x != nil {
|
||||
return x.SpendingHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
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_Reorg
|
||||
Event isSpendEvent_Event `protobuf_oneof:"event"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Event isSpendEvent_Event `protobuf_oneof:"event"`
|
||||
}
|
||||
|
||||
func (m *SpendEvent) Reset() { *m = SpendEvent{} }
|
||||
func (m *SpendEvent) String() string { return proto.CompactTextString(m) }
|
||||
func (*SpendEvent) ProtoMessage() {}
|
||||
func (x *SpendEvent) Reset() {
|
||||
*x = SpendEvent{}
|
||||
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) {
|
||||
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 {
|
||||
if m != nil {
|
||||
return m.Event
|
||||
@ -532,138 +582,380 @@ func (m *SpendEvent) GetEvent() isSpendEvent_Event {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendEvent) GetSpend() *SpendDetails {
|
||||
if x, ok := m.GetEvent().(*SpendEvent_Spend); ok {
|
||||
func (x *SpendEvent) GetSpend() *SpendDetails {
|
||||
if x, ok := x.GetEvent().(*SpendEvent_Spend); ok {
|
||||
return x.Spend
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SpendEvent) GetReorg() *Reorg {
|
||||
if x, ok := m.GetEvent().(*SpendEvent_Reorg); ok {
|
||||
func (x *SpendEvent) GetReorg() *Reorg {
|
||||
if x, ok := x.GetEvent().(*SpendEvent_Reorg); ok {
|
||||
return x.Reorg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*SpendEvent) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*SpendEvent_Spend)(nil),
|
||||
(*SpendEvent_Reorg)(nil),
|
||||
}
|
||||
type isSpendEvent_Event interface {
|
||||
isSpendEvent_Event()
|
||||
}
|
||||
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The hash of the block.
|
||||
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
// The height of the block.
|
||||
Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
||||
func (m *BlockEpoch) Reset() { *m = BlockEpoch{} }
|
||||
func (m *BlockEpoch) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockEpoch) ProtoMessage() {}
|
||||
func (x *BlockEpoch) Reset() {
|
||||
*x = BlockEpoch{}
|
||||
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) {
|
||||
return fileDescriptor_b10e6f8a1c9d2638, []int{8}
|
||||
return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (m *BlockEpoch) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockEpoch.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *BlockEpoch) GetHash() []byte {
|
||||
if x != nil {
|
||||
return x.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BlockEpoch) GetHeight() uint32 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
func (x *BlockEpoch) GetHeight() uint32 {
|
||||
if x != nil {
|
||||
return x.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ConfRequest)(nil), "chainrpc.ConfRequest")
|
||||
proto.RegisterType((*ConfDetails)(nil), "chainrpc.ConfDetails")
|
||||
proto.RegisterType((*Reorg)(nil), "chainrpc.Reorg")
|
||||
proto.RegisterType((*ConfEvent)(nil), "chainrpc.ConfEvent")
|
||||
proto.RegisterType((*Outpoint)(nil), "chainrpc.Outpoint")
|
||||
proto.RegisterType((*SpendRequest)(nil), "chainrpc.SpendRequest")
|
||||
proto.RegisterType((*SpendDetails)(nil), "chainrpc.SpendDetails")
|
||||
proto.RegisterType((*SpendEvent)(nil), "chainrpc.SpendEvent")
|
||||
proto.RegisterType((*BlockEpoch)(nil), "chainrpc.BlockEpoch")
|
||||
var File_chainrpc_chainnotifier_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_chainrpc_chainnotifier_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e,
|
||||
0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
|
||||
0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x77, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 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, 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{
|
||||
// 574 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0x13, 0x3f,
|
||||
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,
|
||||
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,
|
||||
0x42, 0x0b, 0x52, 0x73, 0xd3, 0x60, 0x0d, 0x8d, 0xb1, 0xe0, 0xf3, 0x90, 0x7e, 0x5d, 0x51, 0xa5,
|
||||
0x09, 0x81, 0x43, 0x9d, 0xb3, 0x59, 0xcf, 0x3b, 0xf7, 0xfa, 0xcd, 0x10, 0xcf, 0xa4, 0x0b, 0x15,
|
||||
0x95, 0x48, 0x96, 0xe9, 0xde, 0x3e, 0x76, 0x6d, 0x45, 0x9e, 0x40, 0x9d, 0xaf, 0x96, 0x51, 0x22,
|
||||
0xf8, 0x5c, 0xf5, 0x0e, 0xce, 0xbd, 0x7e, 0x2b, 0xac, 0xf1, 0xd5, 0xd2, 0xd0, 0x29, 0xf2, 0x1c,
|
||||
0x1a, 0x29, 0x65, 0x8b, 0x54, 0x47, 0x29, 0xe3, 0xba, 0x77, 0x88, 0x63, 0x28, 0x5a, 0x13, 0xc6,
|
||||
0x75, 0xf0, 0xdd, 0x2b, 0x6e, 0xfe, 0x40, 0x75, 0xcc, 0xee, 0x15, 0x39, 0x81, 0x8a, 0x8c, 0xd7,
|
||||
0x91, 0xce, 0xed, 0xdd, 0xbe, 0x8c, 0xd7, 0xb7, 0x39, 0x79, 0x06, 0x70, 0x77, 0x2f, 0x92, 0x2f,
|
||||
0x51, 0x1a, 0xab, 0xd4, 0x0a, 0xa8, 0x63, 0x67, 0x12, 0xab, 0x94, 0xbc, 0x80, 0xa6, 0x1d, 0x23,
|
||||
0xb3, 0x95, 0xd1, 0x28, 0x00, 0xd8, 0x22, 0xa7, 0x50, 0xd3, 0x79, 0xc4, 0xf8, 0x8c, 0xe6, 0x56,
|
||||
0x46, 0x55, 0xe7, 0x53, 0x53, 0x06, 0x55, 0xf0, 0x43, 0x2a, 0xe4, 0x22, 0xf8, 0x0c, 0x75, 0xa3,
|
||||
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,
|
||||
0xa8, 0xbd, 0x41, 0x23, 0xf3, 0x64, 0x2f, 0x2c, 0xe6, 0x97, 0x55, 0xf0, 0xa9, 0xa1, 0x0f, 0xde,
|
||||
0x42, 0xed, 0xd3, 0x4a, 0x67, 0x82, 0x71, 0x7c, 0x6e, 0xdc, 0xcb, 0x3e, 0xb7, 0x39, 0x93, 0x0e,
|
||||
0xf8, 0x85, 0xd8, 0x7d, 0x14, 0x5b, 0x14, 0xc1, 0x1a, 0x9a, 0x37, 0x19, 0xe5, 0x33, 0x67, 0xd4,
|
||||
0x00, 0x6a, 0xc2, 0xb2, 0x58, 0xa1, 0x64, 0x73, 0xb5, 0xe3, 0x0f, 0x4b, 0xcc, 0x1f, 0x4d, 0xdc,
|
||||
0xf1, 0xe9, 0xe0, 0x37, 0x9f, 0x7e, 0x7a, 0xf6, 0x66, 0x67, 0xd4, 0x7b, 0x38, 0x56, 0xa6, 0x66,
|
||||
0x7c, 0x11, 0xfd, 0x85, 0x84, 0x23, 0x07, 0x2e, 0x97, 0x7e, 0x09, 0x6d, 0xe3, 0x74, 0x49, 0xa2,
|
||||
0x73, 0xab, 0xa9, 0x25, 0xe3, 0xf5, 0x8d, 0xed, 0xde, 0xe6, 0xa4, 0x0f, 0x47, 0x5b, 0x98, 0x22,
|
||||
0x00, 0x07, 0x08, 0xfc, 0x4f, 0x95, 0x28, 0x4c, 0xc1, 0x10, 0x3a, 0x25, 0x92, 0xf1, 0x6c, 0xa5,
|
||||
0x1f, 0xd8, 0x4d, 0xdc, 0x6c, 0x6a, 0x46, 0xe8, 0x3c, 0xb9, 0x80, 0x76, 0xf9, 0x85, 0x8d, 0x8e,
|
||||
0x8f, 0xe0, 0x92, 0xba, 0x48, 0x4f, 0xc0, 0x01, 0x50, 0x52, 0x11, 0x8d, 0x01, 0xf8, 0x38, 0xb7,
|
||||
0xfb, 0x76, 0x37, 0xfb, 0x6e, 0x3f, 0x91, 0x31, 0x1d, 0x61, 0xff, 0x90, 0x8e, 0x77, 0x00, 0x97,
|
||||
0x26, 0xbc, 0x57, 0x99, 0x48, 0xd2, 0x47, 0xf3, 0xd1, 0x85, 0x8a, 0x55, 0x5c, 0x04, 0xc4, 0x56,
|
||||
0xa3, 0x1f, 0x1e, 0xb4, 0xc6, 0x86, 0xfe, 0xda, 0xfe, 0xd6, 0xc9, 0x14, 0x4e, 0x43, 0xba, 0x60,
|
||||
0x4a, 0x53, 0x69, 0xa2, 0xcb, 0xe4, 0x32, 0xd6, 0x4c, 0x70, 0x75, 0xad, 0xe7, 0x9c, 0xec, 0xe4,
|
||||
0xda, 0xe6, 0xea, 0xec, 0xff, 0x87, 0x6d, 0x5c, 0x7b, 0xe8, 0x91, 0x31, 0x1c, 0x3b, 0x2a, 0xdc,
|
||||
0x14, 0x29, 0x76, 0xd7, 0x77, 0x1c, 0x9d, 0x9d, 0xbe, 0x23, 0xf9, 0x08, 0x5d, 0x47, 0xb2, 0xd9,
|
||||
0x11, 0x99, 0xb6, 0xbe, 0xd8, 0x4c, 0xce, 0x1e, 0xed, 0x0e, 0xbd, 0xbb, 0x0a, 0xfe, 0x89, 0xbd,
|
||||
0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x65, 0xe6, 0xc2, 0xe4, 0xe4, 0x04, 0x00, 0x00,
|
||||
func file_chainrpc_chainnotifier_proto_rawDescGZIP() []byte {
|
||||
file_chainrpc_chainnotifier_proto_rawDescOnce.Do(func() {
|
||||
file_chainrpc_chainnotifier_proto_rawDescData = protoimpl.X.CompressGZIP(file_chainrpc_chainnotifier_proto_rawDescData)
|
||||
})
|
||||
return file_chainrpc_chainnotifier_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_chainrpc_chainnotifier_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_chainrpc_chainnotifier_proto_goTypes = []interface{}{
|
||||
(*ConfRequest)(nil), // 0: chainrpc.ConfRequest
|
||||
(*ConfDetails)(nil), // 1: chainrpc.ConfDetails
|
||||
(*Reorg)(nil), // 2: chainrpc.Reorg
|
||||
(*ConfEvent)(nil), // 3: chainrpc.ConfEvent
|
||||
(*Outpoint)(nil), // 4: chainrpc.Outpoint
|
||||
(*SpendRequest)(nil), // 5: chainrpc.SpendRequest
|
||||
(*SpendDetails)(nil), // 6: chainrpc.SpendDetails
|
||||
(*SpendEvent)(nil), // 7: chainrpc.SpendEvent
|
||||
(*BlockEpoch)(nil), // 8: chainrpc.BlockEpoch
|
||||
}
|
||||
var file_chainrpc_chainnotifier_proto_depIdxs = []int32{
|
||||
1, // 0: chainrpc.ConfEvent.conf:type_name -> chainrpc.ConfDetails
|
||||
2, // 1: chainrpc.ConfEvent.reorg:type_name -> chainrpc.Reorg
|
||||
4, // 2: chainrpc.SpendRequest.outpoint:type_name -> chainrpc.Outpoint
|
||||
4, // 3: chainrpc.SpendDetails.spending_outpoint:type_name -> chainrpc.Outpoint
|
||||
6, // 4: chainrpc.SpendEvent.spend:type_name -> chainrpc.SpendDetails
|
||||
2, // 5: chainrpc.SpendEvent.reorg:type_name -> chainrpc.Reorg
|
||||
0, // 6: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:input_type -> chainrpc.ConfRequest
|
||||
5, // 7: chainrpc.ChainNotifier.RegisterSpendNtfn:input_type -> chainrpc.SpendRequest
|
||||
8, // 8: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:input_type -> chainrpc.BlockEpoch
|
||||
3, // 9: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:output_type -> chainrpc.ConfEvent
|
||||
7, // 10: chainrpc.ChainNotifier.RegisterSpendNtfn:output_type -> chainrpc.SpendEvent
|
||||
8, // 11: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:output_type -> chainrpc.BlockEpoch
|
||||
9, // [9:12] is the sub-list for method output_type
|
||||
6, // [6:9] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -700,10 +992,10 @@ type ChainNotifierClient interface {
|
||||
}
|
||||
|
||||
type chainNotifierClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewChainNotifierClient(cc *grpc.ClientConn) ChainNotifierClient {
|
||||
func NewChainNotifierClient(cc grpc.ClientConnInterface) ChainNotifierClient {
|
||||
return &chainNotifierClient{cc}
|
||||
}
|
||||
|
||||
@ -839,13 +1131,13 @@ type ChainNotifierServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,8 @@ syntax = "proto3";
|
||||
|
||||
package chainrpc;
|
||||
|
||||
option go_package = "github.com/lightningnetwork/lnd/lnrpc/chainrpc";
|
||||
|
||||
// ChainNotifier is a service that can be used to get information about the
|
||||
// chain backend by registering notifiers for chain events.
|
||||
service ChainNotifier {
|
||||
|
@ -1,102 +1,126 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: invoicesrpc/invoices.proto
|
||||
|
||||
package invoicesrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
lnrpc "github.com/lightningnetwork/lnd/lnrpc"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type CancelInvoiceMsg struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Hash corresponding to the (hold) invoice to cancel.
|
||||
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:"-"`
|
||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CancelInvoiceMsg) Reset() { *m = CancelInvoiceMsg{} }
|
||||
func (m *CancelInvoiceMsg) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelInvoiceMsg) ProtoMessage() {}
|
||||
func (x *CancelInvoiceMsg) Reset() {
|
||||
*x = CancelInvoiceMsg{}
|
||||
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) {
|
||||
return fileDescriptor_090ab9c4958b987d, []int{0}
|
||||
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *CancelInvoiceMsg) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelInvoiceMsg.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *CancelInvoiceMsg) GetPaymentHash() []byte {
|
||||
if x != nil {
|
||||
return x.PaymentHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CancelInvoiceResp struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *CancelInvoiceResp) Reset() { *m = CancelInvoiceResp{} }
|
||||
func (m *CancelInvoiceResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelInvoiceResp) ProtoMessage() {}
|
||||
func (x *CancelInvoiceResp) Reset() {
|
||||
*x = CancelInvoiceResp{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//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
|
||||
@ -131,318 +155,528 @@ type AddHoldInvoiceRequest struct {
|
||||
//invoice's destination.
|
||||
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.
|
||||
Private bool `protobuf:"varint,9,opt,name=private,proto3" json:"private,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Private bool `protobuf:"varint,9,opt,name=private,proto3" json:"private,omitempty"`
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) Reset() { *m = AddHoldInvoiceRequest{} }
|
||||
func (m *AddHoldInvoiceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddHoldInvoiceRequest) ProtoMessage() {}
|
||||
func (x *AddHoldInvoiceRequest) Reset() {
|
||||
*x = AddHoldInvoiceRequest{}
|
||||
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) {
|
||||
return fileDescriptor_090ab9c4958b987d, []int{2}
|
||||
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddHoldInvoiceRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *AddHoldInvoiceRequest) GetMemo() string {
|
||||
if x != nil {
|
||||
return x.Memo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
func (x *AddHoldInvoiceRequest) GetHash() []byte {
|
||||
if x != nil {
|
||||
return x.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetValue() int64 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
func (x *AddHoldInvoiceRequest) GetValue() int64 {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetValueMsat() int64 {
|
||||
if m != nil {
|
||||
return m.ValueMsat
|
||||
func (x *AddHoldInvoiceRequest) GetValueMsat() int64 {
|
||||
if x != nil {
|
||||
return x.ValueMsat
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetDescriptionHash() []byte {
|
||||
if m != nil {
|
||||
return m.DescriptionHash
|
||||
func (x *AddHoldInvoiceRequest) GetDescriptionHash() []byte {
|
||||
if x != nil {
|
||||
return x.DescriptionHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetExpiry() int64 {
|
||||
if m != nil {
|
||||
return m.Expiry
|
||||
func (x *AddHoldInvoiceRequest) GetExpiry() int64 {
|
||||
if x != nil {
|
||||
return x.Expiry
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetFallbackAddr() string {
|
||||
if m != nil {
|
||||
return m.FallbackAddr
|
||||
func (x *AddHoldInvoiceRequest) GetFallbackAddr() string {
|
||||
if x != nil {
|
||||
return x.FallbackAddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetCltvExpiry() uint64 {
|
||||
if m != nil {
|
||||
return m.CltvExpiry
|
||||
func (x *AddHoldInvoiceRequest) GetCltvExpiry() uint64 {
|
||||
if x != nil {
|
||||
return x.CltvExpiry
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetRouteHints() []*lnrpc.RouteHint {
|
||||
if m != nil {
|
||||
return m.RouteHints
|
||||
func (x *AddHoldInvoiceRequest) GetRouteHints() []*lnrpc.RouteHint {
|
||||
if x != nil {
|
||||
return x.RouteHints
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceRequest) GetPrivate() bool {
|
||||
if m != nil {
|
||||
return m.Private
|
||||
func (x *AddHoldInvoiceRequest) GetPrivate() bool {
|
||||
if x != nil {
|
||||
return x.Private
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
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
|
||||
//details of the invoice, the sender has all the data necessary to send a
|
||||
//payment to the recipient.
|
||||
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:"-"`
|
||||
PaymentRequest string `protobuf:"bytes,1,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceResp) Reset() { *m = AddHoldInvoiceResp{} }
|
||||
func (m *AddHoldInvoiceResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddHoldInvoiceResp) ProtoMessage() {}
|
||||
func (x *AddHoldInvoiceResp) Reset() {
|
||||
*x = AddHoldInvoiceResp{}
|
||||
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) {
|
||||
return fileDescriptor_090ab9c4958b987d, []int{3}
|
||||
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (m *AddHoldInvoiceResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddHoldInvoiceResp.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *AddHoldInvoiceResp) GetPaymentRequest() string {
|
||||
if x != nil {
|
||||
return x.PaymentRequest
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SettleInvoiceMsg struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Externally discovered pre-image that should be used to settle the hold
|
||||
// invoice.
|
||||
Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Preimage []byte `protobuf:"bytes,1,opt,name=preimage,proto3" json:"preimage,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SettleInvoiceMsg) Reset() { *m = SettleInvoiceMsg{} }
|
||||
func (m *SettleInvoiceMsg) String() string { return proto.CompactTextString(m) }
|
||||
func (*SettleInvoiceMsg) ProtoMessage() {}
|
||||
func (x *SettleInvoiceMsg) Reset() {
|
||||
*x = SettleInvoiceMsg{}
|
||||
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) {
|
||||
return fileDescriptor_090ab9c4958b987d, []int{4}
|
||||
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *SettleInvoiceMsg) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SettleInvoiceMsg.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SettleInvoiceMsg) GetPreimage() []byte {
|
||||
if x != nil {
|
||||
return x.Preimage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettleInvoiceResp struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *SettleInvoiceResp) Reset() { *m = SettleInvoiceResp{} }
|
||||
func (m *SettleInvoiceResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SettleInvoiceResp) ProtoMessage() {}
|
||||
func (x *SettleInvoiceResp) Reset() {
|
||||
*x = SettleInvoiceResp{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
RHash []byte `protobuf:"bytes,2,opt,name=r_hash,json=rHash,proto3" json:"r_hash,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SubscribeSingleInvoiceRequest) Reset() { *m = SubscribeSingleInvoiceRequest{} }
|
||||
func (m *SubscribeSingleInvoiceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubscribeSingleInvoiceRequest) ProtoMessage() {}
|
||||
func (x *SubscribeSingleInvoiceRequest) Reset() {
|
||||
*x = SubscribeSingleInvoiceRequest{}
|
||||
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) {
|
||||
return fileDescriptor_090ab9c4958b987d, []int{6}
|
||||
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *SubscribeSingleInvoiceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SubscribeSingleInvoiceRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SubscribeSingleInvoiceRequest) GetRHash() []byte {
|
||||
if x != nil {
|
||||
return x.RHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CancelInvoiceMsg)(nil), "invoicesrpc.CancelInvoiceMsg")
|
||||
proto.RegisterType((*CancelInvoiceResp)(nil), "invoicesrpc.CancelInvoiceResp")
|
||||
proto.RegisterType((*AddHoldInvoiceRequest)(nil), "invoicesrpc.AddHoldInvoiceRequest")
|
||||
proto.RegisterType((*AddHoldInvoiceResp)(nil), "invoicesrpc.AddHoldInvoiceResp")
|
||||
proto.RegisterType((*SettleInvoiceMsg)(nil), "invoicesrpc.SettleInvoiceMsg")
|
||||
proto.RegisterType((*SettleInvoiceResp)(nil), "invoicesrpc.SettleInvoiceResp")
|
||||
proto.RegisterType((*SubscribeSingleInvoiceRequest)(nil), "invoicesrpc.SubscribeSingleInvoiceRequest")
|
||||
var File_invoicesrpc_invoices_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_invoicesrpc_invoices_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e,
|
||||
0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x6e,
|
||||
0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x1a, 0x09, 0x72, 0x70, 0x63, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e,
|
||||
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{
|
||||
// 523 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
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,
|
||||
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,
|
||||
0x1b, 0x48, 0x11, 0x57, 0xb8, 0xff, 0x06, 0x26, 0x1f, 0x30, 0x8f, 0x09, 0xfb, 0x54, 0xcd, 0xaf,
|
||||
0x54, 0x8a, 0x9e, 0xc1, 0x48, 0xe0, 0x9b, 0x9c, 0x70, 0x1d, 0x65, 0x58, 0x65, 0xae, 0x33, 0x73,
|
||||
0xe6, 0xa3, 0x70, 0x68, 0xb1, 0x25, 0x56, 0x99, 0xff, 0x18, 0x1e, 0x35, 0x9e, 0x85, 0x44, 0x09,
|
||||
0xff, 0x4f, 0x0b, 0x8e, 0x2f, 0x93, 0x64, 0x59, 0xb0, 0xe4, 0x16, 0xfe, 0xb9, 0x21, 0x4a, 0x23,
|
||||
0x04, 0x9d, 0x9c, 0xe4, 0x85, 0x61, 0x1a, 0x84, 0xa6, 0x2e, 0x31, 0xc3, 0xde, 0x32, 0xec, 0xa6,
|
||||
0x46, 0x4f, 0xa0, 0xbb, 0xc5, 0x6c, 0x43, 0xdc, 0xf6, 0xcc, 0x99, 0xb7, 0xc3, 0xaa, 0x41, 0x53,
|
||||
0x00, 0x53, 0x44, 0xb9, 0xc2, 0xda, 0x05, 0x33, 0x1a, 0x18, 0xe4, 0x4a, 0x61, 0x8d, 0x5e, 0xc2,
|
||||
0x24, 0x21, 0x2a, 0x96, 0x54, 0x68, 0x5a, 0xf0, 0x4a, 0x72, 0xc7, 0x90, 0x1e, 0xd5, 0xf0, 0x52,
|
||||
0x36, 0x3a, 0x81, 0x1e, 0xf9, 0x2d, 0xa8, 0xbc, 0x71, 0xbb, 0x86, 0xc5, 0x76, 0xe8, 0x39, 0x1c,
|
||||
0xfe, 0xc0, 0x8c, 0xad, 0x71, 0x7c, 0x1d, 0xe1, 0x24, 0x91, 0x6e, 0xcf, 0x08, 0x1d, 0xed, 0xc0,
|
||||
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,
|
||||
0xfe, 0xac, 0x3d, 0x1f, 0x9e, 0x4f, 0x02, 0xc6, 0x4b, 0xbb, 0xc3, 0x72, 0xb2, 0xa4, 0x5c, 0x87,
|
||||
0x20, 0x77, 0xa5, 0x42, 0x2e, 0x1c, 0x08, 0x49, 0xb7, 0x58, 0x13, 0x77, 0x30, 0x73, 0xe6, 0xfd,
|
||||
0x70, 0xd7, 0xfa, 0xef, 0x00, 0xed, 0x7b, 0xa9, 0x04, 0x7a, 0x01, 0x47, 0xbb, 0x68, 0x64, 0xe5,
|
||||
0xad, 0xf5, 0x74, 0x6c, 0x61, 0xeb, 0xb8, 0x1f, 0xc0, 0x64, 0x45, 0xb4, 0x66, 0xa4, 0x96, 0xab,
|
||||
0x07, 0x7d, 0x21, 0x09, 0xcd, 0x71, 0x4a, 0x6c, 0xa6, 0xb7, 0x7d, 0x19, 0x68, 0x63, 0xdf, 0x04,
|
||||
0xfa, 0x16, 0xa6, 0xab, 0xcd, 0xba, 0xb4, 0x70, 0x4d, 0x56, 0x94, 0xa7, 0xb5, 0x69, 0x95, 0xeb,
|
||||
0x31, 0xf4, 0x64, 0x54, 0x4b, 0xb1, 0x2b, 0x4b, 0x9b, 0x3f, 0x77, 0xfa, 0xce, 0xa4, 0x75, 0xfe,
|
||||
0xb7, 0x05, 0x7d, 0xbb, 0xaf, 0xd0, 0x37, 0x38, 0xb9, 0x9b, 0x0a, 0xbd, 0x0a, 0x6a, 0xa7, 0x19,
|
||||
0x3c, 0xf8, 0x3d, 0x6f, 0x6c, 0xcd, 0xb4, 0xf0, 0x6b, 0x07, 0x7d, 0x81, 0xc3, 0xc6, 0x21, 0xa2,
|
||||
0x69, 0x83, 0x6e, 0xff, 0xb6, 0xbd, 0xa7, 0xf7, 0x8f, 0x8d, 0xc1, 0x5f, 0x61, 0xdc, 0xb4, 0x1d,
|
||||
0xf9, 0x8d, 0x17, 0x77, 0xde, 0xb7, 0x77, 0xfa, 0xe0, 0x8e, 0x12, 0xa5, 0xcc, 0x86, 0xbd, 0x7b,
|
||||
0x32, 0xf7, 0xa3, 0xda, 0x93, 0xf9, 0x5f, 0x32, 0xef, 0x2f, 0xbe, 0x9f, 0xa5, 0x54, 0x67, 0x9b,
|
||||
0x75, 0x10, 0x17, 0xf9, 0x82, 0xd1, 0x34, 0xd3, 0x9c, 0xf2, 0x94, 0x13, 0xfd, 0xab, 0x90, 0xd7,
|
||||
0x0b, 0xc6, 0x93, 0x85, 0x71, 0x6a, 0x51, 0xa3, 0x59, 0xf7, 0xcc, 0x2f, 0x7f, 0xf1, 0x2f, 0x00,
|
||||
0x00, 0xff, 0xff, 0xc3, 0xb1, 0x8c, 0x5e, 0x28, 0x04, 0x00, 0x00,
|
||||
func file_invoicesrpc_invoices_proto_rawDescGZIP() []byte {
|
||||
file_invoicesrpc_invoices_proto_rawDescOnce.Do(func() {
|
||||
file_invoicesrpc_invoices_proto_rawDescData = protoimpl.X.CompressGZIP(file_invoicesrpc_invoices_proto_rawDescData)
|
||||
})
|
||||
return file_invoicesrpc_invoices_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_invoicesrpc_invoices_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_invoicesrpc_invoices_proto_goTypes = []interface{}{
|
||||
(*CancelInvoiceMsg)(nil), // 0: invoicesrpc.CancelInvoiceMsg
|
||||
(*CancelInvoiceResp)(nil), // 1: invoicesrpc.CancelInvoiceResp
|
||||
(*AddHoldInvoiceRequest)(nil), // 2: invoicesrpc.AddHoldInvoiceRequest
|
||||
(*AddHoldInvoiceResp)(nil), // 3: invoicesrpc.AddHoldInvoiceResp
|
||||
(*SettleInvoiceMsg)(nil), // 4: invoicesrpc.SettleInvoiceMsg
|
||||
(*SettleInvoiceResp)(nil), // 5: invoicesrpc.SettleInvoiceResp
|
||||
(*SubscribeSingleInvoiceRequest)(nil), // 6: invoicesrpc.SubscribeSingleInvoiceRequest
|
||||
(*lnrpc.RouteHint)(nil), // 7: lnrpc.RouteHint
|
||||
(*lnrpc.Invoice)(nil), // 8: lnrpc.Invoice
|
||||
}
|
||||
var file_invoicesrpc_invoices_proto_depIdxs = []int32{
|
||||
7, // 0: invoicesrpc.AddHoldInvoiceRequest.route_hints:type_name -> lnrpc.RouteHint
|
||||
6, // 1: invoicesrpc.Invoices.SubscribeSingleInvoice:input_type -> invoicesrpc.SubscribeSingleInvoiceRequest
|
||||
0, // 2: invoicesrpc.Invoices.CancelInvoice:input_type -> invoicesrpc.CancelInvoiceMsg
|
||||
2, // 3: invoicesrpc.Invoices.AddHoldInvoice:input_type -> invoicesrpc.AddHoldInvoiceRequest
|
||||
4, // 4: invoicesrpc.Invoices.SettleInvoice:input_type -> invoicesrpc.SettleInvoiceMsg
|
||||
8, // 5: invoicesrpc.Invoices.SubscribeSingleInvoice:output_type -> lnrpc.Invoice
|
||||
1, // 6: invoicesrpc.Invoices.CancelInvoice:output_type -> invoicesrpc.CancelInvoiceResp
|
||||
3, // 7: invoicesrpc.Invoices.AddHoldInvoice:output_type -> invoicesrpc.AddHoldInvoiceResp
|
||||
5, // 8: invoicesrpc.Invoices.SettleInvoice:output_type -> invoicesrpc.SettleInvoiceResp
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -469,10 +703,10 @@ type InvoicesClient interface {
|
||||
}
|
||||
|
||||
type invoicesClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewInvoicesClient(cc *grpc.ClientConn) InvoicesClient {
|
||||
func NewInvoicesClient(cc grpc.ClientConnInterface) InvoicesClient {
|
||||
return &invoicesClient{cc}
|
||||
}
|
||||
|
||||
@ -561,16 +795,16 @@ type InvoicesServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -1,91 +1,168 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: lnclipb/lncli.proto
|
||||
|
||||
package lnclipb
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type VersionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The version information for lncli.
|
||||
Lncli *verrpc.Version `protobuf:"bytes,1,opt,name=lncli,proto3" json:"lncli,omitempty"`
|
||||
// The version information for lnd.
|
||||
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:"-"`
|
||||
Lnd *verrpc.Version `protobuf:"bytes,2,opt,name=lnd,proto3" json:"lnd,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VersionResponse) Reset() { *m = VersionResponse{} }
|
||||
func (m *VersionResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VersionResponse) ProtoMessage() {}
|
||||
func (x *VersionResponse) Reset() {
|
||||
*x = VersionResponse{}
|
||||
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) {
|
||||
return fileDescriptor_88b54c9c61b986c4, []int{0}
|
||||
return file_lnclipb_lncli_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *VersionResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VersionResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *VersionResponse) GetLncli() *verrpc.Version {
|
||||
if x != nil {
|
||||
return x.Lncli
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VersionResponse) GetLnd() *verrpc.Version {
|
||||
if m != nil {
|
||||
return m.Lnd
|
||||
func (x *VersionResponse) GetLnd() *verrpc.Version {
|
||||
if x != nil {
|
||||
return x.Lnd
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VersionResponse)(nil), "lnclipb.VersionResponse")
|
||||
var File_lnclipb_lncli_proto protoreflect.FileDescriptor
|
||||
|
||||
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{
|
||||
// 159 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xc9, 0x4b, 0xce,
|
||||
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,
|
||||
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,
|
||||
0x92, 0x73, 0xd2, 0x8f, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5,
|
||||
0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0xc9, 0xcb, 0xcc, 0x4b, 0xcf, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca,
|
||||
0xd6, 0xcf, 0xc9, 0x4b, 0xd1, 0xcf, 0xc9, 0x03, 0x39, 0x09, 0xea, 0xc4, 0x24, 0x36, 0xb0, 0xa3,
|
||||
0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xfc, 0x5e, 0x89, 0xc9, 0x00, 0x00, 0x00,
|
||||
func file_lnclipb_lncli_proto_rawDescGZIP() []byte {
|
||||
file_lnclipb_lncli_proto_rawDescOnce.Do(func() {
|
||||
file_lnclipb_lncli_proto_rawDescData = protoimpl.X.CompressGZIP(file_lnclipb_lncli_proto_rawDescData)
|
||||
})
|
||||
return file_lnclipb_lncli_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_lnclipb_lncli_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_lnclipb_lncli_proto_goTypes = []interface{}{
|
||||
(*VersionResponse)(nil), // 0: lnclipb.VersionResponse
|
||||
(*verrpc.Version)(nil), // 1: verrpc.Version
|
||||
}
|
||||
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
|
||||
- selector: lnrpc.State.SubscribeState
|
||||
get: "/v1/state/subscribe"
|
||||
- selector: lnrpc.State.GetState
|
||||
get: "/v1/state"
|
||||
|
||||
# verrpc/verrpc.proto
|
||||
- selector: verrpc.Versioner.GetVersion
|
||||
|
File diff suppressed because it is too large
Load Diff
22623
lnrpc/rpc.pb.go
22623
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -1,79 +1,96 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: signrpc/signer.proto
|
||||
|
||||
package signrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type KeyLocator struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The family of key being identified.
|
||||
KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
|
||||
// The precise index of the key being identified.
|
||||
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:"-"`
|
||||
KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
|
||||
}
|
||||
|
||||
func (m *KeyLocator) Reset() { *m = KeyLocator{} }
|
||||
func (m *KeyLocator) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyLocator) ProtoMessage() {}
|
||||
func (x *KeyLocator) Reset() {
|
||||
*x = KeyLocator{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{0}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *KeyLocator) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyLocator.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *KeyLocator) GetKeyFamily() int32 {
|
||||
if x != nil {
|
||||
return x.KeyFamily
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *KeyLocator) GetKeyIndex() int32 {
|
||||
if m != nil {
|
||||
return m.KeyIndex
|
||||
func (x *KeyLocator) GetKeyIndex() int32 {
|
||||
if x != nil {
|
||||
return x.KeyIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
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
|
||||
//must be specified.
|
||||
@ -81,101 +98,117 @@ type KeyDescriptor struct {
|
||||
//
|
||||
//The key locator that identifies which key to use for signing. Either this
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
}
|
||||
|
||||
func (m *KeyDescriptor) Reset() { *m = KeyDescriptor{} }
|
||||
func (m *KeyDescriptor) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyDescriptor) ProtoMessage() {}
|
||||
func (x *KeyDescriptor) Reset() {
|
||||
*x = KeyDescriptor{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{1}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *KeyDescriptor) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyDescriptor.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *KeyDescriptor) GetRawKeyBytes() []byte {
|
||||
if x != nil {
|
||||
return x.RawKeyBytes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyDescriptor) GetKeyLoc() *KeyLocator {
|
||||
if m != nil {
|
||||
return m.KeyLoc
|
||||
func (x *KeyDescriptor) GetKeyLoc() *KeyLocator {
|
||||
if x != nil {
|
||||
return x.KeyLoc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TxOut struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The value of the output being spent.
|
||||
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
// The script of the output being spent.
|
||||
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:"-"`
|
||||
PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
|
||||
}
|
||||
|
||||
func (m *TxOut) Reset() { *m = TxOut{} }
|
||||
func (m *TxOut) String() string { return proto.CompactTextString(m) }
|
||||
func (*TxOut) ProtoMessage() {}
|
||||
func (x *TxOut) Reset() {
|
||||
*x = TxOut{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{2}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *TxOut) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TxOut.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *TxOut) GetValue() int64 {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TxOut) GetPkScript() []byte {
|
||||
if m != nil {
|
||||
return m.PkScript
|
||||
func (x *TxOut) GetPkScript() []byte {
|
||||
if x != nil {
|
||||
return x.PkScript
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SignDescriptor struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//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
|
||||
@ -217,359 +250,415 @@ type SignDescriptor struct {
|
||||
Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
|
||||
//
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) Reset() { *m = SignDescriptor{} }
|
||||
func (m *SignDescriptor) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignDescriptor) ProtoMessage() {}
|
||||
func (x *SignDescriptor) Reset() {
|
||||
*x = SignDescriptor{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{3}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignDescriptor.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SignDescriptor) GetKeyDesc() *KeyDescriptor {
|
||||
if x != nil {
|
||||
return x.KeyDesc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetSingleTweak() []byte {
|
||||
if m != nil {
|
||||
return m.SingleTweak
|
||||
func (x *SignDescriptor) GetSingleTweak() []byte {
|
||||
if x != nil {
|
||||
return x.SingleTweak
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetDoubleTweak() []byte {
|
||||
if m != nil {
|
||||
return m.DoubleTweak
|
||||
func (x *SignDescriptor) GetDoubleTweak() []byte {
|
||||
if x != nil {
|
||||
return x.DoubleTweak
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetWitnessScript() []byte {
|
||||
if m != nil {
|
||||
return m.WitnessScript
|
||||
func (x *SignDescriptor) GetWitnessScript() []byte {
|
||||
if x != nil {
|
||||
return x.WitnessScript
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetOutput() *TxOut {
|
||||
if m != nil {
|
||||
return m.Output
|
||||
func (x *SignDescriptor) GetOutput() *TxOut {
|
||||
if x != nil {
|
||||
return x.Output
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetSighash() uint32 {
|
||||
if m != nil {
|
||||
return m.Sighash
|
||||
func (x *SignDescriptor) GetSighash() uint32 {
|
||||
if x != nil {
|
||||
return x.Sighash
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SignDescriptor) GetInputIndex() int32 {
|
||||
if m != nil {
|
||||
return m.InputIndex
|
||||
func (x *SignDescriptor) GetInputIndex() int32 {
|
||||
if x != nil {
|
||||
return x.InputIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SignReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SignReq) Reset() { *m = SignReq{} }
|
||||
func (m *SignReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignReq) ProtoMessage() {}
|
||||
func (x *SignReq) Reset() {
|
||||
*x = SignReq{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{4}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *SignReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignReq.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SignReq) GetRawTxBytes() []byte {
|
||||
if x != nil {
|
||||
return x.RawTxBytes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignReq) GetSignDescs() []*SignDescriptor {
|
||||
if m != nil {
|
||||
return m.SignDescs
|
||||
func (x *SignReq) GetSignDescs() []*SignDescriptor {
|
||||
if x != nil {
|
||||
return x.SignDescs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
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
|
||||
//input order.
|
||||
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:"-"`
|
||||
RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SignResp) Reset() { *m = SignResp{} }
|
||||
func (m *SignResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignResp) ProtoMessage() {}
|
||||
func (x *SignResp) Reset() {
|
||||
*x = SignResp{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{5}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (m *SignResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignResp.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SignResp) GetRawSigs() [][]byte {
|
||||
if x != nil {
|
||||
return x.RawSigs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type InputScript struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The serializes witness stack for the specified input.
|
||||
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 input specified is a nested p2sh witness program.
|
||||
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:"-"`
|
||||
SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
|
||||
}
|
||||
|
||||
func (m *InputScript) Reset() { *m = InputScript{} }
|
||||
func (m *InputScript) String() string { return proto.CompactTextString(m) }
|
||||
func (*InputScript) ProtoMessage() {}
|
||||
func (x *InputScript) Reset() {
|
||||
*x = InputScript{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{6}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *InputScript) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InputScript.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *InputScript) GetWitness() [][]byte {
|
||||
if x != nil {
|
||||
return x.Witness
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InputScript) GetSigScript() []byte {
|
||||
if m != nil {
|
||||
return m.SigScript
|
||||
func (x *InputScript) GetSigScript() []byte {
|
||||
if x != nil {
|
||||
return x.SigScript
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type InputScriptResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The set of fully valid input scripts requested.
|
||||
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:"-"`
|
||||
InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"`
|
||||
}
|
||||
|
||||
func (m *InputScriptResp) Reset() { *m = InputScriptResp{} }
|
||||
func (m *InputScriptResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*InputScriptResp) ProtoMessage() {}
|
||||
func (x *InputScriptResp) Reset() {
|
||||
*x = InputScriptResp{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{7}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (m *InputScriptResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InputScriptResp.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *InputScriptResp) GetInputScripts() []*InputScript {
|
||||
if x != nil {
|
||||
return x.InputScripts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SignMessageReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The message to be signed.
|
||||
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SignMessageReq) Reset() { *m = SignMessageReq{} }
|
||||
func (m *SignMessageReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignMessageReq) ProtoMessage() {}
|
||||
func (x *SignMessageReq) Reset() {
|
||||
*x = SignMessageReq{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{8}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (m *SignMessageReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignMessageReq.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SignMessageReq) GetMsg() []byte {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignMessageReq) GetKeyLoc() *KeyLocator {
|
||||
if m != nil {
|
||||
return m.KeyLoc
|
||||
func (x *SignMessageReq) GetKeyLoc() *KeyLocator {
|
||||
if x != nil {
|
||||
return x.KeyLoc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
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.
|
||||
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SignMessageResp) Reset() { *m = SignMessageResp{} }
|
||||
func (m *SignMessageResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignMessageResp) ProtoMessage() {}
|
||||
func (x *SignMessageResp) Reset() {
|
||||
*x = SignMessageResp{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{9}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (m *SignMessageResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignMessageResp.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SignMessageResp) GetSignature() []byte {
|
||||
if x != nil {
|
||||
return x.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VerifyMessageReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The message over which the signature is to be verified.
|
||||
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
//
|
||||
@ -577,282 +666,603 @@ type VerifyMessageReq struct {
|
||||
//message.
|
||||
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
// The public key the signature has to be valid for.
|
||||
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VerifyMessageReq) Reset() { *m = VerifyMessageReq{} }
|
||||
func (m *VerifyMessageReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*VerifyMessageReq) ProtoMessage() {}
|
||||
func (x *VerifyMessageReq) Reset() {
|
||||
*x = VerifyMessageReq{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{10}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (m *VerifyMessageReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VerifyMessageReq.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *VerifyMessageReq) GetMsg() []byte {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VerifyMessageReq) GetSignature() []byte {
|
||||
if m != nil {
|
||||
return m.Signature
|
||||
func (x *VerifyMessageReq) GetSignature() []byte {
|
||||
if x != nil {
|
||||
return x.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VerifyMessageReq) GetPubkey() []byte {
|
||||
if m != nil {
|
||||
return m.Pubkey
|
||||
func (x *VerifyMessageReq) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VerifyMessageResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Whether the signature was valid over the given message.
|
||||
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VerifyMessageResp) Reset() { *m = VerifyMessageResp{} }
|
||||
func (m *VerifyMessageResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*VerifyMessageResp) ProtoMessage() {}
|
||||
func (x *VerifyMessageResp) Reset() {
|
||||
*x = VerifyMessageResp{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{11}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (m *VerifyMessageResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VerifyMessageResp.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *VerifyMessageResp) GetValid() bool {
|
||||
if x != nil {
|
||||
return x.Valid
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type SharedKeyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
//
|
||||
//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
|
||||
//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
|
||||
//locator or a raw public key is expected, if neither is supplied, defaults to
|
||||
//the node's identity private key.
|
||||
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:"-"`
|
||||
KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SharedKeyRequest) Reset() { *m = SharedKeyRequest{} }
|
||||
func (m *SharedKeyRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SharedKeyRequest) ProtoMessage() {}
|
||||
func (x *SharedKeyRequest) Reset() {
|
||||
*x = SharedKeyRequest{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{12}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (m *SharedKeyRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SharedKeyRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SharedKeyRequest) GetEphemeralPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.EphemeralPubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (m *SharedKeyRequest) GetKeyLoc() *KeyLocator {
|
||||
if m != nil {
|
||||
return m.KeyLoc
|
||||
func (x *SharedKeyRequest) GetKeyLoc() *KeyLocator {
|
||||
if x != nil {
|
||||
return x.KeyLoc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SharedKeyRequest) GetKeyDesc() *KeyDescriptor {
|
||||
if m != nil {
|
||||
return m.KeyDesc
|
||||
func (x *SharedKeyRequest) GetKeyDesc() *KeyDescriptor {
|
||||
if x != nil {
|
||||
return x.KeyDesc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SharedKeyResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The shared public key, hashed with sha256.
|
||||
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:"-"`
|
||||
SharedKey []byte `protobuf:"bytes,1,opt,name=shared_key,json=sharedKey,proto3" json:"shared_key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SharedKeyResponse) Reset() { *m = SharedKeyResponse{} }
|
||||
func (m *SharedKeyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SharedKeyResponse) ProtoMessage() {}
|
||||
func (x *SharedKeyResponse) Reset() {
|
||||
*x = SharedKeyResponse{}
|
||||
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) {
|
||||
return fileDescriptor_4ecd772f6c7ffacf, []int{13}
|
||||
return file_signrpc_signer_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (m *SharedKeyResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SharedKeyResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SharedKeyResponse) GetSharedKey() []byte {
|
||||
if x != nil {
|
||||
return x.SharedKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*KeyLocator)(nil), "signrpc.KeyLocator")
|
||||
proto.RegisterType((*KeyDescriptor)(nil), "signrpc.KeyDescriptor")
|
||||
proto.RegisterType((*TxOut)(nil), "signrpc.TxOut")
|
||||
proto.RegisterType((*SignDescriptor)(nil), "signrpc.SignDescriptor")
|
||||
proto.RegisterType((*SignReq)(nil), "signrpc.SignReq")
|
||||
proto.RegisterType((*SignResp)(nil), "signrpc.SignResp")
|
||||
proto.RegisterType((*InputScript)(nil), "signrpc.InputScript")
|
||||
proto.RegisterType((*InputScriptResp)(nil), "signrpc.InputScriptResp")
|
||||
proto.RegisterType((*SignMessageReq)(nil), "signrpc.SignMessageReq")
|
||||
proto.RegisterType((*SignMessageResp)(nil), "signrpc.SignMessageResp")
|
||||
proto.RegisterType((*VerifyMessageReq)(nil), "signrpc.VerifyMessageReq")
|
||||
proto.RegisterType((*VerifyMessageResp)(nil), "signrpc.VerifyMessageResp")
|
||||
proto.RegisterType((*SharedKeyRequest)(nil), "signrpc.SharedKeyRequest")
|
||||
proto.RegisterType((*SharedKeyResponse)(nil), "signrpc.SharedKeyResponse")
|
||||
var File_signrpc_signer_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_signrpc_signer_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x22,
|
||||
0x48, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x61, 0x0a, 0x0d, 0x4b, 0x65, 0x79,
|
||||
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x61,
|
||||
0x77, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 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, 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{
|
||||
// 775 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xed, 0x8e, 0xdb, 0x44,
|
||||
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,
|
||||
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,
|
||||
0xca, 0x78, 0x2e, 0x73, 0x32, 0xb0, 0xa8, 0xf7, 0x1c, 0x60, 0x81, 0xd5, 0xcb, 0x3c, 0x0a, 0x65,
|
||||
0xce, 0xc9, 0xe7, 0x00, 0x09, 0x56, 0xc1, 0xdb, 0x70, 0x4b, 0xd3, 0xca, 0xed, 0x5c, 0x77, 0x6e,
|
||||
0x4e, 0xfc, 0xd3, 0x04, 0xab, 0x3b, 0x0d, 0x90, 0x4f, 0x41, 0x15, 0x01, 0xcd, 0xd6, 0xb8, 0x73,
|
||||
0xbb, 0xfa, 0xed, 0x30, 0xc1, 0xea, 0x85, 0xaa, 0xbd, 0x10, 0xc6, 0x0b, 0xac, 0x9e, 0xa1, 0x88,
|
||||
0x38, 0x65, 0x8a, 0xcc, 0x83, 0x31, 0x0f, 0xcb, 0x40, 0x9d, 0x58, 0x55, 0x12, 0x85, 0xe6, 0x1b,
|
||||
0xf9, 0x0e, 0x0f, 0xcb, 0x05, 0x56, 0xb7, 0x0a, 0x22, 0x5f, 0xc3, 0x40, 0xbd, 0x4f, 0xf3, 0x48,
|
||||
0xf3, 0x39, 0xf3, 0x8f, 0xa7, 0x56, 0xd9, 0xf4, 0x20, 0xcb, 0xef, 0x27, 0xfa, 0xd9, 0xfb, 0x19,
|
||||
0x4e, 0xee, 0x77, 0xaf, 0x0a, 0x49, 0x2e, 0xe1, 0xe4, 0x5d, 0x98, 0x16, 0xa8, 0x29, 0x7b, 0xbe,
|
||||
0x29, 0x94, 0x3c, 0x96, 0x04, 0x66, 0xbe, 0xa6, 0x1b, 0xf9, 0x43, 0x96, 0x2c, 0x75, 0xed, 0xfd,
|
||||
0xd1, 0x85, 0xb3, 0x25, 0x8d, 0xb3, 0x86, 0xc0, 0xef, 0x40, 0xa9, 0x0f, 0xd6, 0x28, 0x22, 0x4d,
|
||||
0xe4, 0xcc, 0x1f, 0x35, 0xa7, 0x1f, 0x3a, 0x7d, 0x25, 0x52, 0x95, 0xe4, 0x4b, 0x18, 0x09, 0x9a,
|
||||
0xc5, 0x29, 0x06, 0xb2, 0xc4, 0x30, 0xb1, 0x53, 0x1c, 0x83, 0xdd, 0x2b, 0x48, 0xb5, 0xac, 0xf3,
|
||||
0x62, 0x55, 0xb7, 0xf4, 0x4c, 0x8b, 0xc1, 0x4c, 0xcb, 0x13, 0x38, 0x2b, 0xa9, 0xcc, 0x50, 0x88,
|
||||
0xbd, 0xda, 0x8f, 0x74, 0xd3, 0xd8, 0xa2, 0x46, 0x32, 0xf9, 0x0a, 0xfa, 0x79, 0x21, 0x59, 0x21,
|
||||
0xdd, 0x13, 0xad, 0xee, 0xac, 0x56, 0xa7, 0x5d, 0xf0, 0xed, 0x5b, 0xe2, 0x82, 0x8a, 0x73, 0x13,
|
||||
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,
|
||||
0xc3, 0x48, 0xc5, 0x25, 0x77, 0xad, 0xb4, 0x80, 0x87, 0xe5, 0xfd, 0xce, 0x84, 0xf5, 0x23, 0x80,
|
||||
0x12, 0xa0, 0x0d, 0x13, 0x6e, 0xf7, 0xba, 0x77, 0xe3, 0xcc, 0x3f, 0xa9, 0x35, 0xb5, 0xcd, 0xf5,
|
||||
0x4f, 0x85, 0xad, 0x85, 0xf7, 0x04, 0x86, 0x66, 0x88, 0x60, 0xe4, 0x31, 0x0c, 0xd5, 0x14, 0x41,
|
||||
0x63, 0x35, 0xa1, 0x77, 0x33, 0xf2, 0x07, 0x3c, 0x2c, 0x97, 0x34, 0x16, 0xde, 0x1d, 0x38, 0x2f,
|
||||
0x94, 0x32, 0xfb, 0xdf, 0xbb, 0x30, 0xb0, 0x76, 0xec, 0x1b, 0x6d, 0xa9, 0xb6, 0x54, 0xd0, 0xb8,
|
||||
0x1d, 0xb4, 0x1a, 0x67, 0x93, 0x7e, 0x09, 0xe7, 0x0d, 0x1e, 0x3d, 0xf5, 0x27, 0x18, 0x1b, 0x1f,
|
||||
0xcc, 0x19, 0xc3, 0xe8, 0xcc, 0x2f, 0x6b, 0xf1, 0xcd, 0x03, 0x23, 0x7a, 0x28, 0x84, 0xf7, 0xda,
|
||||
0xac, 0xcd, 0x6f, 0x28, 0x44, 0x18, 0xa3, 0x32, 0x6a, 0x02, 0xbd, 0xad, 0x88, 0xad, 0x3f, 0xea,
|
||||
0xf1, 0x7f, 0x6e, 0xf1, 0x0c, 0xce, 0x5b, 0x8c, 0x82, 0x91, 0xcf, 0x40, 0xdb, 0x15, 0xca, 0x82,
|
||||
0xa3, 0x25, 0x3e, 0x00, 0xde, 0x1b, 0x98, 0xfc, 0x8e, 0x9c, 0xbe, 0xad, 0xfe, 0x53, 0x44, 0x8b,
|
||||
0xa3, 0x7b, 0xc4, 0x41, 0x1e, 0x41, 0x9f, 0x15, 0xab, 0x04, 0x2b, 0xbb, 0x8f, 0xb6, 0xf2, 0x9e,
|
||||
0xc2, 0xc5, 0x11, 0xb7, 0x60, 0xf6, 0x7a, 0xd1, 0xb5, 0xa6, 0x1f, 0xfa, 0xa6, 0xf0, 0xfe, 0xec,
|
||||
0xc0, 0x64, 0xb9, 0x09, 0x39, 0xae, 0x17, 0x58, 0xf9, 0xf8, 0x50, 0xa0, 0x90, 0xe4, 0x29, 0x4c,
|
||||
0x90, 0x6d, 0x70, 0x8b, 0x3c, 0x4c, 0x03, 0x3b, 0xc1, 0x88, 0x3a, 0xaf, 0xf1, 0xd7, 0x1a, 0x26,
|
||||
0xdf, 0x7e, 0x88, 0x4b, 0xb7, 0x5d, 0xb7, 0xb3, 0x77, 0xaa, 0x75, 0x41, 0x7b, 0x1f, 0x74, 0x41,
|
||||
0xbd, 0x39, 0x5c, 0x34, 0x34, 0x0a, 0x96, 0x67, 0x02, 0xf5, 0xc2, 0x68, 0x30, 0x38, 0xc8, 0x3b,
|
||||
0x15, 0xfb, 0xb6, 0xf9, 0x5f, 0x5d, 0xe8, 0x2f, 0xf5, 0xaf, 0x23, 0xf9, 0x01, 0xc6, 0xea, 0xe9,
|
||||
0x95, 0xbe, 0x58, 0x7e, 0x58, 0x92, 0x49, 0x6b, 0xbf, 0x7d, 0x7c, 0xb8, 0xba, 0x38, 0x42, 0x04,
|
||||
0x23, 0xbf, 0x00, 0xf9, 0x35, 0xdf, 0xb2, 0x42, 0x62, 0x73, 0x81, 0xdf, 0x3f, 0xea, 0xfe, 0xe3,
|
||||
0xbe, 0x19, 0x06, 0xa7, 0xb1, 0x13, 0xa4, 0x7d, 0xab, 0x0e, 0xb1, 0x37, 0x18, 0x8e, 0x57, 0xe8,
|
||||
0x0e, 0xc6, 0xad, 0x20, 0xc9, 0xe3, 0xba, 0xf5, 0x78, 0x79, 0xae, 0xae, 0xfe, 0xed, 0x95, 0x60,
|
||||
0xe4, 0x39, 0x9c, 0x3f, 0x43, 0x4e, 0xdf, 0x61, 0x6d, 0x63, 0x83, 0xe9, 0x38, 0xfe, 0x06, 0xd3,
|
||||
0x7b, 0xae, 0xdf, 0xce, 0xde, 0x7c, 0x13, 0x53, 0xb9, 0x29, 0x56, 0xd3, 0x28, 0xdf, 0xce, 0x52,
|
||||
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 file_signrpc_signer_proto_rawDescGZIP() []byte {
|
||||
file_signrpc_signer_proto_rawDescOnce.Do(func() {
|
||||
file_signrpc_signer_proto_rawDescData = protoimpl.X.CompressGZIP(file_signrpc_signer_proto_rawDescData)
|
||||
})
|
||||
return file_signrpc_signer_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_signrpc_signer_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_signrpc_signer_proto_goTypes = []interface{}{
|
||||
(*KeyLocator)(nil), // 0: signrpc.KeyLocator
|
||||
(*KeyDescriptor)(nil), // 1: signrpc.KeyDescriptor
|
||||
(*TxOut)(nil), // 2: signrpc.TxOut
|
||||
(*SignDescriptor)(nil), // 3: signrpc.SignDescriptor
|
||||
(*SignReq)(nil), // 4: signrpc.SignReq
|
||||
(*SignResp)(nil), // 5: signrpc.SignResp
|
||||
(*InputScript)(nil), // 6: signrpc.InputScript
|
||||
(*InputScriptResp)(nil), // 7: signrpc.InputScriptResp
|
||||
(*SignMessageReq)(nil), // 8: signrpc.SignMessageReq
|
||||
(*SignMessageResp)(nil), // 9: signrpc.SignMessageResp
|
||||
(*VerifyMessageReq)(nil), // 10: signrpc.VerifyMessageReq
|
||||
(*VerifyMessageResp)(nil), // 11: signrpc.VerifyMessageResp
|
||||
(*SharedKeyRequest)(nil), // 12: signrpc.SharedKeyRequest
|
||||
(*SharedKeyResponse)(nil), // 13: signrpc.SharedKeyResponse
|
||||
}
|
||||
var file_signrpc_signer_proto_depIdxs = []int32{
|
||||
0, // 0: signrpc.KeyDescriptor.key_loc:type_name -> signrpc.KeyLocator
|
||||
1, // 1: signrpc.SignDescriptor.key_desc:type_name -> signrpc.KeyDescriptor
|
||||
2, // 2: signrpc.SignDescriptor.output:type_name -> signrpc.TxOut
|
||||
3, // 3: signrpc.SignReq.sign_descs:type_name -> signrpc.SignDescriptor
|
||||
6, // 4: signrpc.InputScriptResp.input_scripts:type_name -> signrpc.InputScript
|
||||
0, // 5: signrpc.SignMessageReq.key_loc:type_name -> signrpc.KeyLocator
|
||||
0, // 6: signrpc.SharedKeyRequest.key_loc:type_name -> signrpc.KeyLocator
|
||||
1, // 7: signrpc.SharedKeyRequest.key_desc:type_name -> signrpc.KeyDescriptor
|
||||
4, // 8: signrpc.Signer.SignOutputRaw:input_type -> signrpc.SignReq
|
||||
4, // 9: signrpc.Signer.ComputeInputScript:input_type -> signrpc.SignReq
|
||||
8, // 10: signrpc.Signer.SignMessage:input_type -> signrpc.SignMessageReq
|
||||
10, // 11: signrpc.Signer.VerifyMessage:input_type -> signrpc.VerifyMessageReq
|
||||
12, // 12: signrpc.Signer.DeriveSharedKey:input_type -> signrpc.SharedKeyRequest
|
||||
5, // 13: signrpc.Signer.SignOutputRaw:output_type -> signrpc.SignResp
|
||||
7, // 14: signrpc.Signer.ComputeInputScript:output_type -> signrpc.InputScriptResp
|
||||
9, // 15: signrpc.Signer.SignMessage:output_type -> signrpc.SignMessageResp
|
||||
11, // 16: signrpc.Signer.VerifyMessage:output_type -> signrpc.VerifyMessageResp
|
||||
13, // 17: signrpc.Signer.DeriveSharedKey:output_type -> signrpc.SharedKeyResponse
|
||||
13, // [13:18] is the sub-list for method output_type
|
||||
8, // [8:13] is the sub-list for method input_type
|
||||
8, // [8:8] is the sub-list for extension type_name
|
||||
8, // [8:8] is the sub-list for extension extendee
|
||||
0, // [0:8] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -907,10 +1317,10 @@ type SignerClient interface {
|
||||
}
|
||||
|
||||
type signerClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSignerClient(cc *grpc.ClientConn) SignerClient {
|
||||
func NewSignerClient(cc grpc.ClientConnInterface) SignerClient {
|
||||
return &signerClient{cc}
|
||||
}
|
||||
|
||||
@ -1013,19 +1423,19 @@ type SignerServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -1,165 +1,414 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: stateservice.proto
|
||||
|
||||
package lnrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type WalletState int32
|
||||
|
||||
const (
|
||||
WalletState_NON_EXISTING WalletState = 0
|
||||
WalletState_LOCKED WalletState = 1
|
||||
WalletState_UNLOCKED WalletState = 2
|
||||
WalletState_RPC_ACTIVE WalletState = 3
|
||||
WalletState_NON_EXISTING WalletState = 0
|
||||
WalletState_LOCKED WalletState = 1
|
||||
WalletState_UNLOCKED WalletState = 2
|
||||
WalletState_RPC_ACTIVE WalletState = 3
|
||||
WalletState_WAITING_TO_START WalletState = 255
|
||||
)
|
||||
|
||||
var WalletState_name = map[int32]string{
|
||||
0: "NON_EXISTING",
|
||||
1: "LOCKED",
|
||||
2: "UNLOCKED",
|
||||
3: "RPC_ACTIVE",
|
||||
}
|
||||
// Enum value maps for WalletState.
|
||||
var (
|
||||
WalletState_name = map[int32]string{
|
||||
0: "NON_EXISTING",
|
||||
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{
|
||||
"NON_EXISTING": 0,
|
||||
"LOCKED": 1,
|
||||
"UNLOCKED": 2,
|
||||
"RPC_ACTIVE": 3,
|
||||
func (x WalletState) Enum() *WalletState {
|
||||
p := new(WalletState)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
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) {
|
||||
return fileDescriptor_9cd64a11048f05dd, []int{0}
|
||||
return file_stateservice_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type SubscribeStateRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *SubscribeStateRequest) Reset() { *m = SubscribeStateRequest{} }
|
||||
func (m *SubscribeStateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubscribeStateRequest) ProtoMessage() {}
|
||||
func (x *SubscribeStateRequest) Reset() {
|
||||
*x = SubscribeStateRequest{}
|
||||
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) {
|
||||
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 {
|
||||
State WalletState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.WalletState" json:"state,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
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 (m *SubscribeStateResponse) Reset() { *m = SubscribeStateResponse{} }
|
||||
func (m *SubscribeStateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubscribeStateResponse) ProtoMessage() {}
|
||||
func (x *SubscribeStateResponse) Reset() {
|
||||
*x = SubscribeStateResponse{}
|
||||
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) {
|
||||
return fileDescriptor_9cd64a11048f05dd, []int{1}
|
||||
return file_stateservice_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *SubscribeStateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SubscribeStateResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *SubscribeStateResponse) GetState() WalletState {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return WalletState_NON_EXISTING
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("lnrpc.WalletState", WalletState_name, WalletState_value)
|
||||
proto.RegisterType((*SubscribeStateRequest)(nil), "lnrpc.SubscribeStateRequest")
|
||||
proto.RegisterType((*SubscribeStateResponse)(nil), "lnrpc.SubscribeStateResponse")
|
||||
type GetStateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
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{
|
||||
// 245 bytes of a gzipped FileDescriptorProto
|
||||
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,
|
||||
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,
|
||||
0xa8, 0xc0, 0xa8, 0xc1, 0x67, 0x24, 0xa4, 0x07, 0x36, 0x49, 0x2f, 0x3c, 0x31, 0x27, 0x27, 0xb5,
|
||||
0x04, 0xa2, 0x14, 0xa2, 0x40, 0xcb, 0x93, 0x8b, 0x1b, 0x49, 0x54, 0x48, 0x80, 0x8b, 0xc7, 0xcf,
|
||||
0xdf, 0x2f, 0xde, 0x35, 0xc2, 0x33, 0x38, 0xc4, 0xd3, 0xcf, 0x5d, 0x80, 0x41, 0x88, 0x8b, 0x8b,
|
||||
0xcd, 0xc7, 0xdf, 0xd9, 0xdb, 0xd5, 0x45, 0x80, 0x51, 0x88, 0x87, 0x8b, 0x23, 0xd4, 0x0f, 0xca,
|
||||
0x63, 0x12, 0xe2, 0xe3, 0xe2, 0x0a, 0x0a, 0x70, 0x8e, 0x77, 0x74, 0x0e, 0xf1, 0x0c, 0x73, 0x15,
|
||||
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,
|
||||
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,
|
||||
0x60, 0x13, 0x92, 0xd8, 0xc0, 0x01, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x75, 0x6a, 0x2f,
|
||||
0xe2, 0x4e, 0x01, 0x00, 0x00,
|
||||
func (x *GetStateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetStateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetStateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stateservice_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 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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -168,13 +417,16 @@ type StateClient interface {
|
||||
// SubscribeState subscribes to the state of the wallet. The current wallet
|
||||
// state will always be delivered immediately.
|
||||
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 {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewStateClient(cc *grpc.ClientConn) StateClient {
|
||||
func NewStateClient(cc grpc.ClientConnInterface) StateClient {
|
||||
return &stateClient{cc}
|
||||
}
|
||||
|
||||
@ -210,20 +462,35 @@ func (x *stateSubscribeStateClient) Recv() (*SubscribeStateResponse, error) {
|
||||
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.
|
||||
type StateServer interface {
|
||||
// SubscribeState subscribes to the state of the wallet. The current wallet
|
||||
// state will always be delivered immediately.
|
||||
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.
|
||||
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")
|
||||
}
|
||||
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) {
|
||||
s.RegisterService(&_State_serviceDesc, srv)
|
||||
@ -250,10 +517,33 @@ func (x *stateSubscribeStateServer) Send(m *SubscribeStateResponse) error {
|
||||
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{
|
||||
ServiceName: "lnrpc.State",
|
||||
HandlerType: (*StateServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetState",
|
||||
Handler: _State_GetState_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
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".
|
||||
// UnaryRPC :call StateServer directly.
|
||||
// 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
|
||||
})
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
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_GetState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "state"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_State_SubscribeState_0 = runtime.ForwardResponseStream
|
||||
|
||||
forward_State_GetState_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
@ -29,6 +29,10 @@ service State {
|
||||
// state will always be delivered immediately.
|
||||
rpc SubscribeState (SubscribeStateRequest)
|
||||
returns (stream SubscribeStateResponse);
|
||||
|
||||
// GetState returns the current wallet state without streaming further
|
||||
// changes.
|
||||
rpc GetState (GetStateRequest) returns (GetStateResponse);
|
||||
}
|
||||
|
||||
enum WalletState {
|
||||
@ -36,6 +40,8 @@ enum WalletState {
|
||||
LOCKED = 1;
|
||||
UNLOCKED = 2;
|
||||
RPC_ACTIVE = 3;
|
||||
|
||||
WAITING_TO_START = 255;
|
||||
}
|
||||
|
||||
message SubscribeStateRequest {
|
||||
@ -44,3 +50,10 @@ message SubscribeStateRequest {
|
||||
message SubscribeStateResponse {
|
||||
WalletState state = 1;
|
||||
}
|
||||
|
||||
message GetStateRequest {
|
||||
}
|
||||
|
||||
message GetStateResponse {
|
||||
WalletState State = 1;
|
||||
}
|
||||
|
@ -11,6 +11,29 @@
|
||||
"application/json"
|
||||
],
|
||||
"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": {
|
||||
"get": {
|
||||
"summary": "SubscribeState subscribes to the state of the wallet. The current wallet\nstate will always be delivered immediately.",
|
||||
@ -45,6 +68,14 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"lnrpcGetStateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"State": {
|
||||
"$ref": "#/definitions/lnrpcWalletState"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcSubscribeStateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -59,7 +90,8 @@
|
||||
"NON_EXISTING",
|
||||
"LOCKED",
|
||||
"UNLOCKED",
|
||||
"RPC_ACTIVE"
|
||||
"RPC_ACTIVE",
|
||||
"WAITING_TO_START"
|
||||
],
|
||||
"default": "NON_EXISTING"
|
||||
},
|
||||
|
@ -1,61 +1,77 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: verrpc/verrpc.proto
|
||||
|
||||
package verrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type VersionRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *VersionRequest) Reset() { *m = VersionRequest{} }
|
||||
func (m *VersionRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VersionRequest) ProtoMessage() {}
|
||||
func (x *VersionRequest) Reset() {
|
||||
*x = VersionRequest{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// A verbose description of the daemon's commit.
|
||||
Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"`
|
||||
// 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.
|
||||
BuildTags []string `protobuf:"bytes,8,rep,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"`
|
||||
// The version of go that compiled the executable.
|
||||
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:"-"`
|
||||
GoVersion string `protobuf:"bytes,9,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Version) Reset() { *m = Version{} }
|
||||
func (m *Version) String() string { return proto.CompactTextString(m) }
|
||||
func (*Version) ProtoMessage() {}
|
||||
func (x *Version) Reset() {
|
||||
*x = Version{}
|
||||
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) {
|
||||
return fileDescriptor_494312204cefa0e6, []int{1}
|
||||
return file_verrpc_verrpc_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *Version) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Version.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *Version) GetCommit() string {
|
||||
if x != nil {
|
||||
return x.Commit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Version) GetCommitHash() string {
|
||||
if m != nil {
|
||||
return m.CommitHash
|
||||
func (x *Version) GetCommitHash() string {
|
||||
if x != nil {
|
||||
return x.CommitHash
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Version) GetVersion() string {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
func (x *Version) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Version) GetAppMajor() uint32 {
|
||||
if m != nil {
|
||||
return m.AppMajor
|
||||
func (x *Version) GetAppMajor() uint32 {
|
||||
if x != nil {
|
||||
return x.AppMajor
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Version) GetAppMinor() uint32 {
|
||||
if m != nil {
|
||||
return m.AppMinor
|
||||
func (x *Version) GetAppMinor() uint32 {
|
||||
if x != nil {
|
||||
return x.AppMinor
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Version) GetAppPatch() uint32 {
|
||||
if m != nil {
|
||||
return m.AppPatch
|
||||
func (x *Version) GetAppPatch() uint32 {
|
||||
if x != nil {
|
||||
return x.AppPatch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Version) GetAppPreRelease() string {
|
||||
if m != nil {
|
||||
return m.AppPreRelease
|
||||
func (x *Version) GetAppPreRelease() string {
|
||||
if x != nil {
|
||||
return x.AppPreRelease
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Version) GetBuildTags() []string {
|
||||
if m != nil {
|
||||
return m.BuildTags
|
||||
func (x *Version) GetBuildTags() []string {
|
||||
if x != nil {
|
||||
return x.BuildTags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Version) GetGoVersion() string {
|
||||
if m != nil {
|
||||
return m.GoVersion
|
||||
func (x *Version) GetGoVersion() string {
|
||||
if x != nil {
|
||||
return x.GoVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VersionRequest)(nil), "verrpc.VersionRequest")
|
||||
proto.RegisterType((*Version)(nil), "verrpc.Version")
|
||||
var File_verrpc_verrpc_proto protoreflect.FileDescriptor
|
||||
|
||||
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{
|
||||
// 300 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x51, 0x4b, 0xf3, 0x30,
|
||||
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,
|
||||
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,
|
||||
0x8b, 0xef, 0x21, 0x8c, 0xbb, 0x88, 0x9e, 0x41, 0x52, 0xea, 0xa6, 0x91, 0x9e, 0x0d, 0xe6, 0x83,
|
||||
0x25, 0xc9, 0x3b, 0xa2, 0x57, 0x70, 0x14, 0xa7, 0xa2, 0xe2, 0xae, 0x62, 0xc3, 0x20, 0x21, 0x46,
|
||||
0x8f, 0xdc, 0x55, 0x94, 0xc1, 0x78, 0x17, 0x77, 0xb0, 0x51, 0x90, 0x7b, 0xa4, 0x17, 0x40, 0xb8,
|
||||
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,
|
||||
0x7c, 0x6e, 0x99, 0x5e, 0xc3, 0x2c, 0x48, 0x8b, 0x85, 0xc5, 0x1a, 0xb9, 0x43, 0x36, 0x0e, 0x1f,
|
||||
0x9e, 0xb6, 0xaf, 0x58, 0xcc, 0x63, 0x48, 0x2f, 0x01, 0xd6, 0x5b, 0x59, 0x6f, 0x0a, 0xcf, 0x85,
|
||||
0x63, 0x93, 0xf9, 0x68, 0x49, 0x72, 0x12, 0x92, 0x17, 0x2e, 0x5c, 0xab, 0x85, 0x2e, 0xf6, 0xbf,
|
||||
0x4e, 0xc2, 0x06, 0x22, 0x74, 0xd7, 0xc7, 0xed, 0x0a, 0x48, 0x37, 0xa2, 0xa5, 0xf7, 0x00, 0x0f,
|
||||
0xe8, 0xfb, 0xaa, 0xd2, 0xae, 0xdf, 0xdf, 0x75, 0x9e, 0xcf, 0xfe, 0xe4, 0xab, 0xf4, 0xed, 0x46,
|
||||
0x48, 0x5f, 0x6d, 0xd7, 0x69, 0xa9, 0x9b, 0xac, 0x96, 0xa2, 0xf2, 0x4a, 0x2a, 0xa1, 0xd0, 0x7f,
|
||||
0x69, 0xfb, 0x91, 0xd5, 0x6a, 0x93, 0xd5, 0xea, 0x70, 0xaf, 0x75, 0x12, 0x0e, 0x76, 0xf7, 0x13,
|
||||
0x00, 0x00, 0xff, 0xff, 0x00, 0x3d, 0xb5, 0x81, 0xc7, 0x01, 0x00, 0x00,
|
||||
func file_verrpc_verrpc_proto_rawDescGZIP() []byte {
|
||||
file_verrpc_verrpc_proto_rawDescOnce.Do(func() {
|
||||
file_verrpc_verrpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_verrpc_verrpc_proto_rawDescData)
|
||||
})
|
||||
return file_verrpc_verrpc_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_verrpc_verrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_verrpc_verrpc_proto_goTypes = []interface{}{
|
||||
(*VersionRequest)(nil), // 0: verrpc.VersionRequest
|
||||
(*Version)(nil), // 1: verrpc.Version
|
||||
}
|
||||
var file_verrpc_verrpc_proto_depIdxs = []int32{
|
||||
0, // 0: verrpc.Versioner.GetVersion:input_type -> verrpc.VersionRequest
|
||||
1, // 1: verrpc.Versioner.GetVersion:output_type -> verrpc.Version
|
||||
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_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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -216,10 +318,10 @@ type VersionerClient interface {
|
||||
}
|
||||
|
||||
type versionerClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewVersionerClient(cc *grpc.ClientConn) VersionerClient {
|
||||
func NewVersionerClient(cc grpc.ClientConnInterface) VersionerClient {
|
||||
return &versionerClient{cc}
|
||||
}
|
||||
|
||||
@ -244,7 +346,7 @@ type VersionerServer interface {
|
||||
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")
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,39 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: walletunlocker.proto
|
||||
|
||||
package lnrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type GenSeedRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
//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
|
||||
//specified, then a fresh set of randomness will be used to create the seed.
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GenSeedRequest) Reset() { *m = GenSeedRequest{} }
|
||||
func (m *GenSeedRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenSeedRequest) ProtoMessage() {}
|
||||
func (x *GenSeedRequest) Reset() {
|
||||
*x = GenSeedRequest{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{0}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *GenSeedRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GenSeedRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *GenSeedRequest) GetAezeedPassphrase() []byte {
|
||||
if x != nil {
|
||||
return x.AezeedPassphrase
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GenSeedRequest) GetSeedEntropy() []byte {
|
||||
if m != nil {
|
||||
return m.SeedEntropy
|
||||
func (x *GenSeedRequest) GetSeedEntropy() []byte {
|
||||
if x != nil {
|
||||
return x.SeedEntropy
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
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 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
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GenSeedResponse) Reset() { *m = GenSeedResponse{} }
|
||||
func (m *GenSeedResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenSeedResponse) ProtoMessage() {}
|
||||
func (x *GenSeedResponse) Reset() {
|
||||
*x = GenSeedResponse{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{1}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *GenSeedResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GenSeedResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *GenSeedResponse) GetCipherSeedMnemonic() []string {
|
||||
if x != nil {
|
||||
return x.CipherSeedMnemonic
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GenSeedResponse) GetEncipheredSeed() []byte {
|
||||
if m != nil {
|
||||
return m.EncipheredSeed
|
||||
func (x *GenSeedResponse) GetEncipheredSeed() []byte {
|
||||
if x != nil {
|
||||
return x.EncipheredSeed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
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. 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
|
||||
//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!
|
||||
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:"-"`
|
||||
StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) Reset() { *m = InitWalletRequest{} }
|
||||
func (m *InitWalletRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*InitWalletRequest) ProtoMessage() {}
|
||||
func (x *InitWalletRequest) Reset() {
|
||||
*x = InitWalletRequest{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{2}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InitWalletRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *InitWalletRequest) GetWalletPassword() []byte {
|
||||
if x != nil {
|
||||
return x.WalletPassword
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) GetCipherSeedMnemonic() []string {
|
||||
if m != nil {
|
||||
return m.CipherSeedMnemonic
|
||||
func (x *InitWalletRequest) GetCipherSeedMnemonic() []string {
|
||||
if x != nil {
|
||||
return x.CipherSeedMnemonic
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) GetAezeedPassphrase() []byte {
|
||||
if m != nil {
|
||||
return m.AezeedPassphrase
|
||||
func (x *InitWalletRequest) GetAezeedPassphrase() []byte {
|
||||
if x != nil {
|
||||
return x.AezeedPassphrase
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) GetRecoveryWindow() int32 {
|
||||
if m != nil {
|
||||
return m.RecoveryWindow
|
||||
func (x *InitWalletRequest) GetRecoveryWindow() int32 {
|
||||
if x != nil {
|
||||
return x.RecoveryWindow
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
|
||||
if m != nil {
|
||||
return m.ChannelBackups
|
||||
func (x *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
|
||||
if x != nil {
|
||||
return x.ChannelBackups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InitWalletRequest) GetStatelessInit() bool {
|
||||
if m != nil {
|
||||
return m.StatelessInit
|
||||
func (x *InitWalletRequest) GetStatelessInit() bool {
|
||||
if x != nil {
|
||||
return x.StatelessInit
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
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
|
||||
//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
|
||||
//caller. Otherwise a copy of this macaroon is also persisted on 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
|
||||
}
|
||||
|
||||
func (m *InitWalletResponse) Reset() { *m = InitWalletResponse{} }
|
||||
func (m *InitWalletResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*InitWalletResponse) ProtoMessage() {}
|
||||
func (x *InitWalletResponse) Reset() {
|
||||
*x = InitWalletResponse{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{3}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (m *InitWalletResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InitWalletResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *InitWalletResponse) GetAdminMacaroon() []byte {
|
||||
if x != nil {
|
||||
return x.AdminMacaroon
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UnlockWalletRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//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
|
||||
@ -314,97 +355,112 @@ type UnlockWalletRequest struct {
|
||||
//
|
||||
//stateless_init is an optional argument instructing the daemon NOT to create
|
||||
//any *.macaroon files in its file system.
|
||||
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:"-"`
|
||||
StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
|
||||
}
|
||||
|
||||
func (m *UnlockWalletRequest) Reset() { *m = UnlockWalletRequest{} }
|
||||
func (m *UnlockWalletRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*UnlockWalletRequest) ProtoMessage() {}
|
||||
func (x *UnlockWalletRequest) Reset() {
|
||||
*x = UnlockWalletRequest{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{4}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *UnlockWalletRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UnlockWalletRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *UnlockWalletRequest) GetWalletPassword() []byte {
|
||||
if x != nil {
|
||||
return x.WalletPassword
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UnlockWalletRequest) GetRecoveryWindow() int32 {
|
||||
if m != nil {
|
||||
return m.RecoveryWindow
|
||||
func (x *UnlockWalletRequest) GetRecoveryWindow() int32 {
|
||||
if x != nil {
|
||||
return x.RecoveryWindow
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
|
||||
if m != nil {
|
||||
return m.ChannelBackups
|
||||
func (x *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
|
||||
if x != nil {
|
||||
return x.ChannelBackups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UnlockWalletRequest) GetStatelessInit() bool {
|
||||
if m != nil {
|
||||
return m.StatelessInit
|
||||
func (x *UnlockWalletRequest) GetStatelessInit() bool {
|
||||
if x != nil {
|
||||
return x.StatelessInit
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type UnlockWalletResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *UnlockWalletResponse) Reset() { *m = UnlockWalletResponse{} }
|
||||
func (m *UnlockWalletResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*UnlockWalletResponse) ProtoMessage() {}
|
||||
func (x *UnlockWalletResponse) Reset() {
|
||||
*x = UnlockWalletResponse{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//current_password should be the current valid passphrase used to unlock the
|
||||
//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
|
||||
//rotate the macaroon root key when set to true. This will invalidate all
|
||||
//previously generated macaroons.
|
||||
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:"-"`
|
||||
NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} }
|
||||
func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChangePasswordRequest) ProtoMessage() {}
|
||||
func (x *ChangePasswordRequest) Reset() {
|
||||
*x = ChangePasswordRequest{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{6}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ChangePasswordRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ChangePasswordRequest) GetCurrentPassword() []byte {
|
||||
if x != nil {
|
||||
return x.CurrentPassword
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) GetNewPassword() []byte {
|
||||
if m != nil {
|
||||
return m.NewPassword
|
||||
func (x *ChangePasswordRequest) GetNewPassword() []byte {
|
||||
if x != nil {
|
||||
return x.NewPassword
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) GetStatelessInit() bool {
|
||||
if m != nil {
|
||||
return m.StatelessInit
|
||||
func (x *ChangePasswordRequest) GetStatelessInit() bool {
|
||||
if x != nil {
|
||||
return x.StatelessInit
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) GetNewMacaroonRootKey() bool {
|
||||
if m != nil {
|
||||
return m.NewMacaroonRootKey
|
||||
func (x *ChangePasswordRequest) GetNewMacaroonRootKey() bool {
|
||||
if x != nil {
|
||||
return x.NewMacaroonRootKey
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
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
|
||||
//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
|
||||
//safely by the caller. Otherwise a copy of this macaroon is also persisted on
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} }
|
||||
func (m *ChangePasswordResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChangePasswordResponse) ProtoMessage() {}
|
||||
func (x *ChangePasswordResponse) Reset() {
|
||||
*x = ChangePasswordResponse{}
|
||||
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) {
|
||||
return fileDescriptor_76e3ed10ed53e4fd, []int{7}
|
||||
return file_walletunlocker_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ChangePasswordResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ChangePasswordResponse) GetAdminMacaroon() []byte {
|
||||
if x != nil {
|
||||
return x.AdminMacaroon
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GenSeedRequest)(nil), "lnrpc.GenSeedRequest")
|
||||
proto.RegisterType((*GenSeedResponse)(nil), "lnrpc.GenSeedResponse")
|
||||
proto.RegisterType((*InitWalletRequest)(nil), "lnrpc.InitWalletRequest")
|
||||
proto.RegisterType((*InitWalletResponse)(nil), "lnrpc.InitWalletResponse")
|
||||
proto.RegisterType((*UnlockWalletRequest)(nil), "lnrpc.UnlockWalletRequest")
|
||||
proto.RegisterType((*UnlockWalletResponse)(nil), "lnrpc.UnlockWalletResponse")
|
||||
proto.RegisterType((*ChangePasswordRequest)(nil), "lnrpc.ChangePasswordRequest")
|
||||
proto.RegisterType((*ChangePasswordResponse)(nil), "lnrpc.ChangePasswordResponse")
|
||||
var File_walletunlocker_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_walletunlocker_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x1a, 0x09, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x53,
|
||||
0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x65,
|
||||
0x7a, 0x65, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18,
|
||||
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{
|
||||
// 599 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdd, 0x6a, 0xdb, 0x4c,
|
||||
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,
|
||||
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,
|
||||
0xe5, 0x20, 0x97, 0x42, 0x0b, 0xb6, 0x9a, 0x91, 0xcc, 0xa3, 0xce, 0xba, 0xcc, 0xa3, 0x8a, 0xf8,
|
||||
0x9f, 0xc0, 0x3d, 0x45, 0xba, 0x40, 0x8c, 0x03, 0xfc, 0x3c, 0x41, 0xa5, 0xd9, 0x53, 0xd8, 0xe6,
|
||||
0xf8, 0x15, 0x31, 0x0e, 0x73, 0xae, 0x54, 0x9e, 0x48, 0xae, 0xd0, 0x73, 0xba, 0x4e, 0xbf, 0x15,
|
||||
0x6c, 0x55, 0x81, 0xf3, 0x39, 0x67, 0x07, 0xd0, 0x52, 0x65, 0x2a, 0x92, 0x96, 0x22, 0x9f, 0x7a,
|
||||
0x0d, 0x93, 0xb7, 0x51, 0xb2, 0x77, 0x15, 0xf2, 0x33, 0x68, 0xcf, 0x6f, 0x50, 0xb9, 0x20, 0x85,
|
||||
0xec, 0x19, 0xec, 0x44, 0x69, 0x9e, 0xa0, 0x0c, 0x4d, 0xf1, 0x98, 0x70, 0x2c, 0x28, 0x8d, 0x3c,
|
||||
0xa7, 0xdb, 0xec, 0xaf, 0x07, 0xac, 0x8a, 0x95, 0x15, 0x67, 0x36, 0xc2, 0x7a, 0xd0, 0x46, 0xaa,
|
||||
0x38, 0xc6, 0xa6, 0xca, 0x5e, 0xe5, 0xde, 0xe0, 0xb2, 0xc0, 0xff, 0xde, 0x80, 0xed, 0xf7, 0x94,
|
||||
0xea, 0x2b, 0x23, 0x7f, 0xa6, 0xa9, 0x07, 0xed, 0xca, 0x0f, 0xa3, 0xa9, 0x10, 0x32, 0xb6, 0x8a,
|
||||
0xdc, 0x0a, 0x9f, 0x5b, 0xba, 0xb4, 0xb3, 0xc6, 0xd2, 0xce, 0x6a, 0xed, 0x6a, 0x2e, 0xb1, 0xab,
|
||||
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,
|
||||
0x3c, 0x1a, 0x4d, 0x72, 0xe5, 0xad, 0x76, 0x9d, 0xfe, 0xc6, 0xf1, 0xfe, 0xc0, 0x8c, 0x70, 0xf0,
|
||||
0x36, 0xe1, 0x74, 0x62, 0x22, 0x17, 0xc4, 0x73, 0x95, 0x08, 0x1d, 0xb8, 0xb6, 0xa2, 0xc2, 0x8a,
|
||||
0x1d, 0x82, 0xab, 0x34, 0xd7, 0x98, 0xa1, 0x52, 0x61, 0x4a, 0xa9, 0xf6, 0xd6, 0xba, 0x4e, 0xff,
|
||||
0xff, 0x60, 0x73, 0x4e, 0x4b, 0xa3, 0xfc, 0x57, 0xc0, 0x6e, 0x1b, 0x66, 0x47, 0x74, 0x08, 0x2e,
|
||||
0x8f, 0xc7, 0x29, 0x85, 0x63, 0x1e, 0x71, 0x29, 0x04, 0x59, 0xc3, 0x36, 0x0d, 0x3d, 0xb3, 0xd0,
|
||||
0xff, 0xe9, 0xc0, 0x83, 0x4b, 0xb3, 0x63, 0x7f, 0x69, 0x78, 0x8d, 0x23, 0x8d, 0xdf, 0x75, 0xa4,
|
||||
0xf9, 0xef, 0x8e, 0xac, 0xd4, 0x39, 0xb2, 0x07, 0x3b, 0x77, 0x35, 0x55, 0x9e, 0xf8, 0x3f, 0x1c,
|
||||
0xd8, 0x2d, 0x6f, 0x19, 0xe2, 0xac, 0xfd, 0x99, 0xdc, 0x27, 0xb0, 0x15, 0x4d, 0xa4, 0x44, 0x5a,
|
||||
0xd0, 0xdb, 0xb6, 0x7c, 0x2e, 0xf8, 0x00, 0x5a, 0x84, 0xc5, 0x4d, 0x9a, 0x7d, 0x31, 0x84, 0xc5,
|
||||
0x3c, 0x65, 0xb1, 0xcd, 0x66, 0x4d, 0x9b, 0xec, 0x39, 0xec, 0x96, 0x27, 0xcd, 0x06, 0x14, 0x4a,
|
||||
0x21, 0x74, 0x38, 0xc2, 0xa9, 0x15, 0xc5, 0x08, 0x8b, 0xd9, 0x9c, 0x02, 0x21, 0xf4, 0x07, 0x9c,
|
||||
0xfa, 0xaf, 0x61, 0xef, 0xbe, 0x80, 0x3f, 0x9a, 0xf7, 0xf1, 0xb7, 0x06, 0xb8, 0x95, 0x2b, 0x97,
|
||||
0xf6, 0x67, 0x61, 0x2f, 0xe1, 0x3f, 0xfb, 0xbe, 0xd9, 0xae, 0x1d, 0xc5, 0xdd, 0x1f, 0xa5, 0xb3,
|
||||
0x77, 0x1f, 0xdb, 0x3b, 0xdf, 0x00, 0xdc, 0x6c, 0x1e, 0xf3, 0x6c, 0xd6, 0xc2, 0xeb, 0xed, 0xec,
|
||||
0xd7, 0x44, 0xec, 0x11, 0xa7, 0xd0, 0xba, 0x3d, 0x2a, 0xd6, 0xb1, 0xa9, 0x35, 0x3b, 0xd9, 0x79,
|
||||
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,
|
||||
0x7c, 0x64, 0xea, 0xaf, 0xd7, 0xcc, 0x37, 0xfc, 0xe2, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8,
|
||||
0x7a, 0x3b, 0x08, 0xb0, 0x05, 0x00, 0x00,
|
||||
func file_walletunlocker_proto_rawDescGZIP() []byte {
|
||||
file_walletunlocker_proto_rawDescOnce.Do(func() {
|
||||
file_walletunlocker_proto_rawDescData = protoimpl.X.CompressGZIP(file_walletunlocker_proto_rawDescData)
|
||||
})
|
||||
return file_walletunlocker_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_walletunlocker_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_walletunlocker_proto_goTypes = []interface{}{
|
||||
(*GenSeedRequest)(nil), // 0: lnrpc.GenSeedRequest
|
||||
(*GenSeedResponse)(nil), // 1: lnrpc.GenSeedResponse
|
||||
(*InitWalletRequest)(nil), // 2: lnrpc.InitWalletRequest
|
||||
(*InitWalletResponse)(nil), // 3: lnrpc.InitWalletResponse
|
||||
(*UnlockWalletRequest)(nil), // 4: lnrpc.UnlockWalletRequest
|
||||
(*UnlockWalletResponse)(nil), // 5: lnrpc.UnlockWalletResponse
|
||||
(*ChangePasswordRequest)(nil), // 6: lnrpc.ChangePasswordRequest
|
||||
(*ChangePasswordResponse)(nil), // 7: lnrpc.ChangePasswordResponse
|
||||
(*ChanBackupSnapshot)(nil), // 8: lnrpc.ChanBackupSnapshot
|
||||
}
|
||||
var file_walletunlocker_proto_depIdxs = []int32{
|
||||
8, // 0: lnrpc.InitWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot
|
||||
8, // 1: lnrpc.UnlockWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot
|
||||
0, // 2: lnrpc.WalletUnlocker.GenSeed:input_type -> lnrpc.GenSeedRequest
|
||||
2, // 3: lnrpc.WalletUnlocker.InitWallet:input_type -> lnrpc.InitWalletRequest
|
||||
4, // 4: lnrpc.WalletUnlocker.UnlockWallet:input_type -> lnrpc.UnlockWalletRequest
|
||||
6, // 5: lnrpc.WalletUnlocker.ChangePassword:input_type -> lnrpc.ChangePasswordRequest
|
||||
1, // 6: lnrpc.WalletUnlocker.GenSeed:output_type -> lnrpc.GenSeedResponse
|
||||
3, // 7: lnrpc.WalletUnlocker.InitWallet:output_type -> lnrpc.InitWalletResponse
|
||||
5, // 8: lnrpc.WalletUnlocker.UnlockWallet:output_type -> lnrpc.UnlockWalletResponse
|
||||
7, // 9: lnrpc.WalletUnlocker.ChangePassword:output_type -> lnrpc.ChangePasswordResponse
|
||||
6, // [6:10] is the sub-list for method output_type
|
||||
2, // [2:6] 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_walletunlocker_proto_init() }
|
||||
func file_walletunlocker_proto_init() {
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -630,10 +905,10 @@ type WalletUnlockerClient interface {
|
||||
}
|
||||
|
||||
type walletUnlockerClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewWalletUnlockerClient(cc *grpc.ClientConn) WalletUnlockerClient {
|
||||
func NewWalletUnlockerClient(cc grpc.ClientConnInterface) WalletUnlockerClient {
|
||||
return &walletUnlockerClient{cc}
|
||||
}
|
||||
|
||||
@ -713,16 +988,16 @@ type WalletUnlockerServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -1,150 +1,248 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: watchtowerrpc/watchtower.proto
|
||||
|
||||
package watchtowerrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type GetInfoRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *GetInfoRequest) Reset() { *m = GetInfoRequest{} }
|
||||
func (m *GetInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetInfoRequest) ProtoMessage() {}
|
||||
func (x *GetInfoRequest) Reset() {
|
||||
*x = GetInfoRequest{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The public key of the watchtower.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
// The listening addresses of the watchtower.
|
||||
Listeners []string `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"`
|
||||
// The URIs of the watchtower.
|
||||
Uris []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Uris []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetInfoResponse) Reset() { *m = GetInfoResponse{} }
|
||||
func (m *GetInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetInfoResponse) ProtoMessage() {}
|
||||
func (x *GetInfoResponse) Reset() {
|
||||
*x = GetInfoResponse{}
|
||||
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) {
|
||||
return fileDescriptor_9f019c0e859ad3d6, []int{1}
|
||||
return file_watchtowerrpc_watchtower_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *GetInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetInfoResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *GetInfoResponse) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetInfoResponse) GetListeners() []string {
|
||||
if m != nil {
|
||||
return m.Listeners
|
||||
func (x *GetInfoResponse) GetListeners() []string {
|
||||
if x != nil {
|
||||
return x.Listeners
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetInfoResponse) GetUris() []string {
|
||||
if m != nil {
|
||||
return m.Uris
|
||||
func (x *GetInfoResponse) GetUris() []string {
|
||||
if x != nil {
|
||||
return x.Uris
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GetInfoRequest)(nil), "watchtowerrpc.GetInfoRequest")
|
||||
proto.RegisterType((*GetInfoResponse)(nil), "watchtowerrpc.GetInfoResponse")
|
||||
var File_watchtowerrpc_watchtower_proto protoreflect.FileDescriptor
|
||||
|
||||
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{
|
||||
// 213 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x4f, 0x2c, 0x49,
|
||||
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,
|
||||
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,
|
||||
0x5e, 0x6a, 0x51, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0x67, 0x10, 0x42, 0x40, 0x48, 0x88, 0x8b,
|
||||
0xa5, 0xb4, 0x28, 0xb3, 0x58, 0x82, 0x19, 0x2c, 0x01, 0x66, 0x1b, 0x85, 0x71, 0x71, 0x85, 0xc3,
|
||||
0xed, 0x17, 0xf2, 0xe0, 0x62, 0x87, 0x5a, 0x25, 0x24, 0xab, 0x87, 0xe2, 0x2e, 0x3d, 0x54, 0x47,
|
||||
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,
|
||||
0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x3f, 0x27, 0x2f, 0x45, 0x3f, 0x27, 0x0f, 0x35, 0x3c, 0x8a,
|
||||
0x0a, 0x92, 0x93, 0xd8, 0xc0, 0x61, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x23, 0x0b,
|
||||
0x68, 0x35, 0x01, 0x00, 0x00,
|
||||
func file_watchtowerrpc_watchtower_proto_rawDescGZIP() []byte {
|
||||
file_watchtowerrpc_watchtower_proto_rawDescOnce.Do(func() {
|
||||
file_watchtowerrpc_watchtower_proto_rawDescData = protoimpl.X.CompressGZIP(file_watchtowerrpc_watchtower_proto_rawDescData)
|
||||
})
|
||||
return file_watchtowerrpc_watchtower_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_watchtowerrpc_watchtower_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_watchtowerrpc_watchtower_proto_goTypes = []interface{}{
|
||||
(*GetInfoRequest)(nil), // 0: watchtowerrpc.GetInfoRequest
|
||||
(*GetInfoResponse)(nil), // 1: watchtowerrpc.GetInfoResponse
|
||||
}
|
||||
var file_watchtowerrpc_watchtower_proto_depIdxs = []int32{
|
||||
0, // 0: watchtowerrpc.Watchtower.GetInfo:input_type -> watchtowerrpc.GetInfoRequest
|
||||
1, // 1: watchtowerrpc.Watchtower.GetInfo:output_type -> watchtowerrpc.GetInfoResponse
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -158,10 +256,10 @@ type WatchtowerClient interface {
|
||||
}
|
||||
|
||||
type watchtowerClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewWatchtowerClient(cc *grpc.ClientConn) WatchtowerClient {
|
||||
func NewWatchtowerClient(cc grpc.ClientConnInterface) WatchtowerClient {
|
||||
return &watchtowerClient{cc}
|
||||
}
|
||||
|
||||
@ -187,7 +285,7 @@ type WatchtowerServer interface {
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,33 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: wtclientrpc/wtclient.proto
|
||||
|
||||
package wtclientrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
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.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// 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
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type PolicyType int32
|
||||
|
||||
@ -33,237 +38,300 @@ const (
|
||||
PolicyType_ANCHOR PolicyType = 1
|
||||
)
|
||||
|
||||
var PolicyType_name = map[int32]string{
|
||||
0: "LEGACY",
|
||||
1: "ANCHOR",
|
||||
}
|
||||
// Enum value maps for PolicyType.
|
||||
var (
|
||||
PolicyType_name = map[int32]string{
|
||||
0: "LEGACY",
|
||||
1: "ANCHOR",
|
||||
}
|
||||
PolicyType_value = map[string]int32{
|
||||
"LEGACY": 0,
|
||||
"ANCHOR": 1,
|
||||
}
|
||||
)
|
||||
|
||||
var PolicyType_value = map[string]int32{
|
||||
"LEGACY": 0,
|
||||
"ANCHOR": 1,
|
||||
func (x PolicyType) Enum() *PolicyType {
|
||||
p := new(PolicyType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{0}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type AddTowerRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The identifying public key of the watchtower to add.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
// A network address the watchtower is reachable over.
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *AddTowerRequest) Reset() { *m = AddTowerRequest{} }
|
||||
func (m *AddTowerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddTowerRequest) ProtoMessage() {}
|
||||
func (x *AddTowerRequest) Reset() {
|
||||
*x = AddTowerRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{0}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *AddTowerRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddTowerRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *AddTowerRequest) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AddTowerRequest) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
func (x *AddTowerRequest) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AddTowerResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *AddTowerResponse) Reset() { *m = AddTowerResponse{} }
|
||||
func (m *AddTowerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddTowerResponse) ProtoMessage() {}
|
||||
func (x *AddTowerResponse) Reset() {
|
||||
*x = AddTowerResponse{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The identifying public key of the watchtower to remove.
|
||||
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
|
||||
//is stale. Otherwise, the watchtower will no longer be used for future
|
||||
//session negotiations and backups.
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RemoveTowerRequest) Reset() { *m = RemoveTowerRequest{} }
|
||||
func (m *RemoveTowerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoveTowerRequest) ProtoMessage() {}
|
||||
func (x *RemoveTowerRequest) Reset() {
|
||||
*x = RemoveTowerRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{2}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *RemoveTowerRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoveTowerRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *RemoveTowerRequest) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RemoveTowerRequest) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
func (x *RemoveTowerRequest) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RemoveTowerResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *RemoveTowerResponse) Reset() { *m = RemoveTowerResponse{} }
|
||||
func (m *RemoveTowerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoveTowerResponse) ProtoMessage() {}
|
||||
func (x *RemoveTowerResponse) Reset() {
|
||||
*x = RemoveTowerResponse{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The identifying public key of the watchtower to retrieve information for.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
IncludeSessions bool `protobuf:"varint,2,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetTowerInfoRequest) Reset() { *m = GetTowerInfoRequest{} }
|
||||
func (m *GetTowerInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetTowerInfoRequest) ProtoMessage() {}
|
||||
func (x *GetTowerInfoRequest) Reset() {
|
||||
*x = GetTowerInfoRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{4}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *GetTowerInfoRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetTowerInfoRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *GetTowerInfoRequest) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetTowerInfoRequest) GetIncludeSessions() bool {
|
||||
if m != nil {
|
||||
return m.IncludeSessions
|
||||
func (x *GetTowerInfoRequest) GetIncludeSessions() bool {
|
||||
if x != nil {
|
||||
return x.IncludeSessions
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type TowerSession struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The total number of successful backups that have been made to the
|
||||
//watchtower session.
|
||||
@ -278,78 +346,88 @@ type TowerSession struct {
|
||||
//Deprecated, use sweep_sat_per_vbyte.
|
||||
//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.
|
||||
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 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
SweepSatPerVbyte uint32 `protobuf:"varint,5,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
|
||||
}
|
||||
|
||||
func (m *TowerSession) Reset() { *m = TowerSession{} }
|
||||
func (m *TowerSession) String() string { return proto.CompactTextString(m) }
|
||||
func (*TowerSession) ProtoMessage() {}
|
||||
func (x *TowerSession) Reset() {
|
||||
*x = TowerSession{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{5}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (m *TowerSession) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TowerSession.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *TowerSession) GetNumBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.NumBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TowerSession) GetNumPendingBackups() uint32 {
|
||||
if m != nil {
|
||||
return m.NumPendingBackups
|
||||
func (x *TowerSession) GetNumPendingBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.NumPendingBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TowerSession) GetMaxBackups() uint32 {
|
||||
if m != nil {
|
||||
return m.MaxBackups
|
||||
func (x *TowerSession) GetMaxBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.MaxBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (m *TowerSession) GetSweepSatPerByte() uint32 {
|
||||
if m != nil {
|
||||
return m.SweepSatPerByte
|
||||
func (x *TowerSession) GetSweepSatPerByte() uint32 {
|
||||
if x != nil {
|
||||
return x.SweepSatPerByte
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TowerSession) GetSweepSatPerVbyte() uint32 {
|
||||
if m != nil {
|
||||
return m.SweepSatPerVbyte
|
||||
func (x *TowerSession) GetSweepSatPerVbyte() uint32 {
|
||||
if x != nil {
|
||||
return x.SweepSatPerVbyte
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Tower struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The identifying public key of the watchtower.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
// 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.
|
||||
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.
|
||||
Sessions []*TowerSession `protobuf:"bytes,5,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Sessions []*TowerSession `protobuf:"bytes,5,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Tower) Reset() { *m = Tower{} }
|
||||
func (m *Tower) String() string { return proto.CompactTextString(m) }
|
||||
func (*Tower) ProtoMessage() {}
|
||||
func (x *Tower) Reset() {
|
||||
*x = Tower{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{6}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *Tower) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Tower.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *Tower) GetPubkey() []byte {
|
||||
if x != nil {
|
||||
return x.Pubkey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Tower) GetAddresses() []string {
|
||||
if m != nil {
|
||||
return m.Addresses
|
||||
func (x *Tower) GetAddresses() []string {
|
||||
if x != nil {
|
||||
return x.Addresses
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Tower) GetActiveSessionCandidate() bool {
|
||||
if m != nil {
|
||||
return m.ActiveSessionCandidate
|
||||
func (x *Tower) GetActiveSessionCandidate() bool {
|
||||
if x != nil {
|
||||
return x.ActiveSessionCandidate
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Tower) GetNumSessions() uint32 {
|
||||
if m != nil {
|
||||
return m.NumSessions
|
||||
func (x *Tower) GetNumSessions() uint32 {
|
||||
if x != nil {
|
||||
return x.NumSessions
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Tower) GetSessions() []*TowerSession {
|
||||
if m != nil {
|
||||
return m.Sessions
|
||||
func (x *Tower) GetSessions() []*TowerSession {
|
||||
if x != nil {
|
||||
return x.Sessions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListTowersRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
IncludeSessions bool `protobuf:"varint,1,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListTowersRequest) Reset() { *m = ListTowersRequest{} }
|
||||
func (m *ListTowersRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListTowersRequest) ProtoMessage() {}
|
||||
func (x *ListTowersRequest) Reset() {
|
||||
*x = ListTowersRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{7}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (m *ListTowersRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ListTowersRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ListTowersRequest) GetIncludeSessions() bool {
|
||||
if x != nil {
|
||||
return x.IncludeSessions
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ListTowersResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The list of watchtowers available for new backups.
|
||||
Towers []*Tower `protobuf:"bytes,1,rep,name=towers,proto3" json:"towers,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Towers []*Tower `protobuf:"bytes,1,rep,name=towers,proto3" json:"towers,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListTowersResponse) Reset() { *m = ListTowersResponse{} }
|
||||
func (m *ListTowersResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListTowersResponse) ProtoMessage() {}
|
||||
func (x *ListTowersResponse) Reset() {
|
||||
*x = ListTowersResponse{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{8}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (m *ListTowersResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ListTowersResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *ListTowersResponse) GetTowers() []*Tower {
|
||||
if x != nil {
|
||||
return x.Towers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type StatsRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *StatsRequest) Reset() { *m = StatsRequest{} }
|
||||
func (m *StatsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatsRequest) ProtoMessage() {}
|
||||
func (x *StatsRequest) Reset() {
|
||||
*x = StatsRequest{}
|
||||
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) {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The total number of backups made to all active and exhausted watchtower
|
||||
//sessions.
|
||||
@ -552,114 +661,130 @@ type StatsResponse struct {
|
||||
// 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"`
|
||||
// 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
NumSessionsExhausted uint32 `protobuf:"varint,5,opt,name=num_sessions_exhausted,json=numSessionsExhausted,proto3" json:"num_sessions_exhausted,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StatsResponse) Reset() { *m = StatsResponse{} }
|
||||
func (m *StatsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatsResponse) ProtoMessage() {}
|
||||
func (x *StatsResponse) Reset() {
|
||||
*x = StatsResponse{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{10}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (m *StatsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatsResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *StatsResponse) GetNumBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.NumBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatsResponse) GetNumPendingBackups() uint32 {
|
||||
if m != nil {
|
||||
return m.NumPendingBackups
|
||||
func (x *StatsResponse) GetNumPendingBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.NumPendingBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatsResponse) GetNumFailedBackups() uint32 {
|
||||
if m != nil {
|
||||
return m.NumFailedBackups
|
||||
func (x *StatsResponse) GetNumFailedBackups() uint32 {
|
||||
if x != nil {
|
||||
return x.NumFailedBackups
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatsResponse) GetNumSessionsAcquired() uint32 {
|
||||
if m != nil {
|
||||
return m.NumSessionsAcquired
|
||||
func (x *StatsResponse) GetNumSessionsAcquired() uint32 {
|
||||
if x != nil {
|
||||
return x.NumSessionsAcquired
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatsResponse) GetNumSessionsExhausted() uint32 {
|
||||
if m != nil {
|
||||
return m.NumSessionsExhausted
|
||||
func (x *StatsResponse) GetNumSessionsExhausted() uint32 {
|
||||
if x != nil {
|
||||
return x.NumSessionsExhausted
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PolicyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
PolicyType PolicyType `protobuf:"varint,1,opt,name=policy_type,json=policyType,proto3,enum=wtclientrpc.PolicyType" json:"policy_type,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PolicyRequest) Reset() { *m = PolicyRequest{} }
|
||||
func (m *PolicyRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PolicyRequest) ProtoMessage() {}
|
||||
func (x *PolicyRequest) Reset() {
|
||||
*x = PolicyRequest{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{11}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (m *PolicyRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PolicyRequest.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *PolicyRequest) GetPolicyType() PolicyType {
|
||||
if x != nil {
|
||||
return x.PolicyType
|
||||
}
|
||||
return PolicyType_LEGACY
|
||||
}
|
||||
|
||||
type PolicyResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The maximum number of updates each session we negotiate with watchtowers
|
||||
//should allow.
|
||||
@ -668,141 +793,439 @@ type PolicyResponse struct {
|
||||
//Deprecated, use sweep_sat_per_vbyte.
|
||||
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
//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
|
||||
//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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
SweepSatPerVbyte uint32 `protobuf:"varint,3,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PolicyResponse) Reset() { *m = PolicyResponse{} }
|
||||
func (m *PolicyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*PolicyResponse) ProtoMessage() {}
|
||||
func (x *PolicyResponse) Reset() {
|
||||
*x = PolicyResponse{}
|
||||
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) {
|
||||
return fileDescriptor_b5f4e7d95a641af2, []int{12}
|
||||
return file_wtclientrpc_wtclient_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (m *PolicyResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PolicyResponse.Unmarshal(m, b)
|
||||
}
|
||||
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
|
||||
func (x *PolicyResponse) GetMaxUpdates() uint32 {
|
||||
if x != nil {
|
||||
return x.MaxUpdates
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (m *PolicyResponse) GetSweepSatPerByte() uint32 {
|
||||
if m != nil {
|
||||
return m.SweepSatPerByte
|
||||
func (x *PolicyResponse) GetSweepSatPerByte() uint32 {
|
||||
if x != nil {
|
||||
return x.SweepSatPerByte
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PolicyResponse) GetSweepSatPerVbyte() uint32 {
|
||||
if m != nil {
|
||||
return m.SweepSatPerVbyte
|
||||
func (x *PolicyResponse) GetSweepSatPerVbyte() uint32 {
|
||||
if x != nil {
|
||||
return x.SweepSatPerVbyte
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("wtclientrpc.PolicyType", PolicyType_name, PolicyType_value)
|
||||
proto.RegisterType((*AddTowerRequest)(nil), "wtclientrpc.AddTowerRequest")
|
||||
proto.RegisterType((*AddTowerResponse)(nil), "wtclientrpc.AddTowerResponse")
|
||||
proto.RegisterType((*RemoveTowerRequest)(nil), "wtclientrpc.RemoveTowerRequest")
|
||||
proto.RegisterType((*RemoveTowerResponse)(nil), "wtclientrpc.RemoveTowerResponse")
|
||||
proto.RegisterType((*GetTowerInfoRequest)(nil), "wtclientrpc.GetTowerInfoRequest")
|
||||
proto.RegisterType((*TowerSession)(nil), "wtclientrpc.TowerSession")
|
||||
proto.RegisterType((*Tower)(nil), "wtclientrpc.Tower")
|
||||
proto.RegisterType((*ListTowersRequest)(nil), "wtclientrpc.ListTowersRequest")
|
||||
proto.RegisterType((*ListTowersResponse)(nil), "wtclientrpc.ListTowersResponse")
|
||||
proto.RegisterType((*StatsRequest)(nil), "wtclientrpc.StatsRequest")
|
||||
proto.RegisterType((*StatsResponse)(nil), "wtclientrpc.StatsResponse")
|
||||
proto.RegisterType((*PolicyRequest)(nil), "wtclientrpc.PolicyRequest")
|
||||
proto.RegisterType((*PolicyResponse)(nil), "wtclientrpc.PolicyResponse")
|
||||
var File_wtclientrpc_wtclient_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_wtclientrpc_wtclient_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x77, 0x74, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x74,
|
||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x77, 0x74,
|
||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x22, 0x43, 0x0a, 0x0f, 0x41, 0x64, 0x64,
|
||||
0x54, 0x6f, 0x77, 0x65, 0x72, 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, 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, 0x12,
|
||||
0x0a, 0x10, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x46, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x77, 0x65,
|
||||
0x72, 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, 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{
|
||||
// 765 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xdd, 0x6e, 0xda, 0x48,
|
||||
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,
|
||||
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,
|
||||
0x7a, 0x27, 0x7a, 0x6e, 0x3b, 0xae, 0xcd, 0x6c, 0x54, 0x4e, 0x60, 0xca, 0x00, 0x36, 0x7b, 0x86,
|
||||
0x71, 0x61, 0xcf, 0x88, 0xab, 0x92, 0x6b, 0x9f, 0x78, 0x0c, 0xed, 0x40, 0xd1, 0xf1, 0x47, 0x57,
|
||||
0x64, 0x51, 0x97, 0x9a, 0x52, 0xab, 0xa2, 0x8a, 0x37, 0x54, 0x87, 0x3f, 0xb0, 0x61, 0xb8, 0xc4,
|
||||
0xf3, 0xea, 0xb9, 0xa6, 0xd4, 0x5a, 0x53, 0xa3, 0x57, 0x05, 0x41, 0x75, 0x29, 0xe2, 0x39, 0x36,
|
||||
0xf5, 0x88, 0x72, 0x0c, 0x48, 0x25, 0x96, 0x7d, 0x43, 0x7e, 0x52, 0x7b, 0x1b, 0x6a, 0x29, 0x1d,
|
||||
0x21, 0xff, 0x0e, 0x6a, 0x27, 0x84, 0xf1, 0xd8, 0x29, 0xbd, 0xb4, 0xbf, 0xa7, 0x7f, 0x1f, 0xaa,
|
||||
0x26, 0xd5, 0xa7, 0xbe, 0x41, 0x34, 0x8f, 0x78, 0x9e, 0x69, 0xd3, 0xf0, 0x43, 0x25, 0x75, 0x53,
|
||||
0xc4, 0xcf, 0x45, 0x58, 0xf9, 0x22, 0x41, 0x85, 0xeb, 0x8a, 0x08, 0x6a, 0x40, 0x99, 0xfa, 0x96,
|
||||
0x36, 0xc2, 0xfa, 0x95, 0xef, 0x78, 0x5c, 0x78, 0x5d, 0x05, 0xea, 0x5b, 0xfd, 0x30, 0x82, 0xda,
|
||||
0x50, 0x0b, 0x08, 0x0e, 0xa1, 0x86, 0x49, 0xc7, 0x31, 0x31, 0xc7, 0x89, 0x5b, 0xd4, 0xb7, 0x86,
|
||||
0x21, 0x12, 0xf1, 0x1b, 0x50, 0xb6, 0xf0, 0x3c, 0xe6, 0xe5, 0x43, 0x41, 0x0b, 0xcf, 0x23, 0x42,
|
||||
0x07, 0x90, 0x37, 0x23, 0xc4, 0xd1, 0x3c, 0xcc, 0x34, 0x87, 0xb8, 0xda, 0x68, 0xc1, 0x48, 0xfd,
|
||||
0xf7, 0x80, 0xd7, 0xcf, 0xd5, 0x25, 0x75, 0x93, 0xa3, 0xe7, 0x98, 0x0d, 0x89, 0xdb, 0x5f, 0x30,
|
||||
0x82, 0x1e, 0x42, 0x2d, 0x7d, 0xe0, 0x86, 0x9f, 0x28, 0x70, 0xe5, 0x6a, 0x82, 0xfd, 0x26, 0x88,
|
||||
0x2b, 0x9f, 0x25, 0x28, 0xf0, 0x14, 0x57, 0xfa, 0xb5, 0x0b, 0x6b, 0xa2, 0x00, 0x24, 0x48, 0x24,
|
||||
0xdf, 0x5a, 0x53, 0x97, 0x01, 0x74, 0x00, 0x75, 0xac, 0x33, 0xf3, 0x26, 0x36, 0x53, 0xd3, 0x31,
|
||||
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,
|
||||
0x18, 0x2e, 0x34, 0xf3, 0xad, 0x72, 0xf7, 0xef, 0x76, 0xa2, 0x63, 0xdb, 0xc9, 0xda, 0xa8, 0x31,
|
||||
0x55, 0x39, 0x84, 0xad, 0x33, 0xd3, 0x0b, 0x3b, 0xc2, 0x8b, 0xda, 0x21, 0xab, 0xec, 0x52, 0x76,
|
||||
0xd9, 0x9f, 0x02, 0x4a, 0x9e, 0x0f, 0xdb, 0x0c, 0xed, 0x41, 0x91, 0xf1, 0x48, 0x5d, 0xe2, 0x57,
|
||||
0x41, 0x77, 0xaf, 0xa2, 0x0a, 0x86, 0xb2, 0x01, 0x95, 0x73, 0x86, 0x59, 0xf4, 0x71, 0xe5, 0xab,
|
||||
0x04, 0xeb, 0x22, 0x20, 0xd4, 0x7e, 0x79, 0x27, 0x3d, 0x00, 0x14, 0xf0, 0x2f, 0xb1, 0x39, 0x25,
|
||||
0xc6, 0xad, 0x86, 0xaa, 0x52, 0xdf, 0x3a, 0xe6, 0x40, 0xc4, 0xee, 0xc2, 0x76, 0xd2, 0x7c, 0x0d,
|
||||
0xeb, 0xd7, 0xbe, 0xe9, 0x12, 0x43, 0x54, 0xa1, 0x96, 0xa8, 0x42, 0x4f, 0x40, 0xe8, 0x31, 0xec,
|
||||
0xa4, 0xce, 0x90, 0xf9, 0x04, 0xfb, 0x1e, 0x23, 0x86, 0x68, 0xae, 0x3f, 0x13, 0x87, 0x8e, 0x22,
|
||||
0x4c, 0x39, 0x85, 0xf5, 0xa1, 0x3d, 0x35, 0xf5, 0x45, 0x54, 0x88, 0x03, 0x28, 0x3b, 0x3c, 0xa0,
|
||||
0xb1, 0x85, 0x43, 0x78, 0xe6, 0x1b, 0xdd, 0xbf, 0x52, 0x66, 0x86, 0x07, 0x2e, 0x16, 0x0e, 0x51,
|
||||
0xc1, 0x89, 0x9f, 0x95, 0x8f, 0x12, 0x6c, 0x44, 0x5a, 0x4b, 0x1b, 0x83, 0xf9, 0xf1, 0x9d, 0xa0,
|
||||
0xa5, 0x62, 0x1b, 0x2d, 0x3c, 0x7f, 0x1d, 0x46, 0x56, 0xcc, 0x4f, 0xee, 0x87, 0xe7, 0x27, 0x9f,
|
||||
0x3d, 0x3f, 0x7b, 0xf7, 0x00, 0x96, 0xb7, 0x45, 0x00, 0xc5, 0xb3, 0xa3, 0x93, 0xde, 0xe0, 0x7d,
|
||||
0xf5, 0xb7, 0xe0, 0xb9, 0xf7, 0x72, 0xf0, 0xfc, 0x95, 0x5a, 0x95, 0xba, 0x9f, 0xf2, 0x50, 0x7d,
|
||||
0x8b, 0x99, 0x3e, 0xe1, 0xfd, 0x31, 0xe0, 0x89, 0xa2, 0x13, 0x28, 0x45, 0xab, 0x12, 0xed, 0xa6,
|
||||
0xf2, 0xbf, 0xb5, 0x86, 0xe5, 0x7f, 0x57, 0xa0, 0xc2, 0x84, 0x21, 0x94, 0x13, 0x7b, 0x11, 0x35,
|
||||
0x52, 0xec, 0xbb, 0x9b, 0x57, 0x6e, 0xae, 0x26, 0x08, 0xc5, 0x17, 0x00, 0xcb, 0x09, 0x40, 0xff,
|
||||
0xa5, 0xf8, 0x77, 0x46, 0x4b, 0x6e, 0xac, 0xc4, 0x85, 0xdc, 0x33, 0xa8, 0x24, 0x37, 0x34, 0x4a,
|
||||
0x5f, 0x20, 0x63, 0x79, 0xcb, 0x19, 0xc3, 0x85, 0x0e, 0xa1, 0xc0, 0x67, 0x08, 0xa5, 0x97, 0x40,
|
||||
0x72, 0xd0, 0x64, 0x39, 0x0b, 0x12, 0xb7, 0xe8, 0x41, 0x31, 0x2c, 0x15, 0x92, 0x33, 0xba, 0x2d,
|
||||
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,
|
||||
0x01, 0x00, 0x00, 0xff, 0xff, 0x49, 0xcd, 0xe9, 0xf8, 0x89, 0x07, 0x00, 0x00,
|
||||
func file_wtclientrpc_wtclient_proto_rawDescGZIP() []byte {
|
||||
file_wtclientrpc_wtclient_proto_rawDescOnce.Do(func() {
|
||||
file_wtclientrpc_wtclient_proto_rawDescData = protoimpl.X.CompressGZIP(file_wtclientrpc_wtclient_proto_rawDescData)
|
||||
})
|
||||
return file_wtclientrpc_wtclient_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_wtclientrpc_wtclient_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_wtclientrpc_wtclient_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_wtclientrpc_wtclient_proto_goTypes = []interface{}{
|
||||
(PolicyType)(0), // 0: wtclientrpc.PolicyType
|
||||
(*AddTowerRequest)(nil), // 1: wtclientrpc.AddTowerRequest
|
||||
(*AddTowerResponse)(nil), // 2: wtclientrpc.AddTowerResponse
|
||||
(*RemoveTowerRequest)(nil), // 3: wtclientrpc.RemoveTowerRequest
|
||||
(*RemoveTowerResponse)(nil), // 4: wtclientrpc.RemoveTowerResponse
|
||||
(*GetTowerInfoRequest)(nil), // 5: wtclientrpc.GetTowerInfoRequest
|
||||
(*TowerSession)(nil), // 6: wtclientrpc.TowerSession
|
||||
(*Tower)(nil), // 7: wtclientrpc.Tower
|
||||
(*ListTowersRequest)(nil), // 8: wtclientrpc.ListTowersRequest
|
||||
(*ListTowersResponse)(nil), // 9: wtclientrpc.ListTowersResponse
|
||||
(*StatsRequest)(nil), // 10: wtclientrpc.StatsRequest
|
||||
(*StatsResponse)(nil), // 11: wtclientrpc.StatsResponse
|
||||
(*PolicyRequest)(nil), // 12: wtclientrpc.PolicyRequest
|
||||
(*PolicyResponse)(nil), // 13: wtclientrpc.PolicyResponse
|
||||
}
|
||||
var file_wtclientrpc_wtclient_proto_depIdxs = []int32{
|
||||
6, // 0: wtclientrpc.Tower.sessions:type_name -> wtclientrpc.TowerSession
|
||||
7, // 1: wtclientrpc.ListTowersResponse.towers:type_name -> wtclientrpc.Tower
|
||||
0, // 2: wtclientrpc.PolicyRequest.policy_type:type_name -> wtclientrpc.PolicyType
|
||||
1, // 3: wtclientrpc.WatchtowerClient.AddTower:input_type -> wtclientrpc.AddTowerRequest
|
||||
3, // 4: wtclientrpc.WatchtowerClient.RemoveTower:input_type -> wtclientrpc.RemoveTowerRequest
|
||||
8, // 5: wtclientrpc.WatchtowerClient.ListTowers:input_type -> wtclientrpc.ListTowersRequest
|
||||
5, // 6: wtclientrpc.WatchtowerClient.GetTowerInfo:input_type -> wtclientrpc.GetTowerInfoRequest
|
||||
10, // 7: wtclientrpc.WatchtowerClient.Stats:input_type -> wtclientrpc.StatsRequest
|
||||
12, // 8: wtclientrpc.WatchtowerClient.Policy:input_type -> wtclientrpc.PolicyRequest
|
||||
2, // 9: wtclientrpc.WatchtowerClient.AddTower:output_type -> wtclientrpc.AddTowerResponse
|
||||
4, // 10: wtclientrpc.WatchtowerClient.RemoveTower:output_type -> wtclientrpc.RemoveTowerResponse
|
||||
9, // 11: wtclientrpc.WatchtowerClient.ListTowers:output_type -> wtclientrpc.ListTowersResponse
|
||||
7, // 12: wtclientrpc.WatchtowerClient.GetTowerInfo:output_type -> wtclientrpc.Tower
|
||||
11, // 13: wtclientrpc.WatchtowerClient.Stats:output_type -> wtclientrpc.StatsResponse
|
||||
13, // 14: wtclientrpc.WatchtowerClient.Policy:output_type -> wtclientrpc.PolicyResponse
|
||||
9, // [9:15] is the sub-list for method output_type
|
||||
3, // [3:9] 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_wtclientrpc_wtclient_proto_init() }
|
||||
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.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// 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.
|
||||
//
|
||||
@ -831,10 +1254,10 @@ type WatchtowerClientClient interface {
|
||||
}
|
||||
|
||||
type watchtowerClientClient struct {
|
||||
cc *grpc.ClientConn
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewWatchtowerClientClient(cc *grpc.ClientConn) WatchtowerClientClient {
|
||||
func NewWatchtowerClientClient(cc grpc.ClientConnInterface) WatchtowerClientClient {
|
||||
return &watchtowerClientClient{cc}
|
||||
}
|
||||
|
||||
@ -920,22 +1343,22 @@ type WatchtowerClientServer interface {
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
||||
|
@ -93,10 +93,10 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string) (
|
||||
fmt.Errorf("unable to create temp directory: %v", err)
|
||||
}
|
||||
|
||||
zmqBlockAddr := fmt.Sprintf("tcp://127.0.0.1:%d", nextAvailablePort())
|
||||
zmqTxAddr := fmt.Sprintf("tcp://127.0.0.1:%d", nextAvailablePort())
|
||||
rpcPort := nextAvailablePort()
|
||||
p2pPort := nextAvailablePort()
|
||||
zmqBlockAddr := fmt.Sprintf("tcp://127.0.0.1:%d", NextAvailablePort())
|
||||
zmqTxAddr := fmt.Sprintf("tcp://127.0.0.1:%d", NextAvailablePort())
|
||||
rpcPort := NextAvailablePort()
|
||||
p2pPort := NextAvailablePort()
|
||||
|
||||
cmdArgs := []string{
|
||||
"-datadir=" + tempBitcoindDir,
|
||||
|
@ -37,7 +37,7 @@ type feeEstimates struct {
|
||||
|
||||
// startFeeService spins up a go-routine to serve fee estimates.
|
||||
func startFeeService() *feeService {
|
||||
port := nextAvailablePort()
|
||||
port := NextAvailablePort()
|
||||
f := feeService{
|
||||
url: fmt.Sprintf("http://localhost:%v/fee-estimates.json", port),
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb/etcd"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
@ -61,9 +62,9 @@ type NetworkHarness struct {
|
||||
Alice *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.
|
||||
useEtcd bool
|
||||
embeddedEtcd bool
|
||||
|
||||
// Channel for transmitting stderr output from failed lightning node
|
||||
// to main process.
|
||||
@ -83,7 +84,7 @@ type NetworkHarness struct {
|
||||
// current repo. This will save developers from having to manually `go install`
|
||||
// within the repo each time before changes
|
||||
func NewNetworkHarness(r *rpctest.Harness, b BackendConfig, lndBinary string,
|
||||
useEtcd bool) (*NetworkHarness, error) {
|
||||
embeddedEtcd bool) (*NetworkHarness, error) {
|
||||
|
||||
feeService := startFeeService()
|
||||
|
||||
@ -97,7 +98,7 @@ func NewNetworkHarness(r *rpctest.Harness, b BackendConfig, lndBinary string,
|
||||
feeService: feeService,
|
||||
quit: make(chan struct{}),
|
||||
lndBinary: lndBinary,
|
||||
useEtcd: useEtcd,
|
||||
embeddedEtcd: embeddedEtcd,
|
||||
}
|
||||
return &n, nil
|
||||
}
|
||||
@ -270,11 +271,70 @@ func (n *NetworkHarness) 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
|
||||
// current instance of the network harness. The created node is running, but
|
||||
// not yet connected to other nodes within the network.
|
||||
func (n *NetworkHarness) NewNode(name string, extraArgs []string) (*HarnessNode, error) {
|
||||
return n.newNode(name, extraArgs, false, nil)
|
||||
func (n *NetworkHarness) NewNode(name string, extraArgs []string) (*HarnessNode,
|
||||
error) {
|
||||
|
||||
return n.newNode(name, extraArgs, false, nil, n.embeddedEtcd, true)
|
||||
}
|
||||
|
||||
// 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,
|
||||
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 {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
@ -296,6 +367,7 @@ func (n *NetworkHarness) NewNodeWithSeed(name string, extraArgs []string,
|
||||
// same password as the internal wallet.
|
||||
genSeedReq := &lnrpc.GenSeedRequest{
|
||||
AezeedPassphrase: password,
|
||||
SeedEntropy: entropy,
|
||||
}
|
||||
|
||||
ctxt, cancel := context.WithTimeout(ctxb, DefaultTimeout)
|
||||
@ -345,7 +417,9 @@ func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string,
|
||||
password []byte, mnemonic []string, recoveryWindow int32,
|
||||
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 {
|
||||
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
|
||||
// initialization phase where the wallet is either created or restored.
|
||||
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{
|
||||
Name: name,
|
||||
@ -386,7 +461,7 @@ func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool,
|
||||
NetParams: n.netParams,
|
||||
ExtraArgs: extraArgs,
|
||||
FeeURL: n.feeService.url,
|
||||
Etcd: n.useEtcd,
|
||||
Etcd: embeddedEtcd,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -398,7 +473,8 @@ func (n *NetworkHarness) newNode(name string, extraArgs []string, hasSeed bool,
|
||||
n.activeNodes[node.NodeID] = node
|
||||
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
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -695,7 +771,7 @@ func (n *NetworkHarness) SuspendNode(node *HarnessNode) (func() error, error) {
|
||||
}
|
||||
|
||||
restart := func() error {
|
||||
return node.start(n.lndBinary, n.lndErrorChan)
|
||||
return node.start(n.lndBinary, n.lndErrorChan, true)
|
||||
}
|
||||
|
||||
return restart, nil
|
||||
@ -712,6 +788,11 @@ func (n *NetworkHarness) ShutdownNode(node *HarnessNode) error {
|
||||
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.
|
||||
// This can be used to temporarily bring a node down during a test, to be later
|
||||
// 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
|
||||
// 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, int64(paymentAmt), rpcInvoice.AmtPaidSat)
|
||||
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
|
||||
// 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, int64(paymentAmt), rpcInvoice.AmtPaidSat)
|
||||
require.Equal(t.t, int64(paymentAmt*1000), rpcInvoice.AmtPaidMsat)
|
||||
|
191
lntest/itest/lnd_etcd_failover_test.go
Normal file
191
lntest/itest/lnd_etcd_failover_test.go
Normal file
@ -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),
|
||||
)
|
||||
// Deprecated fields.
|
||||
newResp.Balance += int64(local)
|
||||
newResp.Balance += int64(local) // nolint:staticcheck
|
||||
assertChannelBalanceResp(t, node, newResp)
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ func assertOnChainInvoiceState(ctx context.Context, t *harnessTest,
|
||||
})
|
||||
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 {
|
||||
require.Equal(t.t, lnrpc.InvoiceHTLCState_SETTLED, htlc.State,
|
||||
"expected htlcs to be erroneously settled")
|
||||
|
11
lntest/itest/lnd_no_etcd_dummy_failover_test.go
Normal file
11
lntest/itest/lnd_no_etcd_dummy_failover_test.go
Normal file
@ -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 {
|
||||
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",
|
||||
spew.Sdump(dbInvoice))
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -1219,12 +1220,11 @@ func channelCommitType(node *lntest.HarnessNode,
|
||||
// assertChannelBalanceResp makes a ChannelBalance request and checks the
|
||||
// returned response matches the expected.
|
||||
func assertChannelBalanceResp(t *harnessTest,
|
||||
node *lntest.HarnessNode, expected *lnrpc.ChannelBalanceResponse) {
|
||||
node *lntest.HarnessNode,
|
||||
expected *lnrpc.ChannelBalanceResponse) { // nolint:interfacer
|
||||
|
||||
resp := getChannelBalance(t, node)
|
||||
require.Equal(
|
||||
t.t, expected, resp, "balance is incorrect",
|
||||
)
|
||||
require.True(t.t, proto.Equal(expected, resp), "balance is incorrect")
|
||||
}
|
||||
|
||||
// getChannelBalance gets the channel balance.
|
||||
@ -5642,7 +5642,7 @@ func testSingleHopSendToRouteCase(net *lntest.NetworkHarness, t *harnessTest,
|
||||
}
|
||||
sendToRouteStream := func() {
|
||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||
alicePayStream, err := carol.SendToRoute(ctxt)
|
||||
alicePayStream, err := carol.SendToRoute(ctxt) // nolint:staticcheck
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create payment stream for "+
|
||||
"carol: %v", err)
|
||||
@ -12672,20 +12672,20 @@ func testQueryRoutes(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
lnwire.MilliSatoshi(len(route.Hops)-1) * feePerHopMSat
|
||||
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 "+
|
||||
"round down to %v (sat)",
|
||||
i, route.TotalFeesMsat, route.TotalFees)
|
||||
i, route.TotalFeesMsat, route.TotalFees) // nolint:staticcheck
|
||||
}
|
||||
if route.TotalFeesMsat != int64(expectedTotalFeesMSat) {
|
||||
t.Fatalf("route %v: total fees in msat expected %v got %v",
|
||||
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 "+
|
||||
"round down to %v (sat)",
|
||||
i, route.TotalAmtMsat, route.TotalAmt)
|
||||
i, route.TotalAmtMsat, route.TotalAmt) // nolint:staticcheck
|
||||
}
|
||||
if route.TotalAmtMsat != int64(expectedTotalAmtMSat) {
|
||||
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] {
|
||||
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 "+
|
||||
"round down to %v (sat)",
|
||||
i, j, hop.FeeMsat, hop.Fee)
|
||||
i, j, hop.FeeMsat, hop.Fee) // nolint:staticcheck
|
||||
}
|
||||
if hop.FeeMsat != int64(feePerHopMSat) {
|
||||
t.Fatalf("route %v hop %v: fee in msat expected %v got %v",
|
||||
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 "+
|
||||
"round down to %v (sat)",
|
||||
i, j, hop.AmtToForwardMsat, hop.AmtToForward)
|
||||
i, j, hop.AmtToForwardMsat, hop.AmtToForward) // nolint:staticcheck
|
||||
}
|
||||
if hop.AmtToForwardMsat != int64(expectedAmtToForwardMSat) {
|
||||
t.Fatalf("route %v hop %v: amt to forward in msat "+
|
||||
@ -12723,15 +12723,15 @@ func testQueryRoutes(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
// payment amount.
|
||||
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)",
|
||||
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 "+
|
||||
"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 {
|
||||
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{},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
// 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)
|
||||
require.True(t, proto.Equal(cfg, resp.Config))
|
||||
|
||||
_, err = node.RouterClient.SetMissionControlConfig(
|
||||
ctxb, &routerrpc.SetMissionControlConfigRequest{
|
||||
|
@ -315,4 +315,8 @@ var allTestCases = []*testCase{
|
||||
name: "wallet import pubkey",
|
||||
test: testWalletImportPubKey,
|
||||
},
|
||||
{
|
||||
name: "etcd_failover",
|
||||
test: testEtcdFailover,
|
||||
},
|
||||
}
|
||||
|
@ -275,3 +275,4 @@
|
||||
<time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeInvoices]: context canceled
|
||||
<time> [ERR] RPCS: [/lnrpc.Lightning/SubscribeChannelGraph]: context deadline exceeded
|
||||
<time> [ERR] RPCS: [/invoicesrpc.Invoices/SubscribeSingleInvoice]: context canceled
|
||||
<time> [ERR] RPCS: [/lnrpc.State/SubscribeState]: context canceled
|
||||
|
124
lntest/node.go
124
lntest/node.go
@ -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
|
||||
// is reached.
|
||||
func nextAvailablePort() int {
|
||||
func NextAvailablePort() int {
|
||||
port := atomic.AddUint32(&lastPort, 1)
|
||||
for port < 65535 {
|
||||
// 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
|
||||
// generator which is prone to use colliding ports.
|
||||
func GenerateBtcdListenerAddresses() (string, string) {
|
||||
return fmt.Sprintf(listenerFormat, nextAvailablePort()),
|
||||
fmt.Sprintf(listenerFormat, nextAvailablePort())
|
||||
return fmt.Sprintf(listenerFormat, NextAvailablePort()),
|
||||
fmt.Sprintf(listenerFormat, NextAvailablePort())
|
||||
}
|
||||
|
||||
// generateListeningPorts returns four ints representing ports to listen on
|
||||
// designated for the current lightning network test. This returns the next
|
||||
// available ports for the p2p, rpc, rest and profiling services.
|
||||
func generateListeningPorts() (int, int, int, int) {
|
||||
p2p := nextAvailablePort()
|
||||
rpc := nextAvailablePort()
|
||||
rest := nextAvailablePort()
|
||||
profile := nextAvailablePort()
|
||||
p2p := NextAvailablePort()
|
||||
rpc := NextAvailablePort()
|
||||
rest := NextAvailablePort()
|
||||
profile := NextAvailablePort()
|
||||
|
||||
return p2p, rpc, rest, profile
|
||||
}
|
||||
@ -303,16 +303,15 @@ func (cfg NodeConfig) genArgs() []string {
|
||||
args = append(
|
||||
args, fmt.Sprintf(
|
||||
"--db.etcd.embedded_client_port=%v",
|
||||
nextAvailablePort(),
|
||||
NextAvailablePort(),
|
||||
),
|
||||
)
|
||||
args = append(
|
||||
args, fmt.Sprintf(
|
||||
"--db.etcd.embedded_peer_port=%v",
|
||||
nextAvailablePort(),
|
||||
NextAvailablePort(),
|
||||
),
|
||||
)
|
||||
args = append(args, "--db.etcd.embedded")
|
||||
}
|
||||
|
||||
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
|
||||
// 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{})
|
||||
|
||||
args := hn.Cfg.genArgs()
|
||||
@ -643,6 +644,12 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error {
|
||||
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
|
||||
// connected client, we have to kill the process.
|
||||
useMacaroons := !hn.Cfg.HasSeed
|
||||
@ -652,6 +659,88 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error) error {
|
||||
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
|
||||
// additional step to unlock the wallet. The connection returned will
|
||||
// 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,
|
||||
// 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.
|
||||
func (hn *HarnessNode) initClientWhenReady() error {
|
||||
func (hn *HarnessNode) initClientWhenReady(timeout time.Duration) error {
|
||||
var (
|
||||
conn *grpc.ClientConn
|
||||
connErr error
|
||||
@ -675,7 +764,7 @@ func (hn *HarnessNode) initClientWhenReady() error {
|
||||
if err := wait.NoError(func() error {
|
||||
conn, connErr = hn.ConnectRPC(true)
|
||||
return connErr
|
||||
}, DefaultTimeout); err != nil {
|
||||
}, timeout); err != nil {
|
||||
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
|
||||
// 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
|
||||
@ -1058,6 +1147,11 @@ func (hn *HarnessNode) shutdown() error {
|
||||
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
|
||||
// notified once it's detected within the test Lightning Network, that a
|
||||
// channel has either been added or closed.
|
||||
|
@ -19,12 +19,14 @@ import (
|
||||
"github.com/btcsuite/btcutil/psbt"
|
||||
"github.com/btcsuite/btcwallet/chain"
|
||||
"github.com/btcsuite/btcwallet/waddrmgr"
|
||||
"github.com/btcsuite/btcwallet/wallet"
|
||||
base "github.com/btcsuite/btcwallet/wallet"
|
||||
"github.com/btcsuite/btcwallet/wallet/txauthor"
|
||||
"github.com/btcsuite/btcwallet/wallet/txrules"
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
"github.com/btcsuite/btcwallet/wtxmgr"
|
||||
"github.com/lightningnetwork/lnd/blockcache"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
@ -37,6 +39,13 @@ const (
|
||||
// UnconfirmedHeight is the special case end height that is used to
|
||||
// obtain unconfirmed transactions from ListTransactionDetails.
|
||||
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 (
|
||||
@ -87,9 +96,6 @@ var _ lnwallet.BlockChainIO = (*BtcWallet)(nil)
|
||||
// New returns a new fully initialized instance of BtcWallet given a valid
|
||||
// configuration struct.
|
||||
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.
|
||||
chainKeyScope := waddrmgr.KeyScope{
|
||||
Purpose: keychain.BIP0043Purpose,
|
||||
@ -108,10 +114,13 @@ func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) {
|
||||
} else {
|
||||
pubPass = cfg.PublicPass
|
||||
}
|
||||
loader := base.NewLoader(
|
||||
cfg.NetParams, netDir, cfg.NoFreelistSync,
|
||||
cfg.DBTimeOut, cfg.RecoveryWindow,
|
||||
|
||||
loader, err := NewWalletLoader(
|
||||
cfg.NetParams, cfg.RecoveryWindow, cfg.LoaderOptions...,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
walletExists, err := loader.WalletExists()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -149,6 +158,104 @@ func New(cfg Config, blockCache *blockcache.BlockCache) (*BtcWallet, error) {
|
||||
}, 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.
|
||||
//
|
||||
// This is a part of the WalletController interface.
|
||||
|
@ -28,10 +28,6 @@ var (
|
||||
// Config is a struct which houses configuration parameters which modify the
|
||||
// instance of BtcWallet generated by the New() function.
|
||||
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
|
||||
// generated log files.
|
||||
LogDir string
|
||||
@ -76,14 +72,8 @@ type Config struct {
|
||||
// normally when creating the BtcWallet.
|
||||
Wallet *wallet.Wallet
|
||||
|
||||
// NoFreelistSync, if true, prevents the database from syncing its
|
||||
// freelist to disk, resulting in improved performance at the expense of
|
||||
// increased startup time.
|
||||
NoFreelistSync bool
|
||||
|
||||
// DBTimeOut specifies the timeout value to use when opening the wallet
|
||||
// database.
|
||||
DBTimeOut time.Duration
|
||||
// LoaderOptions holds functional wallet db loader options.
|
||||
LoaderOptions []LoaderOption
|
||||
}
|
||||
|
||||
// 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{
|
||||
PrivatePass: []byte("alice-pass"),
|
||||
HdSeed: aliceSeedBytes,
|
||||
DataDir: tempTestDirAlice,
|
||||
NetParams: netParams,
|
||||
ChainSource: aliceClient,
|
||||
CoinType: keychain.CoinTypeTestnet,
|
||||
// wallet starts in recovery mode
|
||||
RecoveryWindow: 2,
|
||||
LoaderOptions: []btcwallet.LoaderOption{
|
||||
btcwallet.LoaderWithLocalWalletDB(
|
||||
tempTestDirAlice, false, time.Minute,
|
||||
),
|
||||
},
|
||||
}
|
||||
aliceWalletController, err = walletDriver.New(
|
||||
aliceWalletConfig, blockCache,
|
||||
@ -3454,12 +3458,16 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
||||
bobWalletConfig := &btcwallet.Config{
|
||||
PrivatePass: []byte("bob-pass"),
|
||||
HdSeed: bobSeedBytes,
|
||||
DataDir: tempTestDirBob,
|
||||
NetParams: netParams,
|
||||
ChainSource: bobClient,
|
||||
CoinType: keychain.CoinTypeTestnet,
|
||||
// wallet starts without recovery mode
|
||||
RecoveryWindow: 0,
|
||||
LoaderOptions: []btcwallet.LoaderOption{
|
||||
btcwallet.LoaderWithLocalWalletDB(
|
||||
tempTestDirBob, false, time.Minute,
|
||||
),
|
||||
},
|
||||
}
|
||||
bobWalletController, err = walletDriver.New(
|
||||
bobWalletConfig, blockCache,
|
||||
|
2
log.go
2
log.go
@ -14,6 +14,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/chanfitness"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channelnotifier"
|
||||
"github.com/lightningnetwork/lnd/cluster"
|
||||
"github.com/lightningnetwork/lnd/contractcourt"
|
||||
"github.com/lightningnetwork/lnd/discovery"
|
||||
"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, chanacceptor.Subsystem, interceptor, chanacceptor.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
|
||||
|
@ -21,10 +21,16 @@ import (
|
||||
type rpcState uint8
|
||||
|
||||
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,
|
||||
// but the wallet is not yet created. In this state we'll only allow
|
||||
// calls to the WalletUnlockerService.
|
||||
walletNotCreated rpcState = iota
|
||||
walletNotCreated
|
||||
|
||||
// walletLocked indicates the RPC server is active, but the wallet is
|
||||
// locked. In this state we'll only allow calls to the
|
||||
@ -40,6 +46,11 @@ const (
|
||||
)
|
||||
|
||||
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 = fmt.Errorf("wallet not created, create one to enable " +
|
||||
"full RPC access")
|
||||
@ -71,6 +82,7 @@ var (
|
||||
// The State service must be available at all times, even
|
||||
// before we can check macaroons, so we whitelist it.
|
||||
"/lnrpc.State/SubscribeState": {},
|
||||
"/lnrpc.State/GetState": {},
|
||||
}
|
||||
)
|
||||
|
||||
@ -110,16 +122,9 @@ type InterceptorChain struct {
|
||||
var _ lnrpc.StateServer = (*InterceptorChain)(nil)
|
||||
|
||||
// NewInterceptorChain creates a new InterceptorChain.
|
||||
func NewInterceptorChain(log btclog.Logger, noMacaroons,
|
||||
walletExists bool) *InterceptorChain {
|
||||
|
||||
startState := walletNotCreated
|
||||
if walletExists {
|
||||
startState = walletLocked
|
||||
}
|
||||
|
||||
func NewInterceptorChain(log btclog.Logger, noMacaroons bool) *InterceptorChain {
|
||||
return &InterceptorChain{
|
||||
state: startState,
|
||||
state: waitingToStart,
|
||||
ntfnServer: subscribe.NewServer(),
|
||||
noMacaroons: noMacaroons,
|
||||
permissionMap: make(map[string][]bakery.Op),
|
||||
@ -150,6 +155,26 @@ func (r *InterceptorChain) Stop() error {
|
||||
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
|
||||
// walletLocked to walletUnlocked.
|
||||
func (r *InterceptorChain) SetWalletUnlocked() {
|
||||
@ -169,6 +194,31 @@ func (r *InterceptorChain) SetRPCActive() {
|
||||
_ = 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
|
||||
// state will always be delivered immediately.
|
||||
//
|
||||
@ -177,23 +227,14 @@ func (r *InterceptorChain) SubscribeState(req *lnrpc.SubscribeStateRequest,
|
||||
stream lnrpc.State_SubscribeStateServer) error {
|
||||
|
||||
sendStateUpdate := func(state rpcState) error {
|
||||
resp := &lnrpc.SubscribeStateResponse{}
|
||||
switch state {
|
||||
case walletNotCreated:
|
||||
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)
|
||||
walletState, err := rpcStateToWalletState(state)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return stream.Send(resp)
|
||||
return stream.Send(&lnrpc.SubscribeStateResponse{
|
||||
State: walletState,
|
||||
})
|
||||
}
|
||||
|
||||
// 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
|
||||
// done every RPC call made will have to pass a valid macaroon to be accepted.
|
||||
func (r *InterceptorChain) AddMacaroonService(svc *macaroons.Service) {
|
||||
@ -459,6 +518,11 @@ func (r *InterceptorChain) checkRPCState(srv interface{}) error {
|
||||
|
||||
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
|
||||
// accepted.
|
||||
case walletNotCreated:
|
||||
|
14
rpcserver.go
14
rpcserver.go
@ -1122,7 +1122,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
|
||||
|
||||
// Calculate an appropriate fee rate for this transaction.
|
||||
feePerKw, err := calculateFeeRate(
|
||||
uint64(in.SatPerByte), in.SatPerVbyte,
|
||||
uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
|
||||
uint32(in.TargetConf), r.server.cc.FeeEstimator,
|
||||
)
|
||||
if err != nil {
|
||||
@ -1330,7 +1330,7 @@ func (r *rpcServer) SendMany(ctx context.Context,
|
||||
|
||||
// Calculate an appropriate fee rate for this transaction.
|
||||
feePerKw, err := calculateFeeRate(
|
||||
uint64(in.SatPerByte), in.SatPerVbyte,
|
||||
uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
|
||||
uint32(in.TargetConf), r.server.cc.FeeEstimator,
|
||||
)
|
||||
if err != nil {
|
||||
@ -1731,7 +1731,7 @@ func newPsbtAssembler(req *lnrpc.OpenChannelRequest, normalizedMinConfs int32,
|
||||
"minimum confirmation is not supported for PSBT " +
|
||||
"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 " +
|
||||
"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
|
||||
// as hex strings.
|
||||
case isSync:
|
||||
keyBytes, err := hex.DecodeString(in.NodePubkeyString)
|
||||
keyBytes, err := hex.DecodeString(in.NodePubkeyString) // nolint:staticcheck
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1884,7 +1884,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
|
||||
|
||||
// Calculate an appropriate fee rate for this transaction.
|
||||
feeRate, err := calculateFeeRate(
|
||||
uint64(in.SatPerByte), in.SatPerVbyte,
|
||||
uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
|
||||
uint32(in.TargetConf), r.server.cc.FeeEstimator,
|
||||
)
|
||||
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
|
||||
// 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) {
|
||||
|
||||
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
|
||||
// transaction.
|
||||
feeRate, err := calculateFeeRate(
|
||||
uint64(in.SatPerByte), in.SatPerVbyte,
|
||||
uint64(in.SatPerByte), in.SatPerVbyte, // nolint:staticcheck
|
||||
uint32(in.TargetConf), r.server.cc.FeeEstimator,
|
||||
)
|
||||
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.
|
||||
; 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]
|
||||
; If true, prevents the database from syncing its freelist to disk.
|
||||
; db.bolt.nofreelistsync=1
|
||||
|
@ -137,12 +137,16 @@ type UnlockerService struct {
|
||||
// resetWalletTransactions indicates that the wallet state should be
|
||||
// reset on unlock to force a full chain rescan.
|
||||
resetWalletTransactions bool
|
||||
|
||||
// LoaderOpts holds the functional options for the wallet loader.
|
||||
loaderOpts []btcwallet.LoaderOption
|
||||
}
|
||||
|
||||
// New creates and returns a new UnlockerService.
|
||||
func New(chainDir string, params *chaincfg.Params, noFreelistSync bool,
|
||||
macaroonFiles []string, dbTimeout time.Duration,
|
||||
resetWalletTransactions bool) *UnlockerService {
|
||||
resetWalletTransactions bool,
|
||||
loaderOpts []btcwallet.LoaderOption) *UnlockerService {
|
||||
|
||||
return &UnlockerService{
|
||||
InitMsgs: make(chan *WalletInitMsg, 1),
|
||||
@ -157,17 +161,31 @@ func New(chainDir string, params *chaincfg.Params, noFreelistSync bool,
|
||||
dbTimeout: dbTimeout,
|
||||
noFreelistSync: noFreelistSync,
|
||||
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
|
||||
// UnlockerService is using.
|
||||
func (u *UnlockerService) WalletExists() (bool, error) {
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
loader := wallet.NewLoader(
|
||||
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0,
|
||||
)
|
||||
|
||||
loader, err := u.newLoader(0)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
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
|
||||
// so we don't show a *new* seed to the user if one already exists.
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
loader := wallet.NewLoader(
|
||||
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0,
|
||||
)
|
||||
loader, err := u.newLoader(0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
walletExists, err := loader.WalletExists()
|
||||
if err != nil {
|
||||
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
|
||||
// wallet's files so we can check if the wallet already exists.
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
loader := wallet.NewLoader(
|
||||
u.netParams, netDir, u.noFreelistSync,
|
||||
u.dbTimeout, uint32(recoveryWindow),
|
||||
)
|
||||
loader, err := u.newLoader(uint32(recoveryWindow))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
walletExists, err := loader.WalletExists()
|
||||
if err != nil {
|
||||
@ -392,11 +410,10 @@ func (u *UnlockerService) UnlockWallet(ctx context.Context,
|
||||
password := in.WalletPassword
|
||||
recoveryWindow := uint32(in.RecoveryWindow)
|
||||
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
loader := wallet.NewLoader(
|
||||
u.netParams, netDir, u.noFreelistSync,
|
||||
u.dbTimeout, recoveryWindow,
|
||||
)
|
||||
loader, err := u.newLoader(recoveryWindow)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Check if wallet already exists.
|
||||
walletExists, err := loader.WalletExists()
|
||||
@ -492,10 +509,10 @@ func (u *UnlockerService) UnlockWallet(ctx context.Context,
|
||||
func (u *UnlockerService) ChangePassword(ctx context.Context,
|
||||
in *lnrpc.ChangePasswordRequest) (*lnrpc.ChangePasswordResponse, error) {
|
||||
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
loader := wallet.NewLoader(
|
||||
u.netParams, netDir, u.noFreelistSync, u.dbTimeout, 0,
|
||||
)
|
||||
loader, err := u.newLoader(0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// First, we'll make sure the wallet exists for the specific chain and
|
||||
// network.
|
||||
@ -572,6 +589,7 @@ func (u *UnlockerService) ChangePassword(ctx context.Context,
|
||||
// then close it again.
|
||||
// Attempt to open the macaroon DB, unlock it and then change
|
||||
// the passphrase.
|
||||
netDir := btcwallet.NetworkDir(u.chainDir, u.netParams)
|
||||
macaroonService, err := macaroons.NewService(
|
||||
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) {
|
||||
createTestWalletWithPw(t, testPassword, testPassword, dir, netParams)
|
||||
}
|
||||
@ -148,7 +155,7 @@ func TestGenSeed(t *testing.T) {
|
||||
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// 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(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// 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(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// 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.
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// Once we have the unlocker service created, we'll now instantiate a
|
||||
@ -346,7 +353,7 @@ func TestCreateWalletInvalidEntropy(t *testing.T) {
|
||||
// Create new UnlockerService.
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// We'll attempt to init the wallet with an invalid cipher seed and
|
||||
@ -379,7 +386,7 @@ func TestUnlockWallet(t *testing.T) {
|
||||
// unlock.
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, nil, kvdb.DefaultDBTimeout,
|
||||
true,
|
||||
true, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@ -471,7 +478,7 @@ func TestChangeWalletPasswordNewRootkey(t *testing.T) {
|
||||
// Create a new UnlockerService with our temp files.
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, tempFiles, kvdb.DefaultDBTimeout,
|
||||
false,
|
||||
false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
@ -583,7 +590,7 @@ func TestChangeWalletPasswordStateless(t *testing.T) {
|
||||
service := walletunlocker.New(
|
||||
testDir, testNetParams, true, []string{
|
||||
tempMacFile, nonExistingFile,
|
||||
}, kvdb.DefaultDBTimeout, false,
|
||||
}, kvdb.DefaultDBTimeout, false, testLoaderOpts(testDir),
|
||||
)
|
||||
|
||||
// Create a wallet we can try to unlock. We use the default password
|
||||
|
Loading…
Reference in New Issue
Block a user