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

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.18
File Size Uploaded
lexe_sdk-0.1.18.tar.gz 591.6 kB Details

Built distributions (wheels)

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

Total release size: 25.6 MB

Release files / lexe_sdk-0.1.18.tar.gz

Download URL lexe_sdk-0.1.18.tar.gz
Size 591.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3649974388a44d04220ddbfd3083bbdb70a4444ffac466e235fe81c4f35864ef
BLAKE2b-256 checksum
How to use checksums
f5fec92eba869fa4ed39392571a8d3f2221e134e9965563ce35c4dbfb46b110b
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 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.18-py3-none-win_amd64.whl
Size 5.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c27a3dc550b8dd6b7ec772e96489f381ccd0fbeae3bf37b8e5fc0f70416bfc8a
BLAKE2b-256 checksum
How to use checksums
348d1eff6d5a5d04107e73f7d9cff2a01e86ea49ee62a5b2c330a7b0a254ccc9
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 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.18-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
c168104214c3132bf78c9066231bf4f9c82200f8dc67e7abe47fac9edd560334
BLAKE2b-256 checksum
How to use checksums
f94884bd409e4dc5f1b99f1388ef2c8fa0a6d82035926cac89194c436b4c6ab5
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 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.18-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
23b98ceacdb223dbc11313326021ad18e24db7043cce7f0908fbf25c8e871102
BLAKE2b-256 checksum
How to use checksums
b7c780fc84ff4cbd18714f195d410fb3ea282091cbec1bf0dd883be233201b94
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 22, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.18-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
08563669970d949f43065f2ae72b7c7fe799138cdd7247d4d5c3602f43a1251a
BLAKE2b-256 checksum
How to use checksums
5661518b6739fd54338396794b33a37529559ed1c3f0c7fa9810be24fcf48a4c
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 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.20

5 release files

0.1.19

5 release files

This release

0.1.18 This release

5 release files

0.1.17

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