set private key

This commit is contained in:
callebtc 2022-11-07 14:00:05 +01:00
parent f4da8a9e2b
commit bc35741a8a
2 changed files with 10 additions and 3 deletions

View File

@ -97,3 +97,7 @@ ECLAIR_PASS=eclairpw
# Enter /api in LightningTipBot to get your key # Enter /api in LightningTipBot to get your key
LNTIPS_API_KEY=LNTIPS_ADMIN_KEY LNTIPS_API_KEY=LNTIPS_ADMIN_KEY
LNTIPS_API_ENDPOINT=https://ln.tips LNTIPS_API_ENDPOINT=https://ln.tips
# Cashu Mint
# Use a long-enough random (!) private key
CASHU_PRIVATE_KEY="SuperSecretPrivateKey"

View File

@ -1,5 +1,6 @@
import asyncio import asyncio
from environs import Env # type: ignore
from fastapi import APIRouter from fastapi import APIRouter
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
@ -20,11 +21,13 @@ cashu_static_files = [
] ]
from cashu.mint.ledger import Ledger from cashu.mint.ledger import Ledger
env = Env()
env.read_env()
ledger = Ledger( ledger = Ledger(
db=db, db=db,
# seed=MINT_PRIVATE_KEY, seed=env.str("CASHU_PRIVATE_KEY", default="SuperSecretPrivateKey"),
seed="asd", derivation_path="0/0/0/0",
derivation_path="0/0/0/1",
) )
cashu_ext: APIRouter = APIRouter(prefix="/cashu", tags=["cashu"]) cashu_ext: APIRouter = APIRouter(prefix="/cashu", tags=["cashu"])