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.23

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.23
File Size Uploaded Provenance Actions
lexe_sdk-0.1.23.tar.gz 656.6 kB With provenance Details for lexe_sdk-0.1.23.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for lexe-sdk 0.1.23
File Actions
lexe_sdk-0.1.23-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for lexe_sdk-0.1.23-py3-none-win_amd64.whl
lexe_sdk-0.1.23-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for lexe_sdk-0.1.23-py3-none-manylinux_2_28_aarch64.whl
lexe_sdk-0.1.23-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.23-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
lexe_sdk-0.1.23-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for lexe_sdk-0.1.23-py3-none-macosx_11_0_arm64.whl

Total release size: 26.0 MB

Release files / lexe_sdk-0.1.23.tar.gz

Download URL lexe_sdk-0.1.23.tar.gz
Size 656.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2f399bc2f6a2d617a1ccef3ee89da026b21542981fd1026e8c741802dd401e8d
BLAKE2b-256 checksum
How to use checksums
0a3d1723fe812feb5a9fb5c4aaa1d62af0eaf37dfd3c2f8cee2eb9c7362c4fc8
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 Oct 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.23-py3-none-win_amd64.whl
Size 5.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2d22c06f0d183ed0dd064482874094706c2d145492bc0835954e401d10115b5f
BLAKE2b-256 checksum
How to use checksums
05687a6f00730240c30aa23fd81a58f961bcab757446062f57c22afeaf819324
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 Oct 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.23-py3-none-manylinux_2_28_aarch64.whl
Size 6.7 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d385cb2e51aa427258aef70d012143082620b01e735578678c67717a9c91a2d1
BLAKE2b-256 checksum
How to use checksums
cd8bed2eb57fe7d926fc3957dce627b5f128bdd273ff7bcbf497dd78f2dcff4c
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 Oct 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.23-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
badd70f57c712f54521b3932b1d505280c10df9e4bd2dab209bc61cecd3e0da3
BLAKE2b-256 checksum
How to use checksums
5e1d16aeb6761259b4a2c48deb51660e59bb8911b6061cbf2132f23371cb3725
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 Oct 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.23-py3-none-macosx_11_0_arm64.whl
Size 6.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
88413097828c4d75fb23f010aeb0af95dee7ff287157fe4009949a8705d27ffd
BLAKE2b-256 checksum
How to use checksums
41628668585d83fbef682c0dfe84b1c8dab584fdb774777ef1c8267f98bb9dc2
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 Oct 22, 2026.

Transparency log

Security for lexe-sdk 0.1.23

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.23.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 Oct 22, 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