Merge pull request #844 from frennkie/update-lndlibs

Update lndlibs
This commit is contained in:
frennkie 2019-11-04 22:16:26 +01:00 committed by GitHub
commit f3c8be8a1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1993 additions and 916 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@
home.admin/.DS_Store
*.log
__pycache__
rpc_pb2.pyc
rpc_pb2_grpc.pyc

View file

@ -175,7 +175,7 @@ message UnlockWalletRequest {
/**
recovery_window is an optional argument specifying the address lookahead
when restoring a wallet seed. The recovery window applies to each
invdividual branch of the BIP44 derivation paths. Supplying a recovery
individual branch of the BIP44 derivation paths. Supplying a recovery
window of zero indicates that no addresses should be recovered, such after
the first initialization of the wallet.
*/
@ -389,7 +389,7 @@ service Lightning {
};
}
/** lncli: `subscribechannelevents`
/**
SubscribeChannelEvents creates a uni-directional stream from the server to
the client in which any updates relevant to the state of the channels are
sent over. Events include new active channels, inactive channels, and closed
@ -430,6 +430,15 @@ service Lightning {
*/
rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate);
/**
ChannelAcceptor dispatches a bi-directional streaming RPC in which
OpenChannel requests are sent to the client and the client responds with
a boolean that tells LND whether or not to accept the channel. This allows
node operators to specify their own criteria for accepting inbound channels
through a single persistent connection.
*/
rpc ChannelAcceptor (stream ChannelAcceptResponse) returns (stream ChannelAcceptRequest);
/** lncli: `closechannel`
CloseChannel attempts to close an active channel identified by its channel
outpoint (ChannelPoint). The actions of this method can additionally be
@ -621,7 +630,7 @@ service Lightning {
/** lncli: `queryroutes`
QueryRoutes attempts to query the daemon's Channel Router for a possible
route to a target destination capable of carrying a specific amount of
satoshis. The retuned route contains the full details required to craft and
satoshis. The returned route contains the full details required to craft and
send an HTLC, also including the necessary information that should be
present within the Sphinx packet encapsulated within the HTLC.
*/
@ -768,6 +777,18 @@ service Lightning {
*/
rpc SubscribeChannelBackups(ChannelBackupSubscription) returns (stream ChanBackupSnapshot) {
};
/** lncli: `bakemacaroon`
BakeMacaroon allows the creation of a new macaroon with custom read and
write permissions. No first-party caveats are added since this can be done
offline.
*/
rpc BakeMacaroon(BakeMacaroonRequest) returns (BakeMacaroonResponse) {
option (google.api.http) = {
post: "/v1/macaroon"
body: "*"
};
};
}
message Utxo {
@ -814,6 +835,9 @@ message Transaction {
/// Addresses that received funds for this transaction
repeated string dest_addresses = 8 [ json_name = "dest_addresses" ];
/// The raw transaction hex.
string raw_tx_hex = 9 [ json_name = "raw_tx_hex" ];
}
message GetTransactionsRequest {
}
@ -873,13 +897,21 @@ message SendRequest {
The channel id of the channel that must be taken to the first hop. If zero,
any channel may be used.
*/
uint64 outgoing_chan_id = 9;
uint64 outgoing_chan_id = 9 [jstype = JS_STRING];
/**
An optional maximum total time lock for the route. If zero, there is no
maximum enforced.
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
`--max-cltv-expiry` is enforced.
*/
uint32 cltv_limit = 10;
/**
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.
*/
map<uint64, bytes> dest_tlv = 11;
}
message SendResponse {
@ -896,18 +928,64 @@ message SendToRouteRequest {
/// An optional hex-encoded payment hash to be used for the HTLC.
string payment_hash_string = 2;
/**
Deprecated. The set of routes that should be used to attempt to complete the
payment. The possibility to pass in multiple routes is deprecated and
instead the single route field below should be used in combination with the
streaming variant of SendToRoute.
*/
repeated Route routes = 3 [deprecated = true];
reserved 3;
/// Route that should be used to attempt to complete the payment.
Route route = 4;
}
message ChannelAcceptRequest {
/// The pubkey of the node that wishes to open an inbound channel.
bytes node_pubkey = 1;
/// The hash of the genesis block that the proposed channel resides in.
bytes chain_hash = 2;
/// The pending channel id.
bytes pending_chan_id = 3;
/// The funding amount in satoshis that initiator wishes to use in the channel.
uint64 funding_amt = 4;
/// The push amount of the proposed channel in millisatoshis.
uint64 push_amt = 5;
/// The dust limit of the initiator's commitment tx.
uint64 dust_limit = 6;
/// The maximum amount of coins in millisatoshis that can be pending in this channel.
uint64 max_value_in_flight = 7;
/// The minimum amount of satoshis the initiator requires us to have at all times.
uint64 channel_reserve = 8;
/// The smallest HTLC in millisatoshis that the initiator will accept.
uint64 min_htlc = 9;
/// The initial fee rate that the initiator suggests for both commitment transactions.
uint64 fee_per_kw = 10;
/**
The number of blocks to use for the relative time lock in the pay-to-self output
of both commitment transactions.
*/
uint32 csv_delay = 11;
/// The total number of incoming HTLC's that the initiator will accept.
uint32 max_accepted_htlcs = 12;
/// A bit-field which the initiator uses to specify proposed channel behavior.
uint32 channel_flags = 13;
}
message ChannelAcceptResponse {
/// Whether or not the client accepts the channel.
bool accept = 1;
/// The pending channel id to which this response applies.
bytes pending_chan_id = 2;
}
message ChannelPoint {
oneof funding_txid {
/// Txid of the funding transaction
@ -1098,7 +1176,7 @@ message Channel {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 chan_id = 4 [json_name = "chan_id"];
uint64 chan_id = 4 [json_name = "chan_id", jstype = JS_STRING];
/// The total amount of funds held in this channel
int64 capacity = 5 [json_name = "capacity"];
@ -1162,8 +1240,37 @@ message Channel {
/// True if we were the ones that created the channel.
bool initiator = 18 [json_name = "initiator"];
/// A set of flags showing the current state of the cahnnel.
/// A set of flags showing the current state of the channel.
string chan_status_flags = 19 [json_name = "chan_status_flags"];
/// The minimum satoshis this node is required to reserve in its balance.
int64 local_chan_reserve_sat = 20 [json_name = "local_chan_reserve_sat"];
/**
The minimum satoshis the other node is required to reserve in its balance.
*/
int64 remote_chan_reserve_sat = 21 [json_name = "remote_chan_reserve_sat"];
/**
If true, then this channel uses the modern commitment format where the key
in the output of the remote party does not change each state. This makes
back up and recovery easier as when the channel is closed, the funds go
directly to that key.
*/
bool static_remote_key = 22 [json_name = "static_remote_key"];
/**
The number of seconds that the channel has been monitored by the channel
scoring system. Scores are currently not persisted, so this value may be
less than the lifetime of the channel [EXPERIMENTAL].
*/
int64 lifetime = 23 [json_name = "lifetime"];
/**
The number of seconds that the remote peer has been observed as being online
by the channel scoring system over the lifetime of the channel [EXPERIMENTAL].
*/
int64 uptime = 24 [json_name = "uptime"];
}
@ -1183,7 +1290,7 @@ message ChannelCloseSummary {
string channel_point = 1 [json_name = "channel_point"];
/// The unique channel ID for the channel.
uint64 chan_id = 2 [json_name = "chan_id"];
uint64 chan_id = 2 [json_name = "chan_id", jstype = JS_STRING];
/// The hash of the genesis block that this channel resides within.
string chain_hash = 3 [json_name = "chain_hash"];
@ -1335,6 +1442,12 @@ message GetInfoResponse {
/// A list of active chains the node is connected to
repeated Chain chains = 16 [json_name = "chains"];
/// The color of the current node in hex code format
string color = 17 [json_name = "color"];
// Whether we consider ourselves synced with the public channel graph.
bool synced_to_graph = 18 [json_name = "synced_to_graph"];
}
message Chain {
@ -1468,6 +1581,15 @@ message PendingChannelsResponse {
int64 local_balance = 4 [ json_name = "local_balance" ];
int64 remote_balance = 5 [ json_name = "remote_balance" ];
/// The minimum satoshis this node is required to reserve in its balance.
int64 local_chan_reserve_sat = 6 [json_name = "local_chan_reserve_sat"];
/**
The minimum satoshis the other node is required to reserve in its
balance.
*/
int64 remote_chan_reserve_sat = 7 [json_name = "remote_chan_reserve_sat"];
}
message PendingOpenChannel {
@ -1523,7 +1645,7 @@ message PendingChannelsResponse {
/// The balance in satoshis encumbered in this pending channel
int64 limbo_balance = 3 [ json_name = "limbo_balance" ];
/// The height at which funds can be sweeped into the wallet
/// The height at which funds can be swept into the wallet
uint32 maturity_height = 4 [ json_name = "maturity_height" ];
/*
@ -1606,11 +1728,7 @@ message QueryRoutesRequest {
/// The amount to send expressed in satoshis
int64 amt = 2;
/**
Deprecated. The max number of routes to return. In the future, QueryRoutes
will only return a single route.
*/
int32 num_routes = 3 [deprecated = true];
reserved 3;
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
int32 final_cltv_delta = 4;
@ -1629,20 +1747,46 @@ message QueryRoutesRequest {
repeated bytes ignored_nodes = 6;
/**
A list of edges to ignore during path finding.
Deprecated. A list of edges to ignore during path finding.
*/
repeated EdgeLocator ignored_edges = 7;
repeated EdgeLocator ignored_edges = 7 [deprecated = true];
/**
The source node where the request route should originated from. If empty,
self is assumed.
*/
string source_pub_key = 8;
/**
If set to true, edge probabilities from mission control will be used to get
the optimal route.
*/
bool use_mission_control = 9;
/**
A list of directed node pairs that will be ignored during path finding.
*/
repeated NodePair ignored_pairs = 10;
/**
An optional maximum total time lock for the route. If the source is empty or
ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If
zero, then the value of `--max-cltv-expiry` is used as the limit.
*/
uint32 cltv_limit = 11;
}
message NodePair {
/// The sending node of the pair.
bytes from = 1;
/// The receiving node of the pair.
bytes to = 2;
}
message EdgeLocator {
/// The short channel id of this edge.
uint64 channel_id = 1;
uint64 channel_id = 1 [jstype = JS_STRING];
/**
The direction of this edge. If direction_reverse is false, the direction
@ -1654,7 +1798,17 @@ message EdgeLocator {
}
message QueryRoutesResponse {
/**
The route that results from the path finding operation. This is still a
repeated field to retain backwards compatibility.
*/
repeated Route routes = 1 [json_name = "routes"];
/**
The success probability of the returned route based on the current mission
control state. [EXPERIMENTAL]
*/
double success_prob = 2 [json_name = "success_prob"];
}
message Hop {
@ -1663,7 +1817,7 @@ message Hop {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 chan_id = 1 [json_name = "chan_id"];
uint64 chan_id = 1 [json_name = "chan_id", jstype = JS_STRING];
int64 chan_capacity = 2 [json_name = "chan_capacity"];
int64 amt_to_forward = 3 [json_name = "amt_to_forward", deprecated = true];
int64 fee = 4 [json_name = "fee", deprecated = true];
@ -1676,6 +1830,12 @@ message Hop {
can be executed without relying on a copy of the channel graph.
*/
string pub_key = 8 [json_name = "pub_key"];
/**
If set to true, then this hop will be encoded using the new variable length
TLV format.
*/
bool tlv_payload = 9 [json_name = "tlv_payload"];
}
/**
@ -1698,7 +1858,7 @@ message Route {
/**
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
it ourself.
to ourselves.
*/
int64 total_fees = 2 [json_name = "total_fees", deprecated = true];
@ -1730,6 +1890,9 @@ message Route {
message NodeInfoRequest {
/// The 33-byte hex-encoded compressed public of the target node
string pub_key = 1;
/// If true, will include all known channels associated with the node.
bool include_channels = 2;
}
message NodeInfo {
@ -1742,8 +1905,14 @@ message NodeInfo {
*/
LightningNode node = 1 [json_name = "node"];
/// The total number of channels for the node.
uint32 num_channels = 2 [json_name = "num_channels"];
/// The sum of all channels capacity for the node, denominated in satoshis.
int64 total_capacity = 3 [json_name = "total_capacity"];
/// A list of all public channels for the node.
repeated ChannelEdge channels = 4 [json_name = "channels"];
}
/**
@ -1772,6 +1941,7 @@ message RoutingPolicy {
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
bool disabled = 5 [json_name = "disabled"];
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
uint32 last_update = 7 [json_name = "last_update"];
}
/**
@ -1788,10 +1958,10 @@ message ChannelEdge {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 channel_id = 1 [json_name = "channel_id"];
uint64 channel_id = 1 [json_name = "channel_id", jstype = JS_STRING];
string chan_point = 2 [json_name = "chan_point"];
uint32 last_update = 3 [json_name = "last_update"];
uint32 last_update = 3 [json_name = "last_update", deprecated = true];
string node1_pub = 4 [json_name = "node1_pub"];
string node2_pub = 5 [json_name = "node2_pub"];
@ -1826,7 +1996,7 @@ message ChanInfoRequest {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 chan_id = 1;
uint64 chan_id = 1 [jstype = JS_STRING];
}
message NetworkInfoRequest {
@ -1846,6 +2016,9 @@ message NetworkInfo {
int64 max_channel_size = 9 [json_name = "max_channel_size"];
int64 median_channel_size_sat = 10 [json_name = "median_channel_size_sat"];
// The number of edges marked as zombies.
uint64 num_zombie_chans = 11 [json_name = "num_zombie_chans"];
// TODO(roasbeef): fee rate info, expiry
// * also additional RPC for tracking fee info once in
}
@ -1864,6 +2037,7 @@ message NodeUpdate {
string identity_key = 2;
bytes global_features = 3;
string alias = 4;
string color = 5;
}
message ChannelEdgeUpdate {
/**
@ -1871,7 +2045,7 @@ message ChannelEdgeUpdate {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 chan_id = 1;
uint64 chan_id = 1 [jstype = JS_STRING];
ChannelPoint chan_point = 2;
@ -1888,7 +2062,7 @@ message ClosedChannelUpdate {
height, the next 3 the index within the block, and the last 2 bytes are the
output index for the channel.
*/
uint64 chan_id = 1;
uint64 chan_id = 1 [jstype = JS_STRING];
int64 capacity = 2;
uint32 closed_height = 3;
ChannelPoint chan_point = 4;
@ -1899,7 +2073,7 @@ message HopHint {
string node_id = 1 [json_name = "node_id"];
/// The unique identifier of the channel.
uint64 chan_id = 2 [json_name = "chan_id"];
uint64 chan_id = 2 [json_name = "chan_id", jstype = JS_STRING];
/// The base fee of the channel denominated in millisatoshis.
uint32 fee_base_msat = 3 [json_name = "fee_base_msat"];
@ -2039,6 +2213,42 @@ message Invoice {
The state the invoice is in.
*/
InvoiceState state = 21 [json_name = "state"];
/// List of HTLCs paying to this invoice [EXPERIMENTAL].
repeated InvoiceHTLC htlcs = 22 [json_name = "htlcs"];
}
enum InvoiceHTLCState {
ACCEPTED = 0;
SETTLED = 1;
CANCELED = 2;
}
/// Details of an HTLC that paid to an invoice
message InvoiceHTLC {
/// Short channel id over which the htlc was received.
uint64 chan_id = 1 [json_name = "chan_id", jstype = JS_STRING];
/// Index identifying the htlc on the channel.
uint64 htlc_index = 2 [json_name = "htlc_index"];
/// The amount of the htlc in msat.
uint64 amt_msat = 3 [json_name = "amt_msat"];
/// Block height at which this htlc was accepted.
int32 accept_height = 4 [json_name = "accept_height"];
/// Time at which this htlc was accepted.
int64 accept_time = 5 [json_name = "accept_time"];
/// Time at which this htlc was settled or canceled.
int64 resolve_time = 6 [json_name = "resolve_time"];
/// Block height at which this htlc expires.
int32 expiry_height = 7 [json_name = "expiry_height"];
/// Current state the htlc is in.
InvoiceHTLCState state = 8 [json_name = "state"];
}
message AddInvoiceResponse {
@ -2141,8 +2351,8 @@ message Payment {
/// The path this payment took
repeated string path = 4 [ json_name = "path" ];
/// The fee paid for this payment in satoshis
int64 fee = 5 [json_name = "fee"];
/// Deprecated, use fee_sat or fee_msat.
int64 fee = 5 [json_name = "fee", deprecated = true];
/// The payment preimage
string payment_preimage = 6 [json_name = "payment_preimage"];
@ -2152,9 +2362,34 @@ message Payment {
/// The value of the payment in milli-satoshis
int64 value_msat = 8 [json_name = "value_msat"];
/// The optional payment request being fulfilled.
string payment_request = 9 [json_name = "payment_request"];
enum PaymentStatus {
UNKNOWN = 0;
IN_FLIGHT = 1;
SUCCEEDED = 2;
FAILED = 3;
}
// The status of the payment.
PaymentStatus status = 10 [json_name = "status"];
/// The fee paid for this payment in satoshis
int64 fee_sat = 11 [json_name = "fee_sat"];
/// The fee paid for this payment in milli-satoshis
int64 fee_msat = 12 [json_name = "fee_msat"];
}
message ListPaymentsRequest {
/**
If true, then return payments that have not yet fully completed. This means
that pending payments, as well as failed payments will show up if this
field is set to True.
*/
bool include_incomplete = 1;
}
message ListPaymentsResponse {
@ -2246,6 +2481,9 @@ message PolicyUpdateRequest {
/// The required timelock delta for HTLCs forwarded over the channel.
uint32 time_lock_delta = 5 [json_name = "time_lock_delta"];
/// 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"];
}
message PolicyUpdateResponse {
}
@ -2268,10 +2506,10 @@ message ForwardingEvent {
uint64 timestamp = 1 [json_name = "timestamp"];
/// The incoming channel ID that carried the HTLC that created the circuit.
uint64 chan_id_in = 2 [json_name = "chan_id_in"];
uint64 chan_id_in = 2 [json_name = "chan_id_in", jstype = JS_STRING];
/// The outgoing channel ID that carried the preimage that completed the circuit.
uint64 chan_id_out = 4 [json_name = "chan_id_out"];
uint64 chan_id_out = 4 [json_name = "chan_id_out", jstype = JS_STRING];
/// The total amount (in satoshis) of the incoming HTLC that created half the circuit.
uint64 amt_in = 5 [json_name = "amt_in"];
@ -2285,6 +2523,13 @@ message ForwardingEvent {
/// The total fee (in milli-satoshis) that this payment circuit carried.
uint64 fee_msat = 8 [json_name = "fee_msat"];
/// The total amount (in milli-satoshis) of the incoming HTLC that created half the circuit.
uint64 amt_in_msat = 9 [json_name = "amt_in_msat"];
/// The total amount (in milli-satoshis) of the outgoing HTLC that created the second half of the circuit.
uint64 amt_out_msat = 10 [json_name = "amt_out_msat"];
// TODO(roasbeef): add settlement latency?
// * use FPE on the chan id?
// * also list failures?
@ -2298,7 +2543,7 @@ message ForwardingHistoryResponse {
}
message ExportChannelBackupRequest {
/// The target chanenl point to obtain a back up for.
/// The target channel point to obtain a back up for.
ChannelPoint chan_point = 1;
}
@ -2310,7 +2555,7 @@ message ChannelBackup {
/**
Is an encrypted single-chan backup. this can be passed to
RestoreChannelBackups, or the WalletUnlocker Innit and Unlock methods in
RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
order to trigger the recovery protocol.
*/
bytes chan_backup = 2 [ json_name = "chan_backup" ];
@ -2365,3 +2610,19 @@ message ChannelBackupSubscription {}
message VerifyChanBackupResponse {
}
message MacaroonPermission {
/// The entity a permission grants access to.
string entity = 1 [json_name = "entity"];
/// The action that is granted.
string action = 2 [json_name = "action"];
}
message BakeMacaroonRequest {
/// The list of permissions the new macaroon should grant.
repeated MacaroonPermission permissions = 1 [json_name = "permissions"];
}
message BakeMacaroonResponse {
/// The hex encoded macaroon, serialized in binary format.
string macaroon = 1 [json_name = "macaroon"];
}

File diff suppressed because one or more lines are too long

View file

@ -280,6 +280,11 @@ class LightningStub(object):
request_serializer=rpc__pb2.OpenChannelRequest.SerializeToString,
response_deserializer=rpc__pb2.OpenStatusUpdate.FromString,
)
self.ChannelAcceptor = channel.stream_stream(
'/lnrpc.Lightning/ChannelAcceptor',
request_serializer=rpc__pb2.ChannelAcceptResponse.SerializeToString,
response_deserializer=rpc__pb2.ChannelAcceptRequest.FromString,
)
self.CloseChannel = channel.unary_stream(
'/lnrpc.Lightning/CloseChannel',
request_serializer=rpc__pb2.CloseChannelRequest.SerializeToString,
@ -425,6 +430,11 @@ class LightningStub(object):
request_serializer=rpc__pb2.ChannelBackupSubscription.SerializeToString,
response_deserializer=rpc__pb2.ChanBackupSnapshot.FromString,
)
self.BakeMacaroon = channel.unary_unary(
'/lnrpc.Lightning/BakeMacaroon',
request_serializer=rpc__pb2.BakeMacaroonRequest.SerializeToString,
response_deserializer=rpc__pb2.BakeMacaroonResponse.FromString,
)
class LightningServicer(object):
@ -600,7 +610,7 @@ class LightningServicer(object):
raise NotImplementedError('Method not implemented!')
def SubscribeChannelEvents(self, request, context):
"""* lncli: `subscribechannelevents`
"""*
SubscribeChannelEvents creates a uni-directional stream from the server to
the client in which any updates relevant to the state of the channels are
sent over. Events include new active channels, inactive channels, and closed
@ -642,6 +652,18 @@ class LightningServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ChannelAcceptor(self, request_iterator, context):
"""*
ChannelAcceptor dispatches a bi-directional streaming RPC in which
OpenChannel requests are sent to the client and the client responds with
a boolean that tells LND whether or not to accept the channel. This allows
node operators to specify their own criteria for accepting inbound channels
through a single persistent connection.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CloseChannel(self, request, context):
"""* lncli: `closechannel`
CloseChannel attempts to close an active channel identified by its channel
@ -822,7 +844,7 @@ class LightningServicer(object):
"""* lncli: `queryroutes`
QueryRoutes attempts to query the daemon's Channel Router for a possible
route to a target destination capable of carrying a specific amount of
satoshis. The retuned route contains the full details required to craft and
satoshis. The returned route contains the full details required to craft and
send an HTLC, also including the necessary information that should be
present within the Sphinx packet encapsulated within the HTLC.
"""
@ -967,6 +989,16 @@ class LightningServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def BakeMacaroon(self, request, context):
"""* lncli: `bakemacaroon`
BakeMacaroon allows the creation of a new macaroon with custom read and
write permissions. No first-party caveats are added since this can be done
offline.
"""
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 = {
@ -1075,6 +1107,11 @@ def add_LightningServicer_to_server(servicer, server):
request_deserializer=rpc__pb2.OpenChannelRequest.FromString,
response_serializer=rpc__pb2.OpenStatusUpdate.SerializeToString,
),
'ChannelAcceptor': grpc.stream_stream_rpc_method_handler(
servicer.ChannelAcceptor,
request_deserializer=rpc__pb2.ChannelAcceptResponse.FromString,
response_serializer=rpc__pb2.ChannelAcceptRequest.SerializeToString,
),
'CloseChannel': grpc.unary_stream_rpc_method_handler(
servicer.CloseChannel,
request_deserializer=rpc__pb2.CloseChannelRequest.FromString,
@ -1220,6 +1257,11 @@ def add_LightningServicer_to_server(servicer, server):
request_deserializer=rpc__pb2.ChannelBackupSubscription.FromString,
response_serializer=rpc__pb2.ChanBackupSnapshot.SerializeToString,
),
'BakeMacaroon': grpc.unary_unary_rpc_method_handler(
servicer.BakeMacaroon,
request_deserializer=rpc__pb2.BakeMacaroonRequest.FromString,
response_serializer=rpc__pb2.BakeMacaroonResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'lnrpc.Lightning', rpc_method_handlers)