mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-17 12:26:11 +02:00
chore: update LND gRPC files
This commit is contained in:
parent
62d3f3da9b
commit
f1b657b9a1
7 changed files with 1115 additions and 826 deletions
24
app/lightning/impl/protos/lnd/flake.nix
Normal file
24
app/lightning/impl/protos/lnd/flake.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
description = "A development environment for generating gRPC Python client libraries";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
(python3.withPackages (ps: [ ps.grpcio ps.grpcio-tools ]))
|
||||
curl
|
||||
jq
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -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):
|
||||
|
|
@ -492,8 +497,10 @@ class LightningServicer(object):
|
|||
|
||||
def VerifyMessage(self, request, context):
|
||||
"""lncli: `verifymessage`
|
||||
VerifyMessage verifies a signature over a msg. The signature must be
|
||||
zbase32 encoded and signed by an active node in the resident node's
|
||||
VerifyMessage verifies a signature over a message and recovers the signer's
|
||||
public key. The signature is only deemed valid if the recovered public key
|
||||
corresponds to a node key in the public Lightning network. The signature
|
||||
must be zbase32 encoded and signed by an active node in the resident node's
|
||||
channel database. In addition to returning the validity of the signature,
|
||||
VerifyMessage also returns the recovered pubkey from the signature.
|
||||
"""
|
||||
|
|
@ -1097,6 +1104,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 +1123,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 +1466,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 +3413,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
|
|
@ -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
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: walletunlocker.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
|
@ -15,34 +16,37 @@ _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())
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "walletunlocker_pb2", globals())
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "walletunlocker_pb2", _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b"Z%github.com/lightningnetwork/lnd/lnrpc"
|
||||
_GENSEEDREQUEST._serialized_start = 48
|
||||
_GENSEEDREQUEST._serialized_end = 113
|
||||
_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
|
||||
_globals["DESCRIPTOR"]._options = None
|
||||
_globals["DESCRIPTOR"]._serialized_options = (
|
||||
b"Z%github.com/lightningnetwork/lnd/lnrpc"
|
||||
)
|
||||
_globals["_GENSEEDREQUEST"]._serialized_start = 48
|
||||
_globals["_GENSEEDREQUEST"]._serialized_end = 113
|
||||
_globals["_GENSEEDRESPONSE"]._serialized_start = 115
|
||||
_globals["_GENSEEDRESPONSE"]._serialized_end = 187
|
||||
_globals["_INITWALLETREQUEST"]._serialized_start = 190
|
||||
_globals["_INITWALLETREQUEST"]._serialized_end = 534
|
||||
_globals["_INITWALLETRESPONSE"]._serialized_start = 536
|
||||
_globals["_INITWALLETRESPONSE"]._serialized_end = 580
|
||||
_globals["_WATCHONLY"]._serialized_start = 582
|
||||
_globals["_WATCHONLY"]._serialized_end = 707
|
||||
_globals["_WATCHONLYACCOUNT"]._serialized_start = 709
|
||||
_globals["_WATCHONLYACCOUNT"]._serialized_end = 794
|
||||
_globals["_UNLOCKWALLETREQUEST"]._serialized_start = 797
|
||||
_globals["_UNLOCKWALLETREQUEST"]._serialized_end = 944
|
||||
_globals["_UNLOCKWALLETRESPONSE"]._serialized_start = 946
|
||||
_globals["_UNLOCKWALLETRESPONSE"]._serialized_end = 968
|
||||
_globals["_CHANGEPASSWORDREQUEST"]._serialized_start = 970
|
||||
_globals["_CHANGEPASSWORDREQUEST"]._serialized_end = 1096
|
||||
_globals["_CHANGEPASSWORDRESPONSE"]._serialized_start = 1098
|
||||
_globals["_CHANGEPASSWORDRESPONSE"]._serialized_end = 1146
|
||||
_globals["_WALLETUNLOCKER"]._serialized_start = 1149
|
||||
_globals["_WALLETUNLOCKER"]._serialized_end = 1442
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue