pytonapi 0.2.6__tar.gz → 0.2.9__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.
- {pytonapi-0.2.6 → pytonapi-0.2.9}/PKG-INFO +1 -1
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/sse.py +3 -3
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/websocket.py +3 -3
- pytonapi-0.2.9/pytonapi/py.typed +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/__init__.py +2 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/events.py +1 -1
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/liteserver.py +1 -1
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/traces.py +1 -3
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/nft.py +2 -2
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/sse.py +12 -6
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/PKG-INFO +1 -1
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/SOURCES.txt +1 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/setup.py +4 -1
- {pytonapi-0.2.6 → pytonapi-0.2.9}/LICENSE +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/README.md +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/__init__.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/__init__.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/client.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/__init__.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/accounts.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/blockchain.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/dns.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/emulate.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/events.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/inscriptions.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/jettons.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/liteserver.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/nft.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/rates.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/staking.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/storage.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/tonconnect.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/traces.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/wallet.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/exceptions.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/_address.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/_balance.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/accounts.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/blockchain.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/dns.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/domains.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/inscriptions.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/jettons.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/nft.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/rates.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/staking.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/storage.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/tonconnect.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/__init__.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/client.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/__init__.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/accounts.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/blockchain.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/dns.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/emulate.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/events.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/inscriptions.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/jettons.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/liteserver.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/rates.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/staking.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/storage.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/tonconnect.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/traces.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/wallet.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/utils.py +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/dependency_links.txt +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/requires.txt +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/top_level.txt +0 -0
- {pytonapi-0.2.6 → pytonapi-0.2.9}/setup.cfg +0 -0
|
@@ -9,7 +9,7 @@ class SSEMethod(AsyncTonapiClient):
|
|
|
9
9
|
|
|
10
10
|
async def subscribe_to_transactions(
|
|
11
11
|
self,
|
|
12
|
-
handler: Callable[[TransactionEventData,
|
|
12
|
+
handler: Callable[[TransactionEventData, List[Any]], Awaitable[Any]],
|
|
13
13
|
accounts: List[str],
|
|
14
14
|
operations: Optional[List[str]] = None,
|
|
15
15
|
args: Tuple[Any, ...] = (),
|
|
@@ -45,7 +45,7 @@ class SSEMethod(AsyncTonapiClient):
|
|
|
45
45
|
async def subscribe_to_traces(
|
|
46
46
|
self,
|
|
47
47
|
accounts: List[str],
|
|
48
|
-
handler: Callable[[TraceEventData,
|
|
48
|
+
handler: Callable[[TraceEventData, List[Any]], Awaitable[Any]],
|
|
49
49
|
args: Tuple[Any, ...] = (),
|
|
50
50
|
) -> Any:
|
|
51
51
|
"""
|
|
@@ -65,7 +65,7 @@ class SSEMethod(AsyncTonapiClient):
|
|
|
65
65
|
async def subscribe_to_mempool(
|
|
66
66
|
self,
|
|
67
67
|
accounts: List[str],
|
|
68
|
-
handler: Callable[[MempoolEventData,
|
|
68
|
+
handler: Callable[[MempoolEventData, List[Any]], Awaitable[Any]],
|
|
69
69
|
args: Tuple[Any, ...] = (),
|
|
70
70
|
) -> Any:
|
|
71
71
|
"""
|
|
@@ -9,7 +9,7 @@ class WebSocketMethod(AsyncTonapiClient):
|
|
|
9
9
|
async def subscribe_to_transactions(
|
|
10
10
|
self,
|
|
11
11
|
accounts: List[str],
|
|
12
|
-
handler: Callable[[TransactionEventData,
|
|
12
|
+
handler: Callable[[TransactionEventData, List[Any]], Awaitable[Any]],
|
|
13
13
|
args: Tuple[Any, ...] = (),
|
|
14
14
|
) -> None:
|
|
15
15
|
"""
|
|
@@ -28,7 +28,7 @@ class WebSocketMethod(AsyncTonapiClient):
|
|
|
28
28
|
async def subscribe_to_traces(
|
|
29
29
|
self,
|
|
30
30
|
accounts: List[str],
|
|
31
|
-
handler: Callable[[TraceEventData,
|
|
31
|
+
handler: Callable[[TraceEventData, List[Any]], Awaitable[Any]],
|
|
32
32
|
args: Tuple[Any, ...] = (),
|
|
33
33
|
) -> None:
|
|
34
34
|
"""
|
|
@@ -46,7 +46,7 @@ class WebSocketMethod(AsyncTonapiClient):
|
|
|
46
46
|
async def subscribe_to_mempool(
|
|
47
47
|
self,
|
|
48
48
|
accounts: List[str],
|
|
49
|
-
handler: Callable[[MempoolEventData,
|
|
49
|
+
handler: Callable[[MempoolEventData, List[Any]], Awaitable[Any]],
|
|
50
50
|
args: Tuple[Any, ...] = (),
|
|
51
51
|
) -> None:
|
|
52
52
|
"""
|
|
File without changes
|
|
@@ -5,6 +5,7 @@ from pytonapi.schema import domains
|
|
|
5
5
|
from pytonapi.schema import events
|
|
6
6
|
from pytonapi.schema import inscriptions
|
|
7
7
|
from pytonapi.schema import jettons
|
|
8
|
+
from pytonapi.schema import liteserver
|
|
8
9
|
from pytonapi.schema import nft
|
|
9
10
|
from pytonapi.schema import rates
|
|
10
11
|
from pytonapi.schema import staking
|
|
@@ -20,6 +21,7 @@ __all__ = [
|
|
|
20
21
|
"events",
|
|
21
22
|
"inscriptions",
|
|
22
23
|
"jettons",
|
|
24
|
+
"liteserver",
|
|
23
25
|
"nft",
|
|
24
26
|
"rates",
|
|
25
27
|
"staking",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, List
|
|
2
2
|
|
|
3
3
|
from pytonapi.schema.events import AccountEvents
|
|
4
4
|
from pytonapi.tonapi.client import TonapiClient
|
|
@@ -84,7 +84,7 @@ class NftMethod(TonapiClient):
|
|
|
84
84
|
|
|
85
85
|
return NftItem(**response)
|
|
86
86
|
|
|
87
|
-
def get_bulk_items(self, account_ids:
|
|
87
|
+
def get_bulk_items(self, account_ids: List[str]) -> NftItems:
|
|
88
88
|
"""
|
|
89
89
|
Get NFT items by their addresses
|
|
90
90
|
|
|
@@ -10,7 +10,7 @@ class SSEMethod(TonapiClient):
|
|
|
10
10
|
def subscribe_to_transactions(
|
|
11
11
|
self,
|
|
12
12
|
accounts: List[str],
|
|
13
|
-
handler: Callable[[TransactionEventData,
|
|
13
|
+
handler: Callable[[TransactionEventData, List[Any]], Any],
|
|
14
14
|
args: Tuple[Any, ...] = (),
|
|
15
15
|
) -> None:
|
|
16
16
|
"""
|
|
@@ -24,12 +24,14 @@ class SSEMethod(TonapiClient):
|
|
|
24
24
|
params = {'accounts': accounts}
|
|
25
25
|
for data in self._subscribe(method=method, params=params):
|
|
26
26
|
event = TransactionEventData(**json.loads(data))
|
|
27
|
-
handler(event, *args)
|
|
27
|
+
result = handler(event, *args)
|
|
28
|
+
if result is not None:
|
|
29
|
+
return result
|
|
28
30
|
|
|
29
31
|
def subscribe_to_traces(
|
|
30
32
|
self,
|
|
31
33
|
accounts: List[str],
|
|
32
|
-
handler: Callable[[TraceEventData,
|
|
34
|
+
handler: Callable[[TraceEventData, List[Any]], Any],
|
|
33
35
|
args: Tuple[Any, ...] = (),
|
|
34
36
|
) -> None:
|
|
35
37
|
"""
|
|
@@ -45,12 +47,14 @@ class SSEMethod(TonapiClient):
|
|
|
45
47
|
params = {'accounts': accounts}
|
|
46
48
|
for data in self._subscribe(method=method, params=params):
|
|
47
49
|
event = TraceEventData(**json.loads(data))
|
|
48
|
-
handler(event, *args)
|
|
50
|
+
result = handler(event, *args)
|
|
51
|
+
if result is not None:
|
|
52
|
+
return result
|
|
49
53
|
|
|
50
54
|
def subscribe_to_mempool(
|
|
51
55
|
self,
|
|
52
56
|
accounts: List[str],
|
|
53
|
-
handler: Callable[[MempoolEventData,
|
|
57
|
+
handler: Callable[[MempoolEventData, List[Any]], Any],
|
|
54
58
|
args: Tuple[Any, ...] = (),
|
|
55
59
|
) -> None:
|
|
56
60
|
"""
|
|
@@ -63,4 +67,6 @@ class SSEMethod(TonapiClient):
|
|
|
63
67
|
params = {'accounts': accounts}
|
|
64
68
|
for data in self._subscribe(method=method, params=params):
|
|
65
69
|
event = MempoolEventData(**json.loads(data))
|
|
66
|
-
handler(event, *args)
|
|
70
|
+
result = handler(event, *args)
|
|
71
|
+
if result is not None:
|
|
72
|
+
return result
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="pytonapi",
|
|
8
|
-
version="0.2.
|
|
8
|
+
version="0.2.9",
|
|
9
9
|
author="nessshon",
|
|
10
10
|
description="Provide access to indexed TON blockchain.",
|
|
11
11
|
long_description=long_description,
|
|
@@ -27,4 +27,7 @@ setuptools.setup(
|
|
|
27
27
|
"License :: OSI Approved :: MIT License",
|
|
28
28
|
"Operating System :: OS Independent",
|
|
29
29
|
],
|
|
30
|
+
package_data={
|
|
31
|
+
"": ["*py.typed"],
|
|
32
|
+
},
|
|
30
33
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|