Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,145 changes: 453 additions & 692 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ members = [

[workspace.dependencies]
anyhow = "1"
env_logger = "0.10"
cln-grpc = "0.4"
cln-rpc = "0.4"
cln-plugin = "0.4"
tonic = "0.11"
env_logger = "0.11"
hex = "0.4"
log = "0.4"
once_cell = "1"
cln-grpc = "0.7"
cln-rpc = "0.7"
cln-plugin = "0.7"
tonic = { version = "0.14", features = ["tls-ring", "transport"] }

vls-core = "^0.14"
vls-persist = "^0.14"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gl-client = { path = "../../libs/gl-client" }
rand = "0.8"
bip39 = { version = "2", features = ["rand_core"] }
tokio = { version = "1.29.1", features = ["rt", "macros"] }
hex = "0.4.3"
hex = { workspace = true }
runeauth = "0.1"
anyhow.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion libs/gl-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dirs = "6.0"
env_logger = "0.11"
futures = "0.3"
gl-client = { version = "0.6", path = "../gl-client", features = ["backup"] }
hex = "0.4"
hex = { workspace = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2.0.11"
Expand Down
20 changes: 7 additions & 13 deletions libs/gl-cli/src/json_hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ impl ToJsonHex for cln::GetinfoResponse {
"lightning_dir": self.lightning_dir.clone(),
"fees_collected_msat": self.fees_collected_msat.clone().map_or(0, |amt| amt.msat),
});
if let Some(alias) = &self.alias {
j["alias"] = json!(alias);
}
j["alias"] = json!(&self.alias);
if let Some(feat) = &self.our_features {
j["our_features"] = json!({
"init": hex::encode(&feat.init),
Expand All @@ -51,9 +49,7 @@ impl ToJsonHex for cln::InvoiceResponse {
"payment_secret": hex::encode(&self.payment_secret),
"expires_at": self.expires_at,
});
if let Some(x) = self.created_index {
j["created_index"] = json!(x);
}
j["created_index"] = json!(self.created_index);
if let Some(x) = &self.warning_capacity {
j["warning_capacity"] = json!(x);
}
Expand Down Expand Up @@ -189,11 +185,11 @@ impl ToJsonHex for cln::CloseResponse {
let mut j = json!({
"item_type": self.item_type,
});
if let Some(x) = &self.tx {
j["tx"] = json!(hex::encode(x));
if !self.txs.is_empty() {
j["txs"] = json!(self.txs.iter().map(hex::encode).collect::<Vec<_>>());
}
if let Some(x) = &self.txid {
j["txid"] = json!(hex::encode(x));
if !self.txids.is_empty() {
j["txids"] = json!(self.txids.iter().map(hex::encode).collect::<Vec<_>>());
}

j
Expand Down Expand Up @@ -263,9 +259,7 @@ impl ToJsonHex for cln::ListfundsChannels {
"connected": self.connected,
"state": self.state,
});
if let Some(x) = &self.channel_id {
j["channel_id"] = json!(hex::encode(x));
}
j["channel_id"] = json!(hex::encode(&self.channel_id));
if let Some(x) = &self.short_channel_id {
j["short_channel_id"] = json!(x);
}
Expand Down
10 changes: 5 additions & 5 deletions libs/gl-client-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ env_logger = { workspace = true }
gl-client = { path = "../gl-client", default-features = false, features = [
"export",
] }
hex = "*"
log = "*"
once_cell = "*"
prost = "0.12"
hex = { workspace = true }
log = { workspace = true }
once_cell = { workspace = true }
prost = "0.14"
pyo3 = { version = "0.18", features = [
"extension-module",
"serde",
"abi3-py37",
] }
runeauth = "0.1"
tokio = { version = "1", features = ["full"] }
tonic = { version = "0.11", features = ["tls", "transport"] }
tonic = { version = "0.14", features = ["tls-ring", "transport"] }
serde_json = "^1.0"
thiserror = "1"

Expand Down
2 changes: 1 addition & 1 deletion libs/gl-client-py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PROTODIR=${REPO}/libs/proto
# pyproject.toml.
PROTOC_TOOLCHAIN = \
uv run --no-project \
--with grpcio-tools==1.78.0 \
--with grpcio-tools==1.81.1 \
--with mypy-protobuf==5.0.0 \
python -m grpc_tools.protoc

Expand Down
6 changes: 3 additions & 3 deletions libs/gl-client-py/glclient/greenlight_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions libs/gl-client-py/glclient/greenlight_pb2_grpc.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions libs/gl-client-py/glclient/scheduler_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions libs/gl-client-py/glclient/scheduler_pb2_grpc.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions libs/gl-client-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ version = "0.3.4"
description = ""
readme = "README.md"
requires-python = ">=3.8,<4"
# The checked-in stubs assert protobuf >= 6.33.5 and grpcio >= 1.81.1 at
# import time; bump these together with the regenerated protos and the
# grpcio-tools pin in Makefile's PROTOC_TOOLCHAIN.
dependencies = [
"protobuf>=6,<7",
"protobuf>=6.33.5,<7",
"grpcio>=1.81.1",
"pyln-grpc-proto>=0.1",
]
authors = [
Expand All @@ -22,12 +26,12 @@ module-name = "glclient"
[dependency-groups]
dev = [
"gl-testing",
"grpcio>=1.67",
"grpcio>=1.81.1",
"maturin>=1",
"mypy>=1.14.1",
"mypy-protobuf>=3.6.0",
"patchelf>=0.17.2.2",
"protobuf>=6,<7",
"protobuf>=6.33.5,<7",
"pyln-grpc-proto>=0.1.2",
"python-kacl>=0.6.7",
"types-protobuf>=5.29.1.20241207",
Expand Down
Loading
Loading