lnrpc 0.8.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +24 -24
  4. data/README.md +30 -16
  5. data/examples.rb +14 -12
  6. data/generate-grpc-service-files.sh +30 -0
  7. data/lib/grpc_services/autopilotrpc/autopilot_pb.rb +48 -0
  8. data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +40 -0
  9. data/lib/grpc_services/chainrpc/chainnotifier_pb.rb +67 -0
  10. data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +51 -0
  11. data/lib/grpc_services/invoicesrpc/invoices_pb.rb +48 -0
  12. data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +41 -0
  13. data/lib/grpc_services/lnclipb/lncli_pb.rb +18 -0
  14. data/lib/grpc_services/routerrpc/router_pb.rb +233 -0
  15. data/lib/grpc_services/routerrpc/router_services_pb.rb +86 -0
  16. data/lib/grpc_services/rpc_pb.rb +1347 -0
  17. data/lib/{lnrpc → grpc_services}/rpc_services_pb.rb +185 -175
  18. data/lib/grpc_services/signrpc/signer_pb.rb +84 -0
  19. data/lib/grpc_services/signrpc/signer_services_pb.rb +69 -0
  20. data/lib/grpc_services/verrpc/verrpc_pb.rb +27 -0
  21. data/lib/grpc_services/verrpc/verrpc_services_pb.rb +27 -0
  22. data/lib/grpc_services/walletrpc/walletkit_pb.rb +188 -0
  23. data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +148 -0
  24. data/lib/grpc_services/walletunlocker_pb.rb +57 -0
  25. data/lib/grpc_services/walletunlocker_services_pb.rb +72 -0
  26. data/lib/grpc_services/watchtowerrpc/watchtower_pb.rb +21 -0
  27. data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +28 -0
  28. data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +81 -0
  29. data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +43 -0
  30. data/lib/lnrpc.rb +19 -3
  31. data/lib/lnrpc/client.rb +62 -46
  32. data/lib/lnrpc/grpc_wrapper.rb +43 -0
  33. data/lib/lnrpc/version.rb +1 -1
  34. data/lnrpc.gemspec +7 -5
  35. metadata +41 -17
  36. data/lib/lnrpc/rpc.proto +0 -2580
  37. data/lib/lnrpc/rpc_pb.rb +0 -938
@@ -0,0 +1,84 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: signrpc/signer.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("signrpc/signer.proto", :syntax => :proto3) do
8
+ add_message "signrpc.KeyLocator" do
9
+ optional :key_family, :int32, 1
10
+ optional :key_index, :int32, 2
11
+ end
12
+ add_message "signrpc.KeyDescriptor" do
13
+ optional :raw_key_bytes, :bytes, 1
14
+ optional :key_loc, :message, 2, "signrpc.KeyLocator"
15
+ end
16
+ add_message "signrpc.TxOut" do
17
+ optional :value, :int64, 1
18
+ optional :pk_script, :bytes, 2
19
+ end
20
+ add_message "signrpc.SignDescriptor" do
21
+ optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
22
+ optional :single_tweak, :bytes, 2
23
+ optional :double_tweak, :bytes, 3
24
+ optional :witness_script, :bytes, 4
25
+ optional :output, :message, 5, "signrpc.TxOut"
26
+ optional :sighash, :uint32, 7
27
+ optional :input_index, :int32, 8
28
+ end
29
+ add_message "signrpc.SignReq" do
30
+ optional :raw_tx_bytes, :bytes, 1
31
+ repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
32
+ end
33
+ add_message "signrpc.SignResp" do
34
+ repeated :raw_sigs, :bytes, 1
35
+ end
36
+ add_message "signrpc.InputScript" do
37
+ repeated :witness, :bytes, 1
38
+ optional :sig_script, :bytes, 2
39
+ end
40
+ add_message "signrpc.InputScriptResp" do
41
+ repeated :input_scripts, :message, 1, "signrpc.InputScript"
42
+ end
43
+ add_message "signrpc.SignMessageReq" do
44
+ optional :msg, :bytes, 1
45
+ optional :key_loc, :message, 2, "signrpc.KeyLocator"
46
+ end
47
+ add_message "signrpc.SignMessageResp" do
48
+ optional :signature, :bytes, 1
49
+ end
50
+ add_message "signrpc.VerifyMessageReq" do
51
+ optional :msg, :bytes, 1
52
+ optional :signature, :bytes, 2
53
+ optional :pubkey, :bytes, 3
54
+ end
55
+ add_message "signrpc.VerifyMessageResp" do
56
+ optional :valid, :bool, 1
57
+ end
58
+ add_message "signrpc.SharedKeyRequest" do
59
+ optional :ephemeral_pubkey, :bytes, 1
60
+ optional :key_loc, :message, 2, "signrpc.KeyLocator"
61
+ optional :key_desc, :message, 3, "signrpc.KeyDescriptor"
62
+ end
63
+ add_message "signrpc.SharedKeyResponse" do
64
+ optional :shared_key, :bytes, 1
65
+ end
66
+ end
67
+ end
68
+
69
+ module Signrpc
70
+ KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyLocator").msgclass
71
+ KeyDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyDescriptor").msgclass
72
+ TxOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TxOut").msgclass
73
+ SignDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignDescriptor").msgclass
74
+ SignReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignReq").msgclass
75
+ SignResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignResp").msgclass
76
+ InputScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScript").msgclass
77
+ InputScriptResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScriptResp").msgclass
78
+ SignMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageReq").msgclass
79
+ SignMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageResp").msgclass
80
+ VerifyMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageReq").msgclass
81
+ VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
82
+ SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
83
+ SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
84
+ end
@@ -0,0 +1,69 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: signrpc/signer.proto for package 'signrpc'
3
+
4
+ require 'grpc'
5
+ require 'signrpc/signer_pb'
6
+
7
+ module Signrpc
8
+ module Signer
9
+ # Signer is a service that gives access to the signing functionality 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 = 'signrpc.Signer'
18
+
19
+ #
20
+ # SignOutputRaw is a method that can be used to generated a signature for a
21
+ # set of inputs/outputs to a transaction. Each request specifies details
22
+ # concerning how the outputs should be signed, which keys they should be
23
+ # signed with, and also any optional tweaks. The return value is a fixed
24
+ # 64-byte signature (the same format as we use on the wire in Lightning).
25
+ #
26
+ # If we are unable to sign using the specified keys, then an error will be
27
+ # returned.
28
+ rpc :SignOutputRaw, ::Signrpc::SignReq, ::Signrpc::SignResp
29
+ #
30
+ # ComputeInputScript generates a complete InputIndex for the passed
31
+ # transaction with the signature as defined within the passed SignDescriptor.
32
+ # This method should be capable of generating the proper input script for
33
+ # both regular p2wkh output and p2wkh outputs nested within a regular p2sh
34
+ # output.
35
+ #
36
+ # Note that when using this method to sign inputs belonging to the wallet,
37
+ # the only items of the SignDescriptor that need to be populated are pkScript
38
+ # in the TxOut field, the value in that same field, and finally the input
39
+ # index.
40
+ rpc :ComputeInputScript, ::Signrpc::SignReq, ::Signrpc::InputScriptResp
41
+ #
42
+ # SignMessage signs a message with the key specified in the key locator. The
43
+ # returned signature is fixed-size LN wire format encoded.
44
+ #
45
+ # The main difference to SignMessage in the main RPC is that a specific key is
46
+ # used to sign the message instead of the node identity private key.
47
+ rpc :SignMessage, ::Signrpc::SignMessageReq, ::Signrpc::SignMessageResp
48
+ #
49
+ # VerifyMessage verifies a signature over a message using the public key
50
+ # provided. The signature must be fixed-size LN wire format encoded.
51
+ #
52
+ # The main difference to VerifyMessage in the main RPC is that the public key
53
+ # used to sign the message does not have to be a node known to the network.
54
+ rpc :VerifyMessage, ::Signrpc::VerifyMessageReq, ::Signrpc::VerifyMessageResp
55
+ #
56
+ # DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
57
+ # derivation between the ephemeral public key in the request and the node's
58
+ # key specified in the key_desc parameter. Either a key locator or a raw
59
+ # public key is expected in the key_desc, if neither is supplied, defaults to
60
+ # the node's identity private key:
61
+ # P_shared = privKeyNode * ephemeralPubkey
62
+ # The resulting shared public key is serialized in the compressed format and
63
+ # hashed with sha256, resulting in the final key length of 256bit.
64
+ rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse
65
+ end
66
+
67
+ Stub = Service.rpc_stub_class
68
+ end
69
+ end
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: verrpc/verrpc.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("verrpc/verrpc.proto", :syntax => :proto3) do
8
+ add_message "verrpc.VersionRequest" do
9
+ end
10
+ add_message "verrpc.Version" do
11
+ optional :commit, :string, 1
12
+ optional :commit_hash, :string, 2
13
+ optional :version, :string, 3
14
+ optional :app_major, :uint32, 4
15
+ optional :app_minor, :uint32, 5
16
+ optional :app_patch, :uint32, 6
17
+ optional :app_pre_release, :string, 7
18
+ repeated :build_tags, :string, 8
19
+ optional :go_version, :string, 9
20
+ end
21
+ end
22
+ end
23
+
24
+ module Verrpc
25
+ VersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.VersionRequest").msgclass
26
+ Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.Version").msgclass
27
+ end
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: verrpc/verrpc.proto for package 'verrpc'
3
+
4
+ require 'grpc'
5
+ require 'verrpc/verrpc_pb'
6
+
7
+ module Verrpc
8
+ module Versioner
9
+ # Versioner is a service that can be used to get information about the version
10
+ # and build information of the running 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 = 'verrpc.Versioner'
18
+
19
+ # lncli: `version`
20
+ # GetVersion returns the current version and build information of the running
21
+ # daemon.
22
+ rpc :GetVersion, ::Verrpc::VersionRequest, ::Verrpc::Version
23
+ end
24
+
25
+ Stub = Service.rpc_stub_class
26
+ end
27
+ end
@@ -0,0 +1,188 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: walletrpc/walletkit.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'rpc_pb'
7
+ require 'signrpc/signer_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
10
+ add_message "walletrpc.ListUnspentRequest" do
11
+ optional :min_confs, :int32, 1
12
+ optional :max_confs, :int32, 2
13
+ end
14
+ add_message "walletrpc.ListUnspentResponse" do
15
+ repeated :utxos, :message, 1, "lnrpc.Utxo"
16
+ end
17
+ add_message "walletrpc.LeaseOutputRequest" do
18
+ optional :id, :bytes, 1
19
+ optional :outpoint, :message, 2, "lnrpc.OutPoint"
20
+ end
21
+ add_message "walletrpc.LeaseOutputResponse" do
22
+ optional :expiration, :uint64, 1
23
+ end
24
+ add_message "walletrpc.ReleaseOutputRequest" do
25
+ optional :id, :bytes, 1
26
+ optional :outpoint, :message, 2, "lnrpc.OutPoint"
27
+ end
28
+ add_message "walletrpc.ReleaseOutputResponse" do
29
+ end
30
+ add_message "walletrpc.KeyReq" do
31
+ optional :key_finger_print, :int32, 1
32
+ optional :key_family, :int32, 2
33
+ end
34
+ add_message "walletrpc.AddrRequest" do
35
+ end
36
+ add_message "walletrpc.AddrResponse" do
37
+ optional :addr, :string, 1
38
+ end
39
+ add_message "walletrpc.Transaction" do
40
+ optional :tx_hex, :bytes, 1
41
+ optional :label, :string, 2
42
+ end
43
+ add_message "walletrpc.PublishResponse" do
44
+ optional :publish_error, :string, 1
45
+ end
46
+ add_message "walletrpc.SendOutputsRequest" do
47
+ optional :sat_per_kw, :int64, 1
48
+ repeated :outputs, :message, 2, "signrpc.TxOut"
49
+ optional :label, :string, 3
50
+ optional :min_confs, :int32, 4
51
+ optional :spend_unconfirmed, :bool, 5
52
+ end
53
+ add_message "walletrpc.SendOutputsResponse" do
54
+ optional :raw_tx, :bytes, 1
55
+ end
56
+ add_message "walletrpc.EstimateFeeRequest" do
57
+ optional :conf_target, :int32, 1
58
+ end
59
+ add_message "walletrpc.EstimateFeeResponse" do
60
+ optional :sat_per_kw, :int64, 1
61
+ end
62
+ add_message "walletrpc.PendingSweep" do
63
+ optional :outpoint, :message, 1, "lnrpc.OutPoint"
64
+ optional :witness_type, :enum, 2, "walletrpc.WitnessType"
65
+ optional :amount_sat, :uint32, 3
66
+ optional :sat_per_byte, :uint32, 4
67
+ optional :broadcast_attempts, :uint32, 5
68
+ optional :next_broadcast_height, :uint32, 6
69
+ optional :requested_conf_target, :uint32, 8
70
+ optional :requested_sat_per_byte, :uint32, 9
71
+ optional :force, :bool, 7
72
+ end
73
+ add_message "walletrpc.PendingSweepsRequest" do
74
+ end
75
+ add_message "walletrpc.PendingSweepsResponse" do
76
+ repeated :pending_sweeps, :message, 1, "walletrpc.PendingSweep"
77
+ end
78
+ add_message "walletrpc.BumpFeeRequest" do
79
+ optional :outpoint, :message, 1, "lnrpc.OutPoint"
80
+ optional :target_conf, :uint32, 2
81
+ optional :sat_per_byte, :uint32, 3
82
+ optional :force, :bool, 4
83
+ end
84
+ add_message "walletrpc.BumpFeeResponse" do
85
+ end
86
+ add_message "walletrpc.ListSweepsRequest" do
87
+ optional :verbose, :bool, 1
88
+ end
89
+ add_message "walletrpc.ListSweepsResponse" do
90
+ oneof :sweeps do
91
+ optional :transaction_details, :message, 1, "lnrpc.TransactionDetails"
92
+ optional :transaction_ids, :message, 2, "walletrpc.ListSweepsResponse.TransactionIDs"
93
+ end
94
+ end
95
+ add_message "walletrpc.ListSweepsResponse.TransactionIDs" do
96
+ repeated :transaction_ids, :string, 1
97
+ end
98
+ add_message "walletrpc.LabelTransactionRequest" do
99
+ optional :txid, :bytes, 1
100
+ optional :label, :string, 2
101
+ optional :overwrite, :bool, 3
102
+ end
103
+ add_message "walletrpc.LabelTransactionResponse" do
104
+ end
105
+ add_message "walletrpc.FundPsbtRequest" do
106
+ oneof :template do
107
+ optional :psbt, :bytes, 1
108
+ optional :raw, :message, 2, "walletrpc.TxTemplate"
109
+ end
110
+ oneof :fees do
111
+ optional :target_conf, :uint32, 3
112
+ optional :sat_per_vbyte, :uint32, 4
113
+ end
114
+ end
115
+ add_message "walletrpc.FundPsbtResponse" do
116
+ optional :funded_psbt, :bytes, 1
117
+ optional :change_output_index, :int32, 2
118
+ repeated :locked_utxos, :message, 3, "walletrpc.UtxoLease"
119
+ end
120
+ add_message "walletrpc.TxTemplate" do
121
+ repeated :inputs, :message, 1, "lnrpc.OutPoint"
122
+ map :outputs, :string, :uint64, 2
123
+ end
124
+ add_message "walletrpc.UtxoLease" do
125
+ optional :id, :bytes, 1
126
+ optional :outpoint, :message, 2, "lnrpc.OutPoint"
127
+ optional :expiration, :uint64, 3
128
+ end
129
+ add_message "walletrpc.FinalizePsbtRequest" do
130
+ optional :funded_psbt, :bytes, 1
131
+ end
132
+ add_message "walletrpc.FinalizePsbtResponse" do
133
+ optional :signed_psbt, :bytes, 1
134
+ optional :raw_final_tx, :bytes, 2
135
+ end
136
+ add_enum "walletrpc.WitnessType" do
137
+ value :UNKNOWN_WITNESS, 0
138
+ value :COMMITMENT_TIME_LOCK, 1
139
+ value :COMMITMENT_NO_DELAY, 2
140
+ value :COMMITMENT_REVOKE, 3
141
+ value :HTLC_OFFERED_REVOKE, 4
142
+ value :HTLC_ACCEPTED_REVOKE, 5
143
+ value :HTLC_OFFERED_TIMEOUT_SECOND_LEVEL, 6
144
+ value :HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL, 7
145
+ value :HTLC_OFFERED_REMOTE_TIMEOUT, 8
146
+ value :HTLC_ACCEPTED_REMOTE_SUCCESS, 9
147
+ value :HTLC_SECOND_LEVEL_REVOKE, 10
148
+ value :WITNESS_KEY_HASH, 11
149
+ value :NESTED_WITNESS_KEY_HASH, 12
150
+ value :COMMITMENT_ANCHOR, 13
151
+ end
152
+ end
153
+ end
154
+
155
+ module Walletrpc
156
+ ListUnspentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentRequest").msgclass
157
+ ListUnspentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentResponse").msgclass
158
+ LeaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputRequest").msgclass
159
+ LeaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputResponse").msgclass
160
+ ReleaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputRequest").msgclass
161
+ ReleaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputResponse").msgclass
162
+ KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
163
+ AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass
164
+ AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass
165
+ Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass
166
+ PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
167
+ SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
168
+ SendOutputsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsResponse").msgclass
169
+ EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeRequest").msgclass
170
+ EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeResponse").msgclass
171
+ PendingSweep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweep").msgclass
172
+ PendingSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsRequest").msgclass
173
+ PendingSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsResponse").msgclass
174
+ BumpFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeRequest").msgclass
175
+ BumpFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeResponse").msgclass
176
+ ListSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsRequest").msgclass
177
+ ListSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse").msgclass
178
+ ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass
179
+ LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass
180
+ LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass
181
+ FundPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtRequest").msgclass
182
+ FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass
183
+ TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass
184
+ UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").msgclass
185
+ FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass
186
+ FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass
187
+ WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
188
+ end
@@ -0,0 +1,148 @@
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
+ # DeriveNextKey attempts to derive the *next* key within the key family
37
+ # (account in BIP43) specified. This method should return the next external
38
+ # child within this branch.
39
+ rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor
40
+ #
41
+ # DeriveKey attempts to derive an arbitrary key specified by the passed
42
+ # KeyLocator.
43
+ rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor
44
+ #
45
+ # NextAddr returns the next unused address within the wallet.
46
+ rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse
47
+ #
48
+ # PublishTransaction attempts to publish the passed transaction to the
49
+ # network. Once this returns without an error, the wallet will continually
50
+ # attempt to re-broadcast the transaction on start up, until it enters the
51
+ # chain.
52
+ rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse
53
+ #
54
+ # SendOutputs is similar to the existing sendmany call in Bitcoind, and
55
+ # allows the caller to create a transaction that sends to several outputs at
56
+ # once. This is ideal when wanting to batch create a set of transactions.
57
+ rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse
58
+ #
59
+ # EstimateFee attempts to query the internal fee estimator of the wallet to
60
+ # determine the fee (in sat/kw) to attach to a transaction in order to
61
+ # achieve the confirmation target.
62
+ rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse
63
+ #
64
+ # PendingSweeps returns lists of on-chain outputs that lnd is currently
65
+ # attempting to sweep within its central batching engine. Outputs with similar
66
+ # fee rates are batched together in order to sweep them within a single
67
+ # transaction.
68
+ #
69
+ # NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
70
+ # remain supported. This is an advanced API that depends on the internals of
71
+ # the UtxoSweeper, so things may change.
72
+ rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse
73
+ #
74
+ # BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
75
+ # takes a different approach than bitcoind's bumpfee command. lnd has a
76
+ # central batching engine in which inputs with similar fee rates are batched
77
+ # together to save on transaction fees. Due to this, we cannot rely on
78
+ # bumping the fee on a specific transaction, since transactions can change at
79
+ # any point with the addition of new inputs. The list of inputs that
80
+ # currently exist within lnd's central batching engine can be retrieved
81
+ # through the PendingSweeps RPC.
82
+ #
83
+ # When bumping the fee of an input that currently exists within lnd's central
84
+ # batching engine, a higher fee transaction will be created that replaces the
85
+ # lower fee transaction through the Replace-By-Fee (RBF) policy. If it
86
+ #
87
+ # This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
88
+ # (CPFP), where the child transaction pays for its parent's fee. This can be
89
+ # done by specifying an outpoint within the low fee transaction that is under
90
+ # the control of the wallet.
91
+ #
92
+ # The fee preference can be expressed either as a specific fee rate or a delta
93
+ # of blocks in which the output should be swept on-chain within. If a fee
94
+ # preference is not explicitly specified, then an error is returned.
95
+ #
96
+ # Note that this RPC currently doesn't perform any validation checks on the
97
+ # fee preference being provided. For now, the responsibility of ensuring that
98
+ # the new fee preference is sufficient is delegated to the user.
99
+ rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse
100
+ #
101
+ # ListSweeps returns a list of the sweep transactions our node has produced.
102
+ # Note that these sweeps may not be confirmed yet, as we record sweeps on
103
+ # broadcast, not confirmation.
104
+ rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse
105
+ #
106
+ # LabelTransaction adds a label to a transaction. If the transaction already
107
+ # has a label the call will fail unless the overwrite bool is set. This will
108
+ # overwrite the exiting transaction label. Labels must not be empty, and
109
+ # cannot exceed 500 characters.
110
+ rpc :LabelTransaction, ::Walletrpc::LabelTransactionRequest, ::Walletrpc::LabelTransactionResponse
111
+ #
112
+ # FundPsbt creates a fully populated PSBT that contains enough inputs to fund
113
+ # the outputs specified in the template. There are two ways of specifying a
114
+ # template: Either by passing in a PSBT with at least one output declared or
115
+ # by passing in a raw TxTemplate message.
116
+ #
117
+ # If there are no inputs specified in the template, coin selection is
118
+ # performed automatically. If the template does contain any inputs, it is
119
+ # assumed that full coin selection happened externally and no additional
120
+ # inputs are added. If the specified inputs aren't enough to fund the outputs
121
+ # with the given fee rate, an error is returned.
122
+ #
123
+ # After either selecting or verifying the inputs, all input UTXOs are locked
124
+ # with an internal app ID.
125
+ #
126
+ # NOTE: If this method returns without an error, it is the caller's
127
+ # responsibility to either spend the locked UTXOs (by finalizing and then
128
+ # publishing the transaction) or to unlock/release the locked UTXOs in case of
129
+ # an error on the caller's side.
130
+ rpc :FundPsbt, ::Walletrpc::FundPsbtRequest, ::Walletrpc::FundPsbtResponse
131
+ #
132
+ # FinalizePsbt expects a partial transaction with all inputs and outputs fully
133
+ # declared and tries to sign all inputs that belong to the wallet. Lnd must be
134
+ # the last signer of the transaction. That means, if there are any unsigned
135
+ # non-witness inputs or inputs without UTXO information attached or inputs
136
+ # without witness data that do not belong to lnd's wallet, this method will
137
+ # fail. If no error is returned, the PSBT is ready to be extracted and the
138
+ # final TX within to be broadcast.
139
+ #
140
+ # NOTE: This method does NOT publish the transaction once finalized. It is the
141
+ # caller's responsibility to either publish the transaction on success or
142
+ # unlock/release any locked UTXOs in case of an error in this method.
143
+ rpc :FinalizePsbt, ::Walletrpc::FinalizePsbtRequest, ::Walletrpc::FinalizePsbtResponse
144
+ end
145
+
146
+ Stub = Service.rpc_stub_class
147
+ end
148
+ end