Merge branch 'bumi:master' into master

This commit is contained in:
Ivan Raszl 2023-10-18 12:51:30 +08:00 committed by GitHub
commit b8da3ec0c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 816 additions and 33 deletions

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
lnrpc (0.14.1)
lnrpc (0.15.5)
google-protobuf (>= 3.15.7)
grpc (>= 1.28.0)
@ -9,11 +9,11 @@ GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.0)
google-protobuf (3.21.1)
googleapis-common-protos-types (1.3.1)
google-protobuf (3.22.1)
googleapis-common-protos-types (1.5.0)
google-protobuf (~> 3.14)
grpc (1.46.3)
google-protobuf (~> 3.19)
grpc (1.52.0)
google-protobuf (~> 3.21)
googleapis-common-protos-types (~> 1.0)
rake (13.0.6)
rspec (3.11.0)
@ -40,4 +40,4 @@ DEPENDENCIES
rspec (~> 3.0)
BUNDLED WITH
2.2.33
2.4.4

View File

@ -8,7 +8,7 @@ a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https:
Add this line to your application's Gemfile:
```ruby
gem 'lnrpc', '~> 0.13.0'
gem 'lnrpc', '~> 0.15.5'
```
lnrpc follows the lnd versioning, thus it is recommended to specify the exact version you need for your lnd node as dependency (see [#Versioning](#Versioning)).

View File

@ -10,7 +10,7 @@ cd $GOPATH/src/github.com/lightningnetwork/lnd/lnrpc
echo "Generating Ruby GRPC Service Files"
PROTOS="rpc.proto walletunlocker.proto **/*.proto"
PROTOS="lightning.proto walletunlocker.proto stateservice.proto **/*.proto"
# generate files for each proto
for file in $PROTOS; do

View File

@ -21,9 +21,11 @@ module Chainrpc
# registers an intent for a client to be notified once a confirmation request
# has reached its required number of confirmations on-chain.
#
# A client can specify whether the confirmation request should be for a
# particular transaction by its hash or for an output script by specifying a
# zero hash.
# A confirmation request must have a valid output script. It is also possible
# to give a transaction ID. If the transaction ID is not set, a notification
# is sent once the output script confirms. If the transaction ID is also set,
# a notification is sent once the output script confirms in the given
# transaction.
rpc :RegisterConfirmationsNtfn, ::Chainrpc::ConfRequest, stream(::Chainrpc::ConfEvent)
#
# RegisterSpendNtfn is a synchronous response-streaming RPC that registers an

View File

@ -0,0 +1,17 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: devrpc/dev.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("devrpc/dev.proto", :syntax => :proto3) do
add_message "devrpc.ImportGraphResponse" do
end
end
end
module Devrpc
ImportGraphResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("devrpc.ImportGraphResponse").msgclass
end

View File

@ -0,0 +1,25 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: devrpc/dev.proto for package 'devrpc'
require 'grpc'
require 'devrpc/dev_pb'
module Devrpc
module Dev
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'devrpc.Dev'
#
# ImportGraph imports a ChannelGraph into the graph database. Should only be
# used for development.
rpc :ImportGraph, ::Lnrpc::ChannelGraph, ::Devrpc::ImportGraphResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -3,7 +3,7 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do

View File

@ -1,10 +1,24 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rpc.proto
# source: lightning.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("rpc.proto", :syntax => :proto3) do
add_file("lightning.proto", :syntax => :proto3) do
add_message "lnrpc.SubscribeCustomMessagesRequest" do
end
add_message "lnrpc.CustomMessage" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageRequest" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageResponse" do
end
add_message "lnrpc.Utxo" do
optional :address_type, :enum, 1, "lnrpc.AddressType"
optional :address, :string, 2
@ -13,6 +27,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :outpoint, :message, 5, "lnrpc.OutPoint"
optional :confirmations, :int64, 6
end
add_message "lnrpc.OutputDetail" do
optional :output_type, :enum, 1, "lnrpc.OutputScriptType"
optional :address, :string, 2
optional :pk_script, :string, 3
optional :output_index, :int64, 4
optional :amount, :int64, 5
optional :is_our_address, :bool, 6
end
add_message "lnrpc.Transaction" do
optional :tx_hash, :string, 1
optional :amount, :int64, 2
@ -22,8 +44,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :time_stamp, :int64, 6
optional :total_fees, :int64, 7
repeated :dest_addresses, :string, 8
repeated :output_details, :message, 11, "lnrpc.OutputDetail"
optional :raw_tx_hex, :string, 9
optional :label, :string, 10
repeated :previous_outpoints, :message, 12, "lnrpc.PreviousOutPoint"
end
add_message "lnrpc.GetTransactionsRequest" do
optional :start_height, :int32, 1
@ -83,6 +107,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :csv_delay, :uint32, 11
optional :max_accepted_htlcs, :uint32, 12
optional :channel_flags, :uint32, 13
optional :commitment_type, :enum, 14, "lnrpc.CommitmentType"
optional :wants_zero_conf, :bool, 15
optional :wants_scid_alias, :bool, 16
end
add_message "lnrpc.ChannelAcceptResponse" do
optional :accept, :bool, 1
@ -95,6 +122,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :max_htlc_count, :uint32, 8
optional :min_htlc_in, :uint64, 9
optional :min_accept_depth, :uint32, 10
optional :zero_conf, :bool, 11
end
add_message "lnrpc.ChannelPoint" do
optional :output_index, :uint32, 3
@ -108,6 +136,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :txid_str, :string, 2
optional :output_index, :uint32, 3
end
add_message "lnrpc.PreviousOutPoint" do
optional :outpoint, :string, 1
optional :is_our_output, :bool, 2
end
add_message "lnrpc.LightningAddress" do
optional :pubkey, :string, 1
optional :host, :string, 2
@ -166,6 +198,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "lnrpc.SignMessageRequest" do
optional :msg, :bytes, 1
optional :single_hash, :bool, 2
end
add_message "lnrpc.SignMessageResponse" do
optional :signature, :string, 1
@ -238,6 +271,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :thaw_height, :uint32, 28
optional :local_constraints, :message, 29, "lnrpc.ChannelConstraints"
optional :remote_constraints, :message, 30, "lnrpc.ChannelConstraints"
repeated :alias_scids, :uint64, 31
optional :zero_conf, :bool, 32
optional :zero_conf_confirmed_scid, :uint64, 33
end
add_message "lnrpc.ListChannelsRequest" do
optional :active_only, :bool, 1
@ -249,6 +285,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListChannelsResponse" do
repeated :channels, :message, 11, "lnrpc.Channel"
end
add_message "lnrpc.AliasMap" do
optional :base_scid, :uint64, 1
repeated :aliases, :uint64, 2
end
add_message "lnrpc.ListAliasesRequest" do
end
add_message "lnrpc.ListAliasesResponse" do
repeated :alias_maps, :message, 1, "lnrpc.AliasMap"
end
add_message "lnrpc.ChannelCloseSummary" do
optional :channel_point, :string, 1
optional :chan_id, :uint64, 2
@ -263,6 +308,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :open_initiator, :enum, 11, "lnrpc.Initiator"
optional :close_initiator, :enum, 12, "lnrpc.Initiator"
repeated :resolutions, :message, 13, "lnrpc.Resolution"
repeated :alias_scids, :uint64, 14
optional :zero_conf_confirmed_scid, :uint64, 15
end
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
value :COOPERATIVE_CLOSE, 0
@ -304,6 +351,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :errors, :message, 12, "lnrpc.TimestampedError"
optional :flap_count, :int32, 13
optional :last_flap_ns, :int64, 14
optional :last_ping_payload, :bytes, 15
end
add_enum "lnrpc.Peer.SyncType" do
value :UNKNOWN_SYNC, 0
@ -352,6 +400,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :chains, :message, 16, "lnrpc.Chain"
repeated :uris, :string, 12
map :features, :uint32, :message, 19, "lnrpc.Feature"
optional :require_htlc_interceptor, :bool, 21
end
add_message "lnrpc.GetRecoveryInfoRequest" do
end
@ -383,6 +432,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :sat_per_byte, :int64, 4
optional :delivery_address, :string, 5
optional :sat_per_vbyte, :uint64, 6
optional :max_fee_per_vbyte, :uint64, 7
end
add_message "lnrpc.CloseStatusUpdate" do
oneof :update do
@ -399,6 +449,28 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :funding_amount, :int64, 2
optional :psbt, :bytes, 3
end
add_message "lnrpc.BatchOpenChannelRequest" do
repeated :channels, :message, 1, "lnrpc.BatchOpenChannel"
optional :target_conf, :int32, 2
optional :sat_per_vbyte, :int64, 3
optional :min_confs, :int32, 4
optional :spend_unconfirmed, :bool, 5
optional :label, :string, 6
end
add_message "lnrpc.BatchOpenChannel" do
optional :node_pubkey, :bytes, 1
optional :local_funding_amount, :int64, 2
optional :push_sat, :int64, 3
optional :private, :bool, 4
optional :min_htlc_msat, :int64, 5
optional :remote_csv_delay, :uint32, 6
optional :close_address, :string, 7
optional :pending_chan_id, :bytes, 8
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
end
add_message "lnrpc.BatchOpenChannelResponse" do
repeated :pending_channels, :message, 1, "lnrpc.PendingUpdate"
end
add_message "lnrpc.OpenChannelRequest" do
optional :sat_per_vbyte, :uint64, 1
optional :node_pubkey, :bytes, 2
@ -417,6 +489,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :remote_max_value_in_flight_msat, :uint64, 15
optional :remote_max_htlcs, :uint32, 16
optional :max_local_csv, :uint32, 17
optional :commitment_type, :enum, 18, "lnrpc.CommitmentType"
optional :zero_conf, :bool, 19
optional :scid_alias, :bool, 20
end
add_message "lnrpc.OpenStatusUpdate" do
optional :pending_chan_id, :bytes, 4
@ -459,6 +534,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.FundingPsbtVerify" do
optional :funded_psbt, :bytes, 1
optional :pending_chan_id, :bytes, 2
optional :skip_finalize, :bool, 3
end
add_message "lnrpc.FundingPsbtFinalize" do
optional :signed_psbt, :bytes, 1
@ -502,10 +578,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :remote_chan_reserve_sat, :int64, 7
optional :initiator, :enum, 8, "lnrpc.Initiator"
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
optional :num_forwarding_packages, :int64, 10
optional :chan_status_flags, :string, 11
optional :private, :bool, 12
end
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :confirmation_height, :uint32, 2
optional :commit_fee, :int64, 4
optional :commit_weight, :int64, 5
optional :fee_per_kw, :int64, 6
@ -514,6 +592,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :limbo_balance, :int64, 2
optional :commitments, :message, 3, "lnrpc.PendingChannelsResponse.Commitments"
optional :closing_txid, :string, 4
end
add_message "lnrpc.PendingChannelsResponse.Commitments" do
optional :local_txid, :string, 1
@ -552,6 +631,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
optional :pending_open_channel, :message, 6, "lnrpc.PendingUpdate"
optional :fully_resolved_channel, :message, 7, "lnrpc.ChannelPoint"
end
end
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
@ -560,6 +640,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :ACTIVE_CHANNEL, 2
value :INACTIVE_CHANNEL, 3
value :PENDING_OPEN_CHANNEL, 4
value :FULLY_RESOLVED_CHANNEL, 5
end
add_message "lnrpc.WalletAccountBalance" do
optional :confirmed_balance, :int64, 1
@ -571,6 +652,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :total_balance, :int64, 1
optional :confirmed_balance, :int64, 2
optional :unconfirmed_balance, :int64, 3
optional :locked_balance, :int64, 5
optional :reserved_balance_anchor_chan, :int64, 6
map :account_balance, :string, :message, 4, "lnrpc.WalletAccountBalance"
end
add_message "lnrpc.Amount" do
@ -606,6 +689,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :last_hop_pubkey, :bytes, 15
repeated :route_hints, :message, 16, "lnrpc.RouteHint"
repeated :dest_features, :enum, 17, "lnrpc.FeatureBit"
optional :time_pref, :double, 18
end
add_message "lnrpc.NodePair" do
optional :from, :bytes, 1
@ -632,6 +716,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :mpp_record, :message, 10, "lnrpc.MPPRecord"
optional :amp_record, :message, 12, "lnrpc.AMPRecord"
map :custom_records, :uint64, :bytes, 11
optional :metadata, :bytes, 13
end
add_message "lnrpc.MPPRecord" do
optional :payment_addr, :bytes, 11
@ -767,9 +852,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_proportional_millionths, :uint32, 4
optional :cltv_expiry_delta, :uint32, 5
end
add_message "lnrpc.SetID" do
optional :set_id, :bytes, 1
end
add_message "lnrpc.RouteHint" do
repeated :hop_hints, :message, 1, "lnrpc.HopHint"
end
add_message "lnrpc.AMPInvoiceState" do
optional :state, :enum, 1, "lnrpc.InvoiceHTLCState"
optional :settle_index, :uint64, 2
optional :settle_time, :int64, 3
optional :amt_paid_msat, :int64, 5
end
add_message "lnrpc.Invoice" do
optional :memo, :string, 1
optional :r_preimage, :bytes, 3
@ -797,6 +891,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :is_keysend, :bool, 25
optional :payment_addr, :bytes, 26
optional :is_amp, :bool, 27
map :amp_invoice_state, :string, :message, 28, "lnrpc.AMPInvoiceState"
end
add_enum "lnrpc.Invoice.InvoiceState" do
value :OPEN, 0
@ -891,21 +986,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :index_offset, :uint64, 2
optional :max_payments, :uint64, 3
optional :reversed, :bool, 4
optional :count_total_payments, :bool, 5
end
add_message "lnrpc.ListPaymentsResponse" do
repeated :payments, :message, 1, "lnrpc.Payment"
optional :first_index_offset, :uint64, 2
optional :last_index_offset, :uint64, 3
optional :total_num_payments, :uint64, 4
end
add_message "lnrpc.DeletePaymentRequest" do
optional :payment_hash, :bytes, 1
optional :failed_htlcs_only, :bool, 2
end
add_message "lnrpc.DeleteAllPaymentsRequest" do
optional :failed_payments_only, :bool, 1
optional :failed_htlcs_only, :bool, 2
end
add_message "lnrpc.DeletePaymentResponse" do
end
add_message "lnrpc.DeleteAllPaymentsResponse" do
end
add_message "lnrpc.AbandonChannelRequest" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
optional :pending_funding_shim_only, :bool, 2
optional :i_know_what_i_am_doing, :bool, 3
end
add_message "lnrpc.AbandonChannelResponse" do
end
@ -957,6 +1061,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.PolicyUpdateRequest" do
optional :base_fee_msat, :int64, 3
optional :fee_rate, :double, 4
optional :fee_rate_ppm, :uint32, 9
optional :time_lock_delta, :uint32, 5
optional :max_htlc_msat, :uint64, 6
optional :min_htlc_msat, :uint64, 7
@ -966,7 +1071,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
end
end
add_message "lnrpc.FailedUpdate" do
optional :outpoint, :message, 1, "lnrpc.OutPoint"
optional :reason, :enum, 2, "lnrpc.UpdateFailure"
optional :update_error, :string, 3
end
add_message "lnrpc.PolicyUpdateResponse" do
repeated :failed_updates, :message, 1, "lnrpc.FailedUpdate"
end
add_message "lnrpc.ForwardingHistoryRequest" do
optional :start_time, :uint64, 1
@ -1029,6 +1140,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.BakeMacaroonRequest" do
repeated :permissions, :message, 1, "lnrpc.MacaroonPermission"
optional :root_key_id, :uint64, 2
optional :allow_external_permissions, :bool, 3
end
add_message "lnrpc.BakeMacaroonResponse" do
optional :macaroon, :string, 1
@ -1115,17 +1227,79 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :entity, :string, 1
repeated :actions, :string, 2
end
add_message "lnrpc.CheckMacPermRequest" do
optional :macaroon, :bytes, 1
repeated :permissions, :message, 2, "lnrpc.MacaroonPermission"
optional :fullMethod, :string, 3
end
add_message "lnrpc.CheckMacPermResponse" do
optional :valid, :bool, 1
end
add_message "lnrpc.RPCMiddlewareRequest" do
optional :request_id, :uint64, 1
optional :raw_macaroon, :bytes, 2
optional :custom_caveat_condition, :string, 3
optional :msg_id, :uint64, 7
oneof :intercept_type do
optional :stream_auth, :message, 4, "lnrpc.StreamAuth"
optional :request, :message, 5, "lnrpc.RPCMessage"
optional :response, :message, 6, "lnrpc.RPCMessage"
optional :reg_complete, :bool, 8
end
end
add_message "lnrpc.StreamAuth" do
optional :method_full_uri, :string, 1
end
add_message "lnrpc.RPCMessage" do
optional :method_full_uri, :string, 1
optional :stream_rpc, :bool, 2
optional :type_name, :string, 3
optional :serialized, :bytes, 4
optional :is_error, :bool, 5
end
add_message "lnrpc.RPCMiddlewareResponse" do
optional :ref_msg_id, :uint64, 1
oneof :middleware_message do
optional :register, :message, 2, "lnrpc.MiddlewareRegistration"
optional :feedback, :message, 3, "lnrpc.InterceptFeedback"
end
end
add_message "lnrpc.MiddlewareRegistration" do
optional :middleware_name, :string, 1
optional :custom_macaroon_caveat_name, :string, 2
optional :read_only_mode, :bool, 3
end
add_message "lnrpc.InterceptFeedback" do
optional :error, :string, 1
optional :replace_response, :bool, 2
optional :replacement_serialized, :bytes, 3
end
add_enum "lnrpc.OutputScriptType" do
value :SCRIPT_TYPE_PUBKEY_HASH, 0
value :SCRIPT_TYPE_SCRIPT_HASH, 1
value :SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH, 2
value :SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH, 3
value :SCRIPT_TYPE_PUBKEY, 4
value :SCRIPT_TYPE_MULTISIG, 5
value :SCRIPT_TYPE_NULLDATA, 6
value :SCRIPT_TYPE_NON_STANDARD, 7
value :SCRIPT_TYPE_WITNESS_UNKNOWN, 8
value :SCRIPT_TYPE_WITNESS_V1_TAPROOT, 9
end
add_enum "lnrpc.AddressType" do
value :WITNESS_PUBKEY_HASH, 0
value :NESTED_PUBKEY_HASH, 1
value :UNUSED_WITNESS_PUBKEY_HASH, 2
value :UNUSED_NESTED_PUBKEY_HASH, 3
value :TAPROOT_PUBKEY, 4
value :UNUSED_TAPROOT_PUBKEY, 5
end
add_enum "lnrpc.CommitmentType" do
value :LEGACY, 0
value :STATIC_REMOTE_KEY, 1
value :ANCHORS, 2
value :UNKNOWN_COMMITMENT_TYPE, 999
value :UNKNOWN_COMMITMENT_TYPE, 0
value :LEGACY, 1
value :STATIC_REMOTE_KEY, 2
value :ANCHORS, 3
value :SCRIPT_ENFORCED_LEASE, 4
end
add_enum "lnrpc.Initiator" do
value :INITIATOR_UNKNOWN, 0
@ -1192,11 +1366,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :AMP_REQ, 30
value :AMP_OPT, 31
end
add_enum "lnrpc.UpdateFailure" do
value :UPDATE_FAILURE_UNKNOWN, 0
value :UPDATE_FAILURE_PENDING, 1
value :UPDATE_FAILURE_NOT_FOUND, 2
value :UPDATE_FAILURE_INTERNAL_ERR, 3
value :UPDATE_FAILURE_INVALID_PARAMETER, 4
end
end
end
module Lnrpc
SubscribeCustomMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeCustomMessagesRequest").msgclass
CustomMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CustomMessage").msgclass
SendCustomMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageRequest").msgclass
SendCustomMessageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageResponse").msgclass
Utxo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass
OutputDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputDetail").msgclass
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Transaction").msgclass
GetTransactionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetTransactionsRequest").msgclass
TransactionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TransactionDetails").msgclass
@ -1208,6 +1394,7 @@ module Lnrpc
ChannelAcceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptResponse").msgclass
ChannelPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass
OutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
PreviousOutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PreviousOutPoint").msgclass
LightningAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeRequest").msgclass
EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeResponse").msgclass
@ -1232,6 +1419,9 @@ module Lnrpc
Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Channel").msgclass
ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsRequest").msgclass
ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsResponse").msgclass
AliasMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AliasMap").msgclass
ListAliasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesRequest").msgclass
ListAliasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesResponse").msgclass
ChannelCloseSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary").msgclass
ChannelCloseSummary::ClosureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary.ClosureType").enummodule
Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Resolution").msgclass
@ -1257,6 +1447,9 @@ module Lnrpc
CloseStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
PendingUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
ReadyForPsbtFunding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ReadyForPsbtFunding").msgclass
BatchOpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelRequest").msgclass
BatchOpenChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannel").msgclass
BatchOpenChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelResponse").msgclass
OpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
OpenStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyLocator").msgclass
@ -1318,7 +1511,9 @@ module Lnrpc
ChannelEdgeUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdgeUpdate").msgclass
ClosedChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelUpdate").msgclass
HopHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HopHint").msgclass
SetID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SetID").msgclass
RouteHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
AMPInvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPInvoiceState").msgclass
Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
@ -1334,7 +1529,9 @@ module Lnrpc
HTLCAttempt::HTLCStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt.HTLCStatus").enummodule
ListPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
ListPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
DeletePaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentRequest").msgclass
DeleteAllPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
DeletePaymentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentResponse").msgclass
DeleteAllPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsResponse").msgclass
AbandonChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelRequest").msgclass
AbandonChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelResponse").msgclass
@ -1347,6 +1544,7 @@ module Lnrpc
ChannelFeeReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass
FeeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass
PolicyUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateRequest").msgclass
FailedUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FailedUpdate").msgclass
PolicyUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateResponse").msgclass
ForwardingHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryRequest").msgclass
ForwardingEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingEvent").msgclass
@ -1376,6 +1574,15 @@ module Lnrpc
ChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelUpdate").msgclass
MacaroonId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonId").msgclass
Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Op").msgclass
CheckMacPermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermRequest").msgclass
CheckMacPermResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermResponse").msgclass
RPCMiddlewareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareRequest").msgclass
StreamAuth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.StreamAuth").msgclass
RPCMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMessage").msgclass
RPCMiddlewareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareResponse").msgclass
MiddlewareRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MiddlewareRegistration").msgclass
InterceptFeedback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InterceptFeedback").msgclass
OutputScriptType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputScriptType").enummodule
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
CommitmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CommitmentType").enummodule
Initiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Initiator").enummodule
@ -1385,4 +1592,5 @@ module Lnrpc
InvoiceHTLCState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
PaymentFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentFailureReason").enummodule
FeatureBit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeatureBit").enummodule
UpdateFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UpdateFailure").enummodule
end

View File

@ -1,8 +1,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: rpc.proto for package 'lnrpc'
# Source: lightning.proto for package 'lnrpc'
require 'grpc'
require 'rpc_pb'
require 'lightning_pb'
module Lnrpc
module Lightning
@ -159,6 +159,13 @@ module Lnrpc
# arguments specified in the OpenChannelRequest, this pending channel ID can
# then be used to manually progress the channel funding flow.
rpc :OpenChannel, ::Lnrpc::OpenChannelRequest, stream(::Lnrpc::OpenStatusUpdate)
# lncli: `batchopenchannel`
# BatchOpenChannel attempts to open multiple single-funded channels in a
# single transaction in an atomic way. This means either all channel open
# requests succeed at once or all attempts are aborted if any of them fail.
# This is the safer variant of using PSBTs to manually fund a batch of
# channels through the OpenChannel RPC.
rpc :BatchOpenChannel, ::Lnrpc::BatchOpenChannelRequest, ::Lnrpc::BatchOpenChannelResponse
#
# FundingStateStep is an advanced funding related call that allows the caller
# to either execute some preparatory steps for a funding workflow, or
@ -256,7 +263,12 @@ module Lnrpc
# ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
#
# DeleteAllPayments deletes all outgoing payments from DB.
# DeletePayment deletes an outgoing payment from DB. Note that it will not
# attempt to delete an In-Flight payment, since that would be unsafe.
rpc :DeletePayment, ::Lnrpc::DeletePaymentRequest, ::Lnrpc::DeletePaymentResponse
#
# DeleteAllPayments deletes all outgoing payments from DB. Note that it will
# not attempt to delete In-Flight payments, since that would be unsafe.
rpc :DeleteAllPayments, ::Lnrpc::DeleteAllPaymentsRequest, ::Lnrpc::DeleteAllPaymentsResponse
# lncli: `describegraph`
# DescribeGraph returns a description of the latest graph state from the
@ -325,8 +337,9 @@ module Lnrpc
# lncli: `fwdinghistory`
# ForwardingHistory allows the caller to query the htlcswitch for a record of
# all HTLCs forwarded within the target time range, and integer offset
# within that time range. If no time-range is specified, then the first chunk
# of the past 24 hrs of forwarding history are returned.
# within that time range, for a maximum number of events. If no maximum number
# of events is specified, up to 100 events will be returned. If no time-range
# is specified, then events will be returned in the order that they occured.
#
# A list of forwarding events are returned. The size of each forwarding event
# is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
@ -385,6 +398,37 @@ module Lnrpc
# ListPermissions lists all RPC method URIs and their required macaroon
# permissions to access them.
rpc :ListPermissions, ::Lnrpc::ListPermissionsRequest, ::Lnrpc::ListPermissionsResponse
#
# CheckMacaroonPermissions checks whether a request follows the constraints
# imposed on the macaroon and that the macaroon is authorized to follow the
# provided permissions.
rpc :CheckMacaroonPermissions, ::Lnrpc::CheckMacPermRequest, ::Lnrpc::CheckMacPermResponse
#
# RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A
# gRPC middleware is software component external to lnd that aims to add
# additional business logic to lnd by observing/intercepting/validating
# incoming gRPC client requests and (if needed) replacing/overwriting outgoing
# messages before they're sent to the client. When registering the middleware
# must identify itself and indicate what custom macaroon caveats it wants to
# be responsible for. Only requests that contain a macaroon with that specific
# custom caveat are then sent to the middleware for inspection. The other
# option is to register for the read-only mode in which all requests/responses
# are forwarded for interception to the middleware but the middleware is not
# allowed to modify any responses. As a security measure, _no_ middleware can
# modify responses for requests made with _unencumbered_ macaroons!
rpc :RegisterRPCMiddleware, stream(::Lnrpc::RPCMiddlewareResponse), stream(::Lnrpc::RPCMiddlewareRequest)
# lncli: `sendcustom`
# SendCustomMessage sends a custom peer message.
rpc :SendCustomMessage, ::Lnrpc::SendCustomMessageRequest, ::Lnrpc::SendCustomMessageResponse
# lncli: `subscribecustom`
# SubscribeCustomMessages subscribes to a stream of incoming custom peer
# messages.
rpc :SubscribeCustomMessages, ::Lnrpc::SubscribeCustomMessagesRequest, stream(::Lnrpc::CustomMessage)
# lncli: `listaliases`
# ListAliases returns the set of all aliases that have ever existed with
# their confirmed SCID (if it exists) and/or the base SCID (in the case of
# zero conf).
rpc :ListAliases, ::Lnrpc::ListAliasesRequest, ::Lnrpc::ListAliasesResponse
end
Stub = Service.rpc_stub_class

View File

@ -0,0 +1,106 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: neutrinorpc/neutrino.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("neutrinorpc/neutrino.proto", :syntax => :proto3) do
add_message "neutrinorpc.StatusRequest" do
end
add_message "neutrinorpc.StatusResponse" do
optional :active, :bool, 1
optional :synced, :bool, 2
optional :block_height, :int32, 3
optional :block_hash, :string, 4
repeated :peers, :string, 5
end
add_message "neutrinorpc.AddPeerRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.AddPeerResponse" do
end
add_message "neutrinorpc.DisconnectPeerRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.DisconnectPeerResponse" do
end
add_message "neutrinorpc.IsBannedRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.IsBannedResponse" do
optional :banned, :bool, 1
end
add_message "neutrinorpc.GetBlockHeaderRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetBlockHeaderResponse" do
optional :hash, :string, 1
optional :confirmations, :int64, 2
optional :stripped_size, :int64, 3
optional :size, :int64, 4
optional :weight, :int64, 5
optional :height, :int32, 6
optional :version, :int32, 7
optional :version_hex, :string, 8
optional :merkleroot, :string, 9
optional :time, :int64, 10
optional :nonce, :uint32, 11
optional :bits, :string, 12
optional :ntx, :int32, 13
optional :previous_block_hash, :string, 14
optional :raw_hex, :bytes, 15
end
add_message "neutrinorpc.GetBlockRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetBlockResponse" do
optional :hash, :string, 1
optional :confirmations, :int64, 2
optional :stripped_size, :int64, 3
optional :size, :int64, 4
optional :weight, :int64, 5
optional :height, :int32, 6
optional :version, :int32, 7
optional :version_hex, :string, 8
optional :merkleroot, :string, 9
repeated :tx, :string, 10
optional :time, :int64, 11
optional :nonce, :uint32, 12
optional :bits, :string, 13
optional :ntx, :int32, 14
optional :previous_block_hash, :string, 15
optional :raw_hex, :bytes, 16
end
add_message "neutrinorpc.GetCFilterRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetCFilterResponse" do
optional :filter, :bytes, 1
end
add_message "neutrinorpc.GetBlockHashRequest" do
optional :height, :int32, 1
end
add_message "neutrinorpc.GetBlockHashResponse" do
optional :hash, :string, 1
end
end
end
module Neutrinorpc
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusRequest").msgclass
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusResponse").msgclass
AddPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerRequest").msgclass
AddPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerResponse").msgclass
DisconnectPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerRequest").msgclass
DisconnectPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerResponse").msgclass
IsBannedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedRequest").msgclass
IsBannedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedResponse").msgclass
GetBlockHeaderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderRequest").msgclass
GetBlockHeaderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderResponse").msgclass
GetBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockRequest").msgclass
GetBlockResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockResponse").msgclass
GetCFilterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterRequest").msgclass
GetCFilterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterResponse").msgclass
GetBlockHashRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashRequest").msgclass
GetBlockHashResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashResponse").msgclass
end

View File

@ -0,0 +1,51 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: neutrinorpc/neutrino.proto for package 'neutrinorpc'
require 'grpc'
require 'neutrinorpc/neutrino_pb'
module Neutrinorpc
module NeutrinoKit
# NeutrinoKit is a service that can be used to get information about the
# current state of the neutrino instance, fetch blocks and add/remove peers.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'neutrinorpc.NeutrinoKit'
#
# Status returns the status of the light client neutrino instance,
# along with height and hash of the best block, and a list of connected
# peers.
rpc :Status, ::Neutrinorpc::StatusRequest, ::Neutrinorpc::StatusResponse
#
# AddPeer adds a new peer that has already been connected to the server.
rpc :AddPeer, ::Neutrinorpc::AddPeerRequest, ::Neutrinorpc::AddPeerResponse
#
# DisconnectPeer disconnects a peer by target address. Both outbound and
# inbound nodes will be searched for the target node. An error message will
# be returned if the peer was not found.
rpc :DisconnectPeer, ::Neutrinorpc::DisconnectPeerRequest, ::Neutrinorpc::DisconnectPeerResponse
#
# IsBanned returns true if the peer is banned, otherwise false.
rpc :IsBanned, ::Neutrinorpc::IsBannedRequest, ::Neutrinorpc::IsBannedResponse
#
# GetBlockHeader returns a block header with a particular block hash.
rpc :GetBlockHeader, ::Neutrinorpc::GetBlockHeaderRequest, ::Neutrinorpc::GetBlockHeaderResponse
#
# GetBlock returns a block with a particular block hash.
rpc :GetBlock, ::Neutrinorpc::GetBlockRequest, ::Neutrinorpc::GetBlockResponse
#
# GetCFilter returns a compact filter from a block.
rpc :GetCFilter, ::Neutrinorpc::GetCFilterRequest, ::Neutrinorpc::GetCFilterResponse
#
# GetBlockHash returns the header hash of a block at a given height.
rpc :GetBlockHash, ::Neutrinorpc::GetBlockHashRequest, ::Neutrinorpc::GetBlockHashResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -0,0 +1,48 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: peersrpc/peers.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("peersrpc/peers.proto", :syntax => :proto3) do
add_message "peersrpc.UpdateAddressAction" do
optional :action, :enum, 1, "peersrpc.UpdateAction"
optional :address, :string, 2
end
add_message "peersrpc.UpdateFeatureAction" do
optional :action, :enum, 1, "peersrpc.UpdateAction"
optional :feature_bit, :enum, 2, "lnrpc.FeatureBit"
end
add_message "peersrpc.NodeAnnouncementUpdateRequest" do
repeated :feature_updates, :message, 1, "peersrpc.UpdateFeatureAction"
optional :color, :string, 2
optional :alias, :string, 3
repeated :address_updates, :message, 4, "peersrpc.UpdateAddressAction"
end
add_message "peersrpc.NodeAnnouncementUpdateResponse" do
repeated :ops, :message, 1, "lnrpc.Op"
end
add_enum "peersrpc.UpdateAction" do
value :ADD, 0
value :REMOVE, 1
end
add_enum "peersrpc.FeatureSet" do
value :SET_INIT, 0
value :SET_LEGACY_GLOBAL, 1
value :SET_NODE_ANN, 2
value :SET_INVOICE, 3
value :SET_INVOICE_AMP, 4
end
end
end
module Peersrpc
UpdateAddressAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAddressAction").msgclass
UpdateFeatureAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateFeatureAction").msgclass
NodeAnnouncementUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateRequest").msgclass
NodeAnnouncementUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateResponse").msgclass
UpdateAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAction").enummodule
FeatureSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.FeatureSet").enummodule
end

View File

@ -0,0 +1,27 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: peersrpc/peers.proto for package 'peersrpc'
require 'grpc'
require 'peersrpc/peers_pb'
module Peersrpc
module Peers
# Peers is a service that can be used to get information and interact
# with the other nodes of the newtwork.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'peersrpc.Peers'
# lncli: peers updatenodeannouncement
# UpdateNodeAnnouncement allows the caller to update the node parameters
# and broadcasts a new version of the node announcement to its peers.
rpc :UpdateNodeAnnouncement, ::Peersrpc::NodeAnnouncementUpdateRequest, ::Peersrpc::NodeAnnouncementUpdateResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -3,7 +3,7 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do
@ -30,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :no_inflight_updates, :bool, 18
optional :max_shard_size_msat, :uint64, 21
optional :amp, :bool, 22
optional :time_pref, :double, 23
end
add_message "routerrpc.TrackPaymentRequest" do
optional :payment_hash, :bytes, 1
@ -46,6 +47,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1
optional :route, :message, 2, "lnrpc.Route"
optional :skip_temp_err, :bool, 3
end
add_message "routerrpc.SendToRouteResponse" do
optional :preimage, :bytes, 1
@ -181,6 +183,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
optional :preimage, :bytes, 3
optional :failure_message, :bytes, 4
optional :failure_code, :enum, 5, "lnrpc.Failure.FailureCode"
end
add_message "routerrpc.UpdateChanStatusRequest" do
optional :chan_point, :message, 1, "lnrpc.ChannelPoint"

View File

@ -21,14 +21,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
optional :single_tweak, :bytes, 2
optional :double_tweak, :bytes, 3
optional :tap_tweak, :bytes, 10
optional :witness_script, :bytes, 4
optional :output, :message, 5, "signrpc.TxOut"
optional :sighash, :uint32, 7
optional :input_index, :int32, 8
optional :sign_method, :enum, 9, "signrpc.SignMethod"
end
add_message "signrpc.SignReq" do
optional :raw_tx_bytes, :bytes, 1
repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
repeated :prev_outputs, :message, 3, "signrpc.TxOut"
end
add_message "signrpc.SignResp" do
repeated :raw_sigs, :bytes, 1
@ -45,6 +48,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :key_loc, :message, 2, "signrpc.KeyLocator"
optional :double_hash, :bool, 3
optional :compact_sig, :bool, 4
optional :schnorr_sig, :bool, 5
optional :schnorr_sig_tap_tweak, :bytes, 6
end
add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1
@ -53,6 +58,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :msg, :bytes, 1
optional :signature, :bytes, 2
optional :pubkey, :bytes, 3
optional :is_schnorr_sig, :bool, 4
end
add_message "signrpc.VerifyMessageResp" do
optional :valid, :bool, 1
@ -65,6 +71,71 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "signrpc.SharedKeyResponse" do
optional :shared_key, :bytes, 1
end
add_message "signrpc.TweakDesc" do
optional :tweak, :bytes, 1
optional :is_x_only, :bool, 2
end
add_message "signrpc.TaprootTweakDesc" do
optional :script_root, :bytes, 1
optional :key_spend_only, :bool, 2
end
add_message "signrpc.MuSig2CombineKeysRequest" do
repeated :all_signer_pubkeys, :bytes, 1
repeated :tweaks, :message, 2, "signrpc.TweakDesc"
optional :taproot_tweak, :message, 3, "signrpc.TaprootTweakDesc"
end
add_message "signrpc.MuSig2CombineKeysResponse" do
optional :combined_key, :bytes, 1
optional :taproot_internal_key, :bytes, 2
end
add_message "signrpc.MuSig2SessionRequest" do
optional :key_loc, :message, 1, "signrpc.KeyLocator"
repeated :all_signer_pubkeys, :bytes, 2
repeated :other_signer_public_nonces, :bytes, 3
repeated :tweaks, :message, 4, "signrpc.TweakDesc"
optional :taproot_tweak, :message, 5, "signrpc.TaprootTweakDesc"
end
add_message "signrpc.MuSig2SessionResponse" do
optional :session_id, :bytes, 1
optional :combined_key, :bytes, 2
optional :taproot_internal_key, :bytes, 3
optional :local_public_nonces, :bytes, 4
optional :have_all_nonces, :bool, 5
end
add_message "signrpc.MuSig2RegisterNoncesRequest" do
optional :session_id, :bytes, 1
repeated :other_signer_public_nonces, :bytes, 3
end
add_message "signrpc.MuSig2RegisterNoncesResponse" do
optional :have_all_nonces, :bool, 1
end
add_message "signrpc.MuSig2SignRequest" do
optional :session_id, :bytes, 1
optional :message_digest, :bytes, 2
optional :cleanup, :bool, 3
end
add_message "signrpc.MuSig2SignResponse" do
optional :local_partial_signature, :bytes, 1
end
add_message "signrpc.MuSig2CombineSigRequest" do
optional :session_id, :bytes, 1
repeated :other_partial_signatures, :bytes, 2
end
add_message "signrpc.MuSig2CombineSigResponse" do
optional :have_all_signatures, :bool, 1
optional :final_signature, :bytes, 2
end
add_message "signrpc.MuSig2CleanupRequest" do
optional :session_id, :bytes, 1
end
add_message "signrpc.MuSig2CleanupResponse" do
end
add_enum "signrpc.SignMethod" do
value :SIGN_METHOD_WITNESS_V0, 0
value :SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086, 1
value :SIGN_METHOD_TAPROOT_KEY_SPEND, 2
value :SIGN_METHOD_TAPROOT_SCRIPT_SPEND, 3
end
end
end
@ -83,4 +154,19 @@ module Signrpc
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
TweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TweakDesc").msgclass
TaprootTweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TaprootTweakDesc").msgclass
MuSig2CombineKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysRequest").msgclass
MuSig2CombineKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysResponse").msgclass
MuSig2SessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionRequest").msgclass
MuSig2SessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionResponse").msgclass
MuSig2RegisterNoncesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesRequest").msgclass
MuSig2RegisterNoncesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesResponse").msgclass
MuSig2SignRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignRequest").msgclass
MuSig2SignResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignResponse").msgclass
MuSig2CombineSigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigRequest").msgclass
MuSig2CombineSigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigResponse").msgclass
MuSig2CleanupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupRequest").msgclass
MuSig2CleanupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupResponse").msgclass
SignMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMethod").enummodule
end

View File

@ -29,8 +29,8 @@ module Signrpc
#
# ComputeInputScript generates a complete InputIndex for the passed
# transaction with the signature as defined within the passed SignDescriptor.
# This method should be capable of generating the proper input script for
# both regular p2wkh output and p2wkh outputs nested within a regular p2sh
# This method should be capable of generating the proper input script for both
# regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
# output.
#
# Note that when using this method to sign inputs belonging to the wallet,
@ -62,6 +62,71 @@ module Signrpc
# The resulting shared public key is serialized in the compressed format and
# hashed with sha256, resulting in the final key length of 256bit.
rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse
#
# MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
# to calculate the combined MuSig2 public key from a list of all participating
# signers' public keys. This RPC is completely stateless and deterministic and
# does not create any signing session. It can be used to determine the Taproot
# public key that should be put in an on-chain output once all public keys are
# known. A signing session is only needed later when that output should be
# _spent_ again.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CombineKeys, ::Signrpc::MuSig2CombineKeysRequest, ::Signrpc::MuSig2CombineKeysResponse
#
# MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
# using the local key identified by the key locator. The complete list of all
# public keys of all signing parties must be provided, including the public
# key of the local signing key. If nonces of other parties are already known,
# they can be submitted as well to reduce the number of RPC calls necessary
# later on.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CreateSession, ::Signrpc::MuSig2SessionRequest, ::Signrpc::MuSig2SessionResponse
#
# MuSig2RegisterNonces (experimental!) registers one or more public nonces of
# other signing participants for a session identified by its ID. This RPC can
# be called multiple times until all nonces are registered.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2RegisterNonces, ::Signrpc::MuSig2RegisterNoncesRequest, ::Signrpc::MuSig2RegisterNoncesResponse
#
# MuSig2Sign (experimental!) creates a partial signature using the local
# signing key that was specified when the session was created. This can only
# be called when all public nonces of all participants are known and have been
# registered with the session. If this node isn't responsible for combining
# all the partial signatures, then the cleanup flag should be set, indicating
# that the session can be removed from memory once the signature was produced.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2Sign, ::Signrpc::MuSig2SignRequest, ::Signrpc::MuSig2SignResponse
#
# MuSig2CombineSig (experimental!) combines the given partial signature(s)
# with the local one, if it already exists. Once a partial signature of all
# participants is registered, the final signature will be combined and
# returned.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CombineSig, ::Signrpc::MuSig2CombineSigRequest, ::Signrpc::MuSig2CombineSigResponse
#
# MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
# cases where it's obvious that the signing session won't succeed and the
# resources can be released.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2Cleanup, ::Signrpc::MuSig2CleanupRequest, ::Signrpc::MuSig2CleanupResponse
end
Stub = Service.rpc_stub_class

View File

@ -0,0 +1,35 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: stateservice.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("stateservice.proto", :syntax => :proto3) do
add_message "lnrpc.SubscribeStateRequest" do
end
add_message "lnrpc.SubscribeStateResponse" do
optional :state, :enum, 1, "lnrpc.WalletState"
end
add_message "lnrpc.GetStateRequest" do
end
add_message "lnrpc.GetStateResponse" do
optional :state, :enum, 1, "lnrpc.WalletState"
end
add_enum "lnrpc.WalletState" do
value :NON_EXISTING, 0
value :LOCKED, 1
value :UNLOCKED, 2
value :RPC_ACTIVE, 3
value :SERVER_ACTIVE, 4
value :WAITING_TO_START, 255
end
end
end
module Lnrpc
SubscribeStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateRequest").msgclass
SubscribeStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateResponse").msgclass
GetStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateRequest").msgclass
GetStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateResponse").msgclass
WalletState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletState").enummodule
end

View File

@ -0,0 +1,46 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: stateservice.proto for package 'lnrpc'
require 'grpc'
require 'stateservice_pb'
module Lnrpc
module State
#
# Comments in this file will be directly parsed into the API
# Documentation as descriptions of the associated method, message, or field.
# These descriptions should go right above the definition of the object, and
# can be in either block or // comment format.
#
# An RPC method can be matched to an lncli command by placing a line in the
# beginning of the description in exactly the following format:
# lncli: `methodname`
#
# Failure to specify the exact name of the command will cause documentation
# generation to fail.
#
# More information on how exactly the gRPC documentation is generated from
# this proto file can be found here:
# https://github.com/lightninglabs/lightning-api
#
# State service is a always running service that exposes the current state of
# the wallet and RPC server.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.State'
# SubscribeState subscribes to the state of the wallet. The current wallet
# state will always be delivered immediately.
rpc :SubscribeState, ::Lnrpc::SubscribeStateRequest, stream(::Lnrpc::SubscribeStateResponse)
# GetState returns the current wallet state without streaming further
# changes.
rpc :GetState, ::Lnrpc::GetStateRequest, ::Lnrpc::GetStateResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -3,7 +3,7 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
require 'signrpc/signer_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
@ -12,6 +12,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :min_confs, :int32, 1
optional :max_confs, :int32, 2
optional :account, :string, 3
optional :unconfirmed_only, :bool, 4
end
add_message "walletrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo"
@ -59,6 +60,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "walletrpc.ListAccountsResponse" do
repeated :accounts, :message, 1, "walletrpc.Account"
end
add_message "walletrpc.RequiredReserveRequest" do
optional :additional_public_channels, :uint32, 1
end
add_message "walletrpc.RequiredReserveResponse" do
optional :required_reserve, :int64, 1
end
add_message "walletrpc.ImportAccountRequest" do
optional :name, :string, 1
optional :extended_public_key, :string, 2
@ -172,6 +179,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration, :uint64, 3
optional :pk_script, :bytes, 4
optional :value, :uint64, 5
end
add_message "walletrpc.SignPsbtRequest" do
optional :funded_psbt, :bytes, 1
@ -197,6 +206,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :WITNESS_PUBKEY_HASH, 1
value :NESTED_WITNESS_PUBKEY_HASH, 2
value :HYBRID_NESTED_WITNESS_PUBKEY_HASH, 3
value :TAPROOT_PUBKEY, 4
end
add_enum "walletrpc.WitnessType" do
value :UNKNOWN_WITNESS, 0
@ -230,6 +240,8 @@ module Walletrpc
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass
ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass
ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass
RequiredReserveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveRequest").msgclass
RequiredReserveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveResponse").msgclass
ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass

View File

@ -18,7 +18,9 @@ module Walletrpc
#
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum.
# number of confirmations between the specified minimum and maximum. By
# default, all utxos are listed. To list only the unconfirmed utxos, set
# the unconfirmed_only to true.
rpc :ListUnspent, ::Walletrpc::ListUnspentRequest, ::Walletrpc::ListUnspentResponse
#
# LeaseOutput locks an output to the given ID, preventing it from being
@ -53,6 +55,11 @@ module Walletrpc
# wallet accounts and return only those matching.
rpc :ListAccounts, ::Walletrpc::ListAccountsRequest, ::Walletrpc::ListAccountsResponse
#
# RequiredReserve returns the minimum amount of satoshis that should be kept
# in the wallet in order to fee bump anchor channels if necessary. The value
# scales with the number of public anchor channels but is capped at a maximum.
rpc :RequiredReserve, ::Walletrpc::RequiredReserveRequest, ::Walletrpc::RequiredReserveResponse
#
# ImportAccount imports an account backed by an account extended public key.
# The master key fingerprint denotes the fingerprint of the root key
# corresponding to the account public key (also known as the key with

View File

@ -3,7 +3,7 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletunlocker.proto", :syntax => :proto3) do

View File

@ -16,13 +16,13 @@ module Lnrpc
if options.has_key?(:credentials)
# if there are non hex values prvided we assume it's the certificate file as string otherwise we assume it's the hex value
self.credentials = options[:credentials].match?(/\H/) ? options[:credentials] : [options[:credentials]].pack('H*')
elsif File.exists?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
elsif File.exist?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
self.credentials = ::File.read(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
else
self.credentials = nil
end
if !options.has_key?(:macaroon) && File.exists?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
if !options.has_key?(:macaroon) && File.exist?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
options[:macaroon] = ::File.read(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)).unpack("H*")
end
self.macaroon = options[:macaroon]

View File

@ -1,3 +1,3 @@
module Lnrpc
VERSION = "0.14.3.1"
VERSION = "0.15.5"
end