lnrpc 0.8.0.beta → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +3 -3
- data/README.md +28 -16
- data/examples.rb +6 -11
- data/generate-grpc-service-files.sh +30 -0
- data/lib/grpc_services/autopilotrpc/autopilot_pb.rb +48 -0
- data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +40 -0
- data/lib/grpc_services/chainrpc/chainnotifier_pb.rb +67 -0
- data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +51 -0
- data/lib/grpc_services/invoicesrpc/invoices_pb.rb +48 -0
- data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +41 -0
- data/lib/grpc_services/lnclipb/lncli_pb.rb +18 -0
- data/lib/grpc_services/routerrpc/router_pb.rb +229 -0
- data/lib/grpc_services/routerrpc/router_services_pb.rb +86 -0
- data/lib/grpc_services/rpc_pb.rb +1265 -0
- data/lib/{lnrpc → grpc_services}/rpc_services_pb.rb +115 -119
- data/lib/grpc_services/signrpc/signer_pb.rb +83 -0
- data/lib/grpc_services/signrpc/signer_services_pb.rb +68 -0
- data/lib/grpc_services/verrpc/verrpc_pb.rb +27 -0
- data/lib/grpc_services/verrpc/verrpc_services_pb.rb +27 -0
- data/lib/grpc_services/walletrpc/walletkit_pb.rb +149 -0
- data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +115 -0
- data/lib/grpc_services/walletunlocker_pb.rb +51 -0
- data/lib/grpc_services/walletunlocker_services_pb.rb +72 -0
- data/lib/grpc_services/watchtowerrpc/watchtower_pb.rb +21 -0
- data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +28 -0
- data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +75 -0
- data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +43 -0
- data/lib/lnrpc.rb +19 -3
- data/lib/lnrpc/client.rb +60 -45
- data/lib/lnrpc/grpc_wrapper.rb +43 -0
- data/lib/lnrpc/version.rb +1 -1
- data/lnrpc.gemspec +4 -2
- metadata +35 -11
- data/lib/lnrpc/rpc.proto +0 -2580
- data/lib/lnrpc/rpc_pb.rb +0 -938
@@ -0,0 +1,83 @@
|
|
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
|
+
end
|
62
|
+
add_message "signrpc.SharedKeyResponse" do
|
63
|
+
optional :shared_key, :bytes, 1
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
module Signrpc
|
69
|
+
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyLocator").msgclass
|
70
|
+
KeyDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyDescriptor").msgclass
|
71
|
+
TxOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TxOut").msgclass
|
72
|
+
SignDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignDescriptor").msgclass
|
73
|
+
SignReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignReq").msgclass
|
74
|
+
SignResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignResp").msgclass
|
75
|
+
InputScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScript").msgclass
|
76
|
+
InputScriptResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScriptResp").msgclass
|
77
|
+
SignMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageReq").msgclass
|
78
|
+
SignMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageResp").msgclass
|
79
|
+
VerifyMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageReq").msgclass
|
80
|
+
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
|
81
|
+
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
|
82
|
+
SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
|
83
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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, SignReq, 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, SignReq, 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, SignMessageReq, 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, VerifyMessageReq, 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_loc parameter (or the node's identity private key
|
59
|
+
# if no key locator is specified):
|
60
|
+
# P_shared = privKeyNode * ephemeralPubkey
|
61
|
+
# The resulting shared public key is serialized in the compressed format and
|
62
|
+
# hashed with sha256, resulting in the final key length of 256bit.
|
63
|
+
rpc :DeriveSharedKey, SharedKeyRequest, SharedKeyResponse
|
64
|
+
end
|
65
|
+
|
66
|
+
Stub = Service.rpc_stub_class
|
67
|
+
end
|
68
|
+
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, VersionRequest, Version
|
23
|
+
end
|
24
|
+
|
25
|
+
Stub = Service.rpc_stub_class
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,149 @@
|
|
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
|
+
end
|
51
|
+
add_message "walletrpc.SendOutputsResponse" do
|
52
|
+
optional :raw_tx, :bytes, 1
|
53
|
+
end
|
54
|
+
add_message "walletrpc.EstimateFeeRequest" do
|
55
|
+
optional :conf_target, :int32, 1
|
56
|
+
end
|
57
|
+
add_message "walletrpc.EstimateFeeResponse" do
|
58
|
+
optional :sat_per_kw, :int64, 1
|
59
|
+
end
|
60
|
+
add_message "walletrpc.PendingSweep" do
|
61
|
+
optional :outpoint, :message, 1, "lnrpc.OutPoint"
|
62
|
+
optional :witness_type, :enum, 2, "walletrpc.WitnessType"
|
63
|
+
optional :amount_sat, :uint32, 3
|
64
|
+
optional :sat_per_byte, :uint32, 4
|
65
|
+
optional :broadcast_attempts, :uint32, 5
|
66
|
+
optional :next_broadcast_height, :uint32, 6
|
67
|
+
optional :requested_conf_target, :uint32, 8
|
68
|
+
optional :requested_sat_per_byte, :uint32, 9
|
69
|
+
optional :force, :bool, 7
|
70
|
+
end
|
71
|
+
add_message "walletrpc.PendingSweepsRequest" do
|
72
|
+
end
|
73
|
+
add_message "walletrpc.PendingSweepsResponse" do
|
74
|
+
repeated :pending_sweeps, :message, 1, "walletrpc.PendingSweep"
|
75
|
+
end
|
76
|
+
add_message "walletrpc.BumpFeeRequest" do
|
77
|
+
optional :outpoint, :message, 1, "lnrpc.OutPoint"
|
78
|
+
optional :target_conf, :uint32, 2
|
79
|
+
optional :sat_per_byte, :uint32, 3
|
80
|
+
optional :force, :bool, 4
|
81
|
+
end
|
82
|
+
add_message "walletrpc.BumpFeeResponse" do
|
83
|
+
end
|
84
|
+
add_message "walletrpc.ListSweepsRequest" do
|
85
|
+
optional :verbose, :bool, 1
|
86
|
+
end
|
87
|
+
add_message "walletrpc.ListSweepsResponse" do
|
88
|
+
oneof :sweeps do
|
89
|
+
optional :transaction_details, :message, 1, "lnrpc.TransactionDetails"
|
90
|
+
optional :transaction_ids, :message, 2, "walletrpc.ListSweepsResponse.TransactionIDs"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
add_message "walletrpc.ListSweepsResponse.TransactionIDs" do
|
94
|
+
repeated :transaction_ids, :string, 1
|
95
|
+
end
|
96
|
+
add_message "walletrpc.LabelTransactionRequest" do
|
97
|
+
optional :txid, :bytes, 1
|
98
|
+
optional :label, :string, 2
|
99
|
+
optional :overwrite, :bool, 3
|
100
|
+
end
|
101
|
+
add_message "walletrpc.LabelTransactionResponse" do
|
102
|
+
end
|
103
|
+
add_enum "walletrpc.WitnessType" do
|
104
|
+
value :UNKNOWN_WITNESS, 0
|
105
|
+
value :COMMITMENT_TIME_LOCK, 1
|
106
|
+
value :COMMITMENT_NO_DELAY, 2
|
107
|
+
value :COMMITMENT_REVOKE, 3
|
108
|
+
value :HTLC_OFFERED_REVOKE, 4
|
109
|
+
value :HTLC_ACCEPTED_REVOKE, 5
|
110
|
+
value :HTLC_OFFERED_TIMEOUT_SECOND_LEVEL, 6
|
111
|
+
value :HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL, 7
|
112
|
+
value :HTLC_OFFERED_REMOTE_TIMEOUT, 8
|
113
|
+
value :HTLC_ACCEPTED_REMOTE_SUCCESS, 9
|
114
|
+
value :HTLC_SECOND_LEVEL_REVOKE, 10
|
115
|
+
value :WITNESS_KEY_HASH, 11
|
116
|
+
value :NESTED_WITNESS_KEY_HASH, 12
|
117
|
+
value :COMMITMENT_ANCHOR, 13
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
module Walletrpc
|
123
|
+
ListUnspentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentRequest").msgclass
|
124
|
+
ListUnspentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentResponse").msgclass
|
125
|
+
LeaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputRequest").msgclass
|
126
|
+
LeaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputResponse").msgclass
|
127
|
+
ReleaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputRequest").msgclass
|
128
|
+
ReleaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputResponse").msgclass
|
129
|
+
KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
|
130
|
+
AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass
|
131
|
+
AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass
|
132
|
+
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass
|
133
|
+
PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
|
134
|
+
SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
|
135
|
+
SendOutputsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsResponse").msgclass
|
136
|
+
EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeRequest").msgclass
|
137
|
+
EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeResponse").msgclass
|
138
|
+
PendingSweep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweep").msgclass
|
139
|
+
PendingSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsRequest").msgclass
|
140
|
+
PendingSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsResponse").msgclass
|
141
|
+
BumpFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeRequest").msgclass
|
142
|
+
BumpFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeResponse").msgclass
|
143
|
+
ListSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsRequest").msgclass
|
144
|
+
ListSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse").msgclass
|
145
|
+
ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass
|
146
|
+
LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass
|
147
|
+
LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass
|
148
|
+
WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
|
149
|
+
end
|
@@ -0,0 +1,115 @@
|
|
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, ListUnspentRequest, 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, LeaseOutputRequest, 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, ReleaseOutputRequest, 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, 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, AddrRequest, 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, Transaction, 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, SendOutputsRequest, 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, EstimateFeeRequest, 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, PendingSweepsRequest, 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, BumpFeeRequest, 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, ListSweepsRequest, 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, LabelTransactionRequest, LabelTransactionResponse
|
111
|
+
end
|
112
|
+
|
113
|
+
Stub = Service.rpc_stub_class
|
114
|
+
end
|
115
|
+
end
|