initial commit

This commit is contained in:
callebtc
2022-09-11 04:31:37 +03:00
parent 213968eca7
commit 13a1e47a3d
18 changed files with 1128 additions and 0 deletions

20
wallet/models.py Normal file
View File

@@ -0,0 +1,20 @@
from pydantic import BaseModel
from sqlite3 import Row
class Proof(dict):
amount: int
C_x: int
C_y: int
secret: str
@classmethod
def from_row(cls, row: Row):
return dict(
amount=row[0],
C=dict(
x=int(row[1]),
y=int(row[2]),
),
secret=row[3],
)