chore: update LND gRPC files

This commit is contained in:
fusion44 2023-05-07 13:23:57 +02:00
parent d3a973fa18
commit 1203a2adaf
No known key found for this signature in database
7 changed files with 749 additions and 598 deletions

View file

@ -3,6 +3,8 @@
# clone lnd repo
# cd into lnd/lnrpc
# git clone https://github.com/googleapis/googleapis.git
# poetry shell
# bash gen_protos_python.sh
set -e

File diff suppressed because one or more lines are too long

View file

@ -362,6 +362,11 @@ class LightningStub(object):
request_serializer=lightning__pb2.ListAliasesRequest.SerializeToString,
response_deserializer=lightning__pb2.ListAliasesResponse.FromString,
)
self.LookupHtlcResolution = channel.unary_unary(
"/lnrpc.Lightning/LookupHtlcResolution",
request_serializer=lightning__pb2.LookupHtlcResolutionRequest.SerializeToString,
response_deserializer=lightning__pb2.LookupHtlcResolutionResponse.FromString,
)
class LightningServicer(object):
@ -1097,6 +1102,10 @@ class LightningServicer(object):
"""lncli: `subscribecustom`
SubscribeCustomMessages subscribes to a stream of incoming custom peer
messages.
To include messages with type outside of the custom range (>= 32768) lnd
needs to be compiled with the `dev` build tag, and the message type to
override should be specified in lnd's experimental protocol configuration.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
@ -1112,6 +1121,16 @@ class LightningServicer(object):
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def LookupHtlcResolution(self, request, context):
"""
LookupHtlcResolution retrieves a final htlc resolution from the database.
If the htlc has no final resolution yet, a NotFound grpc status code is
returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def add_LightningServicer_to_server(servicer, server):
rpc_method_handlers = {
@ -1445,6 +1464,11 @@ def add_LightningServicer_to_server(servicer, server):
request_deserializer=lightning__pb2.ListAliasesRequest.FromString,
response_serializer=lightning__pb2.ListAliasesResponse.SerializeToString,
),
"LookupHtlcResolution": grpc.unary_unary_rpc_method_handler(
servicer.LookupHtlcResolution,
request_deserializer=lightning__pb2.LookupHtlcResolutionRequest.FromString,
response_serializer=lightning__pb2.LookupHtlcResolutionResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
"lnrpc.Lightning", rpc_method_handlers
@ -3387,3 +3411,32 @@ class Lightning(object):
timeout,
metadata,
)
@staticmethod
def LookupHtlcResolution(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_unary(
request,
target,
"/lnrpc.Lightning/LookupHtlcResolution",
lightning__pb2.LookupHtlcResolutionRequest.SerializeToString,
lightning__pb2.LookupHtlcResolutionResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)

File diff suppressed because one or more lines are too long

View file

@ -27,6 +27,11 @@ class RouterStub(object):
request_serializer=routerrpc_dot_router__pb2.TrackPaymentRequest.SerializeToString,
response_deserializer=lightning__pb2.Payment.FromString,
)
self.TrackPayments = channel.unary_stream(
"/routerrpc.Router/TrackPayments",
request_serializer=routerrpc_dot_router__pb2.TrackPaymentsRequest.SerializeToString,
response_deserializer=lightning__pb2.Payment.FromString,
)
self.EstimateRouteFee = channel.unary_unary(
"/routerrpc.Router/EstimateRouteFee",
request_serializer=routerrpc_dot_router__pb2.RouteFeeRequest.SerializeToString,
@ -128,6 +133,19 @@ class RouterServicer(object):
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def TrackPayments(self, request, context):
"""
TrackPayments returns an update stream for every payment that is not in a
terminal state. Note that if payments are in-flight while starting a new
subscription, the start of the payment stream could produce out-of-order
and/or duplicate events. In order to get updates for every in-flight
payment attempt make sure to subscribe to this method before initiating any
payments.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def EstimateRouteFee(self, request, context):
"""
EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
@ -208,8 +226,10 @@ class RouterServicer(object):
def QueryProbability(self, request, context):
"""
QueryProbability returns the current success probability estimate for a
given node pair and amount.
Deprecated. QueryProbability returns the current success probability
estimate for a given node pair and amount. The call returns a zero success
probability if no channel is available or if the amount violates min/max
HTLC constraints.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
@ -289,6 +309,11 @@ def add_RouterServicer_to_server(servicer, server):
request_deserializer=routerrpc_dot_router__pb2.TrackPaymentRequest.FromString,
response_serializer=lightning__pb2.Payment.SerializeToString,
),
"TrackPayments": grpc.unary_stream_rpc_method_handler(
servicer.TrackPayments,
request_deserializer=routerrpc_dot_router__pb2.TrackPaymentsRequest.FromString,
response_serializer=lightning__pb2.Payment.SerializeToString,
),
"EstimateRouteFee": grpc.unary_unary_rpc_method_handler(
servicer.EstimateRouteFee,
request_deserializer=routerrpc_dot_router__pb2.RouteFeeRequest.FromString,
@ -435,6 +460,35 @@ class Router(object):
metadata,
)
@staticmethod
def TrackPayments(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_stream(
request,
target,
"/routerrpc.Router/TrackPayments",
routerrpc_dot_router__pb2.TrackPaymentsRequest.SerializeToString,
lightning__pb2.Payment.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
)
@staticmethod
def EstimateRouteFee(
request,

File diff suppressed because one or more lines are too long

View file

@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
import app.lightning.impl.protos.lnd.lightning_pb2 as lightning__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x14walletunlocker.proto\x12\x05lnrpc\x1a\x0flightning.proto"A\n\x0eGenSeedRequest\x12\x19\n\x11\x61\x65zeed_passphrase\x18\x01 \x01(\x0c\x12\x14\n\x0cseed_entropy\x18\x02 \x01(\x0c"H\n\x0fGenSeedResponse\x12\x1c\n\x14\x63ipher_seed_mnemonic\x18\x01 \x03(\t\x12\x17\n\x0f\x65nciphered_seed\x18\x02 \x01(\x0c"\xbd\x02\n\x11InitWalletRequest\x12\x17\n\x0fwallet_password\x18\x01 \x01(\x0c\x12\x1c\n\x14\x63ipher_seed_mnemonic\x18\x02 \x03(\t\x12\x19\n\x11\x61\x65zeed_passphrase\x18\x03 \x01(\x0c\x12\x17\n\x0frecovery_window\x18\x04 \x01(\x05\x12\x32\n\x0f\x63hannel_backups\x18\x05 \x01(\x0b\x32\x19.lnrpc.ChanBackupSnapshot\x12\x16\n\x0estateless_init\x18\x06 \x01(\x08\x12\x1b\n\x13\x65xtended_master_key\x18\x07 \x01(\t\x12.\n&extended_master_key_birthday_timestamp\x18\x08 \x01(\x04\x12$\n\nwatch_only\x18\t \x01(\x0b\x32\x10.lnrpc.WatchOnly",\n\x12InitWalletResponse\x12\x16\n\x0e\x61\x64min_macaroon\x18\x01 \x01(\x0c"}\n\tWatchOnly\x12%\n\x1dmaster_key_birthday_timestamp\x18\x01 \x01(\x04\x12\x1e\n\x16master_key_fingerprint\x18\x02 \x01(\x0c\x12)\n\x08\x61\x63\x63ounts\x18\x03 \x03(\x0b\x32\x17.lnrpc.WatchOnlyAccount"U\n\x10WatchOnlyAccount\x12\x0f\n\x07purpose\x18\x01 \x01(\r\x12\x11\n\tcoin_type\x18\x02 \x01(\r\x12\x0f\n\x07\x61\x63\x63ount\x18\x03 \x01(\r\x12\x0c\n\x04xpub\x18\x04 \x01(\t"\x93\x01\n\x13UnlockWalletRequest\x12\x17\n\x0fwallet_password\x18\x01 \x01(\x0c\x12\x17\n\x0frecovery_window\x18\x02 \x01(\x05\x12\x32\n\x0f\x63hannel_backups\x18\x03 \x01(\x0b\x32\x19.lnrpc.ChanBackupSnapshot\x12\x16\n\x0estateless_init\x18\x04 \x01(\x08"\x16\n\x14UnlockWalletResponse"~\n\x15\x43hangePasswordRequest\x12\x18\n\x10\x63urrent_password\x18\x01 \x01(\x0c\x12\x14\n\x0cnew_password\x18\x02 \x01(\x0c\x12\x16\n\x0estateless_init\x18\x03 \x01(\x08\x12\x1d\n\x15new_macaroon_root_key\x18\x04 \x01(\x08"0\n\x16\x43hangePasswordResponse\x12\x16\n\x0e\x61\x64min_macaroon\x18\x01 \x01(\x0c\x32\xa5\x02\n\x0eWalletUnlocker\x12\x38\n\x07GenSeed\x12\x15.lnrpc.GenSeedRequest\x1a\x16.lnrpc.GenSeedResponse\x12\x41\n\nInitWallet\x12\x18.lnrpc.InitWalletRequest\x1a\x19.lnrpc.InitWalletResponse\x12G\n\x0cUnlockWallet\x12\x1a.lnrpc.UnlockWalletRequest\x1a\x1b.lnrpc.UnlockWalletResponse\x12M\n\x0e\x43hangePassword\x12\x1c.lnrpc.ChangePasswordRequest\x1a\x1d.lnrpc.ChangePasswordResponseB\'Z%github.com/lightningnetwork/lnd/lnrpcb\x06proto3'
b'\n\x14walletunlocker.proto\x12\x05lnrpc\x1a\x0flightning.proto"A\n\x0eGenSeedRequest\x12\x19\n\x11\x61\x65zeed_passphrase\x18\x01 \x01(\x0c\x12\x14\n\x0cseed_entropy\x18\x02 \x01(\x0c"H\n\x0fGenSeedResponse\x12\x1c\n\x14\x63ipher_seed_mnemonic\x18\x01 \x03(\t\x12\x17\n\x0f\x65nciphered_seed\x18\x02 \x01(\x0c"\xd8\x02\n\x11InitWalletRequest\x12\x17\n\x0fwallet_password\x18\x01 \x01(\x0c\x12\x1c\n\x14\x63ipher_seed_mnemonic\x18\x02 \x03(\t\x12\x19\n\x11\x61\x65zeed_passphrase\x18\x03 \x01(\x0c\x12\x17\n\x0frecovery_window\x18\x04 \x01(\x05\x12\x32\n\x0f\x63hannel_backups\x18\x05 \x01(\x0b\x32\x19.lnrpc.ChanBackupSnapshot\x12\x16\n\x0estateless_init\x18\x06 \x01(\x08\x12\x1b\n\x13\x65xtended_master_key\x18\x07 \x01(\t\x12.\n&extended_master_key_birthday_timestamp\x18\x08 \x01(\x04\x12$\n\nwatch_only\x18\t \x01(\x0b\x32\x10.lnrpc.WatchOnly\x12\x19\n\x11macaroon_root_key\x18\n \x01(\x0c",\n\x12InitWalletResponse\x12\x16\n\x0e\x61\x64min_macaroon\x18\x01 \x01(\x0c"}\n\tWatchOnly\x12%\n\x1dmaster_key_birthday_timestamp\x18\x01 \x01(\x04\x12\x1e\n\x16master_key_fingerprint\x18\x02 \x01(\x0c\x12)\n\x08\x61\x63\x63ounts\x18\x03 \x03(\x0b\x32\x17.lnrpc.WatchOnlyAccount"U\n\x10WatchOnlyAccount\x12\x0f\n\x07purpose\x18\x01 \x01(\r\x12\x11\n\tcoin_type\x18\x02 \x01(\r\x12\x0f\n\x07\x61\x63\x63ount\x18\x03 \x01(\r\x12\x0c\n\x04xpub\x18\x04 \x01(\t"\x93\x01\n\x13UnlockWalletRequest\x12\x17\n\x0fwallet_password\x18\x01 \x01(\x0c\x12\x17\n\x0frecovery_window\x18\x02 \x01(\x05\x12\x32\n\x0f\x63hannel_backups\x18\x03 \x01(\x0b\x32\x19.lnrpc.ChanBackupSnapshot\x12\x16\n\x0estateless_init\x18\x04 \x01(\x08"\x16\n\x14UnlockWalletResponse"~\n\x15\x43hangePasswordRequest\x12\x18\n\x10\x63urrent_password\x18\x01 \x01(\x0c\x12\x14\n\x0cnew_password\x18\x02 \x01(\x0c\x12\x16\n\x0estateless_init\x18\x03 \x01(\x08\x12\x1d\n\x15new_macaroon_root_key\x18\x04 \x01(\x08"0\n\x16\x43hangePasswordResponse\x12\x16\n\x0e\x61\x64min_macaroon\x18\x01 \x01(\x0c\x32\xa5\x02\n\x0eWalletUnlocker\x12\x38\n\x07GenSeed\x12\x15.lnrpc.GenSeedRequest\x1a\x16.lnrpc.GenSeedResponse\x12\x41\n\nInitWallet\x12\x18.lnrpc.InitWalletRequest\x1a\x19.lnrpc.InitWalletResponse\x12G\n\x0cUnlockWallet\x12\x1a.lnrpc.UnlockWalletRequest\x1a\x1b.lnrpc.UnlockWalletResponse\x12M\n\x0e\x43hangePassword\x12\x1c.lnrpc.ChangePasswordRequest\x1a\x1d.lnrpc.ChangePasswordResponseB\'Z%github.com/lightningnetwork/lnd/lnrpcb\x06proto3'
)
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
@ -28,21 +28,21 @@ if _descriptor._USE_C_DESCRIPTORS == False:
_GENSEEDRESPONSE._serialized_start = 115
_GENSEEDRESPONSE._serialized_end = 187
_INITWALLETREQUEST._serialized_start = 190
_INITWALLETREQUEST._serialized_end = 507
_INITWALLETRESPONSE._serialized_start = 509
_INITWALLETRESPONSE._serialized_end = 553
_WATCHONLY._serialized_start = 555
_WATCHONLY._serialized_end = 680
_WATCHONLYACCOUNT._serialized_start = 682
_WATCHONLYACCOUNT._serialized_end = 767
_UNLOCKWALLETREQUEST._serialized_start = 770
_UNLOCKWALLETREQUEST._serialized_end = 917
_UNLOCKWALLETRESPONSE._serialized_start = 919
_UNLOCKWALLETRESPONSE._serialized_end = 941
_CHANGEPASSWORDREQUEST._serialized_start = 943
_CHANGEPASSWORDREQUEST._serialized_end = 1069
_CHANGEPASSWORDRESPONSE._serialized_start = 1071
_CHANGEPASSWORDRESPONSE._serialized_end = 1119
_WALLETUNLOCKER._serialized_start = 1122
_WALLETUNLOCKER._serialized_end = 1415
_INITWALLETREQUEST._serialized_end = 534
_INITWALLETRESPONSE._serialized_start = 536
_INITWALLETRESPONSE._serialized_end = 580
_WATCHONLY._serialized_start = 582
_WATCHONLY._serialized_end = 707
_WATCHONLYACCOUNT._serialized_start = 709
_WATCHONLYACCOUNT._serialized_end = 794
_UNLOCKWALLETREQUEST._serialized_start = 797
_UNLOCKWALLETREQUEST._serialized_end = 944
_UNLOCKWALLETRESPONSE._serialized_start = 946
_UNLOCKWALLETRESPONSE._serialized_end = 968
_CHANGEPASSWORDREQUEST._serialized_start = 970
_CHANGEPASSWORDREQUEST._serialized_end = 1096
_CHANGEPASSWORDRESPONSE._serialized_start = 1098
_CHANGEPASSWORDRESPONSE._serialized_end = 1146
_WALLETUNLOCKER._serialized_start = 1149
_WALLETUNLOCKER._serialized_end = 1442
# @@protoc_insertion_point(module_scope)