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}")

Release files for lexe-sdk 0.1.17

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.17
File Size Uploaded
lexe_sdk-0.1.17.tar.gz 586.2 kB Details

Built distributions (wheels)

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

Total release size: 25.3 MB

Release files / lexe_sdk-0.1.17.tar.gz

Download URL lexe_sdk-0.1.17.tar.gz
Size 586.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c50c3b834318e7a54bda9e150a32648923e9a360fdfc8225cc3bb47af831ba02
BLAKE2b-256 checksum
How to use checksums
2e0dbb88ae07c5bf9a4a14ec553ebe2bc9f2c626c1652a000476aca1c61d5b40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.17-py3-none-win_amd64.whl
Size 5.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1d37adab0b591d9776280f5a9e841b144595a4d25ef723fa260d9d58d4dd9d2e
BLAKE2b-256 checksum
How to use checksums
bf14e889d5beb404f7228f58bc692eb6de5c27df5d23889c983769664eaf8722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.17-py3-none-manylinux_2_28_aarch64.whl
Size 6.6 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
62cf1409c26bb597edc6c118ce189f6eb8d81761477d909983a865a62475e02c
BLAKE2b-256 checksum
How to use checksums
f3af31b9b7fbd73f7e83fe1077c6b7dadcbb520b99ed036579f1fa49891dc51f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
59a746b516992029dc57a36982b0f8caa402b9f7c3f0ad62990dbe8631a07659
BLAKE2b-256 checksum
How to use checksums
1533f2fcbf24d4979040dd611b8a0d8521da94ef7e3bafecef456704338fd5f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.17-py3-none-macosx_11_0_arm64.whl
Size 6.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
78ac1e495ae949e267a24f2f95ac8dc52aabc58a60ce4f019240a78c3ca6a19c
BLAKE2b-256 checksum
How to use checksums
2df799f395f5fca50cb06063772e04f8c7a002a12f7376b8d93aaffd2b11c586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.20

5 release files

0.1.19

5 release files

0.1.18

5 release files

This release

0.1.17 This release

5 release files

0.1.15

5 release files

0.1.14

5 release files

0.1.13

5 release files

0.1.11

5 release files

0.1.9

5 release files

0.1.8

5 release files

0.1.7

5 release files

0.1.6

5 release files

0.1.5

5 release files

0.1.4

5 release files

0.1.3

5 release files

0.1.2

5 release files

0.1.1

5 release files

0.1.0

5 release files

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