#841 fix proto files

This commit is contained in:
rootzoll 2019-12-18 15:14:38 +01:00
parent 6c0309f471
commit af2cd319b5
5 changed files with 437 additions and 1519 deletions

View File

@ -359,7 +359,7 @@ to protect the seed words. Most users did not set this.
# trigger wallet recovery
source /home/admin/python3-env-lnd/bin/activate
source <(python /home/admin/config.scripts/lnd.initwallet.py seed ${passwordC} "${wordstring}" ${passwordD})
source <(python3 /home/admin/config.scripts/lnd.initwallet.py seed ${passwordC} "${wordstring}" ${passwordD})
# check if wallet was created for real
if [ ${#err} -eq 0 ]; then

View File

@ -2,21 +2,11 @@ For every new LND version the LND RPC libs need to be compiled from the matching
Do this on a raspberrypi with the exact same python version the scripts will be are running on.
See https://dev.lightning.community/guides/python-grpc/
Make sure Virtual Environment is setup:
```
sudo apt-get -f -y install virtualenv
virtualenv lnd
source lnd/bin/activate
pip install grpcio grpcio-tools googleapis-common-protos
```
Normally that is already done by build_sdcard.sh for user admin user. So just run:
```
source lnd/bin/activate
````
Now to generate the lnd RPC libs:
To generate the lnd RPC libs:
```
cd
source /home/admin/python3-env-lnd/bin/activate
git clone https://github.com/googleapis/googleapis.git
curl -o rpc.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/rpc.proto
python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. rpc.proto

View File

@ -94,15 +94,13 @@ service WalletUnlocker {
message GenSeedRequest {
/**
aezeed_passphrase is an optional user provided passphrase that will be used
to encrypt the generated aezeed cipher seed. When using REST, this field
must be encoded as base64.
to encrypt the generated aezeed cipher seed.
*/
bytes aezeed_passphrase = 1;
/**
seed_entropy is an optional 16-bytes generated via CSPRNG. If not
specified, then a fresh set of randomness will be used to create the seed.
When using REST, this field must be encoded as base64.
*/
bytes seed_entropy = 2;
}
@ -127,8 +125,7 @@ message InitWalletRequest {
/**
wallet_password is the passphrase that should be used to encrypt the
wallet. This MUST be at least 8 chars in length. After creation, this
password is required to unlock the daemon. When using REST, this field
must be encoded as base64.
password is required to unlock the daemon.
*/
bytes wallet_password = 1;
@ -141,8 +138,7 @@ message InitWalletRequest {
/**
aezeed_passphrase is an optional user provided passphrase that will be used
to encrypt the generated aezeed cipher seed. When using REST, this field
must be encoded as base64.
to encrypt the generated aezeed cipher seed.
*/
bytes aezeed_passphrase = 3;
@ -172,7 +168,7 @@ message UnlockWalletRequest {
/**
wallet_password should be the current valid passphrase for the daemon. This
will be required to decrypt on-disk material that the daemon requires to
function properly. When using REST, this field must be encoded as base64.
function properly.
*/
bytes wallet_password = 1;
@ -200,13 +196,13 @@ message UnlockWalletResponse {}
message ChangePasswordRequest {
/**
current_password should be the current valid passphrase used to unlock the
daemon. When using REST, this field must be encoded as base64.
daemon.
*/
bytes current_password = 1;
/**
new_password should be the new passphrase that will be needed to unlock the
daemon. When using REST, this field must be encoded as base64.
daemon.
*/
bytes new_password = 2;
}
@ -359,13 +355,6 @@ service Lightning {
};
}
/**
SubscribePeerEvents creates a uni-directional stream from the server to
the client in which any events relevant to the state of peers are sent
over. Events include peers going online and offline.
*/
rpc SubscribePeerEvents (PeerEventSubscription) returns (stream PeerEvent);
/** lncli: `getinfo`
GetInfo returns general information concerning the lightning node including
it's identity pubkey, alias, the chains it is connected to, and information
@ -561,9 +550,9 @@ service Lightning {
notifying the client of newly added/settled invoices. The caller can
optionally specify the add_index and/or the settle_index. If the add_index
is specified, then we'll first start by sending add invoice events for all
invoices with an add_index greater than the specified value. If the
invoices with an add_index greater than the specified value. If the
settle_index is specified, the next, we'll send out all settle events for
invoices with a settle_index greater than the specified value. One or both
invoices with a settle_index greater than the specified value. One or both
of these fields can be set. If no fields are set, then we'll only send out
the latest add/settle events.
*/
@ -606,7 +595,7 @@ service Lightning {
DescribeGraph returns a description of the latest graph state from the
point of view of the node. The graph information is partitioned into two
components: all the nodes/vertexes, and all the edges that connect the
vertexes themselves. As this is a directed graph, the edges also contain
vertexes themselves. As this is a directed graph, the edges also contain
the node directional specific routing policy which includes: the time lock
delta, fee information, etc.
*/
@ -714,7 +703,7 @@ service Lightning {
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.
As a result each message can only contain 50k entries. Each response has
As a result each message can only contain 50k entries. Each response has
the index offset of the last entry. The index offset can be provided to the
request to allow the caller to skip a series of records.
*/
@ -859,66 +848,32 @@ message TransactionDetails {
message FeeLimit {
oneof limit {
/**
The fee limit expressed as a fixed amount of satoshis.
The fields fixed and fixed_msat are mutually exclusive.
*/
/// The fee limit expressed as a fixed amount of satoshis.
int64 fixed = 1;
/**
The fee limit expressed as a fixed amount of millisatoshis.
The fields fixed and fixed_msat are mutually exclusive.
*/
int64 fixed_msat = 3;
/// The fee limit expressed as a percentage of the payment amount.
int64 percent = 2;
}
}
message SendRequest {
/**
The identity pubkey of the payment recipient. When using REST, this field
must be encoded as base64.
*/
/// The identity pubkey of the payment recipient
bytes dest = 1;
/**
The hex-encoded identity pubkey of the payment recipient. Deprecated now
that the REST gateway supports base64 encoding of bytes fields.
*/
string dest_string = 2 [deprecated = true];
/// The hex-encoded identity pubkey of the payment recipient
string dest_string = 2;
/**
The amount to send expressed in satoshis.
The fields amt and amt_msat are mutually exclusive.
*/
/// Number of satoshis to send.
int64 amt = 3;
/**
The amount to send expressed in millisatoshis.
The fields amt and amt_msat are mutually exclusive.
*/
int64 amt_msat = 12;
/**
The hash to use within the payment's HTLC. When using REST, this field
must be encoded as base64.
*/
/// The hash to use within the payment's HTLC
bytes payment_hash = 4;
/**
The hex-encoded hash to use within the payment's HTLC. Deprecated now
that the REST gateway supports base64 encoding of bytes fields.
*/
string payment_hash_string = 5 [deprecated = true];
/// The hex-encoded hash to use within the payment's HTLC
string payment_hash_string = 5;
/**
A bare-bones invoice for a payment within the Lightning Network. With the
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.
*/
@ -944,11 +899,6 @@ message SendRequest {
*/
uint64 outgoing_chan_id = 9 [jstype = JS_STRING];
/**
The pubkey of the last hop of the route. If empty, any hop may be used.
*/
bytes last_hop_pubkey = 13;
/**
An optional maximum total time lock for the route. This should not exceed
lnd's `--max-cltv-expiry` setting. If zero, then the value of
@ -959,14 +909,9 @@ message SendRequest {
/**
An optional field that can be used to pass an arbitrary set of TLV records
to a peer which understands the new records. This can be used to pass
application specific data during the payment attempt. Record types are
required to be in the custom range >= 65536. When using REST, the values
must be encoded as base64.
application specific data during the payment attempt.
*/
map<uint64, bytes> dest_custom_records = 11;
/// If set, circular payments to self are permitted.
bool allow_self_payment = 14;
map<uint64, bytes> dest_tlv = 11;
}
message SendResponse {
@ -977,17 +922,11 @@ message SendResponse {
}
message SendToRouteRequest {
/**
The payment hash to use for the HTLC. When using REST, this field must be
encoded as base64.
*/
/// The payment hash to use for the HTLC.
bytes payment_hash = 1;
/**
An optional hex-encoded payment hash to be used for the HTLC. Deprecated now
that the REST gateway supports base64 encoding of bytes fields.
*/
string payment_hash_string = 2 [deprecated = true];
/// An optional hex-encoded payment hash to be used for the HTLC.
string payment_hash_string = 2;
reserved 3;
@ -1049,16 +988,10 @@ message ChannelAcceptResponse {
message ChannelPoint {
oneof funding_txid {
/**
Txid of the funding transaction. When using REST, this field must be
encoded as base64.
*/
/// Txid of the funding transaction
bytes funding_txid_bytes = 1 [json_name = "funding_txid_bytes"];
/**
Hex-encoded string representing the byte-reversed hash of the funding
transaction.
*/
/// Hex-encoded string representing the funding transaction
string funding_txid_str = 2 [json_name = "funding_txid_str"];
}
@ -1176,10 +1109,7 @@ message NewAddressResponse {
}
message SignMessageRequest {
/**
The message to be signed. When using REST, this field must be encoded as
base64.
*/
/// The message to be signed
bytes msg = 1 [ json_name = "msg" ];
}
message SignMessageResponse {
@ -1188,10 +1118,7 @@ message SignMessageResponse {
}
message VerifyMessageRequest {
/**
The message over which the signature is to be verified. When using REST,
this field must be encoded as base64.
*/
/// The message over which the signature is to be verified
bytes msg = 1 [ json_name = "msg" ];
/// The signature to be verified over the given message
@ -1210,7 +1137,7 @@ message ConnectPeerRequest {
LightningAddress addr = 1;
/** If set, the daemon will attempt to persistently connect to the target
* peer. Otherwise, the call will be synchronous. */
* peer. Otherwise, the call will be synchronous. */
bool perm = 2;
}
message ConnectPeerResponse {
@ -1456,9 +1383,6 @@ message Peer {
// The type of sync we are currently performing with this peer.
SyncType sync_type = 10 [json_name = "sync_type"];
/// Features advertised by the remote peer in their init message.
map<uint32, Feature> features = 11 [json_name = "features"];
}
message ListPeersRequest {
@ -1468,21 +1392,6 @@ message ListPeersResponse {
repeated Peer peers = 1 [json_name = "peers"];
}
message PeerEventSubscription {
}
message PeerEvent {
/// The identity pubkey of the peer.
string pub_key = 1 [json_name = "pub_key"];
enum EventType {
PEER_ONLINE = 0;
PEER_OFFLINE = 1;
}
EventType type = 2 [ json_name = "type" ];
}
message GetInfoRequest {
}
message GetInfoResponse {
@ -1582,14 +1491,6 @@ message CloseChannelRequest {
/// A manual fee rate set in sat/byte that should be used when crafting the closure transaction.
int64 sat_per_byte = 4;
/*
An optional address to send funds to in the case of a cooperative close.
If the channel was opened with an upfront shutdown script and this field
is set, the request to close will fail because the channel must pay out
to the upfront shutdown addresss.
*/
string delivery_address = 5 [json_name = "delivery_address"];
}
message CloseStatusUpdate {
@ -1605,17 +1506,11 @@ message PendingUpdate {
}
message OpenChannelRequest {
/**
The pubkey of the node to open a channel with. When using REST, this field
must be encoded as base64.
*/
/// The pubkey of the node to open a channel with
bytes node_pubkey = 2 [json_name = "node_pubkey"];
/**
The hex encoded pubkey of the node to open a channel with. Deprecated now
that the REST gateway supports base64 encoding of bytes fields.
*/
string node_pubkey_string = 3 [json_name = "node_pubkey_string", deprecated = true];
/// The hex encoded pubkey of the node to open a channel with
string node_pubkey_string = 3 [json_name = "node_pubkey_string"];
/// The number of satoshis the wallet should commit to the channel
int64 local_funding_amount = 4 [json_name = "local_funding_amount"];
@ -1830,29 +1725,12 @@ message QueryRoutesRequest {
/// The 33-byte hex-encoded public key for the payment destination
string pub_key = 1;
/**
The amount to send expressed in satoshis.
The fields amt and amt_msat are mutually exclusive.
*/
/// The amount to send expressed in satoshis
int64 amt = 2;
/**
The amount to send expressed in millisatoshis.
The fields amt and amt_msat are mutually exclusive.
*/
int64 amt_msat = 12;
reserved 3;
/**
An optional CLTV delta from the current height that should be used for the
timelock of the final hop. Note that unlike SendPayment, QueryRoutes does
not add any additional block padding on top of final_ctlv_delta. This
padding of a few blocks needs to be added manually or otherwise failures may
happen when a block comes in while the payment is in flight.
*/
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
int32 final_cltv_delta = 4;
/**
@ -1864,8 +1742,7 @@ message QueryRoutesRequest {
FeeLimit fee_limit = 5;
/**
A list of nodes to ignore during path finding. When using REST, these fields
must be encoded as base64.
A list of nodes to ignore during path finding.
*/
repeated bytes ignored_nodes = 6;
@ -1897,29 +1774,13 @@ message QueryRoutesRequest {
zero, then the value of `--max-cltv-expiry` is used as the limit.
*/
uint32 cltv_limit = 11;
/**
An optional field that can be used to pass an arbitrary set of TLV records
to a peer which understands the new records. This can be used to pass
application specific data during the payment attempt. If the destination
does not support the specified recrods, and error will be returned.
Record types are required to be in the custom range >= 65536. When using
REST, the values must be encoded as base64.
*/
map<uint64, bytes> dest_custom_records = 13;
}
message NodePair {
/**
The sending node of the pair. When using REST, this field must be encoded as
base64.
*/
/// The sending node of the pair.
bytes from = 1;
/**
The receiving node of the pair. When using REST, this field must be encoded
as base64.
*/
/// The receiving node of the pair.
bytes to = 2;
}
@ -1972,43 +1833,9 @@ message Hop {
/**
If set to true, then this hop will be encoded using the new variable length
TLV format. Note that if any custom tlv_records below are specified, then
this field MUST be set to true for them to be encoded properly.
TLV format.
*/
bool tlv_payload = 9 [json_name = "tlv_payload"];
/**
An optional TLV record tha singals the use of an MPP payment. If present,
the receiver will enforce that that the same mpp_record is included in the
final hop payload of all non-zero payments in the HTLC set. If empty, a
regular single-shot payment is or was attempted.
*/
MPPRecord mpp_record = 10 [json_name = "mpp_record"];
/**
An optional set of key-value TLV records. This is useful within the context
of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
to drop off at each hop within the onion.
*/
map<uint64, bytes> custom_records = 11 [json_name = "custom_records"];
}
message MPPRecord {
/**
A unique, random identifier used to authenticate the sender as the intended
payer of a multi-path payment. The payment_addr must be the same for all
subpayments, and match the payment_addr provided in the receiver's invoice.
The same payment_addr must be used on all subpayments.
*/
bytes payment_addr = 11 [json_name = "payment_addr"];
/**
The total amount in milli-satoshis being sent as part of a larger multi-path
payment. The caller is responsible for ensuring subpayments to the same node
and payment_hash sum exactly to total_amt_msat. The same
total_amt_msat must be used on all subpayments.
*/
int64 total_amt_msat = 10 [json_name = "total_amt_msat"];
}
/**
@ -2021,7 +1848,7 @@ carry the initial payment amount after fees are accounted for.
message Route {
/**
The cumulative (final) time lock across the entire route. This is the CLTV
The cumulative (final) time lock across the entire route. This is the CLTV
value that should be extended to the first hop in the route. All other hops
will decrement the time-lock as advertised, leaving enough time for all
hops to wait for or present the payment preimage to complete the payment.
@ -2029,7 +1856,7 @@ message Route {
uint32 total_time_lock = 1 [json_name = "total_time_lock"];
/**
The sum of the fees paid at each hop within the final route. In the case
The sum of the fees paid at each hop within the final route. In the case
of a one-hop payment, this value will be zero as we don't need to pay a fee
to ourselves.
*/
@ -2100,7 +1927,6 @@ message LightningNode {
string alias = 3 [ json_name = "alias" ];
repeated NodeAddress addresses = 4 [ json_name = "addresses" ];
string color = 5 [ json_name = "color" ];
map<uint32, Feature> features = 6 [ json_name = "features" ];
}
message NodeAddress {
@ -2279,35 +2105,23 @@ message Invoice {
*/
string memo = 1 [json_name = "memo"];
reserved 2;
/** Deprecated. An optional cryptographic receipt of payment which is not
implemented.
*/
bytes receipt = 2 [json_name = "receipt", deprecated = true];
/**
The hex-encoded preimage (32 byte) which will allow settling an incoming
HTLC payable to this preimage. When using REST, this field must be encoded
as base64.
HTLC payable to this preimage
*/
bytes r_preimage = 3 [json_name = "r_preimage"];
/**
The hash of the preimage. When using REST, this field must be encoded as
base64.
*/
/// The hash of the preimage
bytes r_hash = 4 [json_name = "r_hash"];
/**
The value of this invoice in satoshis
The fields value and value_msat are mutually exclusive.
*/
/// The value of this invoice in satoshis
int64 value = 5 [json_name = "value"];
/**
The value of this invoice in millisatoshis
The fields value and value_msat are mutually exclusive.
*/
int64 value_msat = 23 [json_name = "value_msat"];
/// Whether this invoice has been fulfilled
bool settled = 6 [json_name = "settled", deprecated = true];
@ -2318,7 +2132,7 @@ message Invoice {
int64 settle_date = 8 [json_name = "settle_date"];
/**
A bare-bones invoice for a payment within the Lightning Network. With the
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.
*/
@ -2327,8 +2141,7 @@ message Invoice {
/**
Hash (SHA-256) of a description of the payment. Used if the description of
payment (memo) is too long to naturally fit within the description field
of an encoded payment request. When using REST, this field must be encoded
as base64.
of an encoded payment request.
*/
bytes description_hash = 10 [json_name = "description_hash"];
@ -2403,9 +2216,6 @@ message Invoice {
/// List of HTLCs paying to this invoice [EXPERIMENTAL].
repeated InvoiceHTLC htlcs = 22 [json_name = "htlcs"];
/// List of features advertised on the invoice.
map<uint32, Feature> features = 24 [json_name = "features"];
}
enum InvoiceHTLCState {
@ -2439,19 +2249,13 @@ message InvoiceHTLC {
/// Current state the htlc is in.
InvoiceHTLCState state = 8 [json_name = "state"];
/// Custom tlv records.
map<uint64, bytes> custom_records = 9 [json_name = "custom_records"];
/// The total amount of the mpp payment in msat.
uint64 mpp_total_amt_msat = 10 [json_name = "mpp_total_amt_msat"];
}
message AddInvoiceResponse {
bytes r_hash = 1 [json_name = "r_hash"];
/**
A bare-bones invoice for a payment within the Lightning Network. With the
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.
*/
@ -2469,15 +2273,10 @@ message PaymentHash {
/**
The hex-encoded payment hash of the invoice to be looked up. The passed
payment hash must be exactly 32 bytes, otherwise an error is returned.
Deprecated now that the REST gateway supports base64 encoding of bytes
fields.
*/
string r_hash_str = 1 [json_name = "r_hash_str", deprecated = true];
string r_hash_str = 1 [json_name = "r_hash_str"];
/**
The payment hash of the invoice to be looked up. When using REST, this field
must be encoded as base64.
*/
/// The payment hash of the invoice to be looked up.
bytes r_hash = 2 [json_name = "r_hash"];
}
@ -2546,11 +2345,11 @@ message Payment {
/// Deprecated, use value_sat or value_msat.
int64 value = 2 [json_name = "value", deprecated = true];
/// Deprecated, use creation_time_ns
int64 creation_date = 3 [json_name = "creation_date", deprecated = true];
/// The date of this payment
int64 creation_date = 3 [json_name = "creation_date"];
/// The path this payment took.
repeated string path = 4 [json_name = "path", deprecated = true];
/// The path this payment took
repeated string path = 4 [ json_name = "path" ];
/// Deprecated, use fee_sat or fee_msat.
int64 fee = 5 [json_name = "fee", deprecated = true];
@ -2582,35 +2381,6 @@ message Payment {
/// The fee paid for this payment in milli-satoshis
int64 fee_msat = 12 [json_name = "fee_msat"];
/// The time in UNIX nanoseconds at which the payment was created.
int64 creation_time_ns = 13 [json_name = "creation_time_ns"];
/// The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
repeated HTLCAttempt htlcs = 14 [json_name = "htlcs"];
}
message HTLCAttempt {
enum HTLCStatus {
IN_FLIGHT = 0;
SUCCEEDED = 1;
FAILED = 2;
}
/// The status of the HTLC.
HTLCStatus status = 1 [json_name = "status"];
/// The route taken by this HTLC.
Route route = 2 [json_name = "route"];
/// The time in UNIX nanoseconds at which this HTLC was sent.
int64 attempt_time_ns = 3 [json_name = "attempt_time_ns"];
/**
The time in UNIX nanoseconds at which this HTLC was settled or failed.
This value will not be set if the HTLC is still IN_FLIGHT.
*/
int64 resolve_time_ns = 4 [json_name = "resolve_time_ns"];
}
message ListPaymentsRequest {
@ -2664,15 +2434,6 @@ message PayReq {
string fallback_addr = 8 [json_name = "fallback_addr"];
int64 cltv_expiry = 9 [json_name = "cltv_expiry"];
repeated RouteHint route_hints = 10 [json_name = "route_hints"];
bytes payment_addr = 11 [json_name = "payment_addr"];
int64 num_msat = 12 [json_name = "num_msat"];
map<uint32, Feature> features = 13 [json_name = "features"];
}
message Feature {
string name = 2 [json_name = "name"];
bool is_required = 3 [json_name = "is_required"];
bool is_known = 4 [json_name = "is_known"];
}
message FeeReportRequest {}
@ -2723,12 +2484,6 @@ message PolicyUpdateRequest {
/// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum HTLC will be unchanged.
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
/// The minimum HTLC size in milli-satoshis. Only applied if min_htlc_msat_specified is true.
uint64 min_htlc_msat = 7 [json_name = "min_htlc_msat"];
/// If true, min_htlc_msat is applied.
bool min_htlc_msat_specified = 8 [json_name = "set_min_htlc_msat"];
}
message PolicyUpdateResponse {
}
@ -2801,8 +2556,7 @@ message ChannelBackup {
/**
Is an encrypted single-chan backup. this can be passed to
RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
order to trigger the recovery protocol. When using REST, this field must be
encoded as base64.
order to trigger the recovery protocol.
*/
bytes chan_backup = 2 [ json_name = "chan_backup" ];
}
@ -2816,8 +2570,7 @@ message MultiChanBackup {
/**
A single encrypted blob containing all the static channel backups of the
channel listed above. This can be stored as a single file or blob, and
safely be replaced with any prior/future versions. When using REST, this
field must be encoded as base64.
safely be replaced with any prior/future versions.
*/
bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ];
}
@ -2846,15 +2599,8 @@ message ChannelBackups {
message RestoreChanBackupRequest {
oneof backup {
/**
The channels to restore as a list of channel/backup pairs.
*/
ChannelBackups chan_backups = 1 [ json_name = "chan_backups" ];
/**
The channels to restore in the packed multi backup format. When using
REST, this field must be encoded as base64.
*/
bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ];
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,8 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
from __future__ import absolute_import
import grpc
import rpc_pb2 as rpc__pb2
from . import rpc_pb2 as rpc__pb2
class WalletUnlockerStub(object):
@ -245,11 +246,6 @@ class LightningStub(object):
request_serializer=rpc__pb2.ListPeersRequest.SerializeToString,
response_deserializer=rpc__pb2.ListPeersResponse.FromString,
)
self.SubscribePeerEvents = channel.unary_stream(
'/lnrpc.Lightning/SubscribePeerEvents',
request_serializer=rpc__pb2.PeerEventSubscription.SerializeToString,
response_deserializer=rpc__pb2.PeerEvent.FromString,
)
self.GetInfo = channel.unary_unary(
'/lnrpc.Lightning/GetInfo',
request_serializer=rpc__pb2.GetInfoRequest.SerializeToString,
@ -582,16 +578,6 @@ class LightningServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribePeerEvents(self, request, context):
"""*
SubscribePeerEvents creates a uni-directional stream from the server to
the client in which any events relevant to the state of peers are sent
over. Events include peers going online and offline.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetInfo(self, request, context):
"""* lncli: `getinfo`
GetInfo returns general information concerning the lightning node including
@ -786,9 +772,9 @@ class LightningServicer(object):
notifying the client of newly added/settled invoices. The caller can
optionally specify the add_index and/or the settle_index. If the add_index
is specified, then we'll first start by sending add invoice events for all
invoices with an add_index greater than the specified value. If the
invoices with an add_index greater than the specified value. If the
settle_index is specified, the next, we'll send out all settle events for
invoices with a settle_index greater than the specified value. One or both
invoices with a settle_index greater than the specified value. One or both
of these fields can be set. If no fields are set, then we'll only send out
the latest add/settle events.
"""
@ -827,7 +813,7 @@ class LightningServicer(object):
DescribeGraph returns a description of the latest graph state from the
point of view of the node. The graph information is partitioned into two
components: all the nodes/vertexes, and all the edges that connect the
vertexes themselves. As this is a directed graph, the edges also contain
vertexes themselves. As this is a directed graph, the edges also contain
the node directional specific routing policy which includes: the time lock
delta, fee information, etc.
"""
@ -936,7 +922,7 @@ class LightningServicer(object):
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.
As a result each message can only contain 50k entries. Each response has
As a result each message can only contain 50k entries. Each response has
the index offset of the last entry. The index offset can be provided to the
request to allow the caller to skip a series of records.
"""
@ -1087,11 +1073,6 @@ def add_LightningServicer_to_server(servicer, server):
request_deserializer=rpc__pb2.ListPeersRequest.FromString,
response_serializer=rpc__pb2.ListPeersResponse.SerializeToString,
),
'SubscribePeerEvents': grpc.unary_stream_rpc_method_handler(
servicer.SubscribePeerEvents,
request_deserializer=rpc__pb2.PeerEventSubscription.FromString,
response_serializer=rpc__pb2.PeerEvent.SerializeToString,
),
'GetInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetInfo,
request_deserializer=rpc__pb2.GetInfoRequest.FromString,