Files
nutshell/wallet/models.py
2022-09-11 04:31:37 +03:00

21 lines
367 B
Python

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],
)