Metadata-Version: 2.4
Name: lexe-sdk
Version: 0.0.0rc0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE
Summary: Control Lexe self-custody Bitcoin wallets with the Lexe Python SDK
Keywords: lexe,bitcoin,lightning,wallet,payments,crypto,btc,ln,non-custodial,self-custody
Author-email: Lexe Corporation <no-reply@lexe.app>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: homepage, https://lexe.app
Project-URL: documentation, https://python.lexe.app
Project-URL: source, https://github.com/lexe-app/lexe-public/tree/master/sdk-uniffi
Project-URL: repository, https://github.com/lexe-app/lexe-sdk
Project-URL: changelog, https://github.com/lexe-app/lexe-sdk/releases

# Lexe Python SDK

The Lexe Python SDK provides a Python interface for developers to control
self-custodial, always-online [Lexe](https://lexe.app) Lightning nodes.

* [Quickstart guide](https://docs.lexe.tech/python/quickstart/)
* [API reference](https://python.lexe.tech)

```bash
pip install lexe-sdk
```

## Example

```python
import lexe

# Load an existing Lexe wallet from ~/.lexe
config = lexe.WalletEnvConfig.mainnet()
seed = config.read_seed()
wallet = lexe.LexeWallet.load(config, seed)

# Pay a Lightning invoice
payment = wallet.pay_invoice(
    invoice="lnbc...",
    fallback_amount_sats=None,
    note="Paying for coffee",
)
payment = wallet.wait_for_payment(
    index=payment.index,
    timeout_secs=15,
)
print(f"payment: {payment.status}")
```

