mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 02:24:20 +01:00
bumop to 0.8
This commit is contained in:
@@ -115,7 +115,7 @@ cashu info
|
||||
|
||||
Returns:
|
||||
```bash
|
||||
Version: 0.7.0
|
||||
Version: 0.8
|
||||
Debug: False
|
||||
Cashu dir: /home/user/.cashu
|
||||
Wallet: wallet
|
||||
|
||||
@@ -16,7 +16,7 @@ class P2SHScript(BaseModel):
|
||||
class Proof(BaseModel):
|
||||
id: Union[
|
||||
None, str
|
||||
] = "" # NOTE: None for backwards compatibility of old clients < 0.3
|
||||
] = "" # NOTE: None for backwards compatibility for old clients that do not include the keyset id < 0.3
|
||||
amount: int = 0
|
||||
secret: str = ""
|
||||
C: str = ""
|
||||
@@ -78,7 +78,7 @@ class BlindedMessages(BaseModel):
|
||||
|
||||
|
||||
class PostMintResponseLegacy(BaseModel):
|
||||
# NOTE: Backwards compability for < 0.7.1 where we used a simple list and not a key-value dictionary
|
||||
# NOTE: Backwards compability for < 0.8 where we used a simple list and not a key-value dictionary
|
||||
__root__: List[BlindedSignature] = []
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class SplitRequest(BaseModel):
|
||||
amount: int
|
||||
output_data: Union[
|
||||
BlindedMessages, None
|
||||
] = None # backwards compatibility with clients < v0.2.2
|
||||
] = None # backwards compatibility with clients that called this output_data and not outputs < v0.2.2
|
||||
outputs: Union[BlindedMessages, None] = None
|
||||
|
||||
def __init__(self, **data):
|
||||
|
||||
@@ -57,4 +57,4 @@ NOSTR_PRIVATE_KEY = env.str("NOSTR_PRIVATE_KEY", default=None)
|
||||
NOSTR_RELAYS = env.list("NOSTR_RELAYS", default=["wss://nostr-pub.wellorder.net"])
|
||||
|
||||
MAX_ORDER = 64
|
||||
VERSION = "0.7.0"
|
||||
VERSION = "0.8"
|
||||
|
||||
@@ -262,12 +262,15 @@ class LedgerAPI:
|
||||
reponse_dict = resp.json()
|
||||
self.raise_on_error(reponse_dict)
|
||||
try:
|
||||
# backwards compatibility: parse promises < 0.7.1 with no "promises" field
|
||||
promises = PostMintResponseLegacy.parse_obj(reponse_dict)
|
||||
return self._construct_proofs(promises, secrets, rs)
|
||||
# backwards compatibility: parse promises < 0.8 with no "promises" field
|
||||
promises = PostMintResponseLegacy.parse_obj(reponse_dict).__root__
|
||||
logger.warning(
|
||||
"Parsing token with no promises field. Please upgrade mint to 0.8"
|
||||
)
|
||||
except:
|
||||
promises = PostMintResponse.parse_obj(reponse_dict)
|
||||
return self._construct_proofs(promises.promises, secrets, rs)
|
||||
promises = PostMintResponse.parse_obj(reponse_dict).promises
|
||||
|
||||
return self._construct_proofs(promises, secrets, rs)
|
||||
|
||||
async def split(self, proofs, amount, scnd_secret: Optional[str] = None):
|
||||
"""Consume proofs and create new promises based on amount split.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "cashu"
|
||||
version = "0.7.0"
|
||||
version = "0.8"
|
||||
description = "Ecash wallet and mint."
|
||||
authors = ["calle <callebtc@protonmail.com>"]
|
||||
license = "MIT"
|
||||
|
||||
2
setup.py
2
setup.py
@@ -13,7 +13,7 @@ entry_points = {"console_scripts": ["cashu = cashu.wallet.cli:cli"]}
|
||||
|
||||
setuptools.setup(
|
||||
name="cashu",
|
||||
version="0.7.0",
|
||||
version="0.8",
|
||||
description="Ecash wallet and mint with Bitcoin Lightning support",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
|
||||
Reference in New Issue
Block a user