Commit Graph
58 Commits
Author SHA1 Message Date
Jeroen UbbinkandClaude Opus 4.8 6c5c3f0b5f feat(db): add encrypted Secret store and migration
Introduce a singleton Secret model holding the admin password hash and the
Fernet-encrypted nsec, with a hand-written migration for the secrets table.
Add suite-wide pytest config pinning a valid ROUTSTR_SECRET_KEY.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 10:50:51 +02:00
9qeklajc f6d1a41728 fix: checkpoint fee payouts before sending 2026-07-18 14:08:41 +02:00
9qeklajcandGitHub 73f52ef1fd Revert "Retry Cashu transaction storage on transient DB failures" 2026-07-12 14:47:30 +02:00
9qeklajc 07c15de106 better retry logic 2026-07-12 14:12:29 +02:00
9qeklajc aea24d23da fix: retry Cashu transaction storage 2026-07-12 13:29:09 +02:00
9qeklajc f588147b41 use slug base 2026-07-01 17:01:32 +02:00
9qeklajc 9fcf870e3f add provider slug 2026-06-29 23:30:09 +02:00
9qeklajc ed6e0c0189 Merge main into fix-reset-reserve-balance
Resolve pay_for_request conflict: keep main's atomic child-key
balance_limit guard and post-rowcount-check ordering, and stamp
reserved_at on both billing and child reservations.
2026-06-12 21:08:53 +02:00
9qeklajc 919dcf5535 make key reservation reset predictable 2026-06-12 19:45:39 +02:00
Jeroen UbbinkandClaude Sonnet 4.6 feb76bc89d fix: persist and propagate key constraints from Lightning invoices
LightningInvoice had no columns for balance_limit, balance_limit_reset,
or validity_date. SQLModel silently dropped these constructor kwargs, so
create_api_key_from_invoice always produced an unconstrained key.

Add the three columns to LightningInvoice with a migration, and wire them
through to the ApiKey in create_api_key_from_invoice, matching the pattern
already used in the child key creation path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 14:58:40 +02:00
9qeklajc aaa80d47bc add api key creation date 2026-06-01 23:27:26 +02:00
9qeklajc 1f2ff8a99c added admin token 2026-04-25 11:18:58 +02:00
9qeklajc aca8d43a61 fix migration 2026-04-24 23:05:09 +02:00
9qeklajcandGitHub 7fe4c1963b Merge pull request #470 from Routstr/add-dev-cut
update migration rev id
2026-04-24 15:21:32 +02:00
9qeklajc 9a0919f149 update migration rev id 2026-04-24 15:19:53 +02:00
9qeklajcandGitHub d69ab913d4 Merge pull request #419 from Routstr/add-dev-cut
add-dev-cut
2026-04-23 23:22:23 +02:00
9qeklajc c53e72e80a update migration 2026-04-22 23:31:49 +02:00
9qeklajc 05115c3387 add api-key history and fix race condition while topup 2026-04-22 21:50:22 +02:00
9qeklajc d84d249f2c Merge branch 'main' into add-dev-cut
# Conflicts:
#	routstr/auth.py
2026-04-15 23:07:37 +02:00
9qeklajc 85a1ea4b4c add apikey refund tracking 2026-04-10 15:34:19 +02:00
9qeklajc 685368bb0a add support to using custom model ids 2026-04-06 20:09:12 +02:00
9qeklajc a7b815b29f add-dev-cut 2026-03-23 20:07:24 +01:00
9qeklajc 2c2124952f add transaction view 2026-03-11 23:39:22 +01:00
9qeklajc 8a373276ce cache x-cashu tokens 2026-03-11 22:03:05 +01:00
9qeklajc 3ea0a267dd add routstr logic 2026-02-15 16:13:29 +01:00
9qeklajc 2c358276bf add setting jsonb 2026-02-13 23:02:24 +01:00
9qeklajc ba5f9fc181 improvve key logic 2026-02-04 23:10:50 +01:00
9qeklajc 1d043cd98d lint 2026-01-27 09:22:07 +01:00
Shroominic 51c3e5dcd7 fix migrations 2026-01-25 22:58:36 +08:00
Shroominic 788075f656 fix db migration 2026-01-25 22:44:13 +08:00
Shroominic 0bbcacd186 fix: allow multiple provider keys per base url
Use a composite unique constraint and query filters so providers
can share base URLs with distinct API keys.
2026-01-25 22:18:39 +08:00
9qeklajc fc042c768c support child keys mapped to parent balance 2026-01-10 19:53:27 +01:00
Shroominic 71e7c2171b add missing migration 2025-12-25 19:36:26 +01:00
9qeklajc 085ff75d1d create and topup token with lightning 2025-12-10 22:47:37 +01:00
Shroominic 0da08fb945 refactor pricing, provider fees, realtime model map updates 2025-10-20 12:45:02 +08:00
Shroominic 61a0559f8e Add upstream providers management and model integration
- Created migration scripts to establish the `upstream_providers` table and integrate it with the `models` table.
- Enhanced the proxy functionality to support dynamic upstream provider initialization and model resolution.
- Implemented API endpoints for managing upstream providers, including CRUD operations and model fetching.
- Refactored pricing calculations to accommodate upstream provider overrides and ensure accurate cost estimation.
- Updated the admin interface to allow for easy management of upstream providers and their associated models.
2025-10-13 17:17:54 +08:00
Shroominic 73d3613301 move MODELS to DB 2025-09-10 13:28:43 +01:00
Shroominic 14718843de feat(settings): add DB-backed Settings and SettingsService with env merge 2025-09-08 10:52:21 +01:00
Shroominic 9ffd44eac6 undo cursor agent stuff 2025-08-23 17:13:38 -03:00
Shroominic 73e6e259bc Merge remote-tracking branch 'refs/remotes/origin/final-fixes-cleanup' into final-fixes-cleanup 2025-08-23 17:08:01 -03:00
Cursor Agentanddb2002dominic 5061d69f57 Replace print statements with structured logging across multiple files
Co-authored-by: db2002dominic <db2002dominic@gmail.com>
2025-08-23 20:04:19 +00:00
Shroominic 8175188b06 ruff fmt 2025-08-23 17:01:28 -03:00
Shroominic 93f2bf98b8 typing 2025-08-23 16:48:53 -03:00
Shroominic 5831c3e4d4 undo total_balance change 2025-08-22 11:22:59 -03:00
Shroominic 4a338505cc reserved balance wip 2025-08-19 16:54:17 -03:00
Shroominic dda016669f add refund mint+currency to api table 2025-08-13 16:51:00 -03:00
Shroominic 6924f6c18a rm alembic logging 2025-08-12 15:31:17 -03:00
Shroominic 67348d7fb2 rm alembic logging override 2025-08-12 14:36:22 -03:00
Cursor Agent d1cb123f91 Merge branch 'main' into chdir-router-routstr - Resolved conflict by keeping deletion of setup.py 2025-08-10 18:50:50 +00:00
Shroominic 503e861621 change dir 'router' -> 'routstr' 2025-08-09 14:55:26 -03:00