Skip to content
Open
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 change: 1 addition & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions libs/gl-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ categories = ["command-line-utilities", "cryptography::cryptocurrencies"]
license = "MIT"
readme = "README.md"

[features]
experimental-splicing = ["gl-client/experimental-splicing"]

[[bin]]
name = "glcli"
test = true
Expand Down
1 change: 1 addition & 0 deletions libs/gl-client-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ thiserror = "1"
[features]
default = ["permissive"]
permissive = ["gl-client/permissive"]
experimental-splicing = ["gl-client/experimental-splicing"]
18 changes: 8 additions & 10 deletions libs/gl-client-py/glclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def __init__(self, node_id: bytes, grpc_uri: str, creds: Credentials) -> None:
self.inner = native.Node(node_id=node_id, grpc_uri=grpc_uri, creds=creds)
self.logger = logging.getLogger("glclient.Node")

def call(self, path: str, request: bytes) -> bytes:
return bytes(self.inner.call(path, bytes(request)))

def get_info(self) -> clnpb.GetinfoResponse:
uri = "/cln.Node/Getinfo"
req = clnpb.GetinfoRequest().SerializeToString()
Expand Down Expand Up @@ -279,16 +282,11 @@ def decode(self, string: str) -> clnpb.DecodeResponse:
return res.FromString(bytes(self.inner.call(uri, bytes(req))))

def decodepay(
self, bolt11: str, description: Optional[str]
) -> clnpb.DecodepayResponse:
uri = "/cln.Node/DecodePay"
res = clnpb.DecodepayResponse
req = clnpb.DecodepayRequest(
bolt11=bolt11,
description=description,
).SerializeToString()

return res.FromString(bytes(self.inner.call(uri, bytes(req))))
self, bolt11: str, description: Optional[str] = None
) -> clnpb.DecodeResponse:
if description is not None:
raise ValueError("CLN's Decode RPC does not accept a description")
return self.decode(bolt11)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ISSUE] Shouldn't we rather remove the decodepay method, or are we keeping it for backwards compatibility?


def disconnect_peer(self, peer_id: str, force=False) -> clnpb.DisconnectResponse:
uri = "/cln.Node/Disconnect"
Expand Down
1 change: 1 addition & 0 deletions libs/gl-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ default = ["permissive", "export"]
permissive = []
export = ["chacha20poly1305", "secp256k1"]
backup = []
experimental-splicing = []

[dependencies]
aes = "0.8"
Expand Down
14 changes: 14 additions & 0 deletions libs/gl-client/src/persist.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
mod canonical;
#[allow(dead_code)]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ISSUE] Is this dead-code or should it be a cfg(experimental-splicing) guard?

mod splice;

pub use splice::{
candidate_funding_facts_from_psbt, psbt_shape_from_base64, wallet_inputs_from_psbt, FeePolicy,
FundPsbtResponseFacts, FundingOutpoint, LocalSpliceIntent, NormalizedRpcAuth, OldSpliceState,
SignPsbtIntentFacts, SignPsbtResponseFacts, SpliceSignedResponseFacts,
SpliceUpdateResponseFacts, WalletInputReservation, WalletInputSource,
};
pub(crate) use splice::{
psbt_shape_from_psbt, transaction_shape, SpliceOrigin, SplicePhase, SpliceSessionV1,
};
#[cfg(test)]
pub(crate) use splice::{CandidateFundingFacts, WalletInput};

use anyhow::anyhow;
use lightning_signer::bitcoin::secp256k1::PublicKey;
Expand Down
Loading
Loading