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

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.19
File Size Uploaded
lexe_sdk-0.1.19.tar.gz 600.8 kB Details

Built distributions (wheels)

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

Total release size: 25.9 MB

Release files / lexe_sdk-0.1.19.tar.gz

Download URL lexe_sdk-0.1.19.tar.gz
Size 600.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ddb6100fd571664b062fba8e7e0e01c7c485f4ce3b98ec0df9a0ec9a3b943c3
BLAKE2b-256 checksum
How to use checksums
e5b97830c738cfe25c950afa67189798ae0722c0c3b023ab9b6b10d12111e876
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 12, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.19-py3-none-win_amd64.whl
Size 5.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
66f7e046e2d563832a4fbd6641cc5d1f0a88324b0d22b566817720f6d343316e
BLAKE2b-256 checksum
How to use checksums
9b8ed22ff4115c2e6541777b40ce4005840c0486d900a64db32abbb1256eadbc
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 12, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.19-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
bc41e16852251b73e51d464999fecc11263acef7b2fb70ff054cd608f203e05f
BLAKE2b-256 checksum
How to use checksums
5cd8187203f90df852577dd6225fe96894dd8849b7384d91a79c8fbb95f384ae
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 12, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.19-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
7557aa3fe2ff8ce2450f16ecf80dfbdb6db5482276dc01ab6f9e75b04446f4b7
BLAKE2b-256 checksum
How to use checksums
8aa318f6e5cb7c266da7e8f9da09823e2c4700fdaf9fcc0cd907487ba4c94a4f
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 12, 2026.

Transparency log

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

Download URL lexe_sdk-0.1.19-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
b8f1765e0c6fca3f05080a99824a0621a18488428562cf2f6b1372c6ce48238d
BLAKE2b-256 checksum
How to use checksums
84c1ab2c4f810a62811bf5097d25e86897a4bb13b51f0d8103b883c5fedfb71e
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.20

5 release files

This release

0.1.19 This release

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