pytonapi 0.3.0__tar.gz → 0.3.2__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.3.0 → pytonapi-0.3.2}/PKG-INFO +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/accounts.py +14 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/jettons.py +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/websocket.py +3 -3
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/traces.py +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/accounts.py +14 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/jettons.py +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi.egg-info/PKG-INFO +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/setup.py +1 -1
- {pytonapi-0.3.0 → pytonapi-0.3.2}/LICENSE +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/README.md +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/client.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/blockchain.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/dns.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/emulate.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/events.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/inscriptions.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/liteserver.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/nft.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/rates.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/sse.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/staking.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/storage.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/tonconnect.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/traces.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/async_tonapi/methods/wallet.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/exceptions.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/py.typed +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/_address.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/_balance.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/accounts.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/blockchain.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/dns.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/domains.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/events.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/inscriptions.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/jettons.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/liteserver.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/nft.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/rates.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/staking.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/storage.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/schema/tonconnect.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/client.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/__init__.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/blockchain.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/dns.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/emulate.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/events.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/inscriptions.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/liteserver.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/nft.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/rates.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/sse.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/staking.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/storage.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/tonconnect.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/traces.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/tonapi/methods/wallet.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi/utils.py +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi.egg-info/SOURCES.txt +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi.egg-info/dependency_links.txt +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi.egg-info/requires.txt +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/pytonapi.egg-info/top_level.txt +0 -0
- {pytonapi-0.3.0 → pytonapi-0.3.2}/setup.cfg +0 -0
|
@@ -13,7 +13,7 @@ from pytonapi.schema.accounts import (
|
|
|
13
13
|
)
|
|
14
14
|
from pytonapi.schema.domains import DomainNames
|
|
15
15
|
from pytonapi.schema.events import AccountEvents, AccountEvent
|
|
16
|
-
from pytonapi.schema.jettons import JettonsBalances
|
|
16
|
+
from pytonapi.schema.jettons import JettonBalance, JettonsBalances
|
|
17
17
|
from pytonapi.schema.nft import NftItems, NftItem
|
|
18
18
|
from pytonapi.schema.traces import TraceIds
|
|
19
19
|
|
|
@@ -81,6 +81,19 @@ class AccountsMethod(AsyncTonapiClient):
|
|
|
81
81
|
|
|
82
82
|
return JettonsBalances(**response)
|
|
83
83
|
|
|
84
|
+
async def get_jetton_balance(self, account_id: str, jetton_id: str) -> JettonBalance:
|
|
85
|
+
"""
|
|
86
|
+
Get Jetton balance by owner address
|
|
87
|
+
|
|
88
|
+
:param account_id: account ID
|
|
89
|
+
:param jetton_id: jetton ID
|
|
90
|
+
:return: :class:`JettonBalance`
|
|
91
|
+
"""
|
|
92
|
+
method = f"v2/accounts/{account_id}/jettons/{jetton_id}"
|
|
93
|
+
response = await self._get(method=method)
|
|
94
|
+
|
|
95
|
+
return JettonBalance(**response)
|
|
96
|
+
|
|
84
97
|
async def get_jettons_history(
|
|
85
98
|
self,
|
|
86
99
|
account_id: str,
|
|
@@ -54,7 +54,7 @@ class JettonsMethod(AsyncTonapiClient):
|
|
|
54
54
|
if len(result.addresses) != limit:
|
|
55
55
|
break
|
|
56
56
|
|
|
57
|
-
return JettonHolders(addresses=jetton_holders)
|
|
57
|
+
return JettonHolders(addresses=jetton_holders, total=result.total)
|
|
58
58
|
|
|
59
59
|
async def get_all_jettons(self, limit: int = 100, offset: int = 0) -> Jettons:
|
|
60
60
|
"""
|
|
@@ -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, ...], 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, ...], 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, ...], Awaitable[Any]],
|
|
50
50
|
args: Tuple[Any, ...] = (),
|
|
51
51
|
) -> None:
|
|
52
52
|
"""
|
|
@@ -13,7 +13,7 @@ from pytonapi.schema.accounts import (
|
|
|
13
13
|
BalanceChange,
|
|
14
14
|
)
|
|
15
15
|
from pytonapi.schema.domains import DomainNames
|
|
16
|
-
from pytonapi.schema.jettons import JettonsBalances
|
|
16
|
+
from pytonapi.schema.jettons import JettonBalance, JettonsBalances
|
|
17
17
|
from pytonapi.schema.nft import NftItems, NftItem
|
|
18
18
|
from pytonapi.schema.traces import TraceIds
|
|
19
19
|
|
|
@@ -81,6 +81,19 @@ class AccountsMethod(TonapiClient):
|
|
|
81
81
|
|
|
82
82
|
return JettonsBalances(**response)
|
|
83
83
|
|
|
84
|
+
def get_jetton_balance(self, account_id: str, jetton_id: str) -> JettonBalance:
|
|
85
|
+
"""
|
|
86
|
+
Get Jetton balance by owner address
|
|
87
|
+
|
|
88
|
+
:param account_id: account ID
|
|
89
|
+
:param jetton_id: jetton ID
|
|
90
|
+
:return: :class:`JettonBalance`
|
|
91
|
+
"""
|
|
92
|
+
method = f"v2/accounts/{account_id}/jettons/{jetton_id}"
|
|
93
|
+
response = self._get(method=method)
|
|
94
|
+
|
|
95
|
+
return JettonBalance(**response)
|
|
96
|
+
|
|
84
97
|
def get_jettons_history(
|
|
85
98
|
self,
|
|
86
99
|
account_id: str,
|
|
@@ -55,7 +55,7 @@ class JettonsMethod(TonapiClient):
|
|
|
55
55
|
if len(result.addresses) != limit:
|
|
56
56
|
break
|
|
57
57
|
|
|
58
|
-
return JettonHolders(addresses=jetton_holders)
|
|
58
|
+
return JettonHolders(addresses=jetton_holders, total=result.total)
|
|
59
59
|
|
|
60
60
|
def get_all_jettons(self, limit: int = 100, offset: int = 0) -> Jettons:
|
|
61
61
|
"""
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|