tonutils 2.0.1b0__tar.gz → 2.0.1b2__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 (104) hide show
  1. {tonutils-2.0.1b0/tonutils.egg-info → tonutils-2.0.1b2}/PKG-INFO +3 -3
  2. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/README.md +2 -2
  3. tonutils-2.0.1b2/tonutils/__meta__.py +1 -0
  4. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/provider.py +0 -2
  5. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/__init__.py +14 -0
  6. tonutils-2.0.1b2/tonutils/contracts/vanity/__init__.py +17 -0
  7. tonutils-2.0.1b2/tonutils/contracts/vanity/models.py +39 -0
  8. tonutils-2.0.1b2/tonutils/contracts/vanity/tlb.py +40 -0
  9. tonutils-2.0.1b2/tonutils/contracts/vanity/vanity.py +40 -0
  10. {tonutils-2.0.1b0 → tonutils-2.0.1b2/tonutils.egg-info}/PKG-INFO +3 -3
  11. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils.egg-info/SOURCES.txt +4 -0
  12. tonutils-2.0.1b0/tonutils/__meta__.py +0 -1
  13. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/LICENSE +0 -0
  14. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/pyproject.toml +0 -0
  15. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/setup.cfg +0 -0
  16. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/__init__.py +0 -0
  17. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/__init__.py +0 -0
  18. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/__init__.py +0 -0
  19. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/balancer.py +0 -0
  20. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/client.py +0 -0
  21. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/__init__.py +0 -0
  22. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/builder.py +0 -0
  23. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/config.py +0 -0
  24. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/limiter.py +0 -0
  25. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/models.py +0 -0
  26. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/transport.py +0 -0
  27. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/workers/__init__.py +0 -0
  28. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/workers/base.py +0 -0
  29. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/workers/pinger.py +0 -0
  30. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/workers/reader.py +0 -0
  31. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/provider/workers/updater.py +0 -0
  32. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/adnl/stack.py +0 -0
  33. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/base.py +0 -0
  34. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/__init__.py +0 -0
  35. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/balancer.py +0 -0
  36. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/chainstack/__init__.py +0 -0
  37. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/chainstack/client.py +0 -0
  38. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/chainstack/provider.py +0 -0
  39. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/quicknode/__init__.py +0 -0
  40. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/quicknode/client.py +0 -0
  41. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/quicknode/provider.py +0 -0
  42. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tatum/__init__.py +0 -0
  43. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tatum/client.py +0 -0
  44. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tatum/provider.py +0 -0
  45. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tonapi/__init__.py +0 -0
  46. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tonapi/client.py +0 -0
  47. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tonapi/models.py +0 -0
  48. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tonapi/provider.py +0 -0
  49. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/tonapi/stack.py +0 -0
  50. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/toncenter/__init__.py +0 -0
  51. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/toncenter/client.py +0 -0
  52. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/toncenter/models.py +0 -0
  53. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/toncenter/provider.py +0 -0
  54. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/clients/http/toncenter/stack.py +0 -0
  55. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/base.py +0 -0
  56. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/codes.py +0 -0
  57. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/dns/__init__.py +0 -0
  58. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/dns/collection.py +0 -0
  59. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/dns/item.py +0 -0
  60. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/dns/methods.py +0 -0
  61. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/dns/tlb.py +0 -0
  62. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/jetton/__init__.py +0 -0
  63. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/jetton/master.py +0 -0
  64. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/jetton/methods.py +0 -0
  65. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/jetton/tlb.py +0 -0
  66. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/jetton/wallet.py +0 -0
  67. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/nft/__init__.py +0 -0
  68. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/nft/collection.py +0 -0
  69. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/nft/item.py +0 -0
  70. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/nft/methods.py +0 -0
  71. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/nft/tlb.py +0 -0
  72. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/opcodes.py +0 -0
  73. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/telegram/__init__.py +0 -0
  74. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/telegram/collection.py +0 -0
  75. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/telegram/item.py +0 -0
  76. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/telegram/methods.py +0 -0
  77. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/telegram/tlb.py +0 -0
  78. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/versions.py +0 -0
  79. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/__init__.py +0 -0
  80. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/base.py +0 -0
  81. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/configs.py +0 -0
  82. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/messages.py +0 -0
  83. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/methods.py +0 -0
  84. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/params.py +0 -0
  85. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/tlb.py +0 -0
  86. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/__init__.py +0 -0
  87. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/hw.py +0 -0
  88. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/pp.py +0 -0
  89. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/v1.py +0 -0
  90. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/v2.py +0 -0
  91. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/v3.py +0 -0
  92. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/v4.py +0 -0
  93. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/contracts/wallet/versions/v5.py +0 -0
  94. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/exceptions.py +0 -0
  95. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/protocols/__init__.py +0 -0
  96. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/protocols/client.py +0 -0
  97. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/protocols/contract.py +0 -0
  98. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/protocols/wallet.py +0 -0
  99. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/py.typed +0 -0
  100. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/types.py +0 -0
  101. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils/utils.py +0 -0
  102. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils.egg-info/dependency_links.txt +0 -0
  103. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils.egg-info/requires.txt +0 -0
  104. {tonutils-2.0.1b0 → tonutils-2.0.1b2}/tonutils.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tonutils
3
- Version: 2.0.1b0
3
+ Version: 2.0.1b2
4
4
  Summary: Tonutils is a high-level, object-oriented Python library designed to facilitate seamless interactions with the TON blockchain.
5
5
  Author: nessshon
6
6
  Maintainer: nessshon
@@ -37,10 +37,10 @@ Dynamic: license-file
37
37
 
38
38
  [![TON](https://img.shields.io/badge/TON-grey?logo=TON&logoColor=40AEF0)](https://ton.org)
39
39
  ![Python Versions](https://img.shields.io/badge/Python-3.10%20--%203.14-black?color=FFE873&labelColor=3776AB)
40
- [![PyPI](https://img.shields.io/badge/pypi-2.0.1b0-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b0/)
40
+ [![PyPI](https://img.shields.io/badge/pypi-2.0.1b2-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b2/)
41
41
  [![License](https://img.shields.io/github/license/nessshon/tonutils)](LICENSE)
42
42
 
43
- ![Image](assets/banner-640x274.png)
43
+ ![Image](assets/banner.png)
44
44
 
45
45
  ![Downloads](https://pepy.tech/badge/tonutils)
46
46
  ![Downloads](https://pepy.tech/badge/tonutils/month)
@@ -2,10 +2,10 @@
2
2
 
3
3
  [![TON](https://img.shields.io/badge/TON-grey?logo=TON&logoColor=40AEF0)](https://ton.org)
4
4
  ![Python Versions](https://img.shields.io/badge/Python-3.10%20--%203.14-black?color=FFE873&labelColor=3776AB)
5
- [![PyPI](https://img.shields.io/badge/pypi-2.0.1b0-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b0/)
5
+ [![PyPI](https://img.shields.io/badge/pypi-2.0.1b2-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b2/)
6
6
  [![License](https://img.shields.io/github/license/nessshon/tonutils)](LICENSE)
7
7
 
8
- ![Image](assets/banner-640x274.png)
8
+ ![Image](assets/banner.png)
9
9
 
10
10
  ![Downloads](https://pepy.tech/badge/tonutils)
11
11
  ![Downloads](https://pepy.tech/badge/tonutils/month)
@@ -0,0 +1 @@
1
+ __version__ = "2.0.1b2"
@@ -262,8 +262,6 @@ class AdnlProvider:
262
262
  except AdnlServerError as e:
263
263
  if e.code != 651:
264
264
  raise
265
- print("missing block!", e.message)
266
- print(self.last_mc_block)
267
265
  error_message = e.message
268
266
  if attempt < max_651_retries - 1:
269
267
  await asyncio.sleep(0.3 * (2**attempt))
@@ -115,6 +115,14 @@ from .telegram.collection import (
115
115
  TelegramGiftsCollection,
116
116
  TelegramUsernamesCollection,
117
117
  )
118
+ from .vanity import (
119
+ Vanity,
120
+ VanityConfig,
121
+ VanityDeployBody,
122
+ VanityInit,
123
+ VanityResult,
124
+ VanitySpecial,
125
+ )
118
126
  from .versions import ContractVersion
119
127
  from .wallet import (
120
128
  BaseMessageBuilder,
@@ -275,6 +283,12 @@ __all__ = [
275
283
  "TONDNSItem",
276
284
  "TONDNSItemData",
277
285
  "TONTransferBuilder",
286
+ "Vanity",
287
+ "VanityConfig",
288
+ "VanityDeployBody",
289
+ "VanityInit",
290
+ "VanityResult",
291
+ "VanitySpecial",
278
292
  "WalletHighloadV2",
279
293
  "WalletHighloadV2Config",
280
294
  "WalletHighloadV2Data",
@@ -0,0 +1,17 @@
1
+ from .models import (
2
+ VanityConfig,
3
+ VanityInit,
4
+ VanityResult,
5
+ VanitySpecial,
6
+ )
7
+ from .tlb import VanityDeployBody
8
+ from .vanity import Vanity
9
+
10
+ __all__ = [
11
+ "Vanity",
12
+ "VanityConfig",
13
+ "VanityDeployBody",
14
+ "VanityInit",
15
+ "VanityResult",
16
+ "VanitySpecial",
17
+ ]
@@ -0,0 +1,39 @@
1
+ import base64
2
+ import typing as t
3
+
4
+ from pydantic import BaseModel, Field
5
+ from pytoniq_core import Cell
6
+
7
+
8
+ class VanitySpecial(BaseModel):
9
+ tick: bool
10
+ tock: bool
11
+
12
+
13
+ class VanityConfig(BaseModel):
14
+ owner: str
15
+ start: t.Optional[str] = None
16
+ end: t.Optional[str] = None
17
+ masterchain: bool
18
+ non_bounceable: bool
19
+ testnet: bool
20
+ case_sensitive: bool
21
+ only_one: bool
22
+
23
+
24
+ class VanityInit(BaseModel):
25
+ code: str
26
+ split_depth: t.Optional[int] = Field(default=None, alias="fixedPrefixLength")
27
+ special: t.Optional[VanitySpecial] = None
28
+
29
+ @property
30
+ def code_cell(self) -> Cell:
31
+ raw = base64.urlsafe_b64decode(self.code)
32
+ return Cell.one_from_boc(raw)
33
+
34
+
35
+ class VanityResult(BaseModel):
36
+ address: str
37
+ init: VanityInit
38
+ config: VanityConfig
39
+ timestamp: float
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ from pytoniq_core import Cell, Slice, TlbScheme, begin_cell
4
+
5
+
6
+ class VanityDeployBody(TlbScheme):
7
+ """Message body structure for deploying contracts via Vanity."""
8
+
9
+ def __init__(self, code: Cell, data: Cell) -> None:
10
+ """
11
+ Initialize Vanity deploy message body.
12
+
13
+ :param code: Contract code cell to deploy
14
+ :param data: Contract initial data cell
15
+ """
16
+ self.code = code
17
+ self.data = data
18
+
19
+ def serialize(self) -> Cell:
20
+ """
21
+ Serialize deploy body to Cell.
22
+
23
+ Layout: code:^Cell data:^Cell
24
+
25
+ :return: Serialized message body cell
26
+ """
27
+ cell = begin_cell()
28
+ cell.store_ref(self.code)
29
+ cell.store_ref(self.data)
30
+ return cell.end_cell()
31
+
32
+ @classmethod
33
+ def deserialize(cls, cs: Slice) -> VanityDeployBody:
34
+ """
35
+ Deserialize deploy body from Cell slice.
36
+
37
+ :param cs: Cell slice to deserialize from
38
+ :return: Deserialized VanityDeployBody instance
39
+ """
40
+ raise NotImplementedError
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ from pytoniq_core import StateInit, Address
4
+ from pytoniq_core.tlb.account import TickTock
5
+
6
+ from tonutils.contracts.base import BaseContract
7
+ from tonutils.contracts.vanity.models import VanityResult
8
+ from tonutils.protocols.client import ClientProtocol
9
+
10
+
11
+ class Vanity(BaseContract):
12
+ """Vanity contract."""
13
+
14
+ @classmethod
15
+ def from_result(
16
+ cls,
17
+ client: ClientProtocol,
18
+ result: VanityResult,
19
+ ) -> Vanity:
20
+ """
21
+ Construct Vanity contract wrapper from generated result.
22
+
23
+ :param client: TON client to bind to the contract
24
+ :param result: Vanity generation result with address and init data
25
+ :return: Vanity contract instance
26
+ """
27
+ address = Address(result.address)
28
+ state_init = StateInit(code=result.init.code_cell)
29
+ if result.init.split_depth:
30
+ state_init.split_depth = result.init.split_depth
31
+ if result.init.special:
32
+ state_init.special = TickTock(
33
+ tick=result.init.special.tick,
34
+ tock=result.init.special.tock,
35
+ )
36
+ return cls(
37
+ client=client,
38
+ address=address,
39
+ state_init=state_init,
40
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tonutils
3
- Version: 2.0.1b0
3
+ Version: 2.0.1b2
4
4
  Summary: Tonutils is a high-level, object-oriented Python library designed to facilitate seamless interactions with the TON blockchain.
5
5
  Author: nessshon
6
6
  Maintainer: nessshon
@@ -37,10 +37,10 @@ Dynamic: license-file
37
37
 
38
38
  [![TON](https://img.shields.io/badge/TON-grey?logo=TON&logoColor=40AEF0)](https://ton.org)
39
39
  ![Python Versions](https://img.shields.io/badge/Python-3.10%20--%203.14-black?color=FFE873&labelColor=3776AB)
40
- [![PyPI](https://img.shields.io/badge/pypi-2.0.1b0-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b0/)
40
+ [![PyPI](https://img.shields.io/badge/pypi-2.0.1b2-FFE873?labelColor=3776AB)](https://pypi.org/project/tonutils/2.0.1b2/)
41
41
  [![License](https://img.shields.io/github/license/nessshon/tonutils)](LICENSE)
42
42
 
43
- ![Image](assets/banner-640x274.png)
43
+ ![Image](assets/banner.png)
44
44
 
45
45
  ![Downloads](https://pepy.tech/badge/tonutils)
46
46
  ![Downloads](https://pepy.tech/badge/tonutils/month)
@@ -76,6 +76,10 @@ tonutils/contracts/telegram/collection.py
76
76
  tonutils/contracts/telegram/item.py
77
77
  tonutils/contracts/telegram/methods.py
78
78
  tonutils/contracts/telegram/tlb.py
79
+ tonutils/contracts/vanity/__init__.py
80
+ tonutils/contracts/vanity/models.py
81
+ tonutils/contracts/vanity/tlb.py
82
+ tonutils/contracts/vanity/vanity.py
79
83
  tonutils/contracts/wallet/__init__.py
80
84
  tonutils/contracts/wallet/base.py
81
85
  tonutils/contracts/wallet/configs.py
@@ -1 +0,0 @@
1
- __version__ = "2.0.1b0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes