mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
* mint does not start yet * fix import * revert mint db migrations * handle zero fee case * cli: adjust fee message * wallet: replace requests with httpx * clean up * rename http client decorator * fix pending check in main, todo: TEST PROXIES WITH HTTPX * fix up * use httpx for nostr as well * update packages to same versions as https://github.com/lnbits/lnbits/pull/1609/files * fix proof deserialization * check for string * tests passing * adjust wallet api tests * lockfile * add correct responses to Lightning interface and delete melt_id for proofs for which the payent has failed * fix create_invoice checking_id response * migrations atomic * proofs are stored automatically when created * make format * use bolt11 lib * stricter type checking * add fee response to payments * assert fees in test_melt * test that mint_id and melt_id is stored correctly in proofs and proofs_used * remove traces * refactor: Lightning interface into own file and LedgerCrud with typing * fix tests * fix payment response * rename variable
81 lines
1.4 KiB
Python
81 lines
1.4 KiB
Python
from typing import Dict, List, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from ...core.base import Invoice
|
|
|
|
|
|
class PayResponse(BaseModel):
|
|
ok: Optional[bool] = None
|
|
|
|
|
|
class InvoiceResponse(BaseModel):
|
|
amount: Optional[int] = None
|
|
invoice: Optional[Invoice] = None
|
|
id: Optional[str] = None
|
|
|
|
|
|
class SwapResponse(BaseModel):
|
|
outgoing_mint: str
|
|
incoming_mint: str
|
|
invoice: Invoice
|
|
balances: Dict
|
|
|
|
|
|
class BalanceResponse(BaseModel):
|
|
balance: int
|
|
keysets: Optional[Dict] = None
|
|
mints: Optional[Dict] = None
|
|
|
|
|
|
class SendResponse(BaseModel):
|
|
balance: int
|
|
token: str
|
|
npub: Optional[str] = None
|
|
|
|
|
|
class ReceiveResponse(BaseModel):
|
|
initial_balance: int
|
|
balance: int
|
|
|
|
|
|
class BurnResponse(BaseModel):
|
|
balance: int
|
|
|
|
|
|
class PendingResponse(BaseModel):
|
|
pending_token: Dict
|
|
|
|
|
|
class LockResponse(BaseModel):
|
|
P2PK: Optional[str]
|
|
|
|
|
|
class LocksResponse(BaseModel):
|
|
locks: List[str]
|
|
|
|
|
|
class InvoicesResponse(BaseModel):
|
|
invoices: List[Invoice]
|
|
|
|
|
|
class WalletsResponse(BaseModel):
|
|
wallets: Dict
|
|
|
|
|
|
class RestoreResponse(BaseModel):
|
|
balance: int
|
|
|
|
|
|
class InfoResponse(BaseModel):
|
|
version: str
|
|
wallet: str
|
|
debug: bool
|
|
cashu_dir: str
|
|
mint_urls: List[str] = []
|
|
settings: Optional[str]
|
|
tor: bool
|
|
nostr_public_key: Optional[str] = None
|
|
nostr_relays: List[str] = []
|
|
socks_proxy: Optional[str] = None
|