msggen: add missing bkpr-* methods

Changelog-None
This commit is contained in:
daywalker90 2024-04-23 17:53:04 +02:00 committed by Christian Decker
parent 3189ff6a6d
commit 14fea4b72b
10 changed files with 937 additions and 10 deletions

View File

@ -1,5 +1,16 @@
{ {
"grpc-enum-map": { "grpc-enum-map": {
"Bkpr-dumpincomecsvCsv_format": {
"cointracker": 0,
"harmony": 2,
"koinly": 1,
"quickbooks": 3
},
"Bkpr-listaccounteventsEventsType": {
"chain": 1,
"channel": 2,
"onchain_fee": 0
},
"CloseType": { "CloseType": {
"mutual": 0, "mutual": 0,
"unilateral": 1, "unilateral": 1,
@ -514,6 +525,113 @@
"AutoCleanInvoice.enabled": 1, "AutoCleanInvoice.enabled": 1,
"AutoCleanInvoice.expired_by": 2 "AutoCleanInvoice.expired_by": 2
}, },
"Bkpr-channelsapyChannels_apy": {
"Bkpr-ChannelsApy.channels_apy[].account": 1,
"Bkpr-ChannelsApy.channels_apy[].apy_in": 18,
"Bkpr-ChannelsApy.channels_apy[].apy_in_initial": 19,
"Bkpr-ChannelsApy.channels_apy[].apy_lease": 22,
"Bkpr-ChannelsApy.channels_apy[].apy_out": 16,
"Bkpr-ChannelsApy.channels_apy[].apy_out_initial": 17,
"Bkpr-ChannelsApy.channels_apy[].apy_total": 20,
"Bkpr-ChannelsApy.channels_apy[].apy_total_initial": 21,
"Bkpr-ChannelsApy.channels_apy[].channel_start_balance_msat": 9,
"Bkpr-ChannelsApy.channels_apy[].fees_in_msat": 11,
"Bkpr-ChannelsApy.channels_apy[].fees_out_msat": 10,
"Bkpr-ChannelsApy.channels_apy[].lease_fee_earned_msat": 5,
"Bkpr-ChannelsApy.channels_apy[].lease_fee_paid_msat": 4,
"Bkpr-ChannelsApy.channels_apy[].our_start_balance_msat": 8,
"Bkpr-ChannelsApy.channels_apy[].pushed_in_msat": 7,
"Bkpr-ChannelsApy.channels_apy[].pushed_out_msat": 6,
"Bkpr-ChannelsApy.channels_apy[].routed_in_msat": 3,
"Bkpr-ChannelsApy.channels_apy[].routed_out_msat": 2,
"Bkpr-ChannelsApy.channels_apy[].utilization_in": 14,
"Bkpr-ChannelsApy.channels_apy[].utilization_in_initial": 15,
"Bkpr-ChannelsApy.channels_apy[].utilization_out": 12,
"Bkpr-ChannelsApy.channels_apy[].utilization_out_initial": 13
},
"Bkpr-channelsapyRequest": {
"Bkpr-ChannelsApy.end_time": 2,
"Bkpr-ChannelsApy.start_time": 1
},
"Bkpr-channelsapyResponse": {
"Bkpr-ChannelsApy.channels_apy[]": 1
},
"Bkpr-dumpincomecsvRequest": {
"Bkpr-DumpIncomeCsv.consolidate_fees": 3,
"Bkpr-DumpIncomeCsv.csv_file": 2,
"Bkpr-DumpIncomeCsv.csv_format": 1,
"Bkpr-DumpIncomeCsv.end_time": 5,
"Bkpr-DumpIncomeCsv.start_time": 4
},
"Bkpr-dumpincomecsvResponse": {
"Bkpr-DumpIncomeCsv.csv_file": 1,
"Bkpr-DumpIncomeCsv.csv_format": 2
},
"Bkpr-inspectRequest": {
"Bkpr-Inspect.account": 1
},
"Bkpr-inspectResponse": {
"Bkpr-Inspect.txs[]": 1
},
"Bkpr-inspectTxs": {
"Bkpr-Inspect.txs[].blockheight": 2,
"Bkpr-Inspect.txs[].fees_paid_msat": 3,
"Bkpr-Inspect.txs[].outputs[]": 4,
"Bkpr-Inspect.txs[].txid": 1
},
"Bkpr-inspectTxsOutputs": {
"Bkpr-Inspect.txs[].outputs[].account": 1,
"Bkpr-Inspect.txs[].outputs[].credit_msat": 5,
"Bkpr-Inspect.txs[].outputs[].currency": 4,
"Bkpr-Inspect.txs[].outputs[].debit_msat": 6,
"Bkpr-Inspect.txs[].outputs[].originating_account": 7,
"Bkpr-Inspect.txs[].outputs[].outnum": 2,
"Bkpr-Inspect.txs[].outputs[].output_tag": 8,
"Bkpr-Inspect.txs[].outputs[].output_value_msat": 3,
"Bkpr-Inspect.txs[].outputs[].payment_id": 11,
"Bkpr-Inspect.txs[].outputs[].spend_tag": 9,
"Bkpr-Inspect.txs[].outputs[].spending_txid": 10
},
"Bkpr-listaccounteventsEvents": {
"Bkpr-ListAccountEvents.events[].account": 1,
"Bkpr-ListAccountEvents.events[].blockheight": 9,
"Bkpr-ListAccountEvents.events[].credit_msat": 4,
"Bkpr-ListAccountEvents.events[].currency": 6,
"Bkpr-ListAccountEvents.events[].debit_msat": 5,
"Bkpr-ListAccountEvents.events[].description": 13,
"Bkpr-ListAccountEvents.events[].fees_msat": 14,
"Bkpr-ListAccountEvents.events[].is_rebalance": 15,
"Bkpr-ListAccountEvents.events[].origin": 10,
"Bkpr-ListAccountEvents.events[].outpoint": 8,
"Bkpr-ListAccountEvents.events[].part_id": 16,
"Bkpr-ListAccountEvents.events[].payment_id": 11,
"Bkpr-ListAccountEvents.events[].tag": 3,
"Bkpr-ListAccountEvents.events[].timestamp": 7,
"Bkpr-ListAccountEvents.events[].txid": 12,
"Bkpr-ListAccountEvents.events[].type": 2
},
"Bkpr-listaccounteventsRequest": {
"Bkpr-ListAccountEvents.account": 1
},
"Bkpr-listaccounteventsResponse": {
"Bkpr-ListAccountEvents.events[]": 1
},
"Bkpr-listbalancesAccounts": {
"Bkpr-ListBalances.accounts[].account": 1,
"Bkpr-ListBalances.accounts[].account_closed": 5,
"Bkpr-ListBalances.accounts[].account_resolved": 6,
"Bkpr-ListBalances.accounts[].balances[]": 2,
"Bkpr-ListBalances.accounts[].peer_id": 3,
"Bkpr-ListBalances.accounts[].resolved_at_block": 7,
"Bkpr-ListBalances.accounts[].we_opened": 4
},
"Bkpr-listbalancesAccountsBalances": {
"Bkpr-ListBalances.accounts[].balances[].balance_msat": 1,
"Bkpr-ListBalances.accounts[].balances[].coin_type": 2
},
"Bkpr-listbalancesResponse": {
"Bkpr-ListBalances.accounts[]": 1
},
"Bkpr-listincomeIncome_events": { "Bkpr-listincomeIncome_events": {
"Bkpr-ListIncome.income_events[].account": 1, "Bkpr-ListIncome.income_events[].account": 1,
"Bkpr-ListIncome.income_events[].credit_msat": 3, "Bkpr-ListIncome.income_events[].credit_msat": 3,
@ -2516,6 +2634,326 @@
"added": "pre-v0.10.1", "added": "pre-v0.10.1",
"deprecated": false "deprecated": false
}, },
"Bkpr-ChannelsApy": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Bkpr-ChannelsApy.channels_apy[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_in": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_in_initial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_lease": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_out": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_out_initial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_total": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].apy_total_initial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].channel_start_balance_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].fees_in_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].fees_out_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].lease_fee_earned_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].lease_fee_paid_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].our_start_balance_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].pushed_in_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].pushed_out_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].routed_in_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].routed_out_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].utilization_in": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].utilization_in_initial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].utilization_out": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.channels_apy[].utilization_out_initial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.end_time": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ChannelsApy.start_time": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-DumpIncomeCsv": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Bkpr-DumpIncomeCsv.consolidate_fees": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-DumpIncomeCsv.csv_file": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-DumpIncomeCsv.csv_format": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-DumpIncomeCsv.end_time": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-DumpIncomeCsv.start_time": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Bkpr-Inspect.account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].blockheight": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].fees_paid_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].credit_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].currency": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].debit_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].originating_account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].outnum": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].output_tag": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].output_value_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].payment_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].spend_tag": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].outputs[].spending_txid": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-Inspect.txs[].txid": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Bkpr-ListAccountEvents.account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].blockheight": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].credit_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].currency": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].debit_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].description": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].fees_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].is_rebalance": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].origin": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].outpoint": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].part_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].payment_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].tag": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].timestamp": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].txid": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListAccountEvents.events[].type": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Bkpr-ListBalances.accounts[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].account": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].account_closed": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].account_resolved": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].balances[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].balances[].balance_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].balances[].coin_type": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].peer_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].resolved_at_block": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListBalances.accounts[].we_opened": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Bkpr-ListIncome": { "Bkpr-ListIncome": {
"added": "pre-v0.10.1", "added": "pre-v0.10.1",
"deprecated": null "deprecated": null

Binary file not shown.

BIN
cln-grpc/src/convert.rs generated

Binary file not shown.

View File

@ -2490,6 +2490,166 @@ async fn static_backup(
} }
async fn bkpr_channels_apy(
&self,
request: tonic::Request<pb::BkprchannelsapyRequest>,
) -> Result<tonic::Response<pb::BkprchannelsapyResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::BkprchannelsapyRequest = req.into();
debug!("Client asked for bkpr_channels_apy");
trace!("bkpr_channels_apy 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::BkprChannelsApy(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method BkprChannelsApy: {:?}", e)))?;
match result {
Response::BkprChannelsApy(r) => {
trace!("bkpr_channels_apy response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call BkprChannelsApy",
r
)
)),
}
}
async fn bkpr_dump_income_csv(
&self,
request: tonic::Request<pb::BkprdumpincomecsvRequest>,
) -> Result<tonic::Response<pb::BkprdumpincomecsvResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::BkprdumpincomecsvRequest = req.into();
debug!("Client asked for bkpr_dump_income_csv");
trace!("bkpr_dump_income_csv 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::BkprDumpIncomeCsv(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method BkprDumpIncomeCsv: {:?}", e)))?;
match result {
Response::BkprDumpIncomeCsv(r) => {
trace!("bkpr_dump_income_csv response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call BkprDumpIncomeCsv",
r
)
)),
}
}
async fn bkpr_inspect(
&self,
request: tonic::Request<pb::BkprinspectRequest>,
) -> Result<tonic::Response<pb::BkprinspectResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::BkprinspectRequest = req.into();
debug!("Client asked for bkpr_inspect");
trace!("bkpr_inspect 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::BkprInspect(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method BkprInspect: {:?}", e)))?;
match result {
Response::BkprInspect(r) => {
trace!("bkpr_inspect response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call BkprInspect",
r
)
)),
}
}
async fn bkpr_list_account_events(
&self,
request: tonic::Request<pb::BkprlistaccounteventsRequest>,
) -> Result<tonic::Response<pb::BkprlistaccounteventsResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::BkprlistaccounteventsRequest = req.into();
debug!("Client asked for bkpr_list_account_events");
trace!("bkpr_list_account_events 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::BkprListAccountEvents(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method BkprListAccountEvents: {:?}", e)))?;
match result {
Response::BkprListAccountEvents(r) => {
trace!("bkpr_list_account_events response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call BkprListAccountEvents",
r
)
)),
}
}
async fn bkpr_list_balances(
&self,
request: tonic::Request<pb::BkprlistbalancesRequest>,
) -> Result<tonic::Response<pb::BkprlistbalancesResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::BkprlistbalancesRequest = req.into();
debug!("Client asked for bkpr_list_balances");
trace!("bkpr_list_balances 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::BkprListBalances(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method BkprListBalances: {:?}", e)))?;
match result {
Response::BkprListBalances(r) => {
trace!("bkpr_list_balances response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call BkprListBalances",
r
)
)),
}
}
async fn bkpr_list_income( async fn bkpr_list_income(
&self, &self,
request: tonic::Request<pb::BkprlistincomeRequest>, request: tonic::Request<pb::BkprlistincomeRequest>,

BIN
cln-rpc/src/model.rs generated

Binary file not shown.

View File

@ -763,7 +763,7 @@ mod test {
}); });
let p: FundchannelResponse = serde_json::from_value(r).unwrap(); let p: FundchannelResponse = serde_json::from_value(r).unwrap();
assert_eq!(p.channel_type.unwrap().bits, Some(vec![1,3,5])); assert_eq!(p.channel_type.unwrap().bits, Some(vec![1, 3, 5]));
} }
} }

View File

@ -147,6 +147,11 @@ def load_jsonrpc_service():
"PreApproveKeysend", "PreApproveKeysend",
"PreApproveInvoice", "PreApproveInvoice",
"StaticBackup", "StaticBackup",
"Bkpr-ChannelsApy",
"Bkpr-DumpIncomeCsv",
"Bkpr-Inspect",
"Bkpr-ListAccountEvents",
"Bkpr-ListBalances",
"Bkpr-ListIncome", "Bkpr-ListIncome",
] ]
methods = [load_jsonrpc_method(name) for name in method_names] methods = [load_jsonrpc_method(name) for name in method_names]

File diff suppressed because one or more lines are too long

View File

@ -399,6 +399,31 @@ class NodeStub(object):
request_serializer=node__pb2.StaticbackupRequest.SerializeToString, request_serializer=node__pb2.StaticbackupRequest.SerializeToString,
response_deserializer=node__pb2.StaticbackupResponse.FromString, response_deserializer=node__pb2.StaticbackupResponse.FromString,
) )
self.BkprChannelsApy = channel.unary_unary(
'/cln.Node/BkprChannelsApy',
request_serializer=node__pb2.BkprchannelsapyRequest.SerializeToString,
response_deserializer=node__pb2.BkprchannelsapyResponse.FromString,
)
self.BkprDumpIncomeCsv = channel.unary_unary(
'/cln.Node/BkprDumpIncomeCsv',
request_serializer=node__pb2.BkprdumpincomecsvRequest.SerializeToString,
response_deserializer=node__pb2.BkprdumpincomecsvResponse.FromString,
)
self.BkprInspect = channel.unary_unary(
'/cln.Node/BkprInspect',
request_serializer=node__pb2.BkprinspectRequest.SerializeToString,
response_deserializer=node__pb2.BkprinspectResponse.FromString,
)
self.BkprListAccountEvents = channel.unary_unary(
'/cln.Node/BkprListAccountEvents',
request_serializer=node__pb2.BkprlistaccounteventsRequest.SerializeToString,
response_deserializer=node__pb2.BkprlistaccounteventsResponse.FromString,
)
self.BkprListBalances = channel.unary_unary(
'/cln.Node/BkprListBalances',
request_serializer=node__pb2.BkprlistbalancesRequest.SerializeToString,
response_deserializer=node__pb2.BkprlistbalancesResponse.FromString,
)
self.BkprListIncome = channel.unary_unary( self.BkprListIncome = channel.unary_unary(
'/cln.Node/BkprListIncome', '/cln.Node/BkprListIncome',
request_serializer=node__pb2.BkprlistincomeRequest.SerializeToString, request_serializer=node__pb2.BkprlistincomeRequest.SerializeToString,
@ -871,6 +896,36 @@ 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 BkprChannelsApy(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 BkprDumpIncomeCsv(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 BkprInspect(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 BkprListAccountEvents(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 BkprListBalances(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 BkprListIncome(self, request, context): def BkprListIncome(self, request, context):
"""Missing associated documentation comment in .proto file.""" """Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@ -1265,6 +1320,31 @@ def add_NodeServicer_to_server(servicer, server):
request_deserializer=node__pb2.StaticbackupRequest.FromString, request_deserializer=node__pb2.StaticbackupRequest.FromString,
response_serializer=node__pb2.StaticbackupResponse.SerializeToString, response_serializer=node__pb2.StaticbackupResponse.SerializeToString,
), ),
'BkprChannelsApy': grpc.unary_unary_rpc_method_handler(
servicer.BkprChannelsApy,
request_deserializer=node__pb2.BkprchannelsapyRequest.FromString,
response_serializer=node__pb2.BkprchannelsapyResponse.SerializeToString,
),
'BkprDumpIncomeCsv': grpc.unary_unary_rpc_method_handler(
servicer.BkprDumpIncomeCsv,
request_deserializer=node__pb2.BkprdumpincomecsvRequest.FromString,
response_serializer=node__pb2.BkprdumpincomecsvResponse.SerializeToString,
),
'BkprInspect': grpc.unary_unary_rpc_method_handler(
servicer.BkprInspect,
request_deserializer=node__pb2.BkprinspectRequest.FromString,
response_serializer=node__pb2.BkprinspectResponse.SerializeToString,
),
'BkprListAccountEvents': grpc.unary_unary_rpc_method_handler(
servicer.BkprListAccountEvents,
request_deserializer=node__pb2.BkprlistaccounteventsRequest.FromString,
response_serializer=node__pb2.BkprlistaccounteventsResponse.SerializeToString,
),
'BkprListBalances': grpc.unary_unary_rpc_method_handler(
servicer.BkprListBalances,
request_deserializer=node__pb2.BkprlistbalancesRequest.FromString,
response_serializer=node__pb2.BkprlistbalancesResponse.SerializeToString,
),
'BkprListIncome': grpc.unary_unary_rpc_method_handler( 'BkprListIncome': grpc.unary_unary_rpc_method_handler(
servicer.BkprListIncome, servicer.BkprListIncome,
request_deserializer=node__pb2.BkprlistincomeRequest.FromString, request_deserializer=node__pb2.BkprlistincomeRequest.FromString,
@ -2589,6 +2669,91 @@ class Node(object):
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 BkprChannelsApy(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/BkprChannelsApy',
node__pb2.BkprchannelsapyRequest.SerializeToString,
node__pb2.BkprchannelsapyResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def BkprDumpIncomeCsv(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/BkprDumpIncomeCsv',
node__pb2.BkprdumpincomecsvRequest.SerializeToString,
node__pb2.BkprdumpincomecsvResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def BkprInspect(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/BkprInspect',
node__pb2.BkprinspectRequest.SerializeToString,
node__pb2.BkprinspectResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def BkprListAccountEvents(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/BkprListAccountEvents',
node__pb2.BkprlistaccounteventsRequest.SerializeToString,
node__pb2.BkprlistaccounteventsResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def BkprListBalances(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/BkprListBalances',
node__pb2.BkprlistbalancesRequest.SerializeToString,
node__pb2.BkprlistbalancesResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod @staticmethod
def BkprListIncome(request, def BkprListIncome(request,
target, target,

View File

@ -1790,6 +1790,129 @@ def staticbackup2py(m):
}) })
def bkpr_channelsapy_channels_apy2py(m):
return remove_default({
"account": m.account, # PrimitiveField in generate_composite
"apy_in": m.apy_in, # PrimitiveField in generate_composite
"apy_in_initial": m.apy_in_initial, # PrimitiveField in generate_composite
"apy_lease": m.apy_lease, # PrimitiveField in generate_composite
"apy_out": m.apy_out, # PrimitiveField in generate_composite
"apy_out_initial": m.apy_out_initial, # PrimitiveField in generate_composite
"apy_total": m.apy_total, # PrimitiveField in generate_composite
"apy_total_initial": m.apy_total_initial, # PrimitiveField in generate_composite
"channel_start_balance_msat": amount2msat(m.channel_start_balance_msat), # PrimitiveField in generate_composite
"fees_in_msat": amount2msat(m.fees_in_msat), # PrimitiveField in generate_composite
"fees_out_msat": amount2msat(m.fees_out_msat), # PrimitiveField in generate_composite
"lease_fee_earned_msat": amount2msat(m.lease_fee_earned_msat), # PrimitiveField in generate_composite
"lease_fee_paid_msat": amount2msat(m.lease_fee_paid_msat), # PrimitiveField in generate_composite
"our_start_balance_msat": amount2msat(m.our_start_balance_msat), # PrimitiveField in generate_composite
"pushed_in_msat": amount2msat(m.pushed_in_msat), # PrimitiveField in generate_composite
"pushed_out_msat": amount2msat(m.pushed_out_msat), # PrimitiveField in generate_composite
"routed_in_msat": amount2msat(m.routed_in_msat), # PrimitiveField in generate_composite
"routed_out_msat": amount2msat(m.routed_out_msat), # PrimitiveField in generate_composite
"utilization_in": m.utilization_in, # PrimitiveField in generate_composite
"utilization_in_initial": m.utilization_in_initial, # PrimitiveField in generate_composite
"utilization_out": m.utilization_out, # PrimitiveField in generate_composite
"utilization_out_initial": m.utilization_out_initial, # PrimitiveField in generate_composite
})
def bkpr_channelsapy2py(m):
return remove_default({
"channels_apy": [bkpr_channelsapy_channels_apy2py(i) for i in m.channels_apy], # ArrayField[composite] in generate_composite
})
def bkpr_dumpincomecsv2py(m):
return remove_default({
"csv_format": str(m.csv_format), # EnumField in generate_composite
"csv_file": m.csv_file, # PrimitiveField in generate_composite
})
def bkpr_inspect_txs_outputs2py(m):
return remove_default({
"account": m.account, # PrimitiveField in generate_composite
"credit_msat": amount2msat(m.credit_msat), # PrimitiveField in generate_composite
"currency": m.currency, # PrimitiveField in generate_composite
"debit_msat": amount2msat(m.debit_msat), # PrimitiveField in generate_composite
"originating_account": m.originating_account, # PrimitiveField in generate_composite
"outnum": m.outnum, # PrimitiveField in generate_composite
"output_tag": m.output_tag, # PrimitiveField in generate_composite
"output_value_msat": amount2msat(m.output_value_msat), # PrimitiveField in generate_composite
"payment_id": hexlify(m.payment_id), # PrimitiveField in generate_composite
"spend_tag": m.spend_tag, # PrimitiveField in generate_composite
"spending_txid": hexlify(m.spending_txid), # PrimitiveField in generate_composite
})
def bkpr_inspect_txs2py(m):
return remove_default({
"outputs": [bkpr_inspect_txs_outputs2py(i) for i in m.outputs], # ArrayField[composite] in generate_composite
"blockheight": m.blockheight, # PrimitiveField in generate_composite
"fees_paid_msat": amount2msat(m.fees_paid_msat), # PrimitiveField in generate_composite
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
})
def bkpr_inspect2py(m):
return remove_default({
"txs": [bkpr_inspect_txs2py(i) for i in m.txs], # ArrayField[composite] in generate_composite
})
def bkpr_listaccountevents_events2py(m):
return remove_default({
"type": str(m.item_type), # EnumField in generate_composite
"account": m.account, # PrimitiveField in generate_composite
"blockheight": m.blockheight, # PrimitiveField in generate_composite
"credit_msat": amount2msat(m.credit_msat), # PrimitiveField in generate_composite
"currency": m.currency, # PrimitiveField in generate_composite
"debit_msat": amount2msat(m.debit_msat), # PrimitiveField in generate_composite
"description": m.description, # PrimitiveField in generate_composite
"fees_msat": amount2msat(m.fees_msat), # PrimitiveField in generate_composite
"is_rebalance": m.is_rebalance, # PrimitiveField in generate_composite
"origin": m.origin, # PrimitiveField in generate_composite
"outpoint": m.outpoint, # PrimitiveField in generate_composite
"part_id": m.part_id, # PrimitiveField in generate_composite
"payment_id": hexlify(m.payment_id), # PrimitiveField in generate_composite
"tag": m.tag, # PrimitiveField in generate_composite
"timestamp": m.timestamp, # PrimitiveField in generate_composite
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
})
def bkpr_listaccountevents2py(m):
return remove_default({
"events": [bkpr_listaccountevents_events2py(i) for i in m.events], # ArrayField[composite] in generate_composite
})
def bkpr_listbalances_accounts_balances2py(m):
return remove_default({
"balance_msat": amount2msat(m.balance_msat), # PrimitiveField in generate_composite
"coin_type": m.coin_type, # PrimitiveField in generate_composite
})
def bkpr_listbalances_accounts2py(m):
return remove_default({
"balances": [bkpr_listbalances_accounts_balances2py(i) for i in m.balances], # ArrayField[composite] in generate_composite
"account": m.account, # PrimitiveField in generate_composite
"account_closed": m.account_closed, # PrimitiveField in generate_composite
"account_resolved": m.account_resolved, # PrimitiveField in generate_composite
"peer_id": hexlify(m.peer_id), # PrimitiveField in generate_composite
"resolved_at_block": m.resolved_at_block, # PrimitiveField in generate_composite
"we_opened": m.we_opened, # PrimitiveField in generate_composite
})
def bkpr_listbalances2py(m):
return remove_default({
"accounts": [bkpr_listbalances_accounts2py(i) for i in m.accounts], # ArrayField[composite] in generate_composite
})
def bkpr_listincome_income_events2py(m): def bkpr_listincome_income_events2py(m):
return remove_default({ return remove_default({
"account": m.account, # PrimitiveField in generate_composite "account": m.account, # PrimitiveField in generate_composite