tonutils 2.0.1b5__py3-none-any.whl → 2.0.1b6__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.
- tonutils/__meta__.py +1 -1
- tonutils/clients/__init__.py +10 -10
- tonutils/clients/adnl/balancer.py +21 -24
- tonutils/clients/adnl/client.py +21 -24
- tonutils/clients/adnl/provider/config.py +22 -7
- tonutils/clients/base.py +17 -11
- tonutils/clients/http/__init__.py +11 -11
- tonutils/clients/http/balancer.py +11 -11
- tonutils/clients/http/clients/__init__.py +10 -10
- tonutils/clients/http/clients/chainstack.py +3 -3
- tonutils/clients/http/clients/quicknode.py +2 -3
- tonutils/clients/http/clients/tatum.py +3 -3
- tonutils/clients/http/clients/tonapi.py +9 -10
- tonutils/clients/http/clients/toncenter.py +50 -23
- tonutils/clients/http/{providers → provider}/__init__.py +4 -1
- tonutils/clients/http/{providers → provider}/base.py +71 -7
- tonutils/clients/http/{providers/toncenter → provider}/models.py +43 -1
- tonutils/clients/http/{providers/tonapi/provider.py → provider/tonapi.py} +8 -8
- tonutils/clients/http/{providers/toncenter/provider.py → provider/toncenter.py} +22 -14
- tonutils/clients/limiter.py +61 -59
- tonutils/clients/protocol.py +2 -2
- tonutils/contracts/wallet/base.py +2 -3
- tonutils/contracts/wallet/messages.py +4 -8
- tonutils/tonconnect/bridge/__init__.py +0 -0
- tonutils/tonconnect/events.py +0 -0
- tonutils/tonconnect/models/__init__.py +0 -0
- tonutils/tonconnect/storage.py +0 -0
- tonutils/tonconnect/tonconnect.py +0 -0
- tonutils/tools/block_scanner/__init__.py +2 -9
- tonutils/tools/block_scanner/events.py +48 -7
- tonutils/tools/block_scanner/scanner.py +316 -222
- tonutils/tools/block_scanner/storage.py +11 -0
- tonutils/utils.py +0 -48
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/METADATA +1 -1
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/RECORD +39 -41
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/WHEEL +1 -1
- tonutils/clients/http/providers/response.py +0 -85
- tonutils/clients/http/providers/tonapi/__init__.py +0 -3
- tonutils/clients/http/providers/tonapi/models.py +0 -47
- tonutils/clients/http/providers/toncenter/__init__.py +0 -3
- tonutils/tools/block_scanner/annotations.py +0 -23
- tonutils/tools/block_scanner/dispatcher.py +0 -141
- tonutils/tools/block_scanner/traversal.py +0 -97
- tonutils/tools/block_scanner/where.py +0 -53
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/entry_points.txt +0 -0
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/licenses/LICENSE +0 -0
- {tonutils-2.0.1b5.dist-info → tonutils-2.0.1b6.dist-info}/top_level.txt +0 -0
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
from .events import
|
|
2
|
-
BlockEvent,
|
|
3
|
-
TransactionEvent,
|
|
4
|
-
TransactionsEvent,
|
|
5
|
-
)
|
|
1
|
+
from .events import BlockEvent, ErrorEvent, TransactionsEvent
|
|
6
2
|
from .scanner import BlockScanner
|
|
7
|
-
from .where import Where
|
|
8
|
-
|
|
9
3
|
|
|
10
4
|
__all__ = [
|
|
11
5
|
"BlockScanner",
|
|
12
6
|
"BlockEvent",
|
|
13
|
-
"
|
|
7
|
+
"ErrorEvent",
|
|
14
8
|
"TransactionsEvent",
|
|
15
|
-
"Where",
|
|
16
9
|
]
|
|
@@ -8,24 +8,65 @@ from tonutils.clients import LiteBalancer, LiteClient
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@dataclass(frozen=True, slots=True)
|
|
11
|
-
class
|
|
11
|
+
class _BaseEvent:
|
|
12
|
+
"""Base event for BlockScanner.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
client: Lite client/balancer.
|
|
16
|
+
mc_block: Masterchain block being processed.
|
|
17
|
+
context: Shared user context.
|
|
18
|
+
"""
|
|
19
|
+
|
|
12
20
|
client: t.Union[LiteBalancer, LiteClient]
|
|
13
21
|
mc_block: BlockIdExt
|
|
14
|
-
context: t.
|
|
22
|
+
context: t.Mapping[str, t.Any]
|
|
15
23
|
|
|
16
24
|
|
|
17
25
|
@dataclass(frozen=True, slots=True)
|
|
18
|
-
class
|
|
19
|
-
|
|
26
|
+
class ErrorEvent(_BaseEvent):
|
|
27
|
+
"""Error raised during scanning or handler execution.
|
|
28
|
+
|
|
29
|
+
Attributes:
|
|
30
|
+
client: Lite client/balancer.
|
|
31
|
+
mc_block: Masterchain block being processed.
|
|
32
|
+
context: Shared user context.
|
|
33
|
+
error: Raised exception.
|
|
34
|
+
event: Related event (if any).
|
|
35
|
+
handler: Handler/callable that raised (if any).
|
|
36
|
+
block: Related shard block (if any).
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
error: BaseException
|
|
40
|
+
event: t.Any = None
|
|
41
|
+
handler: t.Any = None
|
|
42
|
+
block: t.Optional[BlockIdExt] = None
|
|
20
43
|
|
|
21
44
|
|
|
22
45
|
@dataclass(frozen=True, slots=True)
|
|
23
|
-
class
|
|
46
|
+
class BlockEvent(_BaseEvent):
|
|
47
|
+
"""Shard block event.
|
|
48
|
+
|
|
49
|
+
Attributes:
|
|
50
|
+
client: Lite client/balancer.
|
|
51
|
+
mc_block: Masterchain block being processed.
|
|
52
|
+
context: Shared user context.
|
|
53
|
+
block: Shard block identifier.
|
|
54
|
+
"""
|
|
55
|
+
|
|
24
56
|
block: BlockIdExt
|
|
25
|
-
transaction: Transaction
|
|
26
57
|
|
|
27
58
|
|
|
28
59
|
@dataclass(frozen=True, slots=True)
|
|
29
|
-
class TransactionsEvent(
|
|
60
|
+
class TransactionsEvent(_BaseEvent):
|
|
61
|
+
"""Transactions event for a shard block.
|
|
62
|
+
|
|
63
|
+
Attributes:
|
|
64
|
+
client: Lite client/balancer.
|
|
65
|
+
mc_block: Masterchain block being processed.
|
|
66
|
+
context: Shared user context.
|
|
67
|
+
block: Shard block identifier.
|
|
68
|
+
transactions: Transactions from this block.
|
|
69
|
+
"""
|
|
70
|
+
|
|
30
71
|
block: BlockIdExt
|
|
31
72
|
transactions: t.List[Transaction] = field(default_factory=list)
|