lnrpc 0.14.1 → 0.15.5
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 +6 -6
- data/README.md +1 -1
- data/examples.rb +18 -1
- data/generate-grpc-service-files.sh +1 -1
- data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +5 -3
- data/lib/grpc_services/devrpc/dev_pb.rb +17 -0
- data/lib/grpc_services/devrpc/dev_services_pb.rb +25 -0
- data/lib/grpc_services/invoicesrpc/invoices_pb.rb +1 -1
- data/lib/grpc_services/{rpc_pb.rb → lightning_pb.rb} +215 -7
- data/lib/grpc_services/{rpc_services_pb.rb → lightning_services_pb.rb} +49 -5
- data/lib/grpc_services/neutrinorpc/neutrino_pb.rb +106 -0
- data/lib/grpc_services/neutrinorpc/neutrino_services_pb.rb +51 -0
- data/lib/grpc_services/peersrpc/peers_pb.rb +48 -0
- data/lib/grpc_services/peersrpc/peers_services_pb.rb +27 -0
- data/lib/grpc_services/routerrpc/router_pb.rb +6 -1
- data/lib/grpc_services/signrpc/signer_pb.rb +86 -0
- data/lib/grpc_services/signrpc/signer_services_pb.rb +67 -2
- data/lib/grpc_services/stateservice_pb.rb +35 -0
- data/lib/grpc_services/stateservice_services_pb.rb +46 -0
- data/lib/grpc_services/walletrpc/walletkit_pb.rb +21 -1
- data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +21 -1
- data/lib/grpc_services/walletunlocker_pb.rb +1 -1
- data/lib/lnrpc/client.rb +2 -2
- data/lib/lnrpc/version.rb +1 -1
- metadata +16 -8
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: neutrinorpc/neutrino.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("neutrinorpc/neutrino.proto", :syntax => :proto3) do
|
8
|
+
add_message "neutrinorpc.StatusRequest" do
|
9
|
+
end
|
10
|
+
add_message "neutrinorpc.StatusResponse" do
|
11
|
+
optional :active, :bool, 1
|
12
|
+
optional :synced, :bool, 2
|
13
|
+
optional :block_height, :int32, 3
|
14
|
+
optional :block_hash, :string, 4
|
15
|
+
repeated :peers, :string, 5
|
16
|
+
end
|
17
|
+
add_message "neutrinorpc.AddPeerRequest" do
|
18
|
+
optional :peer_addrs, :string, 1
|
19
|
+
end
|
20
|
+
add_message "neutrinorpc.AddPeerResponse" do
|
21
|
+
end
|
22
|
+
add_message "neutrinorpc.DisconnectPeerRequest" do
|
23
|
+
optional :peer_addrs, :string, 1
|
24
|
+
end
|
25
|
+
add_message "neutrinorpc.DisconnectPeerResponse" do
|
26
|
+
end
|
27
|
+
add_message "neutrinorpc.IsBannedRequest" do
|
28
|
+
optional :peer_addrs, :string, 1
|
29
|
+
end
|
30
|
+
add_message "neutrinorpc.IsBannedResponse" do
|
31
|
+
optional :banned, :bool, 1
|
32
|
+
end
|
33
|
+
add_message "neutrinorpc.GetBlockHeaderRequest" do
|
34
|
+
optional :hash, :string, 1
|
35
|
+
end
|
36
|
+
add_message "neutrinorpc.GetBlockHeaderResponse" do
|
37
|
+
optional :hash, :string, 1
|
38
|
+
optional :confirmations, :int64, 2
|
39
|
+
optional :stripped_size, :int64, 3
|
40
|
+
optional :size, :int64, 4
|
41
|
+
optional :weight, :int64, 5
|
42
|
+
optional :height, :int32, 6
|
43
|
+
optional :version, :int32, 7
|
44
|
+
optional :version_hex, :string, 8
|
45
|
+
optional :merkleroot, :string, 9
|
46
|
+
optional :time, :int64, 10
|
47
|
+
optional :nonce, :uint32, 11
|
48
|
+
optional :bits, :string, 12
|
49
|
+
optional :ntx, :int32, 13
|
50
|
+
optional :previous_block_hash, :string, 14
|
51
|
+
optional :raw_hex, :bytes, 15
|
52
|
+
end
|
53
|
+
add_message "neutrinorpc.GetBlockRequest" do
|
54
|
+
optional :hash, :string, 1
|
55
|
+
end
|
56
|
+
add_message "neutrinorpc.GetBlockResponse" do
|
57
|
+
optional :hash, :string, 1
|
58
|
+
optional :confirmations, :int64, 2
|
59
|
+
optional :stripped_size, :int64, 3
|
60
|
+
optional :size, :int64, 4
|
61
|
+
optional :weight, :int64, 5
|
62
|
+
optional :height, :int32, 6
|
63
|
+
optional :version, :int32, 7
|
64
|
+
optional :version_hex, :string, 8
|
65
|
+
optional :merkleroot, :string, 9
|
66
|
+
repeated :tx, :string, 10
|
67
|
+
optional :time, :int64, 11
|
68
|
+
optional :nonce, :uint32, 12
|
69
|
+
optional :bits, :string, 13
|
70
|
+
optional :ntx, :int32, 14
|
71
|
+
optional :previous_block_hash, :string, 15
|
72
|
+
optional :raw_hex, :bytes, 16
|
73
|
+
end
|
74
|
+
add_message "neutrinorpc.GetCFilterRequest" do
|
75
|
+
optional :hash, :string, 1
|
76
|
+
end
|
77
|
+
add_message "neutrinorpc.GetCFilterResponse" do
|
78
|
+
optional :filter, :bytes, 1
|
79
|
+
end
|
80
|
+
add_message "neutrinorpc.GetBlockHashRequest" do
|
81
|
+
optional :height, :int32, 1
|
82
|
+
end
|
83
|
+
add_message "neutrinorpc.GetBlockHashResponse" do
|
84
|
+
optional :hash, :string, 1
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
module Neutrinorpc
|
90
|
+
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusRequest").msgclass
|
91
|
+
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusResponse").msgclass
|
92
|
+
AddPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerRequest").msgclass
|
93
|
+
AddPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerResponse").msgclass
|
94
|
+
DisconnectPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerRequest").msgclass
|
95
|
+
DisconnectPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerResponse").msgclass
|
96
|
+
IsBannedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedRequest").msgclass
|
97
|
+
IsBannedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedResponse").msgclass
|
98
|
+
GetBlockHeaderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderRequest").msgclass
|
99
|
+
GetBlockHeaderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderResponse").msgclass
|
100
|
+
GetBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockRequest").msgclass
|
101
|
+
GetBlockResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockResponse").msgclass
|
102
|
+
GetCFilterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterRequest").msgclass
|
103
|
+
GetCFilterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterResponse").msgclass
|
104
|
+
GetBlockHashRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashRequest").msgclass
|
105
|
+
GetBlockHashResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashResponse").msgclass
|
106
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: neutrinorpc/neutrino.proto for package 'neutrinorpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'neutrinorpc/neutrino_pb'
|
6
|
+
|
7
|
+
module Neutrinorpc
|
8
|
+
module NeutrinoKit
|
9
|
+
# NeutrinoKit is a service that can be used to get information about the
|
10
|
+
# current state of the neutrino instance, fetch blocks and add/remove peers.
|
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 = 'neutrinorpc.NeutrinoKit'
|
18
|
+
|
19
|
+
#
|
20
|
+
# Status returns the status of the light client neutrino instance,
|
21
|
+
# along with height and hash of the best block, and a list of connected
|
22
|
+
# peers.
|
23
|
+
rpc :Status, ::Neutrinorpc::StatusRequest, ::Neutrinorpc::StatusResponse
|
24
|
+
#
|
25
|
+
# AddPeer adds a new peer that has already been connected to the server.
|
26
|
+
rpc :AddPeer, ::Neutrinorpc::AddPeerRequest, ::Neutrinorpc::AddPeerResponse
|
27
|
+
#
|
28
|
+
# DisconnectPeer disconnects a peer by target address. Both outbound and
|
29
|
+
# inbound nodes will be searched for the target node. An error message will
|
30
|
+
# be returned if the peer was not found.
|
31
|
+
rpc :DisconnectPeer, ::Neutrinorpc::DisconnectPeerRequest, ::Neutrinorpc::DisconnectPeerResponse
|
32
|
+
#
|
33
|
+
# IsBanned returns true if the peer is banned, otherwise false.
|
34
|
+
rpc :IsBanned, ::Neutrinorpc::IsBannedRequest, ::Neutrinorpc::IsBannedResponse
|
35
|
+
#
|
36
|
+
# GetBlockHeader returns a block header with a particular block hash.
|
37
|
+
rpc :GetBlockHeader, ::Neutrinorpc::GetBlockHeaderRequest, ::Neutrinorpc::GetBlockHeaderResponse
|
38
|
+
#
|
39
|
+
# GetBlock returns a block with a particular block hash.
|
40
|
+
rpc :GetBlock, ::Neutrinorpc::GetBlockRequest, ::Neutrinorpc::GetBlockResponse
|
41
|
+
#
|
42
|
+
# GetCFilter returns a compact filter from a block.
|
43
|
+
rpc :GetCFilter, ::Neutrinorpc::GetCFilterRequest, ::Neutrinorpc::GetCFilterResponse
|
44
|
+
#
|
45
|
+
# GetBlockHash returns the header hash of a block at a given height.
|
46
|
+
rpc :GetBlockHash, ::Neutrinorpc::GetBlockHashRequest, ::Neutrinorpc::GetBlockHashResponse
|
47
|
+
end
|
48
|
+
|
49
|
+
Stub = Service.rpc_stub_class
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: peersrpc/peers.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'lightning_pb'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("peersrpc/peers.proto", :syntax => :proto3) do
|
10
|
+
add_message "peersrpc.UpdateAddressAction" do
|
11
|
+
optional :action, :enum, 1, "peersrpc.UpdateAction"
|
12
|
+
optional :address, :string, 2
|
13
|
+
end
|
14
|
+
add_message "peersrpc.UpdateFeatureAction" do
|
15
|
+
optional :action, :enum, 1, "peersrpc.UpdateAction"
|
16
|
+
optional :feature_bit, :enum, 2, "lnrpc.FeatureBit"
|
17
|
+
end
|
18
|
+
add_message "peersrpc.NodeAnnouncementUpdateRequest" do
|
19
|
+
repeated :feature_updates, :message, 1, "peersrpc.UpdateFeatureAction"
|
20
|
+
optional :color, :string, 2
|
21
|
+
optional :alias, :string, 3
|
22
|
+
repeated :address_updates, :message, 4, "peersrpc.UpdateAddressAction"
|
23
|
+
end
|
24
|
+
add_message "peersrpc.NodeAnnouncementUpdateResponse" do
|
25
|
+
repeated :ops, :message, 1, "lnrpc.Op"
|
26
|
+
end
|
27
|
+
add_enum "peersrpc.UpdateAction" do
|
28
|
+
value :ADD, 0
|
29
|
+
value :REMOVE, 1
|
30
|
+
end
|
31
|
+
add_enum "peersrpc.FeatureSet" do
|
32
|
+
value :SET_INIT, 0
|
33
|
+
value :SET_LEGACY_GLOBAL, 1
|
34
|
+
value :SET_NODE_ANN, 2
|
35
|
+
value :SET_INVOICE, 3
|
36
|
+
value :SET_INVOICE_AMP, 4
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module Peersrpc
|
42
|
+
UpdateAddressAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAddressAction").msgclass
|
43
|
+
UpdateFeatureAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateFeatureAction").msgclass
|
44
|
+
NodeAnnouncementUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateRequest").msgclass
|
45
|
+
NodeAnnouncementUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateResponse").msgclass
|
46
|
+
UpdateAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAction").enummodule
|
47
|
+
FeatureSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.FeatureSet").enummodule
|
48
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: peersrpc/peers.proto for package 'peersrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'peersrpc/peers_pb'
|
6
|
+
|
7
|
+
module Peersrpc
|
8
|
+
module Peers
|
9
|
+
# Peers is a service that can be used to get information and interact
|
10
|
+
# with the other nodes of the newtwork.
|
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 = 'peersrpc.Peers'
|
18
|
+
|
19
|
+
# lncli: peers updatenodeannouncement
|
20
|
+
# UpdateNodeAnnouncement allows the caller to update the node parameters
|
21
|
+
# and broadcasts a new version of the node announcement to its peers.
|
22
|
+
rpc :UpdateNodeAnnouncement, ::Peersrpc::NodeAnnouncementUpdateRequest, ::Peersrpc::NodeAnnouncementUpdateResponse
|
23
|
+
end
|
24
|
+
|
25
|
+
Stub = Service.rpc_stub_class
|
26
|
+
end
|
27
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
-
require '
|
6
|
+
require 'lightning_pb'
|
7
7
|
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("routerrpc/router.proto", :syntax => :proto3) do
|
@@ -30,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
30
30
|
optional :no_inflight_updates, :bool, 18
|
31
31
|
optional :max_shard_size_msat, :uint64, 21
|
32
32
|
optional :amp, :bool, 22
|
33
|
+
optional :time_pref, :double, 23
|
33
34
|
end
|
34
35
|
add_message "routerrpc.TrackPaymentRequest" do
|
35
36
|
optional :payment_hash, :bytes, 1
|
@@ -46,6 +47,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
46
47
|
add_message "routerrpc.SendToRouteRequest" do
|
47
48
|
optional :payment_hash, :bytes, 1
|
48
49
|
optional :route, :message, 2, "lnrpc.Route"
|
50
|
+
optional :skip_temp_err, :bool, 3
|
49
51
|
end
|
50
52
|
add_message "routerrpc.SendToRouteResponse" do
|
51
53
|
optional :preimage, :bytes, 1
|
@@ -62,6 +64,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
62
64
|
end
|
63
65
|
add_message "routerrpc.XImportMissionControlRequest" do
|
64
66
|
repeated :pairs, :message, 1, "routerrpc.PairHistory"
|
67
|
+
optional :force, :bool, 2
|
65
68
|
end
|
66
69
|
add_message "routerrpc.XImportMissionControlResponse" do
|
67
70
|
end
|
@@ -180,6 +183,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
180
183
|
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
|
181
184
|
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
|
182
185
|
optional :preimage, :bytes, 3
|
186
|
+
optional :failure_message, :bytes, 4
|
187
|
+
optional :failure_code, :enum, 5, "lnrpc.Failure.FailureCode"
|
183
188
|
end
|
184
189
|
add_message "routerrpc.UpdateChanStatusRequest" do
|
185
190
|
optional :chan_point, :message, 1, "lnrpc.ChannelPoint"
|
@@ -21,14 +21,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
21
21
|
optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
|
22
22
|
optional :single_tweak, :bytes, 2
|
23
23
|
optional :double_tweak, :bytes, 3
|
24
|
+
optional :tap_tweak, :bytes, 10
|
24
25
|
optional :witness_script, :bytes, 4
|
25
26
|
optional :output, :message, 5, "signrpc.TxOut"
|
26
27
|
optional :sighash, :uint32, 7
|
27
28
|
optional :input_index, :int32, 8
|
29
|
+
optional :sign_method, :enum, 9, "signrpc.SignMethod"
|
28
30
|
end
|
29
31
|
add_message "signrpc.SignReq" do
|
30
32
|
optional :raw_tx_bytes, :bytes, 1
|
31
33
|
repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
|
34
|
+
repeated :prev_outputs, :message, 3, "signrpc.TxOut"
|
32
35
|
end
|
33
36
|
add_message "signrpc.SignResp" do
|
34
37
|
repeated :raw_sigs, :bytes, 1
|
@@ -45,6 +48,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
45
48
|
optional :key_loc, :message, 2, "signrpc.KeyLocator"
|
46
49
|
optional :double_hash, :bool, 3
|
47
50
|
optional :compact_sig, :bool, 4
|
51
|
+
optional :schnorr_sig, :bool, 5
|
52
|
+
optional :schnorr_sig_tap_tweak, :bytes, 6
|
48
53
|
end
|
49
54
|
add_message "signrpc.SignMessageResp" do
|
50
55
|
optional :signature, :bytes, 1
|
@@ -53,6 +58,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
53
58
|
optional :msg, :bytes, 1
|
54
59
|
optional :signature, :bytes, 2
|
55
60
|
optional :pubkey, :bytes, 3
|
61
|
+
optional :is_schnorr_sig, :bool, 4
|
56
62
|
end
|
57
63
|
add_message "signrpc.VerifyMessageResp" do
|
58
64
|
optional :valid, :bool, 1
|
@@ -65,6 +71,71 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
65
71
|
add_message "signrpc.SharedKeyResponse" do
|
66
72
|
optional :shared_key, :bytes, 1
|
67
73
|
end
|
74
|
+
add_message "signrpc.TweakDesc" do
|
75
|
+
optional :tweak, :bytes, 1
|
76
|
+
optional :is_x_only, :bool, 2
|
77
|
+
end
|
78
|
+
add_message "signrpc.TaprootTweakDesc" do
|
79
|
+
optional :script_root, :bytes, 1
|
80
|
+
optional :key_spend_only, :bool, 2
|
81
|
+
end
|
82
|
+
add_message "signrpc.MuSig2CombineKeysRequest" do
|
83
|
+
repeated :all_signer_pubkeys, :bytes, 1
|
84
|
+
repeated :tweaks, :message, 2, "signrpc.TweakDesc"
|
85
|
+
optional :taproot_tweak, :message, 3, "signrpc.TaprootTweakDesc"
|
86
|
+
end
|
87
|
+
add_message "signrpc.MuSig2CombineKeysResponse" do
|
88
|
+
optional :combined_key, :bytes, 1
|
89
|
+
optional :taproot_internal_key, :bytes, 2
|
90
|
+
end
|
91
|
+
add_message "signrpc.MuSig2SessionRequest" do
|
92
|
+
optional :key_loc, :message, 1, "signrpc.KeyLocator"
|
93
|
+
repeated :all_signer_pubkeys, :bytes, 2
|
94
|
+
repeated :other_signer_public_nonces, :bytes, 3
|
95
|
+
repeated :tweaks, :message, 4, "signrpc.TweakDesc"
|
96
|
+
optional :taproot_tweak, :message, 5, "signrpc.TaprootTweakDesc"
|
97
|
+
end
|
98
|
+
add_message "signrpc.MuSig2SessionResponse" do
|
99
|
+
optional :session_id, :bytes, 1
|
100
|
+
optional :combined_key, :bytes, 2
|
101
|
+
optional :taproot_internal_key, :bytes, 3
|
102
|
+
optional :local_public_nonces, :bytes, 4
|
103
|
+
optional :have_all_nonces, :bool, 5
|
104
|
+
end
|
105
|
+
add_message "signrpc.MuSig2RegisterNoncesRequest" do
|
106
|
+
optional :session_id, :bytes, 1
|
107
|
+
repeated :other_signer_public_nonces, :bytes, 3
|
108
|
+
end
|
109
|
+
add_message "signrpc.MuSig2RegisterNoncesResponse" do
|
110
|
+
optional :have_all_nonces, :bool, 1
|
111
|
+
end
|
112
|
+
add_message "signrpc.MuSig2SignRequest" do
|
113
|
+
optional :session_id, :bytes, 1
|
114
|
+
optional :message_digest, :bytes, 2
|
115
|
+
optional :cleanup, :bool, 3
|
116
|
+
end
|
117
|
+
add_message "signrpc.MuSig2SignResponse" do
|
118
|
+
optional :local_partial_signature, :bytes, 1
|
119
|
+
end
|
120
|
+
add_message "signrpc.MuSig2CombineSigRequest" do
|
121
|
+
optional :session_id, :bytes, 1
|
122
|
+
repeated :other_partial_signatures, :bytes, 2
|
123
|
+
end
|
124
|
+
add_message "signrpc.MuSig2CombineSigResponse" do
|
125
|
+
optional :have_all_signatures, :bool, 1
|
126
|
+
optional :final_signature, :bytes, 2
|
127
|
+
end
|
128
|
+
add_message "signrpc.MuSig2CleanupRequest" do
|
129
|
+
optional :session_id, :bytes, 1
|
130
|
+
end
|
131
|
+
add_message "signrpc.MuSig2CleanupResponse" do
|
132
|
+
end
|
133
|
+
add_enum "signrpc.SignMethod" do
|
134
|
+
value :SIGN_METHOD_WITNESS_V0, 0
|
135
|
+
value :SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086, 1
|
136
|
+
value :SIGN_METHOD_TAPROOT_KEY_SPEND, 2
|
137
|
+
value :SIGN_METHOD_TAPROOT_SCRIPT_SPEND, 3
|
138
|
+
end
|
68
139
|
end
|
69
140
|
end
|
70
141
|
|
@@ -83,4 +154,19 @@ module Signrpc
|
|
83
154
|
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
|
84
155
|
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
|
85
156
|
SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
|
157
|
+
TweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TweakDesc").msgclass
|
158
|
+
TaprootTweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TaprootTweakDesc").msgclass
|
159
|
+
MuSig2CombineKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysRequest").msgclass
|
160
|
+
MuSig2CombineKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysResponse").msgclass
|
161
|
+
MuSig2SessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionRequest").msgclass
|
162
|
+
MuSig2SessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionResponse").msgclass
|
163
|
+
MuSig2RegisterNoncesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesRequest").msgclass
|
164
|
+
MuSig2RegisterNoncesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesResponse").msgclass
|
165
|
+
MuSig2SignRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignRequest").msgclass
|
166
|
+
MuSig2SignResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignResponse").msgclass
|
167
|
+
MuSig2CombineSigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigRequest").msgclass
|
168
|
+
MuSig2CombineSigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigResponse").msgclass
|
169
|
+
MuSig2CleanupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupRequest").msgclass
|
170
|
+
MuSig2CleanupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupResponse").msgclass
|
171
|
+
SignMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMethod").enummodule
|
86
172
|
end
|
@@ -29,8 +29,8 @@ module Signrpc
|
|
29
29
|
#
|
30
30
|
# ComputeInputScript generates a complete InputIndex for the passed
|
31
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
|
-
#
|
32
|
+
# This method should be capable of generating the proper input script for both
|
33
|
+
# regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
|
34
34
|
# output.
|
35
35
|
#
|
36
36
|
# Note that when using this method to sign inputs belonging to the wallet,
|
@@ -62,6 +62,71 @@ module Signrpc
|
|
62
62
|
# The resulting shared public key is serialized in the compressed format and
|
63
63
|
# hashed with sha256, resulting in the final key length of 256bit.
|
64
64
|
rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse
|
65
|
+
#
|
66
|
+
# MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
|
67
|
+
# to calculate the combined MuSig2 public key from a list of all participating
|
68
|
+
# signers' public keys. This RPC is completely stateless and deterministic and
|
69
|
+
# does not create any signing session. It can be used to determine the Taproot
|
70
|
+
# public key that should be put in an on-chain output once all public keys are
|
71
|
+
# known. A signing session is only needed later when that output should be
|
72
|
+
# _spent_ again.
|
73
|
+
#
|
74
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
75
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
76
|
+
# releases. Backward compatibility is not guaranteed!
|
77
|
+
rpc :MuSig2CombineKeys, ::Signrpc::MuSig2CombineKeysRequest, ::Signrpc::MuSig2CombineKeysResponse
|
78
|
+
#
|
79
|
+
# MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
|
80
|
+
# using the local key identified by the key locator. The complete list of all
|
81
|
+
# public keys of all signing parties must be provided, including the public
|
82
|
+
# key of the local signing key. If nonces of other parties are already known,
|
83
|
+
# they can be submitted as well to reduce the number of RPC calls necessary
|
84
|
+
# later on.
|
85
|
+
#
|
86
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
87
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
88
|
+
# releases. Backward compatibility is not guaranteed!
|
89
|
+
rpc :MuSig2CreateSession, ::Signrpc::MuSig2SessionRequest, ::Signrpc::MuSig2SessionResponse
|
90
|
+
#
|
91
|
+
# MuSig2RegisterNonces (experimental!) registers one or more public nonces of
|
92
|
+
# other signing participants for a session identified by its ID. This RPC can
|
93
|
+
# be called multiple times until all nonces are registered.
|
94
|
+
#
|
95
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
96
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
97
|
+
# releases. Backward compatibility is not guaranteed!
|
98
|
+
rpc :MuSig2RegisterNonces, ::Signrpc::MuSig2RegisterNoncesRequest, ::Signrpc::MuSig2RegisterNoncesResponse
|
99
|
+
#
|
100
|
+
# MuSig2Sign (experimental!) creates a partial signature using the local
|
101
|
+
# signing key that was specified when the session was created. This can only
|
102
|
+
# be called when all public nonces of all participants are known and have been
|
103
|
+
# registered with the session. If this node isn't responsible for combining
|
104
|
+
# all the partial signatures, then the cleanup flag should be set, indicating
|
105
|
+
# that the session can be removed from memory once the signature was produced.
|
106
|
+
#
|
107
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
108
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
109
|
+
# releases. Backward compatibility is not guaranteed!
|
110
|
+
rpc :MuSig2Sign, ::Signrpc::MuSig2SignRequest, ::Signrpc::MuSig2SignResponse
|
111
|
+
#
|
112
|
+
# MuSig2CombineSig (experimental!) combines the given partial signature(s)
|
113
|
+
# with the local one, if it already exists. Once a partial signature of all
|
114
|
+
# participants is registered, the final signature will be combined and
|
115
|
+
# returned.
|
116
|
+
#
|
117
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
118
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
119
|
+
# releases. Backward compatibility is not guaranteed!
|
120
|
+
rpc :MuSig2CombineSig, ::Signrpc::MuSig2CombineSigRequest, ::Signrpc::MuSig2CombineSigResponse
|
121
|
+
#
|
122
|
+
# MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
|
123
|
+
# cases where it's obvious that the signing session won't succeed and the
|
124
|
+
# resources can be released.
|
125
|
+
#
|
126
|
+
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
127
|
+
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
128
|
+
# releases. Backward compatibility is not guaranteed!
|
129
|
+
rpc :MuSig2Cleanup, ::Signrpc::MuSig2CleanupRequest, ::Signrpc::MuSig2CleanupResponse
|
65
130
|
end
|
66
131
|
|
67
132
|
Stub = Service.rpc_stub_class
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: stateservice.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("stateservice.proto", :syntax => :proto3) do
|
8
|
+
add_message "lnrpc.SubscribeStateRequest" do
|
9
|
+
end
|
10
|
+
add_message "lnrpc.SubscribeStateResponse" do
|
11
|
+
optional :state, :enum, 1, "lnrpc.WalletState"
|
12
|
+
end
|
13
|
+
add_message "lnrpc.GetStateRequest" do
|
14
|
+
end
|
15
|
+
add_message "lnrpc.GetStateResponse" do
|
16
|
+
optional :state, :enum, 1, "lnrpc.WalletState"
|
17
|
+
end
|
18
|
+
add_enum "lnrpc.WalletState" do
|
19
|
+
value :NON_EXISTING, 0
|
20
|
+
value :LOCKED, 1
|
21
|
+
value :UNLOCKED, 2
|
22
|
+
value :RPC_ACTIVE, 3
|
23
|
+
value :SERVER_ACTIVE, 4
|
24
|
+
value :WAITING_TO_START, 255
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module Lnrpc
|
30
|
+
SubscribeStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateRequest").msgclass
|
31
|
+
SubscribeStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateResponse").msgclass
|
32
|
+
GetStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateRequest").msgclass
|
33
|
+
GetStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateResponse").msgclass
|
34
|
+
WalletState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletState").enummodule
|
35
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: stateservice.proto for package 'lnrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'stateservice_pb'
|
6
|
+
|
7
|
+
module Lnrpc
|
8
|
+
module State
|
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
|
+
# State service is a always running service that exposes the current state of
|
27
|
+
# the wallet and RPC server.
|
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.State'
|
35
|
+
|
36
|
+
# SubscribeState subscribes to the state of the wallet. The current wallet
|
37
|
+
# state will always be delivered immediately.
|
38
|
+
rpc :SubscribeState, ::Lnrpc::SubscribeStateRequest, stream(::Lnrpc::SubscribeStateResponse)
|
39
|
+
# GetState returns the current wallet state without streaming further
|
40
|
+
# changes.
|
41
|
+
rpc :GetState, ::Lnrpc::GetStateRequest, ::Lnrpc::GetStateResponse
|
42
|
+
end
|
43
|
+
|
44
|
+
Stub = Service.rpc_stub_class
|
45
|
+
end
|
46
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
-
require '
|
6
|
+
require 'lightning_pb'
|
7
7
|
require 'signrpc/signer_pb'
|
8
8
|
|
9
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -12,6 +12,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
12
|
optional :min_confs, :int32, 1
|
13
13
|
optional :max_confs, :int32, 2
|
14
14
|
optional :account, :string, 3
|
15
|
+
optional :unconfirmed_only, :bool, 4
|
15
16
|
end
|
16
17
|
add_message "walletrpc.ListUnspentResponse" do
|
17
18
|
repeated :utxos, :message, 1, "lnrpc.Utxo"
|
@@ -59,6 +60,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
59
60
|
add_message "walletrpc.ListAccountsResponse" do
|
60
61
|
repeated :accounts, :message, 1, "walletrpc.Account"
|
61
62
|
end
|
63
|
+
add_message "walletrpc.RequiredReserveRequest" do
|
64
|
+
optional :additional_public_channels, :uint32, 1
|
65
|
+
end
|
66
|
+
add_message "walletrpc.RequiredReserveResponse" do
|
67
|
+
optional :required_reserve, :int64, 1
|
68
|
+
end
|
62
69
|
add_message "walletrpc.ImportAccountRequest" do
|
63
70
|
optional :name, :string, 1
|
64
71
|
optional :extended_public_key, :string, 2
|
@@ -172,6 +179,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
172
179
|
optional :id, :bytes, 1
|
173
180
|
optional :outpoint, :message, 2, "lnrpc.OutPoint"
|
174
181
|
optional :expiration, :uint64, 3
|
182
|
+
optional :pk_script, :bytes, 4
|
183
|
+
optional :value, :uint64, 5
|
184
|
+
end
|
185
|
+
add_message "walletrpc.SignPsbtRequest" do
|
186
|
+
optional :funded_psbt, :bytes, 1
|
187
|
+
end
|
188
|
+
add_message "walletrpc.SignPsbtResponse" do
|
189
|
+
optional :signed_psbt, :bytes, 1
|
175
190
|
end
|
176
191
|
add_message "walletrpc.FinalizePsbtRequest" do
|
177
192
|
optional :funded_psbt, :bytes, 1
|
@@ -191,6 +206,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
191
206
|
value :WITNESS_PUBKEY_HASH, 1
|
192
207
|
value :NESTED_WITNESS_PUBKEY_HASH, 2
|
193
208
|
value :HYBRID_NESTED_WITNESS_PUBKEY_HASH, 3
|
209
|
+
value :TAPROOT_PUBKEY, 4
|
194
210
|
end
|
195
211
|
add_enum "walletrpc.WitnessType" do
|
196
212
|
value :UNKNOWN_WITNESS, 0
|
@@ -224,6 +240,8 @@ module Walletrpc
|
|
224
240
|
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass
|
225
241
|
ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass
|
226
242
|
ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass
|
243
|
+
RequiredReserveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveRequest").msgclass
|
244
|
+
RequiredReserveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveResponse").msgclass
|
227
245
|
ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
|
228
246
|
ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
|
229
247
|
ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass
|
@@ -248,6 +266,8 @@ module Walletrpc
|
|
248
266
|
FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass
|
249
267
|
TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass
|
250
268
|
UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").msgclass
|
269
|
+
SignPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignPsbtRequest").msgclass
|
270
|
+
SignPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignPsbtResponse").msgclass
|
251
271
|
FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass
|
252
272
|
FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass
|
253
273
|
ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass
|