mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
rpc: Regenerate derived files after adding bkpr-listincome
This commit is contained in:
parent
19af808f45
commit
5924509813
80
.msggen.json
80
.msggen.json
@ -369,6 +369,26 @@
|
||||
"AutoCleanInvoice.enabled": 1,
|
||||
"AutoCleanInvoice.expired_by": 2
|
||||
},
|
||||
"Bkpr-listincomeIncome_events": {
|
||||
"Bkpr-ListIncome.income_events[].account": 1,
|
||||
"Bkpr-ListIncome.income_events[].credit_msat": 3,
|
||||
"Bkpr-ListIncome.income_events[].currency": 5,
|
||||
"Bkpr-ListIncome.income_events[].debit_msat": 4,
|
||||
"Bkpr-ListIncome.income_events[].description": 7,
|
||||
"Bkpr-ListIncome.income_events[].outpoint": 8,
|
||||
"Bkpr-ListIncome.income_events[].payment_id": 10,
|
||||
"Bkpr-ListIncome.income_events[].tag": 2,
|
||||
"Bkpr-ListIncome.income_events[].timestamp": 6,
|
||||
"Bkpr-ListIncome.income_events[].txid": 9
|
||||
},
|
||||
"Bkpr-listincomeRequest": {
|
||||
"Bkpr-ListIncome.consolidate_fees": 1,
|
||||
"Bkpr-ListIncome.end_time": 3,
|
||||
"Bkpr-ListIncome.start_time": 2
|
||||
},
|
||||
"Bkpr-listincomeResponse": {
|
||||
"Bkpr-ListIncome.income_events[]": 1
|
||||
},
|
||||
"CheckmessageRequest": {
|
||||
"CheckMessage.message": 1,
|
||||
"CheckMessage.pubkey": 3,
|
||||
@ -1798,6 +1818,66 @@
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
},
|
||||
"Bkpr-ListIncome.consolidate_fees": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.end_time": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[]": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].account": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].credit_msat": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].currency": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].debit_msat": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].description": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].outpoint": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].payment_id": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].tag": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].timestamp": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.income_events[].txid": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Bkpr-ListIncome.start_time": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"CheckMessage": {
|
||||
"added": "pre-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.
@ -1978,4 +1978,36 @@ async fn static_backup(
|
||||
|
||||
}
|
||||
|
||||
async fn bkpr_list_income(
|
||||
&self,
|
||||
request: tonic::Request<pb::BkprlistincomeRequest>,
|
||||
) -> Result<tonic::Response<pb::BkprlistincomeResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::BkprlistincomeRequest = req.into();
|
||||
debug!("Client asked for bkpr_list_income");
|
||||
trace!("bkpr_list_income 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::BkprListIncome(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method BkprListIncome: {:?}", e)))?;
|
||||
match result {
|
||||
Response::BkprListIncome(r) => {
|
||||
trace!("bkpr_list_income response: {:?}", r);
|
||||
Ok(tonic::Response::new(r.into()))
|
||||
},
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call BkprListIncome",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
cln-rpc/src/model.rs
generated
BIN
cln-rpc/src/model.rs
generated
Binary file not shown.
@ -114,6 +114,7 @@ def load_jsonrpc_service(schema_dir: str):
|
||||
"PreApproveKeysend",
|
||||
"PreApproveInvoice",
|
||||
"StaticBackup",
|
||||
"Bkpr-ListIncome",
|
||||
]
|
||||
methods = [load_jsonrpc_method(name, schema_dir=schema_dir) for name in method_names]
|
||||
service = Service(name="Node", methods=methods)
|
||||
|
File diff suppressed because one or more lines are too long
@ -319,6 +319,11 @@ class NodeStub(object):
|
||||
request_serializer=node__pb2.StaticbackupRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.StaticbackupResponse.FromString,
|
||||
)
|
||||
self.BkprListIncome = channel.unary_unary(
|
||||
'/cln.Node/BkprListIncome',
|
||||
request_serializer=node__pb2.BkprlistincomeRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.BkprlistincomeResponse.FromString,
|
||||
)
|
||||
|
||||
|
||||
class NodeServicer(object):
|
||||
@ -690,6 +695,12 @@ class NodeServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def BkprListIncome(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):
|
||||
rpc_method_handlers = {
|
||||
@ -998,6 +1009,11 @@ def add_NodeServicer_to_server(servicer, server):
|
||||
request_deserializer=node__pb2.StaticbackupRequest.FromString,
|
||||
response_serializer=node__pb2.StaticbackupResponse.SerializeToString,
|
||||
),
|
||||
'BkprListIncome': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.BkprListIncome,
|
||||
request_deserializer=node__pb2.BkprlistincomeRequest.FromString,
|
||||
response_serializer=node__pb2.BkprlistincomeResponse.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'cln.Node', rpc_method_handlers)
|
||||
@ -2044,3 +2060,20 @@ class Node(object):
|
||||
node__pb2.StaticbackupResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def BkprListIncome(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/BkprListIncome',
|
||||
node__pb2.BkprlistincomeRequest.SerializeToString,
|
||||
node__pb2.BkprlistincomeResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
@ -1502,3 +1502,24 @@ def staticbackup2py(m):
|
||||
return remove_default({
|
||||
"scb": [hexlify(m.scb) for i in hexlify(m.scb)], # ArrayField[primitive] in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def bkpr_listincome_income_events2py(m):
|
||||
return remove_default({
|
||||
"account": m.account, # PrimitiveField in generate_composite
|
||||
"tag": m.tag, # PrimitiveField in generate_composite
|
||||
"credit_msat": amount2msat(m.credit_msat), # PrimitiveField in generate_composite
|
||||
"debit_msat": amount2msat(m.debit_msat), # PrimitiveField in generate_composite
|
||||
"currency": m.currency, # PrimitiveField in generate_composite
|
||||
"timestamp": m.timestamp, # PrimitiveField in generate_composite
|
||||
"description": m.description, # PrimitiveField in generate_composite
|
||||
"outpoint": m.outpoint, # PrimitiveField in generate_composite
|
||||
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
|
||||
"payment_id": hexlify(m.payment_id), # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def bkpr_listincome2py(m):
|
||||
return remove_default({
|
||||
"income_events": [bkpr_listincome_income_events2py(i) for i in m.income_events], # ArrayField[composite] in generate_composite
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user