From 9622346cc2d9bd356a8b8a49d9beaad8dbc0e4f1 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Mon, 25 Aug 2025 01:09:20 -0300 Subject: [PATCH] todo --- routstr/balance.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/routstr/balance.py b/routstr/balance.py index 99eb19a3..450fce43 100644 --- a/routstr/balance.py +++ b/routstr/balance.py @@ -33,6 +33,18 @@ async def account_info(key: ApiKey = Depends(get_key_from_header)) -> dict: } +# TODO: Implement POST /v1/wallet/create endpoint +# This endpoint should accept: +# - cashu_token (required): The eCash token to deposit +# - refund_lnurl (optional): LNURL for refunds (instead of refund_address in validate_bearer_key) +# - refund_expiry (optional): Expiry timestamp for the key (maps to key_expiry_time in validate_bearer_key) +# The endpoint should: +# 1. Create a new wallet/API key from the cashu_token +# 2. Store refund_lnurl and refund_expiry in the database +# 3. Return the API key (rstr_...) and balance +# Note: validate_bearer_key already supports refund_address and key_expiry_time params + + @router.get("/create") async def create_balance( initial_balance_token: str, session: AsyncSession = Depends(get_session)