mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
msggen: add renepaystatus method
Changelog-None
This commit is contained in:
parent
9538ecccad
commit
54e1c78e46
80
.msggen.json
80
.msggen.json
@ -408,6 +408,11 @@
|
||||
"failed": 2,
|
||||
"pending": 1
|
||||
},
|
||||
"RenepaystatusPaystatusStatus": {
|
||||
"complete": 0,
|
||||
"failed": 2,
|
||||
"pending": 1
|
||||
},
|
||||
"SendonionStatus": {
|
||||
"complete": 1,
|
||||
"pending": 0
|
||||
@ -2157,6 +2162,25 @@
|
||||
"RenePay.payment_preimage": 1,
|
||||
"RenePay.status": 7
|
||||
},
|
||||
"RenepaystatusPaystatus": {
|
||||
"RenePayStatus.paystatus[].amount_msat": 7,
|
||||
"RenePayStatus.paystatus[].amount_sent_msat": 8,
|
||||
"RenePayStatus.paystatus[].bolt11": 1,
|
||||
"RenePayStatus.paystatus[].created_at": 4,
|
||||
"RenePayStatus.paystatus[].destination": 10,
|
||||
"RenePayStatus.paystatus[].groupid": 5,
|
||||
"RenePayStatus.paystatus[].notes[]": 11,
|
||||
"RenePayStatus.paystatus[].parts": 6,
|
||||
"RenePayStatus.paystatus[].payment_hash": 3,
|
||||
"RenePayStatus.paystatus[].payment_preimage": 2,
|
||||
"RenePayStatus.paystatus[].status": 9
|
||||
},
|
||||
"RenepaystatusRequest": {
|
||||
"RenePayStatus.invstring": 1
|
||||
},
|
||||
"RenepaystatusResponse": {
|
||||
"RenePayStatus.paystatus[]": 1
|
||||
},
|
||||
"SendcustommsgRequest": {
|
||||
"SendCustomMsg.msg": 2,
|
||||
"SendCustomMsg.node_id": 1
|
||||
@ -7612,6 +7636,62 @@
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
},
|
||||
"RenePayStatus.invstring": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[]": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].amount_msat": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].amount_sent_msat": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].bolt11": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].created_at": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].destination": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].groupid": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].notes[]": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].parts": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].payment_hash": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].payment_preimage": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"RenePayStatus.paystatus[].status": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"SendCustomMsg": {
|
||||
"added": "v0.10.1",
|
||||
"deprecated": null
|
||||
|
BIN
cln-grpc/proto/node.proto
generated
BIN
cln-grpc/proto/node.proto
generated
Binary file not shown.
BIN
cln-grpc/src/convert.rs
generated
BIN
cln-grpc/src/convert.rs
generated
Binary file not shown.
@ -2202,6 +2202,38 @@ async fn plugin(
|
||||
|
||||
}
|
||||
|
||||
async fn rene_pay_status(
|
||||
&self,
|
||||
request: tonic::Request<pb::RenepaystatusRequest>,
|
||||
) -> Result<tonic::Response<pb::RenepaystatusResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::RenepaystatusRequest = req.into();
|
||||
debug!("Client asked for rene_pay_status");
|
||||
trace!("rene_pay_status 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::RenePayStatus(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method RenePayStatus: {:?}", e)))?;
|
||||
match result {
|
||||
Response::RenePayStatus(r) => {
|
||||
trace!("rene_pay_status response: {:?}", r);
|
||||
Ok(tonic::Response::new(r.into()))
|
||||
},
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call RenePayStatus",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn rene_pay(
|
||||
&self,
|
||||
request: tonic::Request<pb::RenepayRequest>,
|
||||
|
BIN
cln-rpc/src/model.rs
generated
BIN
cln-rpc/src/model.rs
generated
Binary file not shown.
@ -129,6 +129,7 @@ def load_jsonrpc_service():
|
||||
# "parsefeerate",
|
||||
"Ping",
|
||||
"Plugin",
|
||||
"RenePayStatus",
|
||||
"RenePay",
|
||||
# "reserveinputs",
|
||||
"SendCustomMsg",
|
||||
|
File diff suppressed because one or more lines are too long
@ -354,6 +354,11 @@ class NodeStub(object):
|
||||
request_serializer=node__pb2.PluginRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.PluginResponse.FromString,
|
||||
)
|
||||
self.RenePayStatus = channel.unary_unary(
|
||||
'/cln.Node/RenePayStatus',
|
||||
request_serializer=node__pb2.RenepaystatusRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.RenepaystatusResponse.FromString,
|
||||
)
|
||||
self.RenePay = channel.unary_unary(
|
||||
'/cln.Node/RenePay',
|
||||
request_serializer=node__pb2.RenepayRequest.SerializeToString,
|
||||
@ -852,6 +857,12 @@ class NodeServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def RenePayStatus(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 RenePay(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
@ -1297,6 +1308,11 @@ def add_NodeServicer_to_server(servicer, server):
|
||||
request_deserializer=node__pb2.PluginRequest.FromString,
|
||||
response_serializer=node__pb2.PluginResponse.SerializeToString,
|
||||
),
|
||||
'RenePayStatus': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.RenePayStatus,
|
||||
request_deserializer=node__pb2.RenepaystatusRequest.FromString,
|
||||
response_serializer=node__pb2.RenepaystatusResponse.SerializeToString,
|
||||
),
|
||||
'RenePay': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.RenePay,
|
||||
request_deserializer=node__pb2.RenepayRequest.FromString,
|
||||
@ -2548,6 +2564,23 @@ class Node(object):
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def RenePayStatus(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/RenePayStatus',
|
||||
node__pb2.RenepaystatusRequest.SerializeToString,
|
||||
node__pb2.RenepaystatusResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def RenePay(request,
|
||||
target,
|
||||
|
@ -1715,6 +1715,28 @@ def plugin2py(m):
|
||||
})
|
||||
|
||||
|
||||
def renepaystatus_paystatus2py(m):
|
||||
return remove_default({
|
||||
"notes": [m.notes for i in m.notes], # ArrayField[primitive] in generate_composite
|
||||
"status": str(m.status), # EnumField in generate_composite
|
||||
"amount_msat": amount2msat(m.amount_msat), # PrimitiveField in generate_composite
|
||||
"amount_sent_msat": amount2msat(m.amount_sent_msat), # PrimitiveField in generate_composite
|
||||
"bolt11": m.bolt11, # PrimitiveField in generate_composite
|
||||
"created_at": m.created_at, # PrimitiveField in generate_composite
|
||||
"destination": hexlify(m.destination), # PrimitiveField in generate_composite
|
||||
"groupid": m.groupid, # PrimitiveField in generate_composite
|
||||
"parts": m.parts, # PrimitiveField in generate_composite
|
||||
"payment_hash": hexlify(m.payment_hash), # PrimitiveField in generate_composite
|
||||
"payment_preimage": hexlify(m.payment_preimage), # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def renepaystatus2py(m):
|
||||
return remove_default({
|
||||
"paystatus": [renepaystatus_paystatus2py(i) for i in m.paystatus], # ArrayField[composite] in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def renepay2py(m):
|
||||
return remove_default({
|
||||
"status": str(m.status), # EnumField in generate_composite
|
||||
|
Loading…
Reference in New Issue
Block a user