mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-10 17:19:15 +01:00
rs: Bump crates cln-rpc and cln-grpc to 0.1.5 and cln-plugin to 0.1.6
This commit is contained in:
parent
a13cbcf16f
commit
535d3d953d
5 changed files with 34 additions and 64 deletions
39
Cargo.lock
generated
39
Cargo.lock
generated
|
@ -190,22 +190,31 @@ checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitcoin"
|
name = "bitcoin"
|
||||||
version = "0.29.2"
|
version = "0.30.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3"
|
checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bech32",
|
"bech32",
|
||||||
|
"bitcoin-private",
|
||||||
"bitcoin_hashes",
|
"bitcoin_hashes",
|
||||||
|
"hex_lit",
|
||||||
"secp256k1",
|
"secp256k1",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitcoin_hashes"
|
name = "bitcoin-private"
|
||||||
version = "0.11.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
|
checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitcoin_hashes"
|
||||||
|
version = "0.12.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"bitcoin-private",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -250,7 +259,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cln-grpc"
|
name = "cln-grpc"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
|
@ -280,7 +289,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cln-plugin"
|
name = "cln-plugin"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -297,7 +306,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cln-rpc"
|
name = "cln-rpc"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
|
@ -568,6 +577,12 @@ version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hex_lit"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "home"
|
name = "home"
|
||||||
version = "0.5.5"
|
version = "0.5.5"
|
||||||
|
@ -1170,9 +1185,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "secp256k1"
|
name = "secp256k1"
|
||||||
version = "0.24.3"
|
version = "0.27.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62"
|
checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcoin_hashes",
|
"bitcoin_hashes",
|
||||||
"secp256k1-sys",
|
"secp256k1-sys",
|
||||||
|
@ -1181,9 +1196,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "secp256k1-sys"
|
name = "secp256k1-sys"
|
||||||
version = "0.6.1"
|
version = "0.8.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b"
|
checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cln-grpc"
|
name = "cln-grpc"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "The Core Lightning API as grpc primitives. Provides the bindings used to expose the API over the network."
|
description = "The Core Lightning API as grpc primitives. Provides the bindings used to expose the API over the network."
|
||||||
|
@ -19,10 +19,11 @@ cln-rpc = { path="../cln-rpc/", version = "^0.1", optional = true }
|
||||||
tonic = { version = "0.8", features = ["tls", "transport"] }
|
tonic = { version = "0.8", features = ["tls", "transport"] }
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
bitcoin = { version = "0.29", features = [ "serde" ] }
|
bitcoin = { version = "0.30", features = [ "serde" ] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_json = "1.0.72"
|
serde_json = "1.0.72"
|
||||||
|
cln-rpc = { path="../cln-rpc/", version = "^0.1" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tonic-build = "0.8"
|
tonic-build = "0.8"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use crate::pb::*;
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -247,8 +246,7 @@ fn test_getinfo() {
|
||||||
"network": "regtest",
|
"network": "regtest",
|
||||||
"fees_collected_msat": "0msat", "lightning-dir": "/tmp/ltests-20irp76f/test_pay_variants_1/lightning-1/regtest",
|
"fees_collected_msat": "0msat", "lightning-dir": "/tmp/ltests-20irp76f/test_pay_variants_1/lightning-1/regtest",
|
||||||
"our_features": {"init": "8808226aa2", "node": "80008808226aa2", "channel": "", "invoice": "024200"}});
|
"our_features": {"init": "8808226aa2", "node": "80008808226aa2", "channel": "", "invoice": "024200"}});
|
||||||
let u: cln_rpc::model::responses::GetinfoResponse = serde_json::from_value(j.clone()).unwrap();
|
let _u: cln_rpc::model::responses::GetinfoResponse = serde_json::from_value(j.clone()).unwrap();
|
||||||
let _g: GetinfoResponse = u.into();
|
|
||||||
//let u2: cln_rpc::model::GetinfoResponse = g.into();
|
//let u2: cln_rpc::model::GetinfoResponse = g.into();
|
||||||
//let j2 = serde_json::to_value(u2).unwrap();
|
//let j2 = serde_json::to_value(u2).unwrap();
|
||||||
//assert_eq!(j, j2);
|
//assert_eq!(j, j2);
|
||||||
|
@ -256,48 +254,6 @@ fn test_getinfo() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_keysend() {
|
fn test_keysend() {
|
||||||
let g =
|
|
||||||
KeysendRequest {
|
|
||||||
destination: hex::decode(
|
|
||||||
"035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
|
|
||||||
)
|
|
||||||
.unwrap(),
|
|
||||||
amount_msat: Some(Amount { msat: 10000 }),
|
|
||||||
|
|
||||||
label: Some("hello".to_string()),
|
|
||||||
exemptfee: None,
|
|
||||||
maxdelay: None,
|
|
||||||
retry_for: None,
|
|
||||||
maxfeepercent: None,
|
|
||||||
routehints: Some(RoutehintList {
|
|
||||||
hints: vec![Routehint {
|
|
||||||
hops: vec![RouteHop {
|
|
||||||
id: hex::decode(
|
|
||||||
"035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
|
|
||||||
)
|
|
||||||
.unwrap(),
|
|
||||||
short_channel_id: "12345x678x90".to_string(),
|
|
||||||
feebase: Some(Amount { msat: 123 }),
|
|
||||||
feeprop: 1234,
|
|
||||||
expirydelta: 9,
|
|
||||||
},RouteHop {
|
|
||||||
id: hex::decode(
|
|
||||||
"035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
|
|
||||||
)
|
|
||||||
.unwrap(),
|
|
||||||
short_channel_id: "12345x678x90".to_string(),
|
|
||||||
feebase: Some(Amount { msat: 123 }),
|
|
||||||
feeprop: 1234,
|
|
||||||
expirydelta: 9,
|
|
||||||
}],
|
|
||||||
}],
|
|
||||||
}),
|
|
||||||
extratlvs: None,
|
|
||||||
};
|
|
||||||
|
|
||||||
let u: cln_rpc::model::requests::KeysendRequest = g.into();
|
|
||||||
let _ser = serde_json::to_string(&u);
|
|
||||||
|
|
||||||
let j = r#"{
|
let j = r#"{
|
||||||
"destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
|
"destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
|
||||||
"payment_hash": "e74b03a98453dcb5a7ed5406b97ec3566dde4be85ef71685110f4c0ebc600592",
|
"payment_hash": "e74b03a98453dcb5a7ed5406b97ec3566dde4be85ef71685110f4c0ebc600592",
|
||||||
|
@ -311,8 +267,6 @@ fn test_keysend() {
|
||||||
"status": "complete"
|
"status": "complete"
|
||||||
}"#;
|
}"#;
|
||||||
let u: cln_rpc::model::responses::KeysendResponse = serde_json::from_str(j).unwrap();
|
let u: cln_rpc::model::responses::KeysendResponse = serde_json::from_str(j).unwrap();
|
||||||
let g: KeysendResponse = u.clone().into();
|
|
||||||
println!("{:?}", g);
|
|
||||||
|
|
||||||
let v: serde_json::Value = serde_json::to_value(u.clone()).unwrap();
|
let v: serde_json::Value = serde_json::to_value(u.clone()).unwrap();
|
||||||
let g: cln_rpc::model::responses::KeysendResponse = u.into();
|
let g: cln_rpc::model::responses::KeysendResponse = u.into();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cln-rpc"
|
name = "cln-rpc"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "An async RPC client for Core Lightning."
|
description = "An async RPC client for Core Lightning."
|
||||||
|
@ -14,7 +14,7 @@ path = "examples/getinfo.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
bitcoin = { version = "0.29", features = [ "serde" ] }
|
bitcoin = { version = "0.30", features = [ "serde" ] }
|
||||||
bytes = "1"
|
bytes = "1"
|
||||||
futures-util = { version = "0.3", features = [ "sink" ] }
|
futures-util = { version = "0.3", features = [ "sink" ] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cln-plugin"
|
name = "cln-plugin"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "A CLN plugin library. Write your plugin in Rust."
|
description = "A CLN plugin library. Write your plugin in Rust."
|
||||||
|
|
Loading…
Add table
Reference in a new issue