Skip to content

Commit

Permalink
msggen: add renepaystatus method
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
daywalker90 authored and cdecker committed May 13, 2024
1 parent 9538ecc commit 54e1c78
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 105 deletions.
80 changes: 80 additions & 0 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@
"failed": 2,
"pending": 1
},
"RenepaystatusPaystatusStatus": {
"complete": 0,
"failed": 2,
"pending": 1
},
"SendonionStatus": {
"complete": 1,
"pending": 0
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions cln-grpc/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
94 changes: 94 additions & 0 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions contrib/msggen/msggen/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def load_jsonrpc_service():
# "parsefeerate",
"Ping",
"Plugin",
"RenePayStatus",
"RenePay",
# "reserveinputs",
"SendCustomMsg",
Expand Down
218 changes: 113 additions & 105 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit 54e1c78

Please sign in to comment.