Crate that provides an RPC binding from rust code to the c-lightning daemon
CC0-1.0 License
Bot releases are hidden (Show)
Published by vincenzopalazzo over 1 year ago
Now it is possible make a plugin with the following code
use serde_json::json;
use serde_json::Value;
use clightningrpc_plugin_macros::*;
use clightningrpc_plugin::commands::RPCCommand;
use clightningrpc_plugin::errors::PluginError;
use clightningrpc_plugin::plugin::Plugin;
#[derive(Clone)]
struct State;
// FIXME: implement a derive macros to register
// the option plugins
impl State {
pub fn new() -> Self {
Self
}
}
#[rpc_method(
rpc_name = "foo_macro",
description = "This is a simple and short description"
)]
pub fn foo_rpc(plugin: &mut Plugin<State>, request: Value) -> Result<Value, PluginError> {
let response = json!({"is_dynamic": plugin.dynamic, "rpc_request": request});
Ok(response)
}
#[notification(on = "rpc_command")]
fn on_rpc(plugin: &mut Plugin<State>, request: &Value) {
use clightningrpc_plugin::types::LogLevel;
plugin.log(LogLevel::Info, "received an RPC notification");
}
fn main() {
let plugin = plugin! {
state: State::new(),
dynamic: true,
notification: [
on_rpc,
],
methods: [
foo_rpc,
],
hooks: [],
};
plugin.start();
}
Published by vincenzopalazzo over 1 year ago
Published by vincenzopalazzo over 1 year ago
Published by vincenzopalazzo over 1 year ago
Published by vincenzopalazzo over 1 year ago
Published by vincenzopalazzo almost 2 years ago
Published by vincenzopalazzo almost 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin | |
clightningrpc-conf | This crate provides configuration manager for core lightning. |
Published by vincenzopalazzo almost 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin | |
clightningrpc-conf | This crate provides configuration manager for core lightning. |
Published by vincenzopalazzo almost 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo almost 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo almost 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo about 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
fn call
pub (commit). @RCasatta 06-09-2022Published by vincenzopalazzo about 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo about 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo about 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |
Published by vincenzopalazzo about 2 years ago
These are the complete list of craters supported right now
Crate | Description | Version |
---|---|---|
clightningrpc-common | Crate that provides an Generic RPC binding from rust code to the core lightning daemon | |
clightningrpc | Crate that provides a strong typed RPC binding from rust code to the core lightning daemon | |
clightningrpc-plugin | Crate that provides a plugin API to give the possibility to implement a plugin in Rust | |
clightningrpc-plugin-macros | Crate that provides a procedural macros implementation to make easy to develop a plugin developer to build a plugin |