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

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.20
File Size Uploaded
lexe_sdk-0.1.20.tar.gz 606.2 kB Details

Built distributions (wheels)

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

Total release size: 26.0 MB

Release files / lexe_sdk-0.1.20.tar.gz

Download URL lexe_sdk-0.1.20.tar.gz
Size 606.2 kB
Tags Source
SHA-256 checksum
How to use checksums
711f066e53213d37ee745e5b1a0fff1b0e4e250ceeb92bfb55b0c905097d81ea
BLAKE2b-256 checksum
How to use checksums
ca13151643cda0a09c68a69f214031d5569cc6c9ba306899569d88f08f92ee5d
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 Sep 24, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.20-py3-none-win_amd64.whl
Size 5.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
63c9fa5732cc1487bcc98e1b80bdba085fe1fbaabf9a218d91d62ca659e0db3e
BLAKE2b-256 checksum
How to use checksums
739ba7cb5d18eff503e42997e8625fe88b021bcc509e71186f5c02bb5e090142
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 Sep 24, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.20-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
69064f9426c5d5e8fdbb2747f6969af3ac600cc033e7d510d6571b57d3a7ab74
BLAKE2b-256 checksum
How to use checksums
f5d45b3507002e849fca682bf561718df2c119bbb5b91d405b3baee2d5a0c9b5
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 Sep 24, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.20-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
8b263d66402be3a9e213945289aa52206b20b64f32c8ac905e2cc3cc3690c8c9
BLAKE2b-256 checksum
How to use checksums
369d134b9b98060f9203ff169755e82064577b45ea3560b46888aecb672b9e4b
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 Sep 24, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.20-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
999b695e0d4157b03393cee400a60566a5eb48971e8f7631a52b870477818cab
BLAKE2b-256 checksum
How to use checksums
de30fa40e050f458b617128913d319c4ead3f5eb5369d83d743e48b73042409c
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 Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.20 This release

5 release files

0.1.19

5 release files

0.1.18

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