Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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,096 changes: 257 additions & 839 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docker/gl-testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ ENV PYTHONUNBUFFERED=1
# yet, but we will put the tools in those directories.
ENV PATH=$HOME/.local/bin:/opt/cln-latest/usr/local/bin:/opt/bitcoin/bin:/opt/cln-latest/usr/local/bin:/usr/local/bin:$PATH
ENV UV_INSTALL_DIR=/usr/local/bin/
ENV UV_PROJECT_ENVIRONMENT=/tmp/venv/
# grpcio == 1.46 produces spammy log messages, silence them
ENV GRPC_ENABLE_FORK_SUPPORT=0

Expand Down
52 changes: 52 additions & 0 deletions libs/gl-client-py/.kacl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
kacl:
file: CHANGELOG.md
allowed_header_titles:
- Changelog
- Change Log
allowed_version_sections:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security
default_content:
- All notable changes to this project will be documented in this file.
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
release:
add_unreleased: True
git:
commit: False
commit_message: "[skip ci] Releasing Changelog version {new_version}"
commit_additional_files: []
tag: False
tag_name: "v{new_version}"
tag_description: "Version v{new_version} released"
links:
auto_generate: False
compare_versions_template: '{host}/compare/{previous_version}...{version}'
unreleased_changes_template: '{host}/compare/{latest_version}...master'
initial_version_template: '{host}/tree/{version}'
extension:
post_release_version_prefix: null
issue_tracker:
jira:
host: null
username: null
password: null
issue_patterns: ["[A-Z]+-[0-9]+"]
comment_template: |
# 🚀 New version [v{new_version}]({link})

A new release has been created referencing this issue. Please check it out.

## 🚧 Changes in this version

{changes}

## 🧭 Reference

Code: [Source Code Management System]({link})
stash:
directory: .kacl_stash
always: False
7 changes: 7 additions & 0 deletions libs/gl-client-py/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
5 changes: 2 additions & 3 deletions libs/gl-client-py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ ${PYPROTOS}: pygrpc
pygrpc: ${PROTOSRC}
cp ${PYDIR}/../proto/glclient/scheduler.proto ${PYDIR}/glclient/
cp ${PYDIR}/../proto/glclient/greenlight.proto ${PYDIR}/glclient/
cd ${PYDIR}; poetry install
cd ${PYDIR}; poetry run python -m grpc_tools.protoc ${PYPROTOC_OPTS} glclient/scheduler.proto
cd ${PYDIR}; poetry run python -m grpc_tools.protoc ${PYPROTOC_OPTS} glclient/greenlight.proto
cd ${PYDIR}; uv run python -m grpc_tools.protoc ${PYPROTOC_OPTS} glclient/scheduler.proto
cd ${PYDIR}; uv run python -m grpc_tools.protoc ${PYPROTOC_OPTS} glclient/greenlight.proto

check-py:
#uv run --all-packages mypy ${PYDIR}/glclient
Expand Down
15 changes: 8 additions & 7 deletions libs/gl-client-py/glclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from binascii import hexlify, unhexlify
from typing import Optional, List, Iterable, Any, Type, TypeVar
import logging
from glclient.lsps import LspClient
from glclient.glclient import Credentials


Expand Down Expand Up @@ -505,12 +504,6 @@ def list_datastore(self, key=None):
res = clnpb.ListdatastoreResponse
return res.FromString(bytes(self.inner.call(uri, bytes(req))))

def get_lsp_client(
self,
) -> LspClient:
native_lsps = self.inner.get_lsp_client()
return LspClient(native_lsps)

def configure(self, close_to_addr: str) -> None:
req = nodepb.GlConfig(close_to_addr=close_to_addr).SerializeToString()

Expand Down Expand Up @@ -577,6 +570,14 @@ def wait(self, subsystem, indexname, nextvalue: int) -> clnpb.WaitResponse:
res = clnpb.WaitResponse
return res.FromString(bytes(self.inner.call(uri, bytes(req))))

def lsp_invoice(self, label: str, description: str, amount_msat: int | None = None):
uri = "/greenlight.Node/LspInvoice"
req = nodepb.LspInvoiceRequest(
label=label, description=description, amount_msat=amount_msat
).SerializeToString()
res = nodepb.LspInvoiceResponse
return res.FromString(bytes(self.inner.call(uri, bytes(req))))


def normalize_node_id(node_id, string=False):
if len(node_id) == 66:
Expand Down
Loading
Loading