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.
Files changed (70) hide show
  1. {pytonapi-0.2.6 → pytonapi-0.2.9}/PKG-INFO +1 -1
  2. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/sse.py +3 -3
  3. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/websocket.py +3 -3
  4. pytonapi-0.2.9/pytonapi/py.typed +0 -0
  5. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/__init__.py +2 -0
  6. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/events.py +1 -1
  7. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/liteserver.py +1 -1
  8. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/traces.py +1 -3
  9. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/nft.py +2 -2
  10. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/sse.py +12 -6
  11. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/PKG-INFO +1 -1
  12. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/SOURCES.txt +1 -0
  13. {pytonapi-0.2.6 → pytonapi-0.2.9}/setup.py +4 -1
  14. {pytonapi-0.2.6 → pytonapi-0.2.9}/LICENSE +0 -0
  15. {pytonapi-0.2.6 → pytonapi-0.2.9}/README.md +0 -0
  16. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/__init__.py +0 -0
  17. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/__init__.py +0 -0
  18. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/client.py +0 -0
  19. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/__init__.py +0 -0
  20. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/accounts.py +0 -0
  21. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/blockchain.py +0 -0
  22. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/dns.py +0 -0
  23. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/emulate.py +0 -0
  24. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/events.py +0 -0
  25. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/inscriptions.py +0 -0
  26. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/jettons.py +0 -0
  27. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/liteserver.py +0 -0
  28. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/nft.py +0 -0
  29. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/rates.py +0 -0
  30. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/staking.py +0 -0
  31. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/storage.py +0 -0
  32. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/tonconnect.py +0 -0
  33. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/traces.py +0 -0
  34. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/async_tonapi/methods/wallet.py +0 -0
  35. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/exceptions.py +0 -0
  36. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/_address.py +0 -0
  37. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/_balance.py +0 -0
  38. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/accounts.py +0 -0
  39. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/blockchain.py +0 -0
  40. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/dns.py +0 -0
  41. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/domains.py +0 -0
  42. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/inscriptions.py +0 -0
  43. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/jettons.py +0 -0
  44. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/nft.py +0 -0
  45. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/rates.py +0 -0
  46. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/staking.py +0 -0
  47. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/storage.py +0 -0
  48. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/schema/tonconnect.py +0 -0
  49. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/__init__.py +0 -0
  50. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/client.py +0 -0
  51. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/__init__.py +0 -0
  52. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/accounts.py +0 -0
  53. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/blockchain.py +0 -0
  54. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/dns.py +0 -0
  55. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/emulate.py +0 -0
  56. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/events.py +0 -0
  57. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/inscriptions.py +0 -0
  58. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/jettons.py +0 -0
  59. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/liteserver.py +0 -0
  60. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/rates.py +0 -0
  61. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/staking.py +0 -0
  62. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/storage.py +0 -0
  63. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/tonconnect.py +0 -0
  64. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/traces.py +0 -0
  65. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/tonapi/methods/wallet.py +0 -0
  66. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi/utils.py +0 -0
  67. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/dependency_links.txt +0 -0
  68. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/requires.txt +0 -0
  69. {pytonapi-0.2.6 → pytonapi-0.2.9}/pytonapi.egg-info/top_level.txt +0 -0
  70. {pytonapi-0.2.6 → pytonapi-0.2.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytonapi
3
- Version: 0.2.6
3
+ Version: 0.2.9
4
4
  Summary: Provide access to indexed TON blockchain.
5
5
  Home-page: https://github.com/tonkeeper/pytonapi/
6
6
  Author: nessshon
@@ -9,7 +9,7 @@ class SSEMethod(AsyncTonapiClient):
9
9
 
10
10
  async def subscribe_to_transactions(
11
11
  self,
12
- handler: Callable[[TransactionEventData, ...], Awaitable[Any]],
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, ...], Awaitable[Any]],
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, ...], Awaitable[Any]],
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, ...], Awaitable[Any]],
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, ...], Awaitable[Any]],
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, ...], Awaitable[Any]],
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",
@@ -233,7 +233,7 @@ class ValueFlow(BaseModel):
233
233
  account: AccountAddress
234
234
  ton: int
235
235
  fees: int
236
- jettons: Optional[list[ValueFlowJettonsInner]]
236
+ jettons: Optional[List[ValueFlowJettonsInner]]
237
237
 
238
238
 
239
239
  class Event(BaseModel):
@@ -5,7 +5,7 @@ from pydantic.v1 import BaseModel, Field
5
5
 
6
6
  class BlockRaw(BaseModel):
7
7
  workchain: int
8
- shard: int
8
+ shard: str
9
9
  seqno: int
10
10
  root_hash: str
11
11
  file_hash: str
@@ -73,9 +73,7 @@ class ComputePhase(BaseModel):
73
73
 
74
74
 
75
75
  class StateInit(BaseModel):
76
- code: Optional[str]
77
- data: Optional[str]
78
- library: Dict[str, str]
76
+ boc: str
79
77
 
80
78
 
81
79
  class Message(BaseModel):
@@ -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: list[str]) -> NftItems:
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, ...], Any],
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, ...], Any],
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, ...], Any],
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytonapi
3
- Version: 0.2.6
3
+ Version: 0.2.9
4
4
  Summary: Provide access to indexed TON blockchain.
5
5
  Home-page: https://github.com/tonkeeper/pytonapi/
6
6
  Author: nessshon
@@ -3,6 +3,7 @@ README.md
3
3
  setup.py
4
4
  pytonapi/__init__.py
5
5
  pytonapi/exceptions.py
6
+ pytonapi/py.typed
6
7
  pytonapi/utils.py
7
8
  pytonapi.egg-info/PKG-INFO
8
9
  pytonapi.egg-info/SOURCES.txt
@@ -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.6",
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