mm-btc 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mm_btc/blockstream.py +7 -7
- mm_btc/cli/cmd/address_cmd.py +1 -1
- mm_btc/cli/cmd/utxo_cmd.py +1 -1
- {mm_btc-0.4.1.dist-info → mm_btc-0.4.2.dist-info}/METADATA +2 -2
- {mm_btc-0.4.1.dist-info → mm_btc-0.4.2.dist-info}/RECORD +7 -7
- {mm_btc-0.4.1.dist-info → mm_btc-0.4.2.dist-info}/WHEEL +0 -0
- {mm_btc-0.4.1.dist-info → mm_btc-0.4.2.dist-info}/entry_points.txt +0 -0
mm_btc/blockstream.py
CHANGED
|
@@ -67,10 +67,10 @@ class BlockstreamClient:
|
|
|
67
67
|
res = await self._request(f"/address/{address}")
|
|
68
68
|
try:
|
|
69
69
|
if res.status_code == 400:
|
|
70
|
-
return res.
|
|
71
|
-
return res.
|
|
70
|
+
return res.to_err("400 Bad Request")
|
|
71
|
+
return res.to_ok(Address(**res.parse_json_body()))
|
|
72
72
|
except Exception as e:
|
|
73
|
-
result = res.
|
|
73
|
+
result = res.to_err(e)
|
|
74
74
|
return result
|
|
75
75
|
|
|
76
76
|
async def get_confirmed_balance(self, address: str) -> Result[int]:
|
|
@@ -83,9 +83,9 @@ class BlockstreamClient:
|
|
|
83
83
|
for _ in range(self.attempts):
|
|
84
84
|
res = await self._request(f"/address/{address}/utxo")
|
|
85
85
|
try:
|
|
86
|
-
return res.
|
|
86
|
+
return res.to_ok([Utxo(**out) for out in res.parse_json_body()])
|
|
87
87
|
except Exception as e:
|
|
88
|
-
result = res.
|
|
88
|
+
result = res.to_err(e)
|
|
89
89
|
return result
|
|
90
90
|
|
|
91
91
|
async def get_mempool(self) -> Result[Mempool]:
|
|
@@ -93,9 +93,9 @@ class BlockstreamClient:
|
|
|
93
93
|
for _ in range(self.attempts):
|
|
94
94
|
res = await self._request("/mempool")
|
|
95
95
|
try:
|
|
96
|
-
return res.
|
|
96
|
+
return res.to_ok(Mempool(**res.parse_json_body()))
|
|
97
97
|
except Exception as e:
|
|
98
|
-
result = res.
|
|
98
|
+
result = res.to_err(e)
|
|
99
99
|
return result
|
|
100
100
|
|
|
101
101
|
async def _request(self, url: str) -> HttpResponse:
|
mm_btc/cli/cmd/address_cmd.py
CHANGED
mm_btc/cli/cmd/utxo_cmd.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mm-btc
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Requires-Python: >=3.12
|
|
5
5
|
Requires-Dist: bitcoinlib~=0.7.3
|
|
6
6
|
Requires-Dist: bit~=0.8.0
|
|
7
7
|
Requires-Dist: hdwallet~=3.4.0
|
|
8
|
-
Requires-Dist: mm-crypto-utils>=0.3.
|
|
8
|
+
Requires-Dist: mm-crypto-utils>=0.3.6
|
|
9
9
|
Requires-Dist: mnemonic~=0.21
|
|
10
10
|
Requires-Dist: typer~=0.15.2
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
mm_btc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mm_btc/blockstream.py,sha256=
|
|
2
|
+
mm_btc/blockstream.py,sha256=So188aLle67XfbyqR0P3Zfgza9JD2C00xsSiKo-pDgI,3274
|
|
3
3
|
mm_btc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
mm_btc/tx.py,sha256=7KTMNuL1n8rRj_245BV1bH9M2_PctNvlvPsLEsRTYx4,245
|
|
5
5
|
mm_btc/wallet.py,sha256=_pGTuAf6Y9KzaWTTSg_tn6WEoRsGqhxJuPof0_xyrmM,2333
|
|
6
6
|
mm_btc/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
mm_btc/cli/cli.py,sha256=peUio3WAa2oXomZvq-87QAbuTP37CPNoq5RAG7ax3ns,2656
|
|
8
8
|
mm_btc/cli/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
mm_btc/cli/cmd/address_cmd.py,sha256=
|
|
9
|
+
mm_btc/cli/cmd/address_cmd.py,sha256=8CN59e9MpCTp6ILpo9UpYLM3AqPrh0jbA5FZqqSlGkI,313
|
|
10
10
|
mm_btc/cli/cmd/create_tx_cmd.py,sha256=QHhfA91FGWf5r6DkWTaXInZJi6HYLfxueA1GtcBD2-s,703
|
|
11
11
|
mm_btc/cli/cmd/decode_tx_cmd.py,sha256=0jGlUjnA1X2Q2aYwSBeAjqVNZIBsW5X2lEwIpSfWJsU,175
|
|
12
12
|
mm_btc/cli/cmd/mnemonic_cmd.py,sha256=CY6tPsqOTNfM-4WhKDhqitCi2OeqSIUMEUTFIRGHwIg,1254
|
|
13
|
-
mm_btc/cli/cmd/utxo_cmd.py,sha256=
|
|
14
|
-
mm_btc-0.4.
|
|
15
|
-
mm_btc-0.4.
|
|
16
|
-
mm_btc-0.4.
|
|
17
|
-
mm_btc-0.4.
|
|
13
|
+
mm_btc/cli/cmd/utxo_cmd.py,sha256=Py8yjh50rMK5jrNwKyYUxS4n4NJPiznJxi4wLPFzwoM,310
|
|
14
|
+
mm_btc-0.4.2.dist-info/METADATA,sha256=loBM4SDfgAFGYFr3JOrXutJUZpM59NYD8E6bgUqPwHY,261
|
|
15
|
+
mm_btc-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
mm_btc-0.4.2.dist-info/entry_points.txt,sha256=KphzLNE9eb9H1DO-L0gvBQaQT5ImedyVCN4a6svfiRg,46
|
|
17
|
+
mm_btc-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|