mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
Refactor: P2PKSecret (#323)
* port changes from dleq branch * adjust tests * fix tag serialization * refactor p2pk and secrets into a new Protocol class * clean up code * refactor p2pk types from base * test second refund pubkey
This commit is contained in:
16
cashu/wallet/protocols.py
Normal file
16
cashu/wallet/protocols.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Protocol
|
||||
|
||||
from ..core.crypto.secp import PrivateKey
|
||||
from ..core.db import Database
|
||||
|
||||
|
||||
class SupportsPrivateKey(Protocol):
|
||||
private_key: PrivateKey
|
||||
|
||||
|
||||
class SupportsDb(Protocol):
|
||||
db: Database
|
||||
|
||||
|
||||
class SupportsKeysets(Protocol):
|
||||
keyset_id: str
|
||||
Reference in New Issue
Block a user