mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-04 09:24:22 +01:00
[WIP] [NUTs] NUT-06 update: deprecate amount field in /split (#263)
* mint upgraded and still backwards compatible * cleanup * fix tests * fix things * add deprecated message to new struct * fix test * fix typo * readd endpoint that got lost during merge * version bump in pyproject.toml * remove wallet backwards compatibility because it makes no sense * comment for backwards compat * fix comment
This commit is contained in:
@@ -271,11 +271,6 @@ class PostMintRequest(BaseModel):
|
||||
outputs: List[BlindedMessage]
|
||||
|
||||
|
||||
class PostMintResponseLegacy(BaseModel):
|
||||
# NOTE: Backwards compability for < 0.8.0 where we used a simple list and not a key-value dictionary
|
||||
__root__: List[BlindedSignature] = []
|
||||
|
||||
|
||||
class PostMintResponse(BaseModel):
|
||||
promises: List[BlindedSignature] = []
|
||||
|
||||
@@ -305,7 +300,7 @@ class GetMeltResponse(BaseModel):
|
||||
|
||||
class PostSplitRequest(BaseModel):
|
||||
proofs: List[Proof]
|
||||
amount: int
|
||||
amount: Optional[int] = None # deprecated since 0.13.0
|
||||
outputs: List[BlindedMessage]
|
||||
# signature: Optional[str] = None
|
||||
|
||||
@@ -323,8 +318,14 @@ class PostSplitRequest(BaseModel):
|
||||
|
||||
|
||||
class PostSplitResponse(BaseModel):
|
||||
fst: List[BlindedSignature]
|
||||
snd: List[BlindedSignature]
|
||||
promises: List[BlindedSignature]
|
||||
|
||||
|
||||
# deprecated since 0.13.0
|
||||
class PostSplitResponse_Deprecated(BaseModel):
|
||||
fst: List[BlindedSignature] = []
|
||||
snd: List[BlindedSignature] = []
|
||||
deprecated: str = "The amount field is deprecated since 0.13.0"
|
||||
|
||||
|
||||
# ------- API: CHECK -------
|
||||
|
||||
Reference in New Issue
Block a user