Skip to main content

Lexe Python SDK

pypi.org pypi.org - requires-python python.lexe.tech CI MIT Discord

The Lexe Python SDK provides a Python interface for developers to control self-custodial, always-online Lexe Lightning nodes.

pip install lexe-sdk

Create a wallet

from lexe import Credentials, LexeWallet, RootSeed, WalletConfig

# Configure `mainnet()` or `testnet3()`
config = WalletConfig.mainnet()

# Sample a new seed and write it to ~/.lexe/seedphrase.txt
seed = RootSeed.generate()
seed.write(config)

# Create wallet and register with Lexe (data stored in ~/.lexe)
creds = Credentials.from_root_seed(seed)
wallet = LexeWallet.fresh(config, creds)
wallet.signup(root_seed=seed, partner_pk=None)

# Create a Lightning invoice
invoice = wallet.create_invoice(
    expiration_secs=3600,
    amount_sats=1000,
    description="Initial deposit",
)
print(f"Invoice: {invoice.invoice}")

# Wait for payment
payment = wallet.wait_for_payment(index=invoice.index, timeout_secs=300)
print(f"Payment received: {payment.amount_sats} sats")

Load an existing wallet

from lexe import Credentials, LexeWallet, RootSeed, WalletConfig

# Load existing wallet from ~/.lexe
config = WalletConfig.mainnet()
seed = RootSeed.read(config)
creds = Credentials.from_root_seed(seed)
wallet = LexeWallet.load(config, creds)

# Update to the latest node software
wallet.provision(creds)

# Pay a Lightning invoice
payment = wallet.pay_invoice(
    invoice="lnbc...",
    fallback_amount_sats=None,
    personal_note="Paying for coffee",
)
payment = wallet.wait_for_payment(index=payment.index, timeout_secs=15)
print(f"Payment: {payment.status}")

Metadata

Release files for lexe-sdk 0.1.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lexe-sdk 0.1.24
File Size Uploaded Provenance Actions
lexe_sdk-0.1.24.tar.gz 676.7 kB With provenance Details for lexe_sdk-0.1.24.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for lexe-sdk 0.1.24
File Actions
lexe_sdk-0.1.24-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for lexe_sdk-0.1.24-py3-none-win_amd64.whl
lexe_sdk-0.1.24-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for lexe_sdk-0.1.24-py3-none-manylinux_2_28_aarch64.whl
lexe_sdk-0.1.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for lexe_sdk-0.1.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
lexe_sdk-0.1.24-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for lexe_sdk-0.1.24-py3-none-macosx_11_0_arm64.whl

Total release size: 26.8 MB

Release files / lexe_sdk-0.1.24.tar.gz

Download URL lexe_sdk-0.1.24.tar.gz
Size 676.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0647b39c80ea382540b30184f98e32c20db5c5bdad95e7efbc4b7ccc5b902199
BLAKE2b-256 checksum
How to use checksums
1edcd3db9b5a0264283d6af9536374a66c94d8d909901976e2e053fb42cae72f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / lexe_sdk-0.1.24-py3-none-win_amd64.whl

Download URL lexe_sdk-0.1.24-py3-none-win_amd64.whl
Size 6.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
15500f8dab91c151f0900e05bde1e7fd07773107e42ce788fc1e68a87b8ca6c0
BLAKE2b-256 checksum
How to use checksums
f9e430c2f5c00bf942247ceb38390c8f4e395f6f94dbb65101e1b964f47449d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / lexe_sdk-0.1.24-py3-none-manylinux_2_28_aarch64.whl

Download URL lexe_sdk-0.1.24-py3-none-manylinux_2_28_aarch64.whl
Size 6.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
320c09984068a5942f67dea41d3a155f16453624aa1631d06f712b3bec731ceb
BLAKE2b-256 checksum
How to use checksums
51315bbfaabde334a0fa0732af1bfd0710b15d4c0bcdda90c3589f21b2610584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / lexe_sdk-0.1.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL lexe_sdk-0.1.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
32de72f458be7ee8b5c49d4f1327cb6d80c331c0428d84ecc90cc724a3e3dc82
BLAKE2b-256 checksum
How to use checksums
490bf1d444af6fc3a2b1afc3bafe6f111a9f1bd6cb026c705853e7889c7520fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / lexe_sdk-0.1.24-py3-none-macosx_11_0_arm64.whl

Download URL lexe_sdk-0.1.24-py3-none-macosx_11_0_arm64.whl
Size 6.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a38d627c969208b567cdb45922225a4798a5d5d9b4412e5f27056311c10c30f3
BLAKE2b-256 checksum
How to use checksums
5a9f305a560665c47a76ab534ecca555062d82f473318899bcff1f02ff0a0e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for lexe-sdk 0.1.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for lexe_sdk-0.1.24.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page