(
plugin: &Plugin<PluginState>,
method: &str,
params: serde_json::Value,
)
| 72 | } |
| 73 | |
| 74 | pub async fn call_rpc( |
| 75 | plugin: &Plugin<PluginState>, |
| 76 | method: &str, |
| 77 | params: serde_json::Value, |
| 78 | ) -> Result<serde_json::Value, RpcError> { |
| 79 | let rpc_path = plugin.configuration().rpc_file; |
| 80 | let mut rpc = ClnRpc::new(rpc_path).await.map_err(|e| RpcError { |
| 81 | code: None, |
| 82 | data: None, |
| 83 | message: e.to_string(), |
| 84 | })?; |
| 85 | rpc.call_raw(method, ¶ms).await |
| 86 | } |
| 87 | |
| 88 | pub fn path_to_rest_map_and_params( |
| 89 | plugin: &Plugin<PluginState>, |
no test coverage detected