lnrpc 0.11.1 → 0.14.1
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/Gemfile.lock +23 -23
- data/README.md +8 -9
- data/examples.rb +43 -0
- data/generate-grpc-service-files.sh +2 -3
- data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +5 -5
- data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +4 -4
- data/lib/grpc_services/invoicesrpc/invoices_pb.rb +18 -0
- data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +9 -5
- data/lib/grpc_services/lnclipb/lncli_pb.rb +1 -0
- data/lib/grpc_services/routerrpc/router_pb.rb +50 -0
- data/lib/grpc_services/routerrpc/router_services_pb.rb +33 -14
- data/lib/grpc_services/rpc_pb.rb +123 -0
- data/lib/grpc_services/rpc_services_pb.rb +77 -63
- data/lib/grpc_services/signrpc/signer_pb.rb +3 -0
- data/lib/grpc_services/signrpc/signer_services_pb.rb +9 -8
- data/lib/grpc_services/verrpc/verrpc_services_pb.rb +2 -2
- data/lib/grpc_services/walletrpc/walletkit_pb.rb +108 -0
- data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +87 -14
- data/lib/grpc_services/walletunlocker_pb.rb +23 -0
- data/lib/grpc_services/walletunlocker_services_pb.rb +5 -5
- data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +2 -2
- data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +8 -0
- data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +7 -7
- data/lib/lnrpc/client.rb +1 -0
- data/lib/lnrpc/version.rb +1 -1
- data/lnrpc.gemspec +3 -3
- metadata +11 -11
@@ -5,11 +5,13 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
require 'rpc_pb'
|
7
7
|
require 'signrpc/signer_pb'
|
8
|
+
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
10
|
add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
|
10
11
|
add_message "walletrpc.ListUnspentRequest" do
|
11
12
|
optional :min_confs, :int32, 1
|
12
13
|
optional :max_confs, :int32, 2
|
14
|
+
optional :account, :string, 3
|
13
15
|
end
|
14
16
|
add_message "walletrpc.ListUnspentResponse" do
|
15
17
|
repeated :utxos, :message, 1, "lnrpc.Utxo"
|
@@ -17,6 +19,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
19
|
add_message "walletrpc.LeaseOutputRequest" do
|
18
20
|
optional :id, :bytes, 1
|
19
21
|
optional :outpoint, :message, 2, "lnrpc.OutPoint"
|
22
|
+
optional :expiration_seconds, :uint64, 3
|
20
23
|
end
|
21
24
|
add_message "walletrpc.LeaseOutputResponse" do
|
22
25
|
optional :expiration, :uint64, 1
|
@@ -32,10 +35,48 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
35
|
optional :key_family, :int32, 2
|
33
36
|
end
|
34
37
|
add_message "walletrpc.AddrRequest" do
|
38
|
+
optional :account, :string, 1
|
39
|
+
optional :type, :enum, 2, "walletrpc.AddressType"
|
40
|
+
optional :change, :bool, 3
|
35
41
|
end
|
36
42
|
add_message "walletrpc.AddrResponse" do
|
37
43
|
optional :addr, :string, 1
|
38
44
|
end
|
45
|
+
add_message "walletrpc.Account" do
|
46
|
+
optional :name, :string, 1
|
47
|
+
optional :address_type, :enum, 2, "walletrpc.AddressType"
|
48
|
+
optional :extended_public_key, :string, 3
|
49
|
+
optional :master_key_fingerprint, :bytes, 4
|
50
|
+
optional :derivation_path, :string, 5
|
51
|
+
optional :external_key_count, :uint32, 6
|
52
|
+
optional :internal_key_count, :uint32, 7
|
53
|
+
optional :watch_only, :bool, 8
|
54
|
+
end
|
55
|
+
add_message "walletrpc.ListAccountsRequest" do
|
56
|
+
optional :name, :string, 1
|
57
|
+
optional :address_type, :enum, 2, "walletrpc.AddressType"
|
58
|
+
end
|
59
|
+
add_message "walletrpc.ListAccountsResponse" do
|
60
|
+
repeated :accounts, :message, 1, "walletrpc.Account"
|
61
|
+
end
|
62
|
+
add_message "walletrpc.ImportAccountRequest" do
|
63
|
+
optional :name, :string, 1
|
64
|
+
optional :extended_public_key, :string, 2
|
65
|
+
optional :master_key_fingerprint, :bytes, 3
|
66
|
+
optional :address_type, :enum, 4, "walletrpc.AddressType"
|
67
|
+
optional :dry_run, :bool, 5
|
68
|
+
end
|
69
|
+
add_message "walletrpc.ImportAccountResponse" do
|
70
|
+
optional :account, :message, 1, "walletrpc.Account"
|
71
|
+
repeated :dry_run_external_addrs, :string, 2
|
72
|
+
repeated :dry_run_internal_addrs, :string, 3
|
73
|
+
end
|
74
|
+
add_message "walletrpc.ImportPublicKeyRequest" do
|
75
|
+
optional :public_key, :bytes, 1
|
76
|
+
optional :address_type, :enum, 2, "walletrpc.AddressType"
|
77
|
+
end
|
78
|
+
add_message "walletrpc.ImportPublicKeyResponse" do
|
79
|
+
end
|
39
80
|
add_message "walletrpc.Transaction" do
|
40
81
|
optional :tx_hex, :bytes, 1
|
41
82
|
optional :label, :string, 2
|
@@ -47,6 +88,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
47
88
|
optional :sat_per_kw, :int64, 1
|
48
89
|
repeated :outputs, :message, 2, "signrpc.TxOut"
|
49
90
|
optional :label, :string, 3
|
91
|
+
optional :min_confs, :int32, 4
|
92
|
+
optional :spend_unconfirmed, :bool, 5
|
50
93
|
end
|
51
94
|
add_message "walletrpc.SendOutputsResponse" do
|
52
95
|
optional :raw_tx, :bytes, 1
|
@@ -66,6 +109,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
109
|
optional :next_broadcast_height, :uint32, 6
|
67
110
|
optional :requested_conf_target, :uint32, 8
|
68
111
|
optional :requested_sat_per_byte, :uint32, 9
|
112
|
+
optional :sat_per_vbyte, :uint64, 10
|
113
|
+
optional :requested_sat_per_vbyte, :uint64, 11
|
69
114
|
optional :force, :bool, 7
|
70
115
|
end
|
71
116
|
add_message "walletrpc.PendingSweepsRequest" do
|
@@ -78,6 +123,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
78
123
|
optional :target_conf, :uint32, 2
|
79
124
|
optional :sat_per_byte, :uint32, 3
|
80
125
|
optional :force, :bool, 4
|
126
|
+
optional :sat_per_vbyte, :uint64, 5
|
81
127
|
end
|
82
128
|
add_message "walletrpc.BumpFeeResponse" do
|
83
129
|
end
|
@@ -100,6 +146,52 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
100
146
|
end
|
101
147
|
add_message "walletrpc.LabelTransactionResponse" do
|
102
148
|
end
|
149
|
+
add_message "walletrpc.FundPsbtRequest" do
|
150
|
+
optional :account, :string, 5
|
151
|
+
optional :min_confs, :int32, 6
|
152
|
+
optional :spend_unconfirmed, :bool, 7
|
153
|
+
oneof :template do
|
154
|
+
optional :psbt, :bytes, 1
|
155
|
+
optional :raw, :message, 2, "walletrpc.TxTemplate"
|
156
|
+
end
|
157
|
+
oneof :fees do
|
158
|
+
optional :target_conf, :uint32, 3
|
159
|
+
optional :sat_per_vbyte, :uint64, 4
|
160
|
+
end
|
161
|
+
end
|
162
|
+
add_message "walletrpc.FundPsbtResponse" do
|
163
|
+
optional :funded_psbt, :bytes, 1
|
164
|
+
optional :change_output_index, :int32, 2
|
165
|
+
repeated :locked_utxos, :message, 3, "walletrpc.UtxoLease"
|
166
|
+
end
|
167
|
+
add_message "walletrpc.TxTemplate" do
|
168
|
+
repeated :inputs, :message, 1, "lnrpc.OutPoint"
|
169
|
+
map :outputs, :string, :uint64, 2
|
170
|
+
end
|
171
|
+
add_message "walletrpc.UtxoLease" do
|
172
|
+
optional :id, :bytes, 1
|
173
|
+
optional :outpoint, :message, 2, "lnrpc.OutPoint"
|
174
|
+
optional :expiration, :uint64, 3
|
175
|
+
end
|
176
|
+
add_message "walletrpc.FinalizePsbtRequest" do
|
177
|
+
optional :funded_psbt, :bytes, 1
|
178
|
+
optional :account, :string, 5
|
179
|
+
end
|
180
|
+
add_message "walletrpc.FinalizePsbtResponse" do
|
181
|
+
optional :signed_psbt, :bytes, 1
|
182
|
+
optional :raw_final_tx, :bytes, 2
|
183
|
+
end
|
184
|
+
add_message "walletrpc.ListLeasesRequest" do
|
185
|
+
end
|
186
|
+
add_message "walletrpc.ListLeasesResponse" do
|
187
|
+
repeated :locked_utxos, :message, 1, "walletrpc.UtxoLease"
|
188
|
+
end
|
189
|
+
add_enum "walletrpc.AddressType" do
|
190
|
+
value :UNKNOWN, 0
|
191
|
+
value :WITNESS_PUBKEY_HASH, 1
|
192
|
+
value :NESTED_WITNESS_PUBKEY_HASH, 2
|
193
|
+
value :HYBRID_NESTED_WITNESS_PUBKEY_HASH, 3
|
194
|
+
end
|
103
195
|
add_enum "walletrpc.WitnessType" do
|
104
196
|
value :UNKNOWN_WITNESS, 0
|
105
197
|
value :COMMITMENT_TIME_LOCK, 1
|
@@ -129,6 +221,13 @@ module Walletrpc
|
|
129
221
|
KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
|
130
222
|
AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass
|
131
223
|
AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass
|
224
|
+
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass
|
225
|
+
ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass
|
226
|
+
ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass
|
227
|
+
ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
|
228
|
+
ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
|
229
|
+
ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass
|
230
|
+
ImportPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyResponse").msgclass
|
132
231
|
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass
|
133
232
|
PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
|
134
233
|
SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
|
@@ -145,5 +244,14 @@ module Walletrpc
|
|
145
244
|
ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass
|
146
245
|
LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass
|
147
246
|
LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass
|
247
|
+
FundPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtRequest").msgclass
|
248
|
+
FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass
|
249
|
+
TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass
|
250
|
+
UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").msgclass
|
251
|
+
FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass
|
252
|
+
FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass
|
253
|
+
ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass
|
254
|
+
ListLeasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesResponse").msgclass
|
255
|
+
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddressType").enummodule
|
148
256
|
WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
|
149
257
|
end
|
@@ -10,7 +10,7 @@ module Walletrpc
|
|
10
10
|
# daemon's wallet.
|
11
11
|
class Service
|
12
12
|
|
13
|
-
include GRPC::GenericService
|
13
|
+
include ::GRPC::GenericService
|
14
14
|
|
15
15
|
self.marshal_class_method = :encode
|
16
16
|
self.unmarshal_class_method = :decode
|
@@ -19,47 +19,87 @@ module Walletrpc
|
|
19
19
|
#
|
20
20
|
# ListUnspent returns a list of all utxos spendable by the wallet with a
|
21
21
|
# number of confirmations between the specified minimum and maximum.
|
22
|
-
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
|
22
|
+
rpc :ListUnspent, ::Walletrpc::ListUnspentRequest, ::Walletrpc::ListUnspentResponse
|
23
23
|
#
|
24
24
|
# LeaseOutput locks an output to the given ID, preventing it from being
|
25
25
|
# available for any future coin selection attempts. The absolute time of the
|
26
26
|
# lock's expiration is returned. The expiration of the lock can be extended by
|
27
27
|
# successive invocations of this RPC. Outputs can be unlocked before their
|
28
28
|
# expiration through `ReleaseOutput`.
|
29
|
-
rpc :LeaseOutput, LeaseOutputRequest, LeaseOutputResponse
|
29
|
+
rpc :LeaseOutput, ::Walletrpc::LeaseOutputRequest, ::Walletrpc::LeaseOutputResponse
|
30
30
|
#
|
31
31
|
# ReleaseOutput unlocks an output, allowing it to be available for coin
|
32
32
|
# selection if it remains unspent. The ID should match the one used to
|
33
33
|
# originally lock the output.
|
34
|
-
rpc :ReleaseOutput, ReleaseOutputRequest, ReleaseOutputResponse
|
34
|
+
rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse
|
35
|
+
#
|
36
|
+
# ListLeases lists all currently locked utxos.
|
37
|
+
rpc :ListLeases, ::Walletrpc::ListLeasesRequest, ::Walletrpc::ListLeasesResponse
|
35
38
|
#
|
36
39
|
# DeriveNextKey attempts to derive the *next* key within the key family
|
37
40
|
# (account in BIP43) specified. This method should return the next external
|
38
41
|
# child within this branch.
|
39
|
-
rpc :DeriveNextKey, KeyReq, Signrpc::KeyDescriptor
|
42
|
+
rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor
|
40
43
|
#
|
41
44
|
# DeriveKey attempts to derive an arbitrary key specified by the passed
|
42
45
|
# KeyLocator.
|
43
|
-
rpc :DeriveKey, Signrpc::KeyLocator, Signrpc::KeyDescriptor
|
46
|
+
rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor
|
44
47
|
#
|
45
48
|
# NextAddr returns the next unused address within the wallet.
|
46
|
-
rpc :NextAddr, AddrRequest, AddrResponse
|
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
|
47
87
|
#
|
48
88
|
# PublishTransaction attempts to publish the passed transaction to the
|
49
89
|
# network. Once this returns without an error, the wallet will continually
|
50
90
|
# attempt to re-broadcast the transaction on start up, until it enters the
|
51
91
|
# chain.
|
52
|
-
rpc :PublishTransaction, Transaction, PublishResponse
|
92
|
+
rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse
|
53
93
|
#
|
54
94
|
# SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
55
95
|
# allows the caller to create a transaction that sends to several outputs at
|
56
96
|
# once. This is ideal when wanting to batch create a set of transactions.
|
57
|
-
rpc :SendOutputs, SendOutputsRequest, SendOutputsResponse
|
97
|
+
rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse
|
58
98
|
#
|
59
99
|
# EstimateFee attempts to query the internal fee estimator of the wallet to
|
60
100
|
# determine the fee (in sat/kw) to attach to a transaction in order to
|
61
101
|
# achieve the confirmation target.
|
62
|
-
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse
|
102
|
+
rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse
|
63
103
|
#
|
64
104
|
# PendingSweeps returns lists of on-chain outputs that lnd is currently
|
65
105
|
# attempting to sweep within its central batching engine. Outputs with similar
|
@@ -69,7 +109,7 @@ module Walletrpc
|
|
69
109
|
# NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
70
110
|
# remain supported. This is an advanced API that depends on the internals of
|
71
111
|
# the UtxoSweeper, so things may change.
|
72
|
-
rpc :PendingSweeps, PendingSweepsRequest, PendingSweepsResponse
|
112
|
+
rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse
|
73
113
|
#
|
74
114
|
# BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
75
115
|
# takes a different approach than bitcoind's bumpfee command. lnd has a
|
@@ -96,18 +136,51 @@ module Walletrpc
|
|
96
136
|
# Note that this RPC currently doesn't perform any validation checks on the
|
97
137
|
# fee preference being provided. For now, the responsibility of ensuring that
|
98
138
|
# the new fee preference is sufficient is delegated to the user.
|
99
|
-
rpc :BumpFee, BumpFeeRequest, BumpFeeResponse
|
139
|
+
rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse
|
100
140
|
#
|
101
141
|
# ListSweeps returns a list of the sweep transactions our node has produced.
|
102
142
|
# Note that these sweeps may not be confirmed yet, as we record sweeps on
|
103
143
|
# broadcast, not confirmation.
|
104
|
-
rpc :ListSweeps, ListSweepsRequest, ListSweepsResponse
|
144
|
+
rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse
|
105
145
|
#
|
106
146
|
# LabelTransaction adds a label to a transaction. If the transaction already
|
107
147
|
# has a label the call will fail unless the overwrite bool is set. This will
|
108
148
|
# overwrite the exiting transaction label. Labels must not be empty, and
|
109
149
|
# cannot exceed 500 characters.
|
110
|
-
rpc :LabelTransaction, LabelTransactionRequest, LabelTransactionResponse
|
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
|
111
184
|
end
|
112
185
|
|
113
186
|
Stub = Service.rpc_stub_class
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'rpc_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
9
|
add_file("walletunlocker.proto", :syntax => :proto3) do
|
9
10
|
add_message "lnrpc.GenSeedRequest" do
|
@@ -20,21 +21,41 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
21
|
optional :aezeed_passphrase, :bytes, 3
|
21
22
|
optional :recovery_window, :int32, 4
|
22
23
|
optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot"
|
24
|
+
optional :stateless_init, :bool, 6
|
25
|
+
optional :extended_master_key, :string, 7
|
26
|
+
optional :extended_master_key_birthday_timestamp, :uint64, 8
|
27
|
+
optional :watch_only, :message, 9, "lnrpc.WatchOnly"
|
23
28
|
end
|
24
29
|
add_message "lnrpc.InitWalletResponse" do
|
30
|
+
optional :admin_macaroon, :bytes, 1
|
31
|
+
end
|
32
|
+
add_message "lnrpc.WatchOnly" do
|
33
|
+
optional :master_key_birthday_timestamp, :uint64, 1
|
34
|
+
optional :master_key_fingerprint, :bytes, 2
|
35
|
+
repeated :accounts, :message, 3, "lnrpc.WatchOnlyAccount"
|
36
|
+
end
|
37
|
+
add_message "lnrpc.WatchOnlyAccount" do
|
38
|
+
optional :purpose, :uint32, 1
|
39
|
+
optional :coin_type, :uint32, 2
|
40
|
+
optional :account, :uint32, 3
|
41
|
+
optional :xpub, :string, 4
|
25
42
|
end
|
26
43
|
add_message "lnrpc.UnlockWalletRequest" do
|
27
44
|
optional :wallet_password, :bytes, 1
|
28
45
|
optional :recovery_window, :int32, 2
|
29
46
|
optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot"
|
47
|
+
optional :stateless_init, :bool, 4
|
30
48
|
end
|
31
49
|
add_message "lnrpc.UnlockWalletResponse" do
|
32
50
|
end
|
33
51
|
add_message "lnrpc.ChangePasswordRequest" do
|
34
52
|
optional :current_password, :bytes, 1
|
35
53
|
optional :new_password, :bytes, 2
|
54
|
+
optional :stateless_init, :bool, 3
|
55
|
+
optional :new_macaroon_root_key, :bool, 4
|
36
56
|
end
|
37
57
|
add_message "lnrpc.ChangePasswordResponse" do
|
58
|
+
optional :admin_macaroon, :bytes, 1
|
38
59
|
end
|
39
60
|
end
|
40
61
|
end
|
@@ -44,6 +65,8 @@ module Lnrpc
|
|
44
65
|
GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
|
45
66
|
InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass
|
46
67
|
InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass
|
68
|
+
WatchOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnly").msgclass
|
69
|
+
WatchOnlyAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnlyAccount").msgclass
|
47
70
|
UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass
|
48
71
|
UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
|
49
72
|
ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass
|
@@ -27,7 +27,7 @@ module Lnrpc
|
|
27
27
|
# lnd at first startup, and unlock a previously set up wallet.
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include GRPC::GenericService
|
30
|
+
include ::GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -42,7 +42,7 @@ module Lnrpc
|
|
42
42
|
# Once the cipherseed is obtained and verified by the user, the InitWallet
|
43
43
|
# method should be used to commit the newly generated seed, and create the
|
44
44
|
# wallet.
|
45
|
-
rpc :GenSeed, GenSeedRequest, GenSeedResponse
|
45
|
+
rpc :GenSeed, ::Lnrpc::GenSeedRequest, ::Lnrpc::GenSeedResponse
|
46
46
|
#
|
47
47
|
# InitWallet is used when lnd is starting up for the first time to fully
|
48
48
|
# initialize the daemon and its internal wallet. At the very least a wallet
|
@@ -56,15 +56,15 @@ module Lnrpc
|
|
56
56
|
# Alternatively, this can be used along with the GenSeed RPC to obtain a
|
57
57
|
# seed, then present it to the user. Once it has been verified by the user,
|
58
58
|
# the seed can be fed into this RPC in order to commit the new wallet.
|
59
|
-
rpc :InitWallet, InitWalletRequest, InitWalletResponse
|
59
|
+
rpc :InitWallet, ::Lnrpc::InitWalletRequest, ::Lnrpc::InitWalletResponse
|
60
60
|
# lncli: `unlock`
|
61
61
|
# UnlockWallet is used at startup of lnd to provide a password to unlock
|
62
62
|
# the wallet database.
|
63
|
-
rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse
|
63
|
+
rpc :UnlockWallet, ::Lnrpc::UnlockWalletRequest, ::Lnrpc::UnlockWalletResponse
|
64
64
|
# lncli: `changepassword`
|
65
65
|
# ChangePassword changes the password of the encrypted wallet. This will
|
66
66
|
# automatically unlock the wallet database if successful.
|
67
|
-
rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse
|
67
|
+
rpc :ChangePassword, ::Lnrpc::ChangePasswordRequest, ::Lnrpc::ChangePasswordResponse
|
68
68
|
end
|
69
69
|
|
70
70
|
Stub = Service.rpc_stub_class
|
@@ -10,7 +10,7 @@ module Watchtowerrpc
|
|
10
10
|
# functionality of the daemon.
|
11
11
|
class Service
|
12
12
|
|
13
|
-
include GRPC::GenericService
|
13
|
+
include ::GRPC::GenericService
|
14
14
|
|
15
15
|
self.marshal_class_method = :encode
|
16
16
|
self.unmarshal_class_method = :decode
|
@@ -20,7 +20,7 @@ module Watchtowerrpc
|
|
20
20
|
# GetInfo returns general information concerning the companion watchtower
|
21
21
|
# including its public key and URIs where the server is currently
|
22
22
|
# listening for clients.
|
23
|
-
rpc :GetInfo, GetInfoRequest, GetInfoResponse
|
23
|
+
rpc :GetInfo, ::Watchtowerrpc::GetInfoRequest, ::Watchtowerrpc::GetInfoResponse
|
24
24
|
end
|
25
25
|
|
26
26
|
Stub = Service.rpc_stub_class
|
@@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
26
26
|
optional :num_pending_backups, :uint32, 2
|
27
27
|
optional :max_backups, :uint32, 3
|
28
28
|
optional :sweep_sat_per_byte, :uint32, 4
|
29
|
+
optional :sweep_sat_per_vbyte, :uint32, 5
|
29
30
|
end
|
30
31
|
add_message "wtclientrpc.Tower" do
|
31
32
|
optional :pubkey, :bytes, 1
|
@@ -50,10 +51,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
50
51
|
optional :num_sessions_exhausted, :uint32, 5
|
51
52
|
end
|
52
53
|
add_message "wtclientrpc.PolicyRequest" do
|
54
|
+
optional :policy_type, :enum, 1, "wtclientrpc.PolicyType"
|
53
55
|
end
|
54
56
|
add_message "wtclientrpc.PolicyResponse" do
|
55
57
|
optional :max_updates, :uint32, 1
|
56
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
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
@@ -72,4 +79,5 @@ module Wtclientrpc
|
|
72
79
|
StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass
|
73
80
|
PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass
|
74
81
|
PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass
|
82
|
+
PolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyType").enummodule
|
75
83
|
end
|
@@ -10,7 +10,7 @@ module Wtclientrpc
|
|
10
10
|
# functionality of the daemon.
|
11
11
|
class Service
|
12
12
|
|
13
|
-
include GRPC::GenericService
|
13
|
+
include ::GRPC::GenericService
|
14
14
|
|
15
15
|
self.marshal_class_method = :encode
|
16
16
|
self.unmarshal_class_method = :decode
|
@@ -21,21 +21,21 @@ module Wtclientrpc
|
|
21
21
|
# considers it for new sessions. If the watchtower already exists, then
|
22
22
|
# any new addresses included will be considered when dialing it for
|
23
23
|
# session negotiations and backups.
|
24
|
-
rpc :AddTower, AddTowerRequest, AddTowerResponse
|
24
|
+
rpc :AddTower, ::Wtclientrpc::AddTowerRequest, ::Wtclientrpc::AddTowerResponse
|
25
25
|
#
|
26
26
|
# RemoveTower removes a watchtower from being considered for future session
|
27
27
|
# negotiations and from being used for any subsequent backups until it's added
|
28
28
|
# again. If an address is provided, then this RPC only serves as a way of
|
29
29
|
# removing the address from the watchtower instead.
|
30
|
-
rpc :RemoveTower, RemoveTowerRequest, RemoveTowerResponse
|
30
|
+
rpc :RemoveTower, ::Wtclientrpc::RemoveTowerRequest, ::Wtclientrpc::RemoveTowerResponse
|
31
31
|
# ListTowers returns the list of watchtowers registered with the client.
|
32
|
-
rpc :ListTowers, ListTowersRequest, ListTowersResponse
|
32
|
+
rpc :ListTowers, ::Wtclientrpc::ListTowersRequest, ::Wtclientrpc::ListTowersResponse
|
33
33
|
# GetTowerInfo retrieves information for a registered watchtower.
|
34
|
-
rpc :GetTowerInfo, GetTowerInfoRequest, Tower
|
34
|
+
rpc :GetTowerInfo, ::Wtclientrpc::GetTowerInfoRequest, ::Wtclientrpc::Tower
|
35
35
|
# Stats returns the in-memory statistics of the client since startup.
|
36
|
-
rpc :Stats, StatsRequest, StatsResponse
|
36
|
+
rpc :Stats, ::Wtclientrpc::StatsRequest, ::Wtclientrpc::StatsResponse
|
37
37
|
# Policy returns the active watchtower client policy configuration.
|
38
|
-
rpc :Policy, PolicyRequest, PolicyResponse
|
38
|
+
rpc :Policy, ::Wtclientrpc::PolicyRequest, ::Wtclientrpc::PolicyResponse
|
39
39
|
end
|
40
40
|
|
41
41
|
Stub = Service.rpc_stub_class
|
data/lib/lnrpc/client.rb
CHANGED
data/lib/lnrpc/version.rb
CHANGED
data/lnrpc.gemspec
CHANGED
@@ -25,10 +25,10 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib", "lib/grpc_services"]
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "
|
28
|
+
spec.add_development_dependency "bundler", "> 2.0"
|
29
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
31
|
|
32
|
-
spec.add_dependency "grpc", ">= 1.
|
33
|
-
spec.add_dependency "google-protobuf", ">=3.7"
|
32
|
+
spec.add_dependency "grpc", ">= 1.28.0"
|
33
|
+
spec.add_dependency "google-protobuf", ">=3.15.7"
|
34
34
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lnrpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bumann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.28.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.28.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: google-protobuf
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.15.7
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.15.7
|
83
83
|
description: gRPC service definitions for the Lightning Network Daemon (lnd) gRPC
|
84
84
|
interface packed as ruby gem
|
85
85
|
email:
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.1.6
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: gRPC interface for lnd packed as ruby gem
|