Error model

This commit is contained in:
callebtc
2022-10-05 19:44:08 +02:00
parent dcc72b3961
commit befd12102c
2 changed files with 45 additions and 20 deletions

View File

@@ -4,6 +4,11 @@ from typing import List
from pydantic import BaseModel
class CashuError(BaseModel):
code = "000"
error = "CashuError"
class P2SHScript(BaseModel):
script: str
signature: str
@@ -110,6 +115,16 @@ class MintRequest(BaseModel):
blinded_messages: List[BlindedMessage] = []
class GetMintResponse(BaseModel):
pr: str
hash: str
class GetMeltResponse(BaseModel):
paid: str
preimage: str
class SplitRequest(BaseModel):
proofs: List[Proof]
amount: int
@@ -127,6 +142,11 @@ class SplitRequest(BaseModel):
self.output_data = None
class PostSplitResponse(BaseModel):
fst: List[BlindedSignature]
snd: List[BlindedSignature]
class CheckRequest(BaseModel):
proofs: List[Proof]