Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet committed Jul 8, 2024
1 parent d2f8ac2 commit 0c5646b
Show file tree
Hide file tree
Showing 22 changed files with 1,765 additions and 266 deletions.
9 changes: 9 additions & 0 deletions libs/gl-client-py/glclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ def pay(
bytes(self.inner.call(uri, bytes(req)))
)

def trampoline_pay(self, bolt11: str, trmp_node_id: bytes, amount_msat: Optional[int] = None, label: Optional[str] = None):
res = self.inner.trampoline_pay(
bolt11=bolt11,
trmp_node_id=trmp_node_id,
amount_msat=amount_msat,
label=label,
)
return nodepb.TrampolinePayResponse.FromString(bytes(res))

def keysend(
self,
destination: bytes,
Expand Down
22 changes: 13 additions & 9 deletions libs/gl-client-py/glclient/glclient.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ package adds a pythonic facade on top of this to improve usability.
"""

from typing import Optional, List
import glclient.glclient as native;

import glclient.glclient as native

class TlsConfig:
def __init__(self) -> None: ...
def with_ca_certificate(self, ca: bytes) -> "TlsConfig": ...
def identity(self, cert_pem: bytes, key_pem: bytes) -> "TlsConfig": ...
def identity_from_path(self, path : str) -> "TlsConfig": ...
def identity_from_path(self, path: str) -> "TlsConfig": ...

class Credentials:
def __init__(self) -> None: ...
Expand All @@ -35,7 +34,6 @@ class Credentials:
class SignerHandle:
def shutdown(self) -> None: ...


class Signer:
def __init__(self, secret: bytes, network: str, creds: Credentials): ...
def sign_challenge(self, challenge: bytes) -> bytes: ...
Expand All @@ -45,8 +43,9 @@ class Signer:
def version(self) -> str: ...
def is_running(self) -> bool: ...
def shutdown(self) -> None: ...
def create_rune(self, restrictions: List[List[str]], rune: Optional[str] = None) -> str: ...

def create_rune(
self, restrictions: List[List[str]], rune: Optional[str] = None
) -> str: ...

class Scheduler:
def __init__(self, network: str, creds: Optional[Credentials]): ...
Expand All @@ -62,8 +61,7 @@ class Scheduler:
def list_outgoing_webhooks(self) -> bytes: ...
def delete_outgoing_webhook(self, webhook_id: int) -> bytes: ...
def delete_outgoing_webhooks(self, webhook_ids: List[int]) -> bytes: ...
def rotate_outgoing_webhook_secret(self, webhook_id: int) -> bytes: ...

def rotate_outgoing_webhook_secret(self, webhook_id: int) -> bytes: ...

class Node:
def __init__(
Expand All @@ -75,6 +73,13 @@ class Node:
def stop(self) -> None: ...
def call(self, method: str, request: bytes) -> bytes: ...
def get_lsp_client(self) -> LspClient: ...
def trampoline_pay(
self,
bolt11: str,
trmp_node_id: bytes,
amount_msat: Optional[int] = None,
label: Optional[str] = None,
) -> bytes: ...
def configure(self, payload: bytes) -> None: ...

class LspClient:
Expand All @@ -88,5 +93,4 @@ class LspClient:
) -> bytes: ...
def list_lsp_servers(self) -> List[str]: ...


def backup_decrypt_with_seed(encrypted: bytes, seed: bytes) -> bytes: ...
44 changes: 25 additions & 19 deletions libs/gl-client-py/glclient/greenlight_pb2.py

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions libs/gl-client-py/glclient/greenlight_pb2.pyi

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

43 changes: 43 additions & 0 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.

17 changes: 17 additions & 0 deletions libs/gl-client-py/glclient/greenlight_pb2_grpc.pyi

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

Loading

0 comments on commit 0c5646b

Please sign in to comment.