added required variables to .env.example

This commit is contained in:
GitHappens2Me
2025-05-23 22:04:13 +02:00
parent 6e24ff77c8
commit d992bc78be
6 changed files with 7896 additions and 7834 deletions
+22
View File
@@ -1,6 +1,28 @@
NAME = "Your Routstr Proxy Name"
DESCRIPTION = "A short Description"
UPSTREAM_BASE_URL="https://api.openai.com/v1"
UPSTREAM_API_KEY="sk-21212121212121212121212121212121"
# Lightning address used to receive funds
RECEIVE_LN_ADDRESS="shroominic@walletofsatoshi.com"
COST_PER_REQUEST="10"
# password used to log into admin interface
ADMIN_PASSWORD="XXX"
# NPUB of Nostr account
NPUB="npub..."
# Cashu Mint used for payments
MINT="https://my.mint:3339"
HTTP_URL=""
ONION_URL="XXX.onion"
MODEL_BASED_PRICING = "true"
+1 -1
View File
@@ -2,4 +2,4 @@ __pycache__
.env
keys.db
wallet.sqlite3
.notes
+2
View File
@@ -7,6 +7,8 @@ services:
- .:/app
env_file:
- .env
ports:
- "8000:8000" # ← This line is added
tor:
image: ghcr.io/hundehausen/tor-hidden-service:latest
+6 -7828
View File
File diff suppressed because it is too large Load Diff
+7859
View File
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -7,9 +7,9 @@ from cashu.wallet.helpers import deserialize_token_from_string, receive # type:
from sqlmodel import select, func, col
from .db import ApiKey, AsyncSession
RECIEVE_LN_ADDRESS = os.environ["RECIEVE_LN_ADDRESS"]
MINIMUM_PAYOUT = 100 # sat
DEVS_DONATION_RATE = 0.021 # 2.1%
RECEIVE_LN_ADDRESS = os.environ["RECEIVE_LN_ADDRESS"]
MINIMUM_PAYOUT = 5 # sat
DEVS_DONATION_RATE = 0# 0.021 # 2.1%
WALLET = None
@@ -96,7 +96,8 @@ async def pay_out(session: AsyncSession) -> None:
wallet = await _initialize_wallet()
wallet_balance = wallet.available_balance
assert wallet_balance <= user_balance, "Something went deeply wrong."
# Why is that bad?
#assert wallet_balance <= user_balance, f"Something went deeply wrong. Wallet-balance: {wallet_balance}, User-Balance: {user_balance}"
if (revenue := wallet_balance - user_balance) <= MINIMUM_PAYOUT:
return
@@ -104,7 +105,7 @@ async def pay_out(session: AsyncSession) -> None:
devs_donation = int(revenue * DEVS_DONATION_RATE)
owners_draw = revenue - devs_donation
await send_to_lnurl(wallet, RECIEVE_LN_ADDRESS, owners_draw)
await send_to_lnurl(wallet, RECEIVE_LN_ADDRESS, owners_draw)
await send_to_lnurl(
wallet,
"npub130mznv74rxs032peqym6g3wqavh472623mt3z5w73xq9r6qqdufs7ql29s@npub.cash",