lnrpc 0.9.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +24 -24
- data/README.md +30 -16
- data/examples.rb +13 -6
- data/generate-grpc-service-files.sh +29 -0
- data/lib/grpc_services/autopilotrpc/autopilot_pb.rb +48 -0
- data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +40 -0
- data/lib/grpc_services/chainrpc/chainnotifier_pb.rb +67 -0
- data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +51 -0
- data/lib/grpc_services/invoicesrpc/invoices_pb.rb +48 -0
- data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +41 -0
- data/lib/grpc_services/lnclipb/lncli_pb.rb +18 -0
- data/lib/grpc_services/routerrpc/router_pb.rb +277 -0
- data/lib/grpc_services/routerrpc/router_services_pb.rb +105 -0
- data/lib/grpc_services/rpc_pb.rb +1388 -0
- data/lib/{lnrpc → grpc_services}/rpc_services_pb.rb +165 -178
- data/lib/grpc_services/signrpc/signer_pb.rb +84 -0
- data/lib/grpc_services/signrpc/signer_services_pb.rb +69 -0
- data/lib/grpc_services/verrpc/verrpc_pb.rb +27 -0
- data/lib/grpc_services/verrpc/verrpc_services_pb.rb +27 -0
- data/lib/grpc_services/walletrpc/walletkit_pb.rb +254 -0
- data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +188 -0
- data/lib/grpc_services/walletunlocker_pb.rb +57 -0
- data/lib/grpc_services/walletunlocker_services_pb.rb +72 -0
- data/lib/grpc_services/watchtowerrpc/watchtower_pb.rb +21 -0
- data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +28 -0
- data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +83 -0
- data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +43 -0
- data/lib/lnrpc.rb +19 -3
- data/lib/lnrpc/client.rb +62 -46
- data/lib/lnrpc/grpc_wrapper.rb +43 -0
- data/lib/lnrpc/version.rb +1 -1
- data/lnrpc.gemspec +7 -5
- metadata +41 -17
- data/lib/lnrpc/rpc.proto +0 -3075
- data/lib/lnrpc/rpc_pb.rb +0 -1082
@@ -0,0 +1,188 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: walletrpc/walletkit.proto for package 'walletrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'walletrpc/walletkit_pb'
|
6
|
+
|
7
|
+
module Walletrpc
|
8
|
+
module WalletKit
|
9
|
+
# WalletKit is a service that gives access to the core functionalities of the
|
10
|
+
# daemon's wallet.
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'walletrpc.WalletKit'
|
18
|
+
|
19
|
+
#
|
20
|
+
# ListUnspent returns a list of all utxos spendable by the wallet with a
|
21
|
+
# number of confirmations between the specified minimum and maximum.
|
22
|
+
rpc :ListUnspent, ::Walletrpc::ListUnspentRequest, ::Walletrpc::ListUnspentResponse
|
23
|
+
#
|
24
|
+
# LeaseOutput locks an output to the given ID, preventing it from being
|
25
|
+
# available for any future coin selection attempts. The absolute time of the
|
26
|
+
# lock's expiration is returned. The expiration of the lock can be extended by
|
27
|
+
# successive invocations of this RPC. Outputs can be unlocked before their
|
28
|
+
# expiration through `ReleaseOutput`.
|
29
|
+
rpc :LeaseOutput, ::Walletrpc::LeaseOutputRequest, ::Walletrpc::LeaseOutputResponse
|
30
|
+
#
|
31
|
+
# ReleaseOutput unlocks an output, allowing it to be available for coin
|
32
|
+
# selection if it remains unspent. The ID should match the one used to
|
33
|
+
# originally lock the output.
|
34
|
+
rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse
|
35
|
+
#
|
36
|
+
# ListLeases lists all currently locked utxos.
|
37
|
+
rpc :ListLeases, ::Walletrpc::ListLeasesRequest, ::Walletrpc::ListLeasesResponse
|
38
|
+
#
|
39
|
+
# DeriveNextKey attempts to derive the *next* key within the key family
|
40
|
+
# (account in BIP43) specified. This method should return the next external
|
41
|
+
# child within this branch.
|
42
|
+
rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor
|
43
|
+
#
|
44
|
+
# DeriveKey attempts to derive an arbitrary key specified by the passed
|
45
|
+
# KeyLocator.
|
46
|
+
rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor
|
47
|
+
#
|
48
|
+
# NextAddr returns the next unused address within the wallet.
|
49
|
+
rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse
|
50
|
+
#
|
51
|
+
# ListAccounts retrieves all accounts belonging to the wallet by default. A
|
52
|
+
# name and key scope filter can be provided to filter through all of the
|
53
|
+
# wallet accounts and return only those matching.
|
54
|
+
rpc :ListAccounts, ::Walletrpc::ListAccountsRequest, ::Walletrpc::ListAccountsResponse
|
55
|
+
#
|
56
|
+
# ImportAccount imports an account backed by an account extended public key.
|
57
|
+
# The master key fingerprint denotes the fingerprint of the root key
|
58
|
+
# corresponding to the account public key (also known as the key with
|
59
|
+
# derivation path m/). This may be required by some hardware wallets for
|
60
|
+
# proper identification and signing.
|
61
|
+
#
|
62
|
+
# The address type can usually be inferred from the key's version, but may be
|
63
|
+
# required for certain keys to map them into the proper scope.
|
64
|
+
#
|
65
|
+
# For BIP-0044 keys, an address type must be specified as we intend to not
|
66
|
+
# support importing BIP-0044 keys into the wallet using the legacy
|
67
|
+
# pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
|
68
|
+
# the standard BIP-0049 derivation scheme, while a witness address type will
|
69
|
+
# force the standard BIP-0084 derivation scheme.
|
70
|
+
#
|
71
|
+
# For BIP-0049 keys, an address type must also be specified to make a
|
72
|
+
# distinction between the standard BIP-0049 address schema (nested witness
|
73
|
+
# pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
|
74
|
+
# externally, witness pubkeys internally).
|
75
|
+
#
|
76
|
+
# NOTE: Events (deposits/spends) for keys derived from an account will only be
|
77
|
+
# detected by lnd if they happen after the import. Rescans to detect past
|
78
|
+
# events will be supported later on.
|
79
|
+
rpc :ImportAccount, ::Walletrpc::ImportAccountRequest, ::Walletrpc::ImportAccountResponse
|
80
|
+
#
|
81
|
+
# ImportPublicKey imports a public key as watch-only into the wallet.
|
82
|
+
#
|
83
|
+
# NOTE: Events (deposits/spends) for a key will only be detected by lnd if
|
84
|
+
# they happen after the import. Rescans to detect past events will be
|
85
|
+
# supported later on.
|
86
|
+
rpc :ImportPublicKey, ::Walletrpc::ImportPublicKeyRequest, ::Walletrpc::ImportPublicKeyResponse
|
87
|
+
#
|
88
|
+
# PublishTransaction attempts to publish the passed transaction to the
|
89
|
+
# network. Once this returns without an error, the wallet will continually
|
90
|
+
# attempt to re-broadcast the transaction on start up, until it enters the
|
91
|
+
# chain.
|
92
|
+
rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse
|
93
|
+
#
|
94
|
+
# SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
95
|
+
# allows the caller to create a transaction that sends to several outputs at
|
96
|
+
# once. This is ideal when wanting to batch create a set of transactions.
|
97
|
+
rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse
|
98
|
+
#
|
99
|
+
# EstimateFee attempts to query the internal fee estimator of the wallet to
|
100
|
+
# determine the fee (in sat/kw) to attach to a transaction in order to
|
101
|
+
# achieve the confirmation target.
|
102
|
+
rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse
|
103
|
+
#
|
104
|
+
# PendingSweeps returns lists of on-chain outputs that lnd is currently
|
105
|
+
# attempting to sweep within its central batching engine. Outputs with similar
|
106
|
+
# fee rates are batched together in order to sweep them within a single
|
107
|
+
# transaction.
|
108
|
+
#
|
109
|
+
# NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
110
|
+
# remain supported. This is an advanced API that depends on the internals of
|
111
|
+
# the UtxoSweeper, so things may change.
|
112
|
+
rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse
|
113
|
+
#
|
114
|
+
# BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
115
|
+
# takes a different approach than bitcoind's bumpfee command. lnd has a
|
116
|
+
# central batching engine in which inputs with similar fee rates are batched
|
117
|
+
# together to save on transaction fees. Due to this, we cannot rely on
|
118
|
+
# bumping the fee on a specific transaction, since transactions can change at
|
119
|
+
# any point with the addition of new inputs. The list of inputs that
|
120
|
+
# currently exist within lnd's central batching engine can be retrieved
|
121
|
+
# through the PendingSweeps RPC.
|
122
|
+
#
|
123
|
+
# When bumping the fee of an input that currently exists within lnd's central
|
124
|
+
# batching engine, a higher fee transaction will be created that replaces the
|
125
|
+
# lower fee transaction through the Replace-By-Fee (RBF) policy. If it
|
126
|
+
#
|
127
|
+
# This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
|
128
|
+
# (CPFP), where the child transaction pays for its parent's fee. This can be
|
129
|
+
# done by specifying an outpoint within the low fee transaction that is under
|
130
|
+
# the control of the wallet.
|
131
|
+
#
|
132
|
+
# The fee preference can be expressed either as a specific fee rate or a delta
|
133
|
+
# of blocks in which the output should be swept on-chain within. If a fee
|
134
|
+
# preference is not explicitly specified, then an error is returned.
|
135
|
+
#
|
136
|
+
# Note that this RPC currently doesn't perform any validation checks on the
|
137
|
+
# fee preference being provided. For now, the responsibility of ensuring that
|
138
|
+
# the new fee preference is sufficient is delegated to the user.
|
139
|
+
rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse
|
140
|
+
#
|
141
|
+
# ListSweeps returns a list of the sweep transactions our node has produced.
|
142
|
+
# Note that these sweeps may not be confirmed yet, as we record sweeps on
|
143
|
+
# broadcast, not confirmation.
|
144
|
+
rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse
|
145
|
+
#
|
146
|
+
# LabelTransaction adds a label to a transaction. If the transaction already
|
147
|
+
# has a label the call will fail unless the overwrite bool is set. This will
|
148
|
+
# overwrite the exiting transaction label. Labels must not be empty, and
|
149
|
+
# cannot exceed 500 characters.
|
150
|
+
rpc :LabelTransaction, ::Walletrpc::LabelTransactionRequest, ::Walletrpc::LabelTransactionResponse
|
151
|
+
#
|
152
|
+
# FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
153
|
+
# the outputs specified in the template. There are two ways of specifying a
|
154
|
+
# template: Either by passing in a PSBT with at least one output declared or
|
155
|
+
# by passing in a raw TxTemplate message.
|
156
|
+
#
|
157
|
+
# If there are no inputs specified in the template, coin selection is
|
158
|
+
# performed automatically. If the template does contain any inputs, it is
|
159
|
+
# assumed that full coin selection happened externally and no additional
|
160
|
+
# inputs are added. If the specified inputs aren't enough to fund the outputs
|
161
|
+
# with the given fee rate, an error is returned.
|
162
|
+
#
|
163
|
+
# After either selecting or verifying the inputs, all input UTXOs are locked
|
164
|
+
# with an internal app ID.
|
165
|
+
#
|
166
|
+
# NOTE: If this method returns without an error, it is the caller's
|
167
|
+
# responsibility to either spend the locked UTXOs (by finalizing and then
|
168
|
+
# publishing the transaction) or to unlock/release the locked UTXOs in case of
|
169
|
+
# an error on the caller's side.
|
170
|
+
rpc :FundPsbt, ::Walletrpc::FundPsbtRequest, ::Walletrpc::FundPsbtResponse
|
171
|
+
#
|
172
|
+
# FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
173
|
+
# declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
174
|
+
# the last signer of the transaction. That means, if there are any unsigned
|
175
|
+
# non-witness inputs or inputs without UTXO information attached or inputs
|
176
|
+
# without witness data that do not belong to lnd's wallet, this method will
|
177
|
+
# fail. If no error is returned, the PSBT is ready to be extracted and the
|
178
|
+
# final TX within to be broadcast.
|
179
|
+
#
|
180
|
+
# NOTE: This method does NOT publish the transaction once finalized. It is the
|
181
|
+
# caller's responsibility to either publish the transaction on success or
|
182
|
+
# unlock/release any locked UTXOs in case of an error in this method.
|
183
|
+
rpc :FinalizePsbt, ::Walletrpc::FinalizePsbtRequest, ::Walletrpc::FinalizePsbtResponse
|
184
|
+
end
|
185
|
+
|
186
|
+
Stub = Service.rpc_stub_class
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: walletunlocker.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'rpc_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("walletunlocker.proto", :syntax => :proto3) do
|
9
|
+
add_message "lnrpc.GenSeedRequest" do
|
10
|
+
optional :aezeed_passphrase, :bytes, 1
|
11
|
+
optional :seed_entropy, :bytes, 2
|
12
|
+
end
|
13
|
+
add_message "lnrpc.GenSeedResponse" do
|
14
|
+
repeated :cipher_seed_mnemonic, :string, 1
|
15
|
+
optional :enciphered_seed, :bytes, 2
|
16
|
+
end
|
17
|
+
add_message "lnrpc.InitWalletRequest" do
|
18
|
+
optional :wallet_password, :bytes, 1
|
19
|
+
repeated :cipher_seed_mnemonic, :string, 2
|
20
|
+
optional :aezeed_passphrase, :bytes, 3
|
21
|
+
optional :recovery_window, :int32, 4
|
22
|
+
optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot"
|
23
|
+
optional :stateless_init, :bool, 6
|
24
|
+
end
|
25
|
+
add_message "lnrpc.InitWalletResponse" do
|
26
|
+
optional :admin_macaroon, :bytes, 1
|
27
|
+
end
|
28
|
+
add_message "lnrpc.UnlockWalletRequest" do
|
29
|
+
optional :wallet_password, :bytes, 1
|
30
|
+
optional :recovery_window, :int32, 2
|
31
|
+
optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot"
|
32
|
+
optional :stateless_init, :bool, 4
|
33
|
+
end
|
34
|
+
add_message "lnrpc.UnlockWalletResponse" do
|
35
|
+
end
|
36
|
+
add_message "lnrpc.ChangePasswordRequest" do
|
37
|
+
optional :current_password, :bytes, 1
|
38
|
+
optional :new_password, :bytes, 2
|
39
|
+
optional :stateless_init, :bool, 3
|
40
|
+
optional :new_macaroon_root_key, :bool, 4
|
41
|
+
end
|
42
|
+
add_message "lnrpc.ChangePasswordResponse" do
|
43
|
+
optional :admin_macaroon, :bytes, 1
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module Lnrpc
|
49
|
+
GenSeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedRequest").msgclass
|
50
|
+
GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
|
51
|
+
InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass
|
52
|
+
InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass
|
53
|
+
UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass
|
54
|
+
UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
|
55
|
+
ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass
|
56
|
+
ChangePasswordResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordResponse").msgclass
|
57
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: walletunlocker.proto for package 'lnrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'walletunlocker_pb'
|
6
|
+
|
7
|
+
module Lnrpc
|
8
|
+
module WalletUnlocker
|
9
|
+
#
|
10
|
+
# Comments in this file will be directly parsed into the API
|
11
|
+
# Documentation as descriptions of the associated method, message, or field.
|
12
|
+
# These descriptions should go right above the definition of the object, and
|
13
|
+
# can be in either block or // comment format.
|
14
|
+
#
|
15
|
+
# An RPC method can be matched to an lncli command by placing a line in the
|
16
|
+
# beginning of the description in exactly the following format:
|
17
|
+
# lncli: `methodname`
|
18
|
+
#
|
19
|
+
# Failure to specify the exact name of the command will cause documentation
|
20
|
+
# generation to fail.
|
21
|
+
#
|
22
|
+
# More information on how exactly the gRPC documentation is generated from
|
23
|
+
# this proto file can be found here:
|
24
|
+
# https://github.com/lightninglabs/lightning-api
|
25
|
+
#
|
26
|
+
# WalletUnlocker is a service that is used to set up a wallet password for
|
27
|
+
# lnd at first startup, and unlock a previously set up wallet.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'lnrpc.WalletUnlocker'
|
35
|
+
|
36
|
+
#
|
37
|
+
# GenSeed is the first method that should be used to instantiate a new lnd
|
38
|
+
# instance. This method allows a caller to generate a new aezeed cipher seed
|
39
|
+
# given an optional passphrase. If provided, the passphrase will be necessary
|
40
|
+
# to decrypt the cipherseed to expose the internal wallet seed.
|
41
|
+
#
|
42
|
+
# Once the cipherseed is obtained and verified by the user, the InitWallet
|
43
|
+
# method should be used to commit the newly generated seed, and create the
|
44
|
+
# wallet.
|
45
|
+
rpc :GenSeed, ::Lnrpc::GenSeedRequest, ::Lnrpc::GenSeedResponse
|
46
|
+
#
|
47
|
+
# InitWallet is used when lnd is starting up for the first time to fully
|
48
|
+
# initialize the daemon and its internal wallet. At the very least a wallet
|
49
|
+
# password must be provided. This will be used to encrypt sensitive material
|
50
|
+
# on disk.
|
51
|
+
#
|
52
|
+
# In the case of a recovery scenario, the user can also specify their aezeed
|
53
|
+
# mnemonic and passphrase. If set, then the daemon will use this prior state
|
54
|
+
# to initialize its internal wallet.
|
55
|
+
#
|
56
|
+
# Alternatively, this can be used along with the GenSeed RPC to obtain a
|
57
|
+
# seed, then present it to the user. Once it has been verified by the user,
|
58
|
+
# the seed can be fed into this RPC in order to commit the new wallet.
|
59
|
+
rpc :InitWallet, ::Lnrpc::InitWalletRequest, ::Lnrpc::InitWalletResponse
|
60
|
+
# lncli: `unlock`
|
61
|
+
# UnlockWallet is used at startup of lnd to provide a password to unlock
|
62
|
+
# the wallet database.
|
63
|
+
rpc :UnlockWallet, ::Lnrpc::UnlockWalletRequest, ::Lnrpc::UnlockWalletResponse
|
64
|
+
# lncli: `changepassword`
|
65
|
+
# ChangePassword changes the password of the encrypted wallet. This will
|
66
|
+
# automatically unlock the wallet database if successful.
|
67
|
+
rpc :ChangePassword, ::Lnrpc::ChangePasswordRequest, ::Lnrpc::ChangePasswordResponse
|
68
|
+
end
|
69
|
+
|
70
|
+
Stub = Service.rpc_stub_class
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: watchtowerrpc/watchtower.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("watchtowerrpc/watchtower.proto", :syntax => :proto3) do
|
8
|
+
add_message "watchtowerrpc.GetInfoRequest" do
|
9
|
+
end
|
10
|
+
add_message "watchtowerrpc.GetInfoResponse" do
|
11
|
+
optional :pubkey, :bytes, 1
|
12
|
+
repeated :listeners, :string, 2
|
13
|
+
repeated :uris, :string, 3
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Watchtowerrpc
|
19
|
+
GetInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoRequest").msgclass
|
20
|
+
GetInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoResponse").msgclass
|
21
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: watchtowerrpc/watchtower.proto for package 'watchtowerrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'watchtowerrpc/watchtower_pb'
|
6
|
+
|
7
|
+
module Watchtowerrpc
|
8
|
+
module Watchtower
|
9
|
+
# Watchtower is a service that grants access to the watchtower server
|
10
|
+
# functionality of the daemon.
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'watchtowerrpc.Watchtower'
|
18
|
+
|
19
|
+
# lncli: tower info
|
20
|
+
# GetInfo returns general information concerning the companion watchtower
|
21
|
+
# including its public key and URIs where the server is currently
|
22
|
+
# listening for clients.
|
23
|
+
rpc :GetInfo, ::Watchtowerrpc::GetInfoRequest, ::Watchtowerrpc::GetInfoResponse
|
24
|
+
end
|
25
|
+
|
26
|
+
Stub = Service.rpc_stub_class
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: wtclientrpc/wtclient.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("wtclientrpc/wtclient.proto", :syntax => :proto3) do
|
8
|
+
add_message "wtclientrpc.AddTowerRequest" do
|
9
|
+
optional :pubkey, :bytes, 1
|
10
|
+
optional :address, :string, 2
|
11
|
+
end
|
12
|
+
add_message "wtclientrpc.AddTowerResponse" do
|
13
|
+
end
|
14
|
+
add_message "wtclientrpc.RemoveTowerRequest" do
|
15
|
+
optional :pubkey, :bytes, 1
|
16
|
+
optional :address, :string, 2
|
17
|
+
end
|
18
|
+
add_message "wtclientrpc.RemoveTowerResponse" do
|
19
|
+
end
|
20
|
+
add_message "wtclientrpc.GetTowerInfoRequest" do
|
21
|
+
optional :pubkey, :bytes, 1
|
22
|
+
optional :include_sessions, :bool, 2
|
23
|
+
end
|
24
|
+
add_message "wtclientrpc.TowerSession" do
|
25
|
+
optional :num_backups, :uint32, 1
|
26
|
+
optional :num_pending_backups, :uint32, 2
|
27
|
+
optional :max_backups, :uint32, 3
|
28
|
+
optional :sweep_sat_per_byte, :uint32, 4
|
29
|
+
optional :sweep_sat_per_vbyte, :uint32, 5
|
30
|
+
end
|
31
|
+
add_message "wtclientrpc.Tower" do
|
32
|
+
optional :pubkey, :bytes, 1
|
33
|
+
repeated :addresses, :string, 2
|
34
|
+
optional :active_session_candidate, :bool, 3
|
35
|
+
optional :num_sessions, :uint32, 4
|
36
|
+
repeated :sessions, :message, 5, "wtclientrpc.TowerSession"
|
37
|
+
end
|
38
|
+
add_message "wtclientrpc.ListTowersRequest" do
|
39
|
+
optional :include_sessions, :bool, 1
|
40
|
+
end
|
41
|
+
add_message "wtclientrpc.ListTowersResponse" do
|
42
|
+
repeated :towers, :message, 1, "wtclientrpc.Tower"
|
43
|
+
end
|
44
|
+
add_message "wtclientrpc.StatsRequest" do
|
45
|
+
end
|
46
|
+
add_message "wtclientrpc.StatsResponse" do
|
47
|
+
optional :num_backups, :uint32, 1
|
48
|
+
optional :num_pending_backups, :uint32, 2
|
49
|
+
optional :num_failed_backups, :uint32, 3
|
50
|
+
optional :num_sessions_acquired, :uint32, 4
|
51
|
+
optional :num_sessions_exhausted, :uint32, 5
|
52
|
+
end
|
53
|
+
add_message "wtclientrpc.PolicyRequest" do
|
54
|
+
optional :policy_type, :enum, 1, "wtclientrpc.PolicyType"
|
55
|
+
end
|
56
|
+
add_message "wtclientrpc.PolicyResponse" do
|
57
|
+
optional :max_updates, :uint32, 1
|
58
|
+
optional :sweep_sat_per_byte, :uint32, 2
|
59
|
+
optional :sweep_sat_per_vbyte, :uint32, 3
|
60
|
+
end
|
61
|
+
add_enum "wtclientrpc.PolicyType" do
|
62
|
+
value :LEGACY, 0
|
63
|
+
value :ANCHOR, 1
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
module Wtclientrpc
|
69
|
+
AddTowerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.AddTowerRequest").msgclass
|
70
|
+
AddTowerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.AddTowerResponse").msgclass
|
71
|
+
RemoveTowerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.RemoveTowerRequest").msgclass
|
72
|
+
RemoveTowerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.RemoveTowerResponse").msgclass
|
73
|
+
GetTowerInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.GetTowerInfoRequest").msgclass
|
74
|
+
TowerSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.TowerSession").msgclass
|
75
|
+
Tower = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.Tower").msgclass
|
76
|
+
ListTowersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.ListTowersRequest").msgclass
|
77
|
+
ListTowersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.ListTowersResponse").msgclass
|
78
|
+
StatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsRequest").msgclass
|
79
|
+
StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass
|
80
|
+
PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass
|
81
|
+
PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass
|
82
|
+
PolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyType").enummodule
|
83
|
+
end
|