bitcoinwatcher 2.11b2__tar.gz → 2.12__tar.gz

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.
Files changed (37) hide show
  1. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/PKG-INFO +2 -2
  2. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/address_listener/address_listener.py +3 -1
  3. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/test_bitcoin_utils.py +10 -1
  4. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/bitcoin_utils.py +12 -0
  5. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoinwatcher.egg-info/PKG-INFO +2 -2
  6. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoinwatcher.egg-info/requires.txt +1 -1
  7. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/pyproject.toml +2 -2
  8. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/LICENSE +0 -0
  9. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/README.md +0 -0
  10. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/__init__.py +0 -0
  11. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/address_listener/__init__.py +0 -0
  12. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/address_listener/simple_address_listener.py +0 -0
  13. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/models/__init__.py +0 -0
  14. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/models/address_tx_data.py +0 -0
  15. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/__init__.py +0 -0
  16. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/data/__init__.py +0 -0
  17. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/data/transactions.py +0 -0
  18. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/test_address_listener.py +0 -0
  19. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tests/test_bitcoin_rpc.py +0 -0
  20. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_extractors/__init__.py +0 -0
  21. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_extractors/abstract_extractor.py +0 -0
  22. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_extractors/bitcoin_rpc.py +0 -0
  23. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_extractors/default.py +0 -0
  24. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_extractors/mempool.py +0 -0
  25. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_listener/__init__.py +0 -0
  26. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_listener/abstract_tx_listener.py +0 -0
  27. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/tx_listener/zmq_listener.py +0 -0
  28. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/__init__.py +0 -0
  29. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/benchmark.py +0 -0
  30. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/bitcoin_rpc.py +0 -0
  31. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/constants.py +0 -0
  32. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/context_aware_logging.py +0 -0
  33. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoin/utils/inscription_utils.py +0 -0
  34. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoinwatcher.egg-info/SOURCES.txt +0 -0
  35. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoinwatcher.egg-info/dependency_links.txt +0 -0
  36. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/bitcoinwatcher.egg-info/top_level.txt +0 -0
  37. {bitcoinwatcher-2.11b2 → bitcoinwatcher-2.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitcoinwatcher
3
- Version: 2.11b2
3
+ Version: 2.12
4
4
  Summary: bitcoinwatcher is a Python library that implements a ZMQ subscriber and provides abstractions to build custom address watchers. This library is designed to make it easy for developers to monitor Bitcoin addresses and react to changes in their state.
5
5
  Author: twosatsmaxi
6
6
  License: Apache License
@@ -224,7 +224,7 @@ Requires-Dist: idna==3.7
224
224
  Requires-Dist: pyzmq==25.1.2
225
225
  Requires-Dist: requests==2.31.0
226
226
  Requires-Dist: urllib3==2.2.1
227
- Requires-Dist: bitcoinlib==0.7.0
227
+ Requires-Dist: bitcoinlib==0.7.4
228
228
  Requires-Dist: ordipool==1.2.0
229
229
  Requires-Dist: pyzmq==25.1.2
230
230
  Requires-Dist: python-bitcoinrpc==1.0
@@ -10,6 +10,7 @@ from bitcoin.tx_extractors.default import DefaultTxAddressDataExtractor
10
10
  from bitcoin.tx_listener.abstract_tx_listener import AbstractTxListener
11
11
  from bitcoin.utils.constants import default_host
12
12
  from bitcoin.utils.context_aware_logging import logger
13
+ from bitcoin.utils.bitcoin_utils import has_satflow_op_return
13
14
 
14
15
 
15
16
  class AbstractAddressListener(AbstractTxListener, ABC):
@@ -48,7 +49,8 @@ class AbstractAddressListener(AbstractTxListener, ABC):
48
49
  address_tx_data = address_tx_data
49
50
  # filter the address we are interested in
50
51
  addresses_for_events = self.filter_address_tx_data(address_tx_data)
51
- if len(addresses_for_events) == 0:
52
+
53
+ if len(addresses_for_events) == 0 and not has_satflow_op_return(tx):
52
54
  return
53
55
 
54
56
  for address in addresses_for_events:
@@ -3,7 +3,7 @@ from unittest import TestCase
3
3
  from bitcoinlib.transactions import Transaction
4
4
 
5
5
  from bitcoin.tests.data.transactions import batch_airdrop_tx_hex, tx_hex, non_reveal_tx_hex, tx_hex_2
6
- from bitcoin.utils.bitcoin_utils import is_reveal_tx, count_reveal_inputs
6
+ from bitcoin.utils.bitcoin_utils import is_reveal_tx, count_reveal_inputs, has_satflow_op_return
7
7
 
8
8
 
9
9
  class Test(TestCase):
@@ -34,3 +34,12 @@ class Test(TestCase):
34
34
  def test_count_reveal_in_airdrop_tx(self):
35
35
  tx = Transaction.parse_hex(batch_airdrop_tx_hex, strict=False)
36
36
  self.assertEqual(count_reveal_inputs(tx), 1420)
37
+
38
+ def test_has_satflow_op_return_true(self):
39
+ satflow_tx_hex = "02000000000102121a4369bd06b9123b43f41a072c3832979927e1244dbf27b85b87e4348db6090100000000ffffffffdbe5c4bff3c32c18694c85eafa74c2626c99595156571bc333b58ec9e7e437030000000000ffffffff0398230000000000002200206925778b2282777c97222e5a6b7ce092c521c755f2fd912dd20449a53d741a983cb7590000000000160014dfafb9f5e2e1b8afde774a725aedbb5f127015bb0000000000000000096a07534154464c4f5701419cc0b1bcedab6113b7793c420b0eda8efb706be4a8202d4d9f129ae539880c7027e2abd67a8510771cfa90cffd5a9c76577b1f5388ca869714e629197acdf08d8101400a443de48021e733eb29237abfdd89016a1a171074c399b5a43e5c3349854e3ac1950fe9e27ef7280881f11f67dcc855bb34b2e44e48811d4c0dd4f6e89051ac00000000"
40
+ tx = Transaction.parse_hex(satflow_tx_hex, strict=False)
41
+ self.assertTrue(has_satflow_op_return(tx))
42
+
43
+ def test_has_satflow_op_return_false(self):
44
+ tx = Transaction.parse_hex(tx_hex, strict=False)
45
+ self.assertFalse(has_satflow_op_return(tx))
@@ -16,3 +16,15 @@ def is_reveal_tx(tx: Transaction) -> bool:
16
16
  count_of_inscriptions = count_reveal_inputs(tx)
17
17
  return count_of_inscriptions > 0
18
18
  # check if any of the witness contains ord, convert witness to hex
19
+
20
+
21
+ def has_satflow_op_return(tx: Transaction) -> bool:
22
+ for output in tx.outputs:
23
+ if output.script_type == 'nulldata' and output.lock_script:
24
+ try:
25
+ script_data = output.lock_script.hex()
26
+ if b'SATFLOW'.hex() in script_data:
27
+ return True
28
+ except:
29
+ pass
30
+ return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitcoinwatcher
3
- Version: 2.11b2
3
+ Version: 2.12
4
4
  Summary: bitcoinwatcher is a Python library that implements a ZMQ subscriber and provides abstractions to build custom address watchers. This library is designed to make it easy for developers to monitor Bitcoin addresses and react to changes in their state.
5
5
  Author: twosatsmaxi
6
6
  License: Apache License
@@ -224,7 +224,7 @@ Requires-Dist: idna==3.7
224
224
  Requires-Dist: pyzmq==25.1.2
225
225
  Requires-Dist: requests==2.31.0
226
226
  Requires-Dist: urllib3==2.2.1
227
- Requires-Dist: bitcoinlib==0.7.0
227
+ Requires-Dist: bitcoinlib==0.7.4
228
228
  Requires-Dist: ordipool==1.2.0
229
229
  Requires-Dist: pyzmq==25.1.2
230
230
  Requires-Dist: python-bitcoinrpc==1.0
@@ -5,7 +5,7 @@ idna==3.7
5
5
  pyzmq==25.1.2
6
6
  requests==2.31.0
7
7
  urllib3==2.2.1
8
- bitcoinlib==0.7.0
8
+ bitcoinlib==0.7.4
9
9
  ordipool==1.2.0
10
10
  pyzmq==25.1.2
11
11
  python-bitcoinrpc==1.0
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "bitcoinwatcher"
8
- version = "2.11b2"
8
+ version = "2.12"
9
9
  description = "bitcoinwatcher is a Python library that implements a ZMQ subscriber and provides abstractions to build custom address watchers. This library is designed to make it easy for developers to monitor Bitcoin addresses and react to changes in their state."
10
10
  readme = "README.md"
11
11
  authors = [{name = "twosatsmaxi"}]
@@ -30,7 +30,7 @@ dependencies = [
30
30
  "pyzmq==25.1.2",
31
31
  "requests==2.31.0",
32
32
  "urllib3==2.2.1",
33
- "bitcoinlib==0.7.0",
33
+ "bitcoinlib==0.7.4",
34
34
  "ordipool==1.2.0",
35
35
  "pyzmq==25.1.2",
36
36
  "python-bitcoinrpc==1.0",
File without changes
File without changes
File without changes