mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
coverage badge
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
**Cashu is a Chaumian Ecash wallet and mint with Bitcoin Lightning support.**
|
||||
|
||||
<a href="https://pypi.org/project/cashu/"><img alt="Release" src="https://img.shields.io/pypi/v/cashu?color=black"></a>
|
||||
<a href="https://pypi.org/project/cashu/"><img alt="Release" src="https://img.shields.io/pypi/v/cashu?color=black"></a><a href="https://app.codecov.io/gh/callebtc/cashu"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/callebtc/cashu"></a>
|
||||
|
||||
|
||||
*Disclaimer: The author is NOT a cryptographer and this work has not been reviewed. This means that there is very likely a fatal flaw somewhere. Cashu is still experimental and not production-ready.*
|
||||
|
||||
|
||||
@@ -207,16 +207,6 @@ class Ledger:
|
||||
sum_outputs = sum(self._verify_amount(p.amount) for p in outs)
|
||||
assert sum_outputs - sum_inputs == 0
|
||||
|
||||
def _get_output_split(self, amount: int):
|
||||
"""Given an amount returns a list of amounts returned e.g. 13 is [1, 4, 8]."""
|
||||
self._verify_amount(amount)
|
||||
bits_amt = bin(amount)[::-1][:-2]
|
||||
rv = []
|
||||
for (pos, bit) in enumerate(bits_amt):
|
||||
if bit == "1":
|
||||
rv.append(2**pos)
|
||||
return rv
|
||||
|
||||
async def _request_lightning_invoice(self, amount: int):
|
||||
"""Returns an invoice from the Lightning backend."""
|
||||
error, balance = await self.lightning.status()
|
||||
|
||||
@@ -53,16 +53,6 @@ class LedgerAPI:
|
||||
self.s = requests.Session()
|
||||
self.s.headers.update({"Client-version": VERSION})
|
||||
|
||||
@staticmethod
|
||||
def _get_output_split(amount):
|
||||
"""Given an amount returns a list of amounts returned e.g. 13 is [1, 4, 8]."""
|
||||
bits_amt = bin(amount)[::-1][:-2]
|
||||
rv = []
|
||||
for (pos, bit) in enumerate(bits_amt):
|
||||
if bit == "1":
|
||||
rv.append(2**pos)
|
||||
return rv
|
||||
|
||||
def _construct_proofs(
|
||||
self, promises: List[BlindedSignature], secrets: List[str], rs: List[str]
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user