Pay many people over Lightning, from your own wallet. Kesa takes a list of recipients and amounts, pays each one from your wallet, and keeps a record of every payment. It pays any Lightning address (LUD-16), custodial or self-custodial. It's open source and runs on your computer.
Kesa is from Igbo késà, "to share out widely". Say it KEH-sa.
Early alpha (v0.1.1): use with caution. Kesa moves real money, and a Lightning payment can't be reversed. Start with small amounts and check your wallet after each run. Kesa is provided "as is", without warranty of any kind, under the MIT licence: you use it at your own risk.
What it does
- One list in, everyone paid. Type the recipients in the app, or import a CSV. Set each amount, or split a pot evenly or by shares.
- Your wallet, your key. Kesa sends from your own wallet: any wallet that offers NWC (Nostr Wallet Connect), with a connection string, or Blink where it's available, with an API key. Either is stored encrypted under your password, and only unlocks when you type it: to send, and for a few other steps such as checking a held payment with your wallet.
- Straight from your wallet. Kesa runs on your computer and tells your wallet to pay each person. There's no sign-up and no Kesa server in between. What it does hold is your wallet's key or connection string. Kesa never shares it: a Blink key is only ever sent to Blink, and an NWC connection string never leaves your computer. It can spend, though: cap what it can spend (see Wallets).
- Nothing sent by accident. Every payout is a dry run until you confirm it with your password. The balance is checked first.
- No payment sent twice. Every payment is recorded before it is sent. If Kesa can't tell whether a payment went out (a timeout, a dropped connection), it holds that row and never resends it by itself. A stopped payout picks up where it left off.
- A record of everything. Each payout keeps a results file (CSV) and a report of who was paid, when, and the fee your wallet reported.
Grants, bounties, community rewards, sats payroll, event prizes: anything where many people are paid at once.
Wallets
| Wallet | Status | What Kesa holds | How you cap it |
|---|---|---|---|
| NWC (Nostr Wallet Connect) | ✅ | a connection string | a budget on the connection, set in your wallet |
| Blink (its API isn't available in the US) | ✅ | an API key | spending limits and an expiry on the key, set in Blink |
| phoenixd, LND, CLN | planned |
Tested with real sats: Blink, plus Coinos, Primal and Minibits over NWC. Other NWC wallets, such as Alby Hub, ZEUS and LNbits, should work: tell us how it goes.
Fees: not every NWC wallet reports its fees, and some report them wrong (see Primal below). The report shows what your wallet reports, or "–" when it reports none. For your records and reconciling, use your wallet's own history.
Wallet notes:
- Phone wallets (e.g. Primal, Minibits): keep the app open for the whole run. Primal doesn't answer otherwise.
- Blink: if it starts refusing payments, stop and resume later. Don't switch keys or accounts to get past its limits.
- Coinos: it doesn't report fees (the report shows "–") (request).
- Primal: it can report fees lower than they were (issue).
- Minibits: keep its balance small (Minibits calls itself experimental). It doesn't report fees, and the balance it gives Kesa is what its spending limit still allows, not what the wallet holds. It doesn't answer payment lookups, so Kesa can't check a held payment with it: look in Minibits' own history (the answers are under Answer yourself). If it shows paid, choose It went out. Only if it shows failed, choose Give up on it and pay that person in a new payout. If it's pending or unclear, leave it held.
- LNbits: use your own server. NWC needs its NWC Service Provider extension, which only an admin can install.
Others can be added behind the same interface (kesa/backends/base.py); see
CONTRIBUTING. Whether the funds themselves are custodial depends on
the wallet you connect: a Blink account is custodial (Blink holds the funds), an Alby Hub
is your own node.
What you need
- A wallet with sats in it, and either:
- NWC: a connection made for Kesa in your wallet, allowed to pay invoices, read the balance and look up payments, with a budget. The app's Docs → Connect an NWC wallet walks you through it.
- Blink (where available): an API key with Read and Write (not Receive). The app's Docs → Get a Blink key walks you through it, including spending limits.
Kesa is a tool: you are responsible for the laws that apply to your payouts where you and your recipients are (tax, payroll, exchange control, anti-money-laundering rules).
Kesa is for paying out from your own wallet. If you pay out on someone else's behalf, check your wallet's terms: some forbid it without their approval (Blink §4.3(f), Minibits §1.9).
Install
Windows: the desktop app
- Download
Kesa-<version>-setup.exefrom the Releases page. - Run it. It installs for your user only (no admin prompt), adds Kesa to the Start menu,
and puts the
kesacommand on your PATH. - "Windows protected your PC". The installer isn't code-signed yet (signing is
planned through the SignPath Foundation), so Windows SmartScreen stops it the first
time. Click More info, check the file name is
Kesa-<version>-setup.exe, then click Run anyway.
You can check the download first: compare its SHA-256 with SHA256SUMS.txt on the same
release.
Get-FileHash .\Kesa-0.1.1-setup.exe -Algorithm SHA256
Kesa opens in its own window. It needs Microsoft Edge WebView2, which Windows 10 and 11 already include.
- Your settings, encrypted key, payment records (
runs\) and drafts are kept in%APPDATA%\Kesa. Uninstalling removes the program only, never that folder. - Closing the window while a payout is sending doesn't stop it: Kesa asks, then closes by itself when the run has finished.
- The command line comes with it (see the reference below), and shares the app's payment
records, so the never-pay-twice checks cover both. Open a new terminal after
installing so
kesais on your PATH. - The licences of the software the app bundles (Python and its libraries) are in
THIRD-PARTY-NOTICES.txtin the install folder. - To build the app yourself, see docs/building.md.
Mac, Linux (and Windows without the installer): with pip
You need Python 3.11 or newer. Install Kesa in a virtual environment:
python3 -m venv kesa-env # Windows: py -m venv kesa-env
. kesa-env/bin/activate # Windows: kesa-env\Scripts\activate
pip install kesa
Then make a folder for Kesa and start the app from it. Kesa keeps its settings, encrypted key and payment records in the folder you start it from.
mkdir ~/kesa && cd ~/kesa
kesa serve # then open the link it prints
The link carries a secret made for this launch: only someone with it can use the app, so keep it to yourself. Each start makes a new one. Best: open it in a private window used only for Kesa (see docs/security.md, Known limits).
In a browser, extensions can read what you type on a page: your API key once, and your password each time you send. Use a browser profile without extensions, or a private window (most browsers turn extensions off there), and don't let the browser save the password. The Windows app has its own window, with no extensions.
kesa serve only listens on your own computer (127.0.0.1), never on the network.
kesa app is the same app in its own window. Install it with
pip install "kesa[app]". On Linux it also
needs GTK, which pip can't install. On Ubuntu or Mint, first run
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.1
and make the virtual environment with python3 -m venv --system-site-packages kesa-env.
The window is tested on Windows 11, macOS 11 (Intel) and Linux Mint 22.
Quick start
In the app:
- Settings: choose your wallet. For Blink, paste your API key and your BTC wallet's ID; for NWC, paste the connection string. Choose a password (12+ characters) and click Save & connect. Kesa checks the connection with your wallet (it reads your balance, nothing is sent) before saving anything.
- Build payout: choose how to pay, add each recipient (or Import CSV), then Build payout.
- Review: check who gets what, optionally Check addresses, then tick, enter your password and send. The report shows each payment as it goes.
On the command line:
kesa key set # connect Blink (key encrypted, wallet ID saved)
kesa key set --backend nwc # or an NWC wallet (connection string encrypted)
kesa pay payouts.csv # a dry run: the plan, nothing sent
kesa pay payouts.csv --confirm # send (asks for your password)
The CSV format
A header row, then one row per payment. address and amount_sats are required; name,
memo and id are optional. Column order and spelling are flexible (amount or sats
work too). examples/payouts.csv is one to start from: with
--no-resolve, a dry run shows the plan without looking up its made-up addresses.
name,address,amount_sats,memo,id
Alice,alice@example.com,21,Grant payout,g-001
Bob,bob@example.com,50,Bounty #42,g-002
Each payout's results file holds the same columns plus status, tx_id, fee_sats, settled_at, error. It is your receipt and what lets a stopped payout carry on.
Resume: run the same command on the same file again, or open the payout in the app.
Rows already paid are skipped, failed rows are tried again, and held rows (outcome
unknown) are never resent until you check your wallet and say what happened.
Paying the same people again: every payout stands alone. The dry run (and the app's Review) tells you when an earlier run paid, holds or still owes someone in it. A row an earlier run still owes is paid by resuming that run, not by adding it to a new payout. If a run isn't finished and the new payout repeats it, both refuse it until that run is finished. A row that can never be paid (a dead address) is moved out of its run with Fix failed rows in the app.
Command-line reference
Every command has --help. Nothing is sent without kesa pay ... --confirm.
kesa serve – the app, in your browser (local only, 127.0.0.1).
kesa serve # prints the link to open (port 8808)
kesa serve --port 8809 # another port (one copy per port)
kesa serve --config ~/kesa/kesa.toml
kesa split – build a payout CSV from a list of people (the app's Build payout).
Each build is a payout of its own, with its own payout id; the file is named after it.
kesa split team.csv # each row keeps its amount_sats
kesa split team.csv --pot 100000 # split 100,000 sats: evenly, or by a shares column
kesa split team.csv --memo "Payout {date} - {name}"
kesa split payout.csv # a new payout from an old one (same amounts)
The list needs an address column; name, amount_sats, shares, memo and id
are optional. It writes team.p-20261126-1500-ab12.csv (or --out PATH).
kesa pay – pay a payout CSV from your wallet.
kesa pay team.p-20261126-1500-ab12.csv # dry run: the plan, nothing sent
kesa pay team.p-20261126-1500-ab12.csv --confirm # send (asks for your key password)
Running the same file again resumes it: paid rows are skipped, held rows are never
resent, failed rows are retried. Its results go to runs/ beside the config, shared
with the app. --fee-buffer SATS sets a flat fee buffer for the balance check;
--wait SECONDS waits that long before each payment after the first. Ctrl-C during a
send stops it after the payment in progress (resume later); a second Ctrl-C quits at once.
kesa key set – connect your Blink wallet, as the app's Settings does: it asks for
your API key, your BTC wallet's ID and a password (12+ characters), checks them with
Blink (a balance read, nothing sent), then saves the key encrypted under that password
(kesa.key.enc) and the wallet ID in kesa.toml. With --backend nwc it asks for an
NWC connection string instead, checks it with your wallet (what it can do and its
balance, nothing sent) and saves it encrypted the same way. kesa key rotate changes
the password.
kesa key set
kesa key set --backend nwc
kesa key rotate
kesa resolve – after checking your wallet, settle one held row (outcome unknown).
kesa resolve runs/kesa-run-ca3d977d6bdfb1d5548df4ad7cdc5ecd.results.csv 3 sent # it went out
kesa resolve runs/kesa-run-ca3d977d6bdfb1d5548df4ad7cdc5ecd.results.csv 3 not-sent # it didn't (password)
kesa resolve runs/kesa-run-ca3d977d6bdfb1d5548df4ad7cdc5ecd.results.csv 3 given-up # can't tell (password)
sent marks it paid (never paid again). not-sent marks it failed: the next resume asks
your wallet first and pays it again only if the wallet confirms it didn't go out. When the
wallet can't confirm that, your answer counts 30 days after the payment was sent (a
Lightning payment can take that long to finish): mark it again then. given-up means the
row is never sent from that payout; if its payment did go through, paying the person again
pays them twice. The app does all of this on the report (with Check with Blink, or
Check with your wallet for NWC).
Your key and your settings
Your API key or NWC connection string is only ever stored encrypted, in
kesa.key.enc, by kesa key set or the app's Settings. A send asks for its password and
decrypts it in memory for that run only. Kesa never reads one from a settings file or an
environment variable: never put it in kesa.toml. If one is there, kesa pay stops
and says so, and the app warns you (saving Settings removes it). An NWC send also refuses
while any environment variable holds a connection string.
Changing the password: in Settings, Change the password (the current password,
then the new one twice; the key or connection string isn't entered again), or run
kesa key rotate. Replacing the saved wallet (Connect a different wallet) always needs
the current password. Forgotten it? Nothing can open the saved key, by design. Close Kesa, delete
kesa.key.enc (Key file in Settings shows where it is) and connect again with the key
or connection string from your wallet. Only the saved copy is lost; your payouts' records
stay.
Disconnecting a wallet: there is no button for it, on purpose (anyone using your open
app could otherwise swap in their own wallet). Delete or revoke the connection (or Blink
API key) in your wallet, which is what stops it spending; then close Kesa and delete
kesa.key.enc. Kesa shows "Not connected".
kesa.toml holds the ordinary settings, and Settings or kesa key set write it for you.
Which one a command uses: --config, else kesa.toml in the current folder, else the
desktop app's (%APPDATA%\Kesa\kesa.toml) when it exists. An environment variable beats
the file.
| Setting | Env | Meaning |
|---|---|---|
backend |
blink (the default) or nwc |
|
wallet_id |
BLINK_WALLET_ID |
Blink: the BTC wallet to pay from |
api_url |
BLINK_API_URL |
the Blink API; only https://api.blink.sv/... is accepted |
fee_per_payment |
KESA_FEE_PER_PAYMENT |
fee buffer: sats per payment sent (default 10) |
fee_percent |
KESA_FEE_PERCENT |
fee buffer: % of the total sent, decimals allowed (default 1) |
fee_buffer |
KESA_FEE_BUFFER |
a flat fee buffer instead of the two above (--fee-buffer N too); in the file only when neither is set |
wait_seconds |
KESA_WAIT_SECONDS |
seconds to wait before each payment after the first (default 0; --wait N too). For big payouts, see Big payouts |
key_file |
KESA_KEY_FILE |
where the encrypted key is (default: kesa.key.enc beside kesa.toml) |
nwc_relay |
NWC: the relay's name, shown in the app (the connection itself comes only from the key file) |
The environment variables are for kesa pay; kesa serve reads the file only.
Your Blink API key: scopes and limits
Kesa only moves money from your wallet, so create the key with the least privilege that still works, and lean on Blink's own server-side controls as a backstop Kesa itself cannot provide.
Scopes – tick only:
| Scope | Kesa needs it? | Why |
|---|---|---|
| Read | ✅ | balance precheck + the wallet-history reconcile |
| Write | ✅ | the Lightning payment send |
| Receive | ❌ | Kesa never receives – a payout key should not be able to |
Spending limits (set them – Blink enforces these regardless of the client):
- Daily ≈ your largest expected batch total + routing fees + ~20% headroom.
High enough that one real batch (plus a retry run) clears, low enough that a bug
or a leaked key can't drain the wallet. If a send ever exceeds a limit, Blink
rejects it as a definite
FAILURE(nothing moved – safe to resend after the window resets), but it stalls the batch, so size with headroom. - Weekly / Monthly ≈ your payout cadence sized up (weekly batches → weekly ≈ 2× a batch; monthly ≈ a month of batches + margin).
- Don't leave all four blank on a key that can pay.
Paying many people on one provider? See Big payouts.
Your NWC connection: permissions and budget
Make a connection just for Kesa in your wallet. Allow pay invoices, read the balance and look up payments (Kesa uses the lookup to confirm a payment that didn't answer clearly; without it, such a row waits for you to check by hand). Set a budget: your wallet refuses anything over it, whatever Kesa does. When the wallet reports the budget left (Alby Hub does; Coinos doesn't), Kesa also counts it in its balance check, so a payout over it isn't started. Delete the connection in your wallet to revoke it.
For a big payout, make sure the budget covers the whole payout plus fees. Paying many people on one provider? See Big payouts.
Two controls that matter more than the key or connection settings:
- Fund a dedicated payout wallet to roughly the batch amount. Kesa pays only from this one wallet, so a lightly-funded wallet is the hardest cap on the blast radius – stronger than any API limit.
- Use a short-lived key. Create it for a run and revoke it after, or set an expiry matching your payout cadence.
Big payouts: be kind to providers
Every payment asks the recipient's provider (the server behind their Lightning address) for an invoice, then asks your wallet to pay it. Many of these services are run by small teams, and they limit how much one user can ask of them. A big payout sent all at once can hit those limits: the provider refuses for a while, and it may restrict your account or block your connection, for a time or for good. Your own node removes your wallet provider's limits, but not the recipients'.
- Set a wait between payments for big payouts (Settings,
wait_seconds, orkesa pay --wait N). For very big ones, a minute or two between payments, run overnight, is kindest: check the report in the morning and resume anything that failed. Kesa asks the computer not to sleep while a payout sends; the screen may still turn off. Closing a laptop's lid can still put it to sleep. - Spread out payments to one provider. If many recipients use the same provider, split them over several payouts rather than one long burst.
- When a provider keeps refusing, leave it be. A recipient's provider may refuse to make invoices after many in a short time, whichever wallet pays. When one refuses 3 in a row, the run stops asking it and marks the rest of its rows "Not tried": nothing is sent to them. Resume the run later, not straight away.
Kesa has no built-in caps per provider: limits change, and they are each provider's to set. Using it considerately is up to you.
Safety
- Payments go straight from your wallet. Kesa only tells your wallet to pay; it has no account or cloud service of its own: it runs on your computer. (Whether the funds are custodial depends on your wallet: a Blink account is, Blink holds the funds in it.)
- But its key can spend. While your key or connection is unlocked for a send, Kesa can pay from your wallet, up to the limits or budget set on it. Set those and keep the payout wallet lightly funded (above).
- Dry run by default. A live send needs your confirmation and your password
(
--confirmon the command line). - Balance check, fail closed. It won't start if the balance can't be read, or is below the total plus the fee buffer (by default 10 sats per payment plus 1% of the total, kept back for routing fees).
- Three outcomes, and the middle one is the trap. Each payment is paid, a definite failure (nothing moved, safe to send again), or unknown (a timeout, a dropped connection, a server error: the money may have moved).
- An unknown outcome is never resent automatically. Kesa first checks your wallet history for a matching payment; if it can't prove the payment went out, the row is held for you to settle after checking your wallet (or by asking your wallet about that exact payment). With NWC a payment counts as paid only with the wallet's proof (the preimage of the invoice), and each one is requested once, never again by itself.
- Recorded before sending. A row is marked in the results file before its money moves, so a crash mid-send leaves a held row, never a silent resend.
- Awake while sending. While a payout sends, Kesa asks the computer not to sleep, so a long run isn't cut off mid-payment. The screen may still turn off.
- Your key stays encrypted. A Blink key is only ever sent to Blink's own API. An NWC connection string never leaves your computer: Kesa signs and encrypts each request for your wallet and passes it through the relay the string names.
- Never logs secrets.
More detail, and the known limits: docs/security.md.
Privacy: no data collection
Kesa collects nothing. There are no accounts, no analytics, no tracking and no update check, and nothing is ever sent to the people who make Kesa. Your settings, key, payouts and payment records stay on your computer. Kesa only talks to:
- your wallet (Blink's API with your key, or for NWC the relay your connection string names), to read your balance and send your payments;
- each recipient's Lightning address server, to get an invoice. That server learns the amount and, if it accepts one, the memo.
How it works
- A small Python core with one payment-backend interface (
resolve/pay/status/balance). Two backends today, Blink (GraphQL) and NWC (NIP-47); others (phoenixd, LND, CLN, BTCPay) can be added behind the same interface without touching the core. - Every address is a Lightning address: Kesa asks it for an invoice (LUD-16) and pays that invoice from your wallet.
- The results CSV is the state: no database. Resuming and the double-pay checks both read it.
- The app (
kesa serve) is a small local web server using only the Python standard library; the Windows app shows it in its own window (pywebview).
kesa/ the program
backends/ payment rails (Blink and NWC today)
static/ the app's logo, icon and fonts
tests/ the offline test suite (no network, no real money)
packaging/ the Windows app build (PyInstaller, Inno Setup)
examples/ an example payout CSV
docs/ security notes, building the app, brand files
Contributing
Bug reports and ideas are welcome: see CONTRIBUTING.md. To report a security problem privately, see SECURITY.md. Changes between versions are in CHANGELOG.md.
Licence
MIT. Provided "as is", without warranty of any kind.
Built by JigLab.
Metadata
Release files for kesa 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kesa-0.1.1.tar.gz | 685.9 kB | With provenance | Details for kesa-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kesa-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for kesa-0.1.1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / kesa-0.1.1.tar.gz
| Download URL | kesa-0.1.1.tar.gz |
|---|---|
| Size | 685.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
572cc1c6b82ba9872fe70bc6bc53b4256fcad2c1e9d19395e20a7967dff1ad65
|
|
BLAKE2b-256 checksum How to use checksums |
7dd4ab7eac5b4c1e633fc87552e13a5b990f2d4dfa6e3dc63e65e8b93d77ca58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logRelease files / kesa-0.1.1-py3-none-any.whl
| Download URL | kesa-0.1.1-py3-none-any.whl |
|---|---|
| Size | 422.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2e95bb3432dfd5e631d18c5d955ddab552299e3105a31edf55fe9eefb9dcc5b
|
|
BLAKE2b-256 checksum How to use checksums |
2c20d0b4bb57e22efb2303889ed4bc00ba005431615680a852276ea1aae169b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 1, 2026.
Transparency logSecurity for kesa 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kesa-0.1.1.tar.gz
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 Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.