mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
msggen: Add preapproveinvoice and preapprovekeysend to msggen
This commit is contained in:
committed by
Rusty Russell
parent
cfa33ce362
commit
c029de7d56
32
.msggen.json
32
.msggen.json
@@ -1294,6 +1294,14 @@
|
|||||||
"PingResponse": {
|
"PingResponse": {
|
||||||
"Ping.totlen": 1
|
"Ping.totlen": 1
|
||||||
},
|
},
|
||||||
|
"PreapproveinvoiceRequest": {
|
||||||
|
"PreApproveInvoice.bolt11": 1
|
||||||
|
},
|
||||||
|
"PreapprovekeysendRequest": {
|
||||||
|
"PreApproveKeysend.amount_msat": 3,
|
||||||
|
"PreApproveKeysend.destination": 1,
|
||||||
|
"PreApproveKeysend.payment_hash": 2
|
||||||
|
},
|
||||||
"SendcustommsgRequest": {
|
"SendcustommsgRequest": {
|
||||||
"SendCustomMsg.msg": 2,
|
"SendCustomMsg.msg": 2,
|
||||||
"SendCustomMsg.node_id": 1
|
"SendCustomMsg.node_id": 1
|
||||||
@@ -4712,6 +4720,30 @@
|
|||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
},
|
},
|
||||||
|
"PreApproveInvoice": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": null
|
||||||
|
},
|
||||||
|
"PreApproveInvoice.bolt11": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"PreApproveKeysend": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": null
|
||||||
|
},
|
||||||
|
"PreApproveKeysend.amount_msat": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"PreApproveKeysend.destination": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"PreApproveKeysend.payment_hash": {
|
||||||
|
"added": "v23.02",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
"SendCustomMsg": {
|
"SendCustomMsg": {
|
||||||
"added": "v0.10.1",
|
"added": "v0.10.1",
|
||||||
"deprecated": null
|
"deprecated": null
|
||||||
|
|||||||
18
cln-grpc/proto/node.proto
generated
18
cln-grpc/proto/node.proto
generated
@@ -61,6 +61,8 @@ service Node {
|
|||||||
rpc SignInvoice(SigninvoiceRequest) returns (SigninvoiceResponse) {}
|
rpc SignInvoice(SigninvoiceRequest) returns (SigninvoiceResponse) {}
|
||||||
rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {}
|
rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {}
|
||||||
rpc Stop(StopRequest) returns (StopResponse) {}
|
rpc Stop(StopRequest) returns (StopResponse) {}
|
||||||
|
rpc PreApproveKeysend(PreapprovekeysendRequest) returns (PreapprovekeysendResponse) {}
|
||||||
|
rpc PreApproveInvoice(PreapproveinvoiceRequest) returns (PreapproveinvoiceResponse) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetinfoRequest {
|
message GetinfoRequest {
|
||||||
@@ -1670,3 +1672,19 @@ message StopRequest {
|
|||||||
|
|
||||||
message StopResponse {
|
message StopResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message PreapprovekeysendRequest {
|
||||||
|
optional bytes destination = 1;
|
||||||
|
optional bytes payment_hash = 2;
|
||||||
|
optional Amount amount_msat = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PreapprovekeysendResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message PreapproveinvoiceRequest {
|
||||||
|
optional string bolt11 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PreapproveinvoiceResponse {
|
||||||
|
}
|
||||||
|
|||||||
56
cln-grpc/src/convert.rs
generated
56
cln-grpc/src/convert.rs
generated
@@ -1562,6 +1562,22 @@ impl From<responses::StopResponse> for pb::StopResponse {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<responses::PreapprovekeysendResponse> for pb::PreapprovekeysendResponse {
|
||||||
|
fn from(c: responses::PreapprovekeysendResponse) -> Self {
|
||||||
|
Self {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<responses::PreapproveinvoiceResponse> for pb::PreapproveinvoiceResponse {
|
||||||
|
fn from(c: responses::PreapproveinvoiceResponse) -> Self {
|
||||||
|
Self {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_variables,deprecated)]
|
#[allow(unused_variables,deprecated)]
|
||||||
impl From<requests::GetinfoRequest> for pb::GetinfoRequest {
|
impl From<requests::GetinfoRequest> for pb::GetinfoRequest {
|
||||||
fn from(c: requests::GetinfoRequest) -> Self {
|
fn from(c: requests::GetinfoRequest) -> Self {
|
||||||
@@ -2220,6 +2236,26 @@ impl From<requests::StopRequest> for pb::StopRequest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<requests::PreapprovekeysendRequest> for pb::PreapprovekeysendRequest {
|
||||||
|
fn from(c: requests::PreapprovekeysendRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
|
||||||
|
payment_hash: c.payment_hash.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
|
||||||
|
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<requests::PreapproveinvoiceRequest> for pb::PreapproveinvoiceRequest {
|
||||||
|
fn from(c: requests::PreapproveinvoiceRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
bolt11: c.bolt11, // Rule #2 for type string?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#[allow(unused_variables,deprecated)]
|
#[allow(unused_variables,deprecated)]
|
||||||
impl From<pb::GetinfoRequest> for requests::GetinfoRequest {
|
impl From<pb::GetinfoRequest> for requests::GetinfoRequest {
|
||||||
@@ -2863,3 +2899,23 @@ impl From<pb::StopRequest> for requests::StopRequest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<pb::PreapprovekeysendRequest> for requests::PreapprovekeysendRequest {
|
||||||
|
fn from(c: pb::PreapprovekeysendRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
destination: c.destination.map(|v| PublicKey::from_slice(&v).unwrap()), // Rule #1 for type pubkey?
|
||||||
|
payment_hash: c.payment_hash.map(|v| hex::encode(v)), // Rule #1 for type hex?
|
||||||
|
amount_msat: c.amount_msat.map(|a| a.into()), // Rule #1 for type msat?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables,deprecated)]
|
||||||
|
impl From<pb::PreapproveinvoiceRequest> for requests::PreapproveinvoiceRequest {
|
||||||
|
fn from(c: pb::PreapproveinvoiceRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
bolt11: c.bolt11, // Rule #1 for type string?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1722,4 +1722,68 @@ async fn stop(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn pre_approve_keysend(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<pb::PreapprovekeysendRequest>,
|
||||||
|
) -> Result<tonic::Response<pb::PreapprovekeysendResponse>, tonic::Status> {
|
||||||
|
let req = request.into_inner();
|
||||||
|
let req: requests::PreapprovekeysendRequest = req.into();
|
||||||
|
debug!("Client asked for pre_approve_keysend");
|
||||||
|
trace!("pre_approve_keysend request: {:?}", req);
|
||||||
|
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||||
|
let result = rpc.call(Request::PreApproveKeysend(req))
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(
|
||||||
|
Code::Unknown,
|
||||||
|
format!("Error calling method PreApproveKeysend: {:?}", e)))?;
|
||||||
|
match result {
|
||||||
|
Response::PreApproveKeysend(r) => {
|
||||||
|
trace!("pre_approve_keysend response: {:?}", r);
|
||||||
|
Ok(tonic::Response::new(r.into()))
|
||||||
|
},
|
||||||
|
r => Err(Status::new(
|
||||||
|
Code::Internal,
|
||||||
|
format!(
|
||||||
|
"Unexpected result {:?} to method call PreApproveKeysend",
|
||||||
|
r
|
||||||
|
)
|
||||||
|
)),
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn pre_approve_invoice(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<pb::PreapproveinvoiceRequest>,
|
||||||
|
) -> Result<tonic::Response<pb::PreapproveinvoiceResponse>, tonic::Status> {
|
||||||
|
let req = request.into_inner();
|
||||||
|
let req: requests::PreapproveinvoiceRequest = req.into();
|
||||||
|
debug!("Client asked for pre_approve_invoice");
|
||||||
|
trace!("pre_approve_invoice request: {:?}", req);
|
||||||
|
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||||
|
let result = rpc.call(Request::PreApproveInvoice(req))
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(
|
||||||
|
Code::Unknown,
|
||||||
|
format!("Error calling method PreApproveInvoice: {:?}", e)))?;
|
||||||
|
match result {
|
||||||
|
Response::PreApproveInvoice(r) => {
|
||||||
|
trace!("pre_approve_invoice response: {:?}", r);
|
||||||
|
Ok(tonic::Response::new(r.into()))
|
||||||
|
},
|
||||||
|
r => Err(Status::new(
|
||||||
|
Code::Internal,
|
||||||
|
format!(
|
||||||
|
"Unexpected result {:?} to method call PreApproveInvoice",
|
||||||
|
r
|
||||||
|
)
|
||||||
|
)),
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
70
cln-rpc/src/model.rs
generated
70
cln-rpc/src/model.rs
generated
@@ -69,6 +69,8 @@ pub enum Request {
|
|||||||
SignInvoice(requests::SigninvoiceRequest),
|
SignInvoice(requests::SigninvoiceRequest),
|
||||||
SignMessage(requests::SignmessageRequest),
|
SignMessage(requests::SignmessageRequest),
|
||||||
Stop(requests::StopRequest),
|
Stop(requests::StopRequest),
|
||||||
|
PreApproveKeysend(requests::PreapprovekeysendRequest),
|
||||||
|
PreApproveInvoice(requests::PreapproveinvoiceRequest),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
@@ -128,6 +130,8 @@ pub enum Response {
|
|||||||
SignInvoice(responses::SigninvoiceResponse),
|
SignInvoice(responses::SigninvoiceResponse),
|
||||||
SignMessage(responses::SignmessageResponse),
|
SignMessage(responses::SignmessageResponse),
|
||||||
Stop(responses::StopResponse),
|
Stop(responses::StopResponse),
|
||||||
|
PreApproveKeysend(responses::PreapprovekeysendResponse),
|
||||||
|
PreApproveInvoice(responses::PreapproveinvoiceResponse),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1375,6 +1379,42 @@ pub mod requests {
|
|||||||
type Response = super::responses::StopResponse;
|
type Response = super::responses::StopResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct PreapprovekeysendRequest {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub destination: Option<PublicKey>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub payment_hash: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub amount_msat: Option<Amount>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<PreapprovekeysendRequest> for Request {
|
||||||
|
fn from(r: PreapprovekeysendRequest) -> Self {
|
||||||
|
Request::PreApproveKeysend(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntoRequest for PreapprovekeysendRequest {
|
||||||
|
type Response = super::responses::PreapprovekeysendResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct PreapproveinvoiceRequest {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bolt11: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<PreapproveinvoiceRequest> for Request {
|
||||||
|
fn from(r: PreapproveinvoiceRequest) -> Self {
|
||||||
|
Request::PreApproveInvoice(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntoRequest for PreapproveinvoiceRequest {
|
||||||
|
type Response = super::responses::PreapproveinvoiceResponse;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -4236,5 +4276,35 @@ pub mod responses {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct PreapprovekeysendResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TryFrom<Response> for PreapprovekeysendResponse {
|
||||||
|
type Error = super::TryFromResponseError;
|
||||||
|
|
||||||
|
fn try_from(response: Response) -> Result<Self, Self::Error> {
|
||||||
|
match response {
|
||||||
|
Response::PreApproveKeysend(response) => Ok(response),
|
||||||
|
_ => Err(TryFromResponseError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct PreapproveinvoiceResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TryFrom<Response> for PreapproveinvoiceResponse {
|
||||||
|
type Error = super::TryFromResponseError;
|
||||||
|
|
||||||
|
fn try_from(response: Response) -> Result<Self, Self::Error> {
|
||||||
|
match response {
|
||||||
|
Response::PreApproveInvoice(response) => Ok(response),
|
||||||
|
_ => Err(TryFromResponseError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ def load_jsonrpc_service(schema_dir: str):
|
|||||||
"Stop",
|
"Stop",
|
||||||
# "notifications", # No point in mapping this
|
# "notifications", # No point in mapping this
|
||||||
# "help",
|
# "help",
|
||||||
|
"PreApproveKeysend",
|
||||||
|
"PreApproveInvoice",
|
||||||
]
|
]
|
||||||
methods = [load_jsonrpc_method(name, schema_dir=schema_dir) for name in method_names]
|
methods = [load_jsonrpc_method(name, schema_dir=schema_dir) for name in method_names]
|
||||||
service = Service(name="Node", methods=methods)
|
service = Service(name="Node", methods=methods)
|
||||||
|
|||||||
@@ -1323,3 +1323,13 @@ def signmessage2py(m):
|
|||||||
def stop2py(m):
|
def stop2py(m):
|
||||||
return remove_default({
|
return remove_default({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def preapprovekeysend2py(m):
|
||||||
|
return remove_default({
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def preapproveinvoice2py(m):
|
||||||
|
return remove_default({
|
||||||
|
})
|
||||||
|
|||||||
504
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
504
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
File diff suppressed because one or more lines are too long
@@ -279,6 +279,16 @@ class NodeStub(object):
|
|||||||
request_serializer=node__pb2.StopRequest.SerializeToString,
|
request_serializer=node__pb2.StopRequest.SerializeToString,
|
||||||
response_deserializer=node__pb2.StopResponse.FromString,
|
response_deserializer=node__pb2.StopResponse.FromString,
|
||||||
)
|
)
|
||||||
|
self.PreApproveKeysend = channel.unary_unary(
|
||||||
|
'/cln.Node/PreApproveKeysend',
|
||||||
|
request_serializer=node__pb2.PreapprovekeysendRequest.SerializeToString,
|
||||||
|
response_deserializer=node__pb2.PreapprovekeysendResponse.FromString,
|
||||||
|
)
|
||||||
|
self.PreApproveInvoice = channel.unary_unary(
|
||||||
|
'/cln.Node/PreApproveInvoice',
|
||||||
|
request_serializer=node__pb2.PreapproveinvoiceRequest.SerializeToString,
|
||||||
|
response_deserializer=node__pb2.PreapproveinvoiceResponse.FromString,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class NodeServicer(object):
|
class NodeServicer(object):
|
||||||
@@ -602,6 +612,18 @@ class NodeServicer(object):
|
|||||||
context.set_details('Method not implemented!')
|
context.set_details('Method not implemented!')
|
||||||
raise NotImplementedError('Method not implemented!')
|
raise NotImplementedError('Method not implemented!')
|
||||||
|
|
||||||
|
def PreApproveKeysend(self, request, context):
|
||||||
|
"""Missing associated documentation comment in .proto file."""
|
||||||
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||||
|
context.set_details('Method not implemented!')
|
||||||
|
raise NotImplementedError('Method not implemented!')
|
||||||
|
|
||||||
|
def PreApproveInvoice(self, request, context):
|
||||||
|
"""Missing associated documentation comment in .proto file."""
|
||||||
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||||
|
context.set_details('Method not implemented!')
|
||||||
|
raise NotImplementedError('Method not implemented!')
|
||||||
|
|
||||||
|
|
||||||
def add_NodeServicer_to_server(servicer, server):
|
def add_NodeServicer_to_server(servicer, server):
|
||||||
rpc_method_handlers = {
|
rpc_method_handlers = {
|
||||||
@@ -870,6 +892,16 @@ def add_NodeServicer_to_server(servicer, server):
|
|||||||
request_deserializer=node__pb2.StopRequest.FromString,
|
request_deserializer=node__pb2.StopRequest.FromString,
|
||||||
response_serializer=node__pb2.StopResponse.SerializeToString,
|
response_serializer=node__pb2.StopResponse.SerializeToString,
|
||||||
),
|
),
|
||||||
|
'PreApproveKeysend': grpc.unary_unary_rpc_method_handler(
|
||||||
|
servicer.PreApproveKeysend,
|
||||||
|
request_deserializer=node__pb2.PreapprovekeysendRequest.FromString,
|
||||||
|
response_serializer=node__pb2.PreapprovekeysendResponse.SerializeToString,
|
||||||
|
),
|
||||||
|
'PreApproveInvoice': grpc.unary_unary_rpc_method_handler(
|
||||||
|
servicer.PreApproveInvoice,
|
||||||
|
request_deserializer=node__pb2.PreapproveinvoiceRequest.FromString,
|
||||||
|
response_serializer=node__pb2.PreapproveinvoiceResponse.SerializeToString,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
generic_handler = grpc.method_handlers_generic_handler(
|
generic_handler = grpc.method_handlers_generic_handler(
|
||||||
'cln.Node', rpc_method_handlers)
|
'cln.Node', rpc_method_handlers)
|
||||||
@@ -1780,3 +1812,37 @@ class Node(object):
|
|||||||
node__pb2.StopResponse.FromString,
|
node__pb2.StopResponse.FromString,
|
||||||
options, channel_credentials,
|
options, channel_credentials,
|
||||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def PreApproveKeysend(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, '/cln.Node/PreApproveKeysend',
|
||||||
|
node__pb2.PreapprovekeysendRequest.SerializeToString,
|
||||||
|
node__pb2.PreapprovekeysendResponse.FromString,
|
||||||
|
options, channel_credentials,
|
||||||
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def PreApproveInvoice(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, '/cln.Node/PreApproveInvoice',
|
||||||
|
node__pb2.PreapproveinvoiceRequest.SerializeToString,
|
||||||
|
node__pb2.PreapproveinvoiceResponse.FromString,
|
||||||
|
options, channel_credentials,
|
||||||
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10primitives.proto\x12\x03\x63ln\"\x16\n\x06\x41mount\x12\x0c\n\x04msat\x18\x01 \x01(\x04\"D\n\x0b\x41mountOrAll\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ll\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"D\n\x0b\x41mountOrAny\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ny\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"\x19\n\x17\x43hannelStateChangeCause\"(\n\x08Outpoint\x12\x0c\n\x04txid\x18\x01 \x01(\x0c\x12\x0e\n\x06outnum\x18\x02 \x01(\r\"h\n\x07\x46\x65\x65rate\x12\x0e\n\x04slow\x18\x01 \x01(\x08H\x00\x12\x10\n\x06normal\x18\x02 \x01(\x08H\x00\x12\x10\n\x06urgent\x18\x03 \x01(\x08H\x00\x12\x0f\n\x05perkb\x18\x04 \x01(\rH\x00\x12\x0f\n\x05perkw\x18\x05 \x01(\rH\x00\x42\x07\n\x05style\":\n\nOutputDesc\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x1b\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x0b.cln.Amount\"t\n\x08RouteHop\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x1c\n\x07\x66\x65\x65\x62\x61se\x18\x03 \x01(\x0b\x32\x0b.cln.Amount\x12\x0f\n\x07\x66\x65\x65prop\x18\x04 \x01(\r\x12\x13\n\x0b\x65xpirydelta\x18\x05 \x01(\r\"(\n\tRoutehint\x12\x1b\n\x04hops\x18\x01 \x03(\x0b\x32\r.cln.RouteHop\".\n\rRoutehintList\x12\x1d\n\x05hints\x18\x02 \x03(\x0b\x32\x0e.cln.Routehint\"\'\n\x08TlvEntry\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"+\n\tTlvStream\x12\x1e\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\r.cln.TlvEntry*$\n\x0b\x43hannelSide\x12\t\n\x05LOCAL\x10\x00\x12\n\n\x06REMOTE\x10\x01*\x84\x02\n\x0c\x43hannelState\x12\x0c\n\x08Openingd\x10\x00\x12\x1a\n\x16\x43hanneldAwaitingLockin\x10\x01\x12\x12\n\x0e\x43hanneldNormal\x10\x02\x12\x18\n\x14\x43hanneldShuttingDown\x10\x03\x12\x17\n\x13\x43losingdSigexchange\x10\x04\x12\x14\n\x10\x43losingdComplete\x10\x05\x12\x16\n\x12\x41waitingUnilateral\x10\x06\x12\x14\n\x10\x46undingSpendSeen\x10\x07\x12\x0b\n\x07Onchain\x10\x08\x12\x15\n\x11\x44ualopendOpenInit\x10\t\x12\x1b\n\x17\x44ualopendAwaitingLockin\x10\n*\x8a\x02\n\tHtlcState\x12\x0f\n\x0bSentAddHtlc\x10\x00\x12\x11\n\rSentAddCommit\x10\x01\x12\x15\n\x11RcvdAddRevocation\x10\x02\x12\x14\n\x10RcvdAddAckCommit\x10\x03\x12\x18\n\x14SentAddAckRevocation\x10\x04\x12\x18\n\x14RcvdAddAckRevocation\x10\x05\x12\x12\n\x0eRcvdRemoveHtlc\x10\x06\x12\x14\n\x10RcvdRemoveCommit\x10\x07\x12\x18\n\x14SentRemoveRevocation\x10\x08\x12\x17\n\x13SentRemoveAckCommit\x10\t\x12\x1b\n\x17RcvdRemoveAckRevocation\x10\nb\x06proto3')
|
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10primitives.proto\x12\x03\x63ln\"\x16\n\x06\x41mount\x12\x0c\n\x04msat\x18\x01 \x01(\x04\"D\n\x0b\x41mountOrAll\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ll\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"D\n\x0b\x41mountOrAny\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ny\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"\x19\n\x17\x43hannelStateChangeCause\"(\n\x08Outpoint\x12\x0c\n\x04txid\x18\x01 \x01(\x0c\x12\x0e\n\x06outnum\x18\x02 \x01(\r\"h\n\x07\x46\x65\x65rate\x12\x0e\n\x04slow\x18\x01 \x01(\x08H\x00\x12\x10\n\x06normal\x18\x02 \x01(\x08H\x00\x12\x10\n\x06urgent\x18\x03 \x01(\x08H\x00\x12\x0f\n\x05perkb\x18\x04 \x01(\rH\x00\x12\x0f\n\x05perkw\x18\x05 \x01(\rH\x00\x42\x07\n\x05style\":\n\nOutputDesc\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x1b\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x0b.cln.Amount\"t\n\x08RouteHop\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x1c\n\x07\x66\x65\x65\x62\x61se\x18\x03 \x01(\x0b\x32\x0b.cln.Amount\x12\x0f\n\x07\x66\x65\x65prop\x18\x04 \x01(\r\x12\x13\n\x0b\x65xpirydelta\x18\x05 \x01(\r\"(\n\tRoutehint\x12\x1b\n\x04hops\x18\x01 \x03(\x0b\x32\r.cln.RouteHop\".\n\rRoutehintList\x12\x1d\n\x05hints\x18\x02 \x03(\x0b\x32\x0e.cln.Routehint\"\'\n\x08TlvEntry\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"+\n\tTlvStream\x12\x1e\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\r.cln.TlvEntry*$\n\x0b\x43hannelSide\x12\t\n\x05LOCAL\x10\x00\x12\n\n\x06REMOTE\x10\x01*\x84\x02\n\x0c\x43hannelState\x12\x0c\n\x08Openingd\x10\x00\x12\x1a\n\x16\x43hanneldAwaitingLockin\x10\x01\x12\x12\n\x0e\x43hanneldNormal\x10\x02\x12\x18\n\x14\x43hanneldShuttingDown\x10\x03\x12\x17\n\x13\x43losingdSigexchange\x10\x04\x12\x14\n\x10\x43losingdComplete\x10\x05\x12\x16\n\x12\x41waitingUnilateral\x10\x06\x12\x14\n\x10\x46undingSpendSeen\x10\x07\x12\x0b\n\x07Onchain\x10\x08\x12\x15\n\x11\x44ualopendOpenInit\x10\t\x12\x1b\n\x17\x44ualopendAwaitingLockin\x10\n*\xea\x03\n\tHtlcState\x12\x0f\n\x0bSentAddHtlc\x10\x00\x12\x11\n\rSentAddCommit\x10\x01\x12\x15\n\x11RcvdAddRevocation\x10\x02\x12\x14\n\x10RcvdAddAckCommit\x10\x03\x12\x18\n\x14SentAddAckRevocation\x10\x04\x12\x18\n\x14RcvdAddAckRevocation\x10\x05\x12\x12\n\x0eRcvdRemoveHtlc\x10\x06\x12\x14\n\x10RcvdRemoveCommit\x10\x07\x12\x18\n\x14SentRemoveRevocation\x10\x08\x12\x17\n\x13SentRemoveAckCommit\x10\t\x12\x1b\n\x17RcvdRemoveAckRevocation\x10\n\x12\x11\n\rRCVD_ADD_HTLC\x10\x0b\x12\x13\n\x0fRCVD_ADD_COMMIT\x10\x0c\x12\x17\n\x13SENT_ADD_REVOCATION\x10\r\x12\x17\n\x13SENT_ADD_ACK_COMMIT\x10\x0e\x12\x14\n\x10SENT_REMOVE_HTLC\x10\x0f\x12\x16\n\x12SENT_REMOVE_COMMIT\x10\x10\x12\x1a\n\x16RCVD_REMOVE_REVOCATION\x10\x11\x12\x1a\n\x16RCVD_REMOVE_ACK_COMMIT\x10\x12\x12\x1e\n\x1aSENT_REMOVE_ACK_REVOCATION\x10\x13\x62\x06proto3')
|
||||||
|
|
||||||
_CHANNELSIDE = DESCRIPTOR.enum_types_by_name['ChannelSide']
|
_CHANNELSIDE = DESCRIPTOR.enum_types_by_name['ChannelSide']
|
||||||
ChannelSide = enum_type_wrapper.EnumTypeWrapper(_CHANNELSIDE)
|
ChannelSide = enum_type_wrapper.EnumTypeWrapper(_CHANNELSIDE)
|
||||||
@@ -47,6 +47,15 @@ RcvdRemoveCommit = 7
|
|||||||
SentRemoveRevocation = 8
|
SentRemoveRevocation = 8
|
||||||
SentRemoveAckCommit = 9
|
SentRemoveAckCommit = 9
|
||||||
RcvdRemoveAckRevocation = 10
|
RcvdRemoveAckRevocation = 10
|
||||||
|
RCVD_ADD_HTLC = 11
|
||||||
|
RCVD_ADD_COMMIT = 12
|
||||||
|
SENT_ADD_REVOCATION = 13
|
||||||
|
SENT_ADD_ACK_COMMIT = 14
|
||||||
|
SENT_REMOVE_HTLC = 15
|
||||||
|
SENT_REMOVE_COMMIT = 16
|
||||||
|
RCVD_REMOVE_REVOCATION = 17
|
||||||
|
RCVD_REMOVE_ACK_COMMIT = 18
|
||||||
|
SENT_REMOVE_ACK_REVOCATION = 19
|
||||||
|
|
||||||
|
|
||||||
_AMOUNT = DESCRIPTOR.message_types_by_name['Amount']
|
_AMOUNT = DESCRIPTOR.message_types_by_name['Amount']
|
||||||
@@ -153,7 +162,7 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|||||||
_CHANNELSTATE._serialized_start=757
|
_CHANNELSTATE._serialized_start=757
|
||||||
_CHANNELSTATE._serialized_end=1017
|
_CHANNELSTATE._serialized_end=1017
|
||||||
_HTLCSTATE._serialized_start=1020
|
_HTLCSTATE._serialized_start=1020
|
||||||
_HTLCSTATE._serialized_end=1286
|
_HTLCSTATE._serialized_end=1510
|
||||||
_AMOUNT._serialized_start=25
|
_AMOUNT._serialized_start=25
|
||||||
_AMOUNT._serialized_end=47
|
_AMOUNT._serialized_end=47
|
||||||
_AMOUNTORALL._serialized_start=49
|
_AMOUNTORALL._serialized_start=49
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ RESOURCES
|
|||||||
|
|
||||||
Main web site: <https://github.com/ElementsProject/lightning>
|
Main web site: <https://github.com/ElementsProject/lightning>
|
||||||
|
|
||||||
[comment]: # ( SHA256STAMP:41d0ca6a956520453538c8ad5c5afce681540f4ce26017570cdc2356c3aab599)
|
[comment]: # ( SHA256STAMP:19cf1a28402f36cace4b0f667ac9ab97d53dcee78e0ae4fca6d7b1dccd797adb)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
"added": "v23.02",
|
||||||
"required": [
|
"required": [
|
||||||
"bolt11"
|
"bolt11"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
"added": "v23.02",
|
||||||
"properties": {}
|
"properties": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
"added": "v23.02",
|
||||||
"required": [
|
"required": [
|
||||||
"destination",
|
"destination",
|
||||||
"payment_hash",
|
"payment_hash",
|
||||||
|
|||||||
Reference in New Issue
Block a user