mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-10 04:04:19 +01:00
* nut-19 sign mint quote * ephemeral key for quote * `mint` adjustments + crypto/nut19.py * wip: mint side working * fix import * post-merge fixups * more fixes * make format * move nut19 to nuts directory * `key` -> `privkey` and `pubkey` * make format * mint_info method for nut-19 support * fix tests imports * fix signature missing positional argument + fix db migration format not correctly escaped + pass in NUT-19 keypair to `request_mint` `request_mint_with_callback` * make format * fix `get_invoice_status` * rename to xx * nutxx -> nut20 * mypy * remove `mint_quote_signature_required` as per spec * wip edits * clean up * fix tests * fix deprecated api tests * fix redis tests * fix cache tests * fix regtest mint external * fix mint regtest * add test without signature * test pubkeys in quotes * wip * add compat --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
31 lines
554 B
Python
31 lines
554 B
Python
from typing import Dict, List, Protocol
|
|
|
|
import httpx
|
|
|
|
from ..core.base import Proof, Unit, WalletKeyset
|
|
from ..core.crypto.secp import PrivateKey
|
|
from ..core.db import Database
|
|
|
|
|
|
class SupportsPrivateKey(Protocol):
|
|
private_key: PrivateKey
|
|
|
|
|
|
class SupportsDb(Protocol):
|
|
db: Database
|
|
proofs: List[Proof]
|
|
|
|
|
|
class SupportsKeysets(Protocol):
|
|
keysets: Dict[str, WalletKeyset] # holds keysets
|
|
keyset_id: str
|
|
unit: Unit
|
|
|
|
|
|
class SupportsHttpxClient(Protocol):
|
|
httpx: httpx.AsyncClient
|
|
|
|
|
|
class SupportsMintURL(Protocol):
|
|
url: str
|