pytonapi 2.0.1__tar.gz → 2.0.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-2.0.1/pytonapi.egg-info → pytonapi-2.0.2}/PKG-INFO +3 -3
- {pytonapi-2.0.1 → pytonapi-2.0.2}/README.md +2 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pyproject.toml +3 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/__meta__.py +1 -1
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/__init__.py +4 -5
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/accounts.py +155 -171
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/nft.py +12 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/purchases.py +8 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/accounts.py +14 -14
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/blockchain.py +6 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/events.py +6 -3
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/jettons.py +1 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/rates.py +1 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/staking.py +2 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/traces.py +1 -2
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/utils.py +32 -16
- {pytonapi-2.0.1 → pytonapi-2.0.2/pytonapi.egg-info}/PKG-INFO +3 -3
- {pytonapi-2.0.1 → pytonapi-2.0.2}/LICENSE +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/__init__.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/cli.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/client.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/exceptions.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/py.typed +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/__init__.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/client.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/limiter.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/mixin.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/_enums.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/blockchain.py +5 -5
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/connect.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/dns.py +6 -6
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/emulation.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/events.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/extra_currency.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/gasless.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/jettons.py +5 -5
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/lite_server.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/multisig.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/rates.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/staking.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/storage.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/traces.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/utilities.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/models/wallet.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/__init__.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/_base.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/connect.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/dns.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/emulation.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/extra_currency.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/gasless.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/lite_server.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/multisig.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/nft.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/purchases.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/storage.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/utilities.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/rest/resources/wallet.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/streaming/__init__.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/streaming/client.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/streaming/models.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/streaming/sse.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/streaming/ws.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/types.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/webhook/__init__.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/webhook/client.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/webhook/dispatcher.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi/webhook/models.py +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi.egg-info/SOURCES.txt +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi.egg-info/dependency_links.txt +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi.egg-info/entry_points.txt +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi.egg-info/requires.txt +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/pytonapi.egg-info/top_level.txt +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/setup.cfg +0 -0
- {pytonapi-2.0.1 → pytonapi-2.0.2}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytonapi
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Python SDK for TONAPI — REST API, streaming, and webhooks for TON blockchain.
|
|
5
5
|
Author: nessshon
|
|
6
6
|
Maintainer: nessshon
|
|
@@ -27,7 +27,7 @@ Requires-Dist: aiohttp>=3.9.0
|
|
|
27
27
|
Requires-Dist: pydantic<3.0,>=2.4.1
|
|
28
28
|
Dynamic: license-file
|
|
29
29
|
|
|
30
|
-
# 📦
|
|
30
|
+
# 📦 TON API
|
|
31
31
|
|
|
32
32
|
[](https://ton.org)
|
|
33
33
|

|
|
@@ -41,7 +41,7 @@ Dynamic: license-file
|
|
|
41
41
|

|
|
42
42
|

|
|
43
43
|
|
|
44
|
-
### Python SDK for [
|
|
44
|
+
### Python SDK for [TON API](https://tonapi.io)
|
|
45
45
|
|
|
46
46
|
Access TON blockchain data via REST API, real-time streaming, and webhooks.
|
|
47
47
|
API key required — obtain at [tonconsole.com](https://tonconsole.com/), docs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 📦
|
|
1
|
+
# 📦 TON API
|
|
2
2
|
|
|
3
3
|
[](https://ton.org)
|
|
4
4
|

|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|

|
|
13
13
|

|
|
14
14
|
|
|
15
|
-
### Python SDK for [
|
|
15
|
+
### Python SDK for [TON API](https://tonapi.io)
|
|
16
16
|
|
|
17
17
|
Access TON blockchain data via REST API, real-time streaming, and webhooks.
|
|
18
18
|
API key required — obtain at [tonconsole.com](https://tonconsole.com/), docs
|
|
@@ -104,8 +104,6 @@ select = [
|
|
|
104
104
|
"RUF",
|
|
105
105
|
]
|
|
106
106
|
ignore = [
|
|
107
|
-
# line too long
|
|
108
|
-
"E501",
|
|
109
107
|
# docstring in public module
|
|
110
108
|
"D100",
|
|
111
109
|
# docstring in public package
|
|
@@ -116,6 +114,8 @@ ignore = [
|
|
|
116
114
|
"D107",
|
|
117
115
|
# blank line before class docstring (conflicts D211)
|
|
118
116
|
"D203",
|
|
117
|
+
# 1 blank line required between summary and description (multi-line summary)
|
|
118
|
+
"D205",
|
|
119
119
|
# multi-line summary second line (conflicts D212)
|
|
120
120
|
"D213",
|
|
121
121
|
# first word capitalization (false positive for proper nouns like dApp)
|
|
@@ -129,6 +129,7 @@ ignore = [
|
|
|
129
129
|
"__init__.py" = ["F401"]
|
|
130
130
|
"pytonapi/rest/models/*" = ["D101"]
|
|
131
131
|
"tests/*" = ["D101", "D102", "T20"]
|
|
132
|
+
"tests/rest/fixtures.py" = ["E501"]
|
|
132
133
|
"codegen/*" = ["T20"]
|
|
133
134
|
"examples/*" = ["D", "T20", "RUF006", "RUF059"]
|
|
134
135
|
|
|
@@ -47,11 +47,9 @@ from pytonapi.rest.models.accounts import (
|
|
|
47
47
|
JettonSwapAction,
|
|
48
48
|
JettonTransferAction,
|
|
49
49
|
LiquidityDepositAction,
|
|
50
|
-
Metadata,
|
|
51
50
|
Multisigs,
|
|
52
51
|
NftItemTransferAction,
|
|
53
52
|
NftPurchaseAction,
|
|
54
|
-
Price,
|
|
55
53
|
Protocol,
|
|
56
54
|
PurchaseAction,
|
|
57
55
|
Refund,
|
|
@@ -149,9 +147,10 @@ from pytonapi.rest.models.nft import (
|
|
|
149
147
|
NftItems,
|
|
150
148
|
NftOperation,
|
|
151
149
|
NftOperations,
|
|
150
|
+
Price,
|
|
152
151
|
Sale,
|
|
153
152
|
)
|
|
154
|
-
from pytonapi.rest.models.purchases import AccountPurchases, Purchase
|
|
153
|
+
from pytonapi.rest.models.purchases import AccountPurchases, Metadata, Purchase
|
|
155
154
|
from pytonapi.rest.models.rates import ChartPoints, MarketTonRates, TokenRates
|
|
156
155
|
from pytonapi.rest.models.staking import AccountStaking, AccountStakingInfo, ApyHistory, PoolImplementation, PoolInfo
|
|
157
156
|
from pytonapi.rest.models.storage import StorageProvider
|
|
@@ -204,11 +203,9 @@ _models_to_rebuild = [
|
|
|
204
203
|
JettonTransferAction,
|
|
205
204
|
JettonsBalances,
|
|
206
205
|
LiquidityDepositAction,
|
|
207
|
-
Metadata,
|
|
208
206
|
Multisigs,
|
|
209
207
|
NftItemTransferAction,
|
|
210
208
|
NftPurchaseAction,
|
|
211
|
-
Price,
|
|
212
209
|
Protocol,
|
|
213
210
|
PurchaseAction,
|
|
214
211
|
Refund,
|
|
@@ -306,8 +303,10 @@ _models_to_rebuild = [
|
|
|
306
303
|
NftItems,
|
|
307
304
|
NftOperation,
|
|
308
305
|
NftOperations,
|
|
306
|
+
Price,
|
|
309
307
|
Sale,
|
|
310
308
|
AccountPurchases,
|
|
309
|
+
Metadata,
|
|
311
310
|
Purchase,
|
|
312
311
|
MarketTonRates,
|
|
313
312
|
TokenRates,
|
|
@@ -8,11 +8,9 @@ from pydantic import BaseModel, ConfigDict, Field
|
|
|
8
8
|
|
|
9
9
|
from pytonapi.rest.models._enums import (
|
|
10
10
|
AccountStatus,
|
|
11
|
-
CurrencyType,
|
|
12
11
|
ExecGetMethodArgType,
|
|
13
12
|
JettonVerificationType,
|
|
14
13
|
PoolImplementationType,
|
|
15
|
-
TrustType,
|
|
16
14
|
)
|
|
17
15
|
|
|
18
16
|
if t.TYPE_CHECKING:
|
|
@@ -20,7 +18,8 @@ if t.TYPE_CHECKING:
|
|
|
20
18
|
from pytonapi.rest.models.extra_currency import EcPreview
|
|
21
19
|
from pytonapi.rest.models.jettons import ScaledUI
|
|
22
20
|
from pytonapi.rest.models.multisig import Multisig
|
|
23
|
-
from pytonapi.rest.models.nft import NftItem
|
|
21
|
+
from pytonapi.rest.models.nft import NftItem, Price
|
|
22
|
+
from pytonapi.rest.models.purchases import Metadata
|
|
24
23
|
from pytonapi.rest.models.rates import TokenRates
|
|
25
24
|
|
|
26
25
|
|
|
@@ -49,73 +48,30 @@ class AccountAddress(BaseModel):
|
|
|
49
48
|
icon: str | None = Field(default=None)
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
class
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
class NftPurchaseAction(BaseModel):
|
|
52
|
+
auction_type: str
|
|
53
|
+
amount: Price
|
|
54
|
+
nft: NftItem
|
|
55
|
+
seller: AccountAddress
|
|
56
|
+
buyer: AccountAddress
|
|
55
57
|
|
|
56
58
|
|
|
57
|
-
class
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
class JettonPreview(BaseModel):
|
|
60
|
+
address: str
|
|
61
|
+
name: str
|
|
62
|
+
symbol: str
|
|
60
63
|
decimals: int
|
|
61
|
-
token_name: str
|
|
62
|
-
verification: TrustType
|
|
63
64
|
image: str
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
protocol: Protocol
|
|
70
|
-
stake_meta: Price | None = Field(default=None)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class SubscriptionAction(BaseModel):
|
|
74
|
-
subscriber: AccountAddress
|
|
75
|
-
subscription: str
|
|
76
|
-
beneficiary: AccountAddress
|
|
77
|
-
admin: AccountAddress
|
|
78
|
-
price: Price
|
|
79
|
-
initial: bool
|
|
80
|
-
amount: int | None = Field(default=None)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class UnSubscriptionAction(BaseModel):
|
|
84
|
-
subscriber: AccountAddress
|
|
85
|
-
subscription: str
|
|
86
|
-
beneficiary: AccountAddress
|
|
87
|
-
admin: AccountAddress
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class Metadata(BaseModel):
|
|
91
|
-
encrypted_binary: str
|
|
92
|
-
decryption_key: str | None = Field(default=None)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class PurchaseAction(BaseModel):
|
|
96
|
-
source: AccountAddress
|
|
97
|
-
destination: AccountAddress
|
|
98
|
-
invoice_id: str
|
|
99
|
-
amount: Price
|
|
100
|
-
metadata: Metadata
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
class DepositStakeAction(BaseModel):
|
|
104
|
-
amount: int
|
|
105
|
-
staker: AccountAddress
|
|
106
|
-
pool: AccountAddress
|
|
107
|
-
implementation: PoolImplementationType
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class ElectionsDepositStakeAction(BaseModel):
|
|
111
|
-
amount: int
|
|
112
|
-
staker: AccountAddress
|
|
65
|
+
verification: JettonVerificationType
|
|
66
|
+
score: int
|
|
67
|
+
custom_payload_api_uri: str | None = Field(default=None)
|
|
68
|
+
scaled_ui: ScaledUI | None = Field(default=None)
|
|
69
|
+
description: str | None = Field(default=None)
|
|
113
70
|
|
|
114
71
|
|
|
115
|
-
class
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
renewer: AccountAddress
|
|
72
|
+
class EncryptedComment(BaseModel):
|
|
73
|
+
encryption_type: str
|
|
74
|
+
cipher_text: str
|
|
119
75
|
|
|
120
76
|
|
|
121
77
|
class Refund(BaseModel):
|
|
@@ -123,39 +79,28 @@ class Refund(BaseModel):
|
|
|
123
79
|
origin: str
|
|
124
80
|
|
|
125
81
|
|
|
126
|
-
class
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
82
|
+
class JettonTransferAction(BaseModel):
|
|
83
|
+
senders_wallet: str
|
|
84
|
+
recipients_wallet: str
|
|
85
|
+
amount: str
|
|
86
|
+
jetton: JettonPreview
|
|
87
|
+
sender: AccountAddress | None = Field(default=None)
|
|
88
|
+
recipient: AccountAddress | None = Field(default=None)
|
|
89
|
+
comment: str | None = Field(default=None)
|
|
90
|
+
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
132
91
|
refund: Refund | None = Field(default=None)
|
|
133
92
|
|
|
134
93
|
|
|
135
|
-
class
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
class AuctionBidAction(BaseModel):
|
|
141
|
-
auction_type: str
|
|
142
|
-
amount: Price
|
|
143
|
-
bidder: AccountAddress
|
|
144
|
-
auction: AccountAddress
|
|
145
|
-
nft: NftItem | None = Field(default=None)
|
|
94
|
+
class JettonBurnAction(BaseModel):
|
|
95
|
+
sender: AccountAddress
|
|
96
|
+
senders_wallet: str
|
|
97
|
+
amount: str
|
|
98
|
+
jetton: JettonPreview
|
|
146
99
|
|
|
147
100
|
|
|
148
|
-
class
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
symbol: str
|
|
152
|
-
decimals: int
|
|
153
|
-
image: str
|
|
154
|
-
verification: JettonVerificationType
|
|
155
|
-
score: int
|
|
156
|
-
custom_payload_api_uri: str | None = Field(default=None)
|
|
157
|
-
scaled_ui: ScaledUI | None = Field(default=None)
|
|
158
|
-
description: str | None = Field(default=None)
|
|
101
|
+
class ElectionsDepositStakeAction(BaseModel):
|
|
102
|
+
amount: int
|
|
103
|
+
staker: AccountAddress
|
|
159
104
|
|
|
160
105
|
|
|
161
106
|
class JettonMintAction(BaseModel):
|
|
@@ -165,11 +110,10 @@ class JettonMintAction(BaseModel):
|
|
|
165
110
|
jetton: JettonPreview
|
|
166
111
|
|
|
167
112
|
|
|
168
|
-
class
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
amount: int | None = Field(default=None)
|
|
113
|
+
class GasRelayAction(BaseModel):
|
|
114
|
+
amount: int
|
|
115
|
+
relayer: AccountAddress
|
|
116
|
+
target: AccountAddress
|
|
173
117
|
|
|
174
118
|
|
|
175
119
|
class ActionSimplePreview(BaseModel):
|
|
@@ -181,49 +125,41 @@ class ActionSimplePreview(BaseModel):
|
|
|
181
125
|
value_image: str | None = Field(default=None)
|
|
182
126
|
|
|
183
127
|
|
|
184
|
-
class
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
128
|
+
class UnSubscriptionAction(BaseModel):
|
|
129
|
+
subscriber: AccountAddress
|
|
130
|
+
subscription: str
|
|
131
|
+
beneficiary: AccountAddress
|
|
132
|
+
admin: AccountAddress
|
|
188
133
|
|
|
189
134
|
|
|
190
|
-
class
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
buyer: AccountAddress
|
|
135
|
+
class DepositStakeAction(BaseModel):
|
|
136
|
+
amount: int
|
|
137
|
+
staker: AccountAddress
|
|
138
|
+
pool: AccountAddress
|
|
139
|
+
implementation: PoolImplementationType
|
|
196
140
|
|
|
197
141
|
|
|
198
|
-
class
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
amount: str
|
|
202
|
-
jetton: JettonPreview
|
|
142
|
+
class Protocol(BaseModel):
|
|
143
|
+
name: str
|
|
144
|
+
image: str | None = Field(default=None)
|
|
203
145
|
|
|
204
146
|
|
|
205
|
-
class
|
|
206
|
-
|
|
207
|
-
|
|
147
|
+
class WithdrawTokenStakeRequestAction(BaseModel):
|
|
148
|
+
staker: AccountAddress
|
|
149
|
+
protocol: Protocol
|
|
150
|
+
stake_meta: Price | None = Field(default=None)
|
|
208
151
|
|
|
209
152
|
|
|
210
|
-
class
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
216
|
-
payload: str | None = Field(default=None)
|
|
217
|
-
refund: Refund | None = Field(default=None)
|
|
153
|
+
class WithdrawStakeRequestAction(BaseModel):
|
|
154
|
+
staker: AccountAddress
|
|
155
|
+
pool: AccountAddress
|
|
156
|
+
implementation: PoolImplementationType
|
|
157
|
+
amount: int | None = Field(default=None)
|
|
218
158
|
|
|
219
159
|
|
|
220
|
-
class
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
amount: str
|
|
224
|
-
currency: EcPreview
|
|
225
|
-
comment: str | None = Field(default=None)
|
|
226
|
-
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
160
|
+
class ContractDeployAction(BaseModel):
|
|
161
|
+
address: str
|
|
162
|
+
interfaces: list[str]
|
|
227
163
|
|
|
228
164
|
|
|
229
165
|
class RemoveExtensionAction(BaseModel):
|
|
@@ -231,29 +167,17 @@ class RemoveExtensionAction(BaseModel):
|
|
|
231
167
|
extension: str
|
|
232
168
|
|
|
233
169
|
|
|
234
|
-
class
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
ton_in: int | None = Field(default=None)
|
|
241
|
-
ton_out: int | None = Field(default=None)
|
|
242
|
-
jetton_master_in: JettonPreview | None = Field(default=None)
|
|
243
|
-
jetton_master_out: JettonPreview | None = Field(default=None)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
class VaultDepositInfo(BaseModel):
|
|
247
|
-
price: Price
|
|
248
|
-
vault: str
|
|
249
|
-
|
|
170
|
+
class PurchaseAction(BaseModel):
|
|
171
|
+
source: AccountAddress
|
|
172
|
+
destination: AccountAddress
|
|
173
|
+
invoice_id: str
|
|
174
|
+
amount: Price
|
|
175
|
+
metadata: Metadata
|
|
250
176
|
|
|
251
|
-
class LiquidityDepositAction(BaseModel):
|
|
252
|
-
protocol: Protocol
|
|
253
|
-
from_: AccountAddress = Field(alias="from")
|
|
254
|
-
tokens: list[VaultDepositInfo]
|
|
255
177
|
|
|
256
|
-
|
|
178
|
+
class ElectionsRecoverStakeAction(BaseModel):
|
|
179
|
+
amount: int
|
|
180
|
+
staker: AccountAddress
|
|
257
181
|
|
|
258
182
|
|
|
259
183
|
class WithdrawStakeAction(BaseModel):
|
|
@@ -263,10 +187,37 @@ class WithdrawStakeAction(BaseModel):
|
|
|
263
187
|
implementation: PoolImplementationType
|
|
264
188
|
|
|
265
189
|
|
|
266
|
-
class
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
190
|
+
class SmartContractAction(BaseModel):
|
|
191
|
+
executor: AccountAddress
|
|
192
|
+
contract: AccountAddress
|
|
193
|
+
ton_attached: int
|
|
194
|
+
operation: str
|
|
195
|
+
payload: str | None = Field(default=None)
|
|
196
|
+
refund: Refund | None = Field(default=None)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class SetSignatureAllowedAction(BaseModel):
|
|
200
|
+
wallet: AccountAddress
|
|
201
|
+
allowed: bool
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class ExtraCurrencyTransferAction(BaseModel):
|
|
205
|
+
sender: AccountAddress
|
|
206
|
+
recipient: AccountAddress
|
|
207
|
+
amount: str
|
|
208
|
+
currency: EcPreview
|
|
209
|
+
comment: str | None = Field(default=None)
|
|
210
|
+
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
class NftItemTransferAction(BaseModel):
|
|
214
|
+
nft: str
|
|
215
|
+
sender: AccountAddress | None = Field(default=None)
|
|
216
|
+
recipient: AccountAddress | None = Field(default=None)
|
|
217
|
+
comment: str | None = Field(default=None)
|
|
218
|
+
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
219
|
+
payload: str | None = Field(default=None)
|
|
220
|
+
refund: Refund | None = Field(default=None)
|
|
270
221
|
|
|
271
222
|
|
|
272
223
|
class FlawedJettonTransferAction(BaseModel):
|
|
@@ -282,6 +233,22 @@ class FlawedJettonTransferAction(BaseModel):
|
|
|
282
233
|
refund: Refund | None = Field(default=None)
|
|
283
234
|
|
|
284
235
|
|
|
236
|
+
class SubscriptionAction(BaseModel):
|
|
237
|
+
subscriber: AccountAddress
|
|
238
|
+
subscription: str
|
|
239
|
+
beneficiary: AccountAddress
|
|
240
|
+
admin: AccountAddress
|
|
241
|
+
price: Price
|
|
242
|
+
initial: bool
|
|
243
|
+
amount: int | None = Field(default=None)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
class DomainRenewAction(BaseModel):
|
|
247
|
+
domain: str
|
|
248
|
+
contract_address: str
|
|
249
|
+
renewer: AccountAddress
|
|
250
|
+
|
|
251
|
+
|
|
285
252
|
class AddExtensionAction(BaseModel):
|
|
286
253
|
wallet: AccountAddress
|
|
287
254
|
extension: str
|
|
@@ -296,26 +263,43 @@ class TonTransferAction(BaseModel):
|
|
|
296
263
|
refund: Refund | None = Field(default=None)
|
|
297
264
|
|
|
298
265
|
|
|
299
|
-
class
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
jetton: JettonPreview
|
|
304
|
-
sender: AccountAddress | None = Field(default=None)
|
|
305
|
-
recipient: AccountAddress | None = Field(default=None)
|
|
306
|
-
comment: str | None = Field(default=None)
|
|
307
|
-
encrypted_comment: EncryptedComment | None = Field(default=None)
|
|
308
|
-
refund: Refund | None = Field(default=None)
|
|
266
|
+
class DepositTokenStakeAction(BaseModel):
|
|
267
|
+
staker: AccountAddress
|
|
268
|
+
protocol: Protocol
|
|
269
|
+
stake_meta: Price | None = Field(default=None)
|
|
309
270
|
|
|
310
271
|
|
|
311
|
-
class
|
|
312
|
-
|
|
313
|
-
|
|
272
|
+
class JettonSwapAction(BaseModel):
|
|
273
|
+
dex: str
|
|
274
|
+
amount_in: str
|
|
275
|
+
amount_out: str
|
|
276
|
+
user_wallet: AccountAddress
|
|
277
|
+
router: AccountAddress
|
|
278
|
+
ton_in: int | None = Field(default=None)
|
|
279
|
+
ton_out: int | None = Field(default=None)
|
|
280
|
+
jetton_master_in: JettonPreview | None = Field(default=None)
|
|
281
|
+
jetton_master_out: JettonPreview | None = Field(default=None)
|
|
314
282
|
|
|
315
283
|
|
|
316
|
-
class
|
|
317
|
-
|
|
318
|
-
|
|
284
|
+
class VaultDepositInfo(BaseModel):
|
|
285
|
+
price: Price
|
|
286
|
+
vault: str
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
class LiquidityDepositAction(BaseModel):
|
|
290
|
+
protocol: Protocol
|
|
291
|
+
from_: AccountAddress = Field(alias="from")
|
|
292
|
+
tokens: list[VaultDepositInfo]
|
|
293
|
+
|
|
294
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class AuctionBidAction(BaseModel):
|
|
298
|
+
auction_type: str
|
|
299
|
+
amount: Price
|
|
300
|
+
bidder: AccountAddress
|
|
301
|
+
auction: AccountAddress
|
|
302
|
+
nft: NftItem | None = Field(default=None)
|
|
319
303
|
|
|
320
304
|
|
|
321
305
|
class Action(BaseModel):
|
|
@@ -6,10 +6,10 @@ import typing as t
|
|
|
6
6
|
|
|
7
7
|
from pydantic import BaseModel, Field
|
|
8
8
|
|
|
9
|
-
from pytonapi.rest.models._enums import TrustType
|
|
9
|
+
from pytonapi.rest.models._enums import CurrencyType, TrustType
|
|
10
10
|
|
|
11
11
|
if t.TYPE_CHECKING:
|
|
12
|
-
from pytonapi.rest.models.accounts import AccountAddress
|
|
12
|
+
from pytonapi.rest.models.accounts import AccountAddress
|
|
13
13
|
|
|
14
14
|
NftApprovedBy = list[str]
|
|
15
15
|
|
|
@@ -33,6 +33,16 @@ class NftCollections(BaseModel):
|
|
|
33
33
|
nft_collections: list[NftCollection]
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
class Price(BaseModel):
|
|
37
|
+
currency_type: CurrencyType
|
|
38
|
+
value: str
|
|
39
|
+
decimals: int
|
|
40
|
+
token_name: str
|
|
41
|
+
verification: TrustType
|
|
42
|
+
image: str
|
|
43
|
+
jetton: str | None = Field(default=None)
|
|
44
|
+
|
|
45
|
+
|
|
36
46
|
class Sale(BaseModel):
|
|
37
47
|
address: str
|
|
38
48
|
market: AccountAddress
|
|
@@ -4,10 +4,16 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import typing as t
|
|
6
6
|
|
|
7
|
-
from pydantic import BaseModel
|
|
7
|
+
from pydantic import BaseModel, Field
|
|
8
8
|
|
|
9
9
|
if t.TYPE_CHECKING:
|
|
10
|
-
from pytonapi.rest.models.accounts import AccountAddress
|
|
10
|
+
from pytonapi.rest.models.accounts import AccountAddress
|
|
11
|
+
from pytonapi.rest.models.nft import Price
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Metadata(BaseModel):
|
|
15
|
+
encrypted_binary: str
|
|
16
|
+
decryption_key: str | None = Field(default=None)
|
|
11
17
|
|
|
12
18
|
|
|
13
19
|
class Purchase(BaseModel):
|
|
@@ -90,8 +90,7 @@ class AccountsResource(BaseResource):
|
|
|
90
90
|
"""Get all Jettons balances by owner address.
|
|
91
91
|
|
|
92
92
|
:param account_id: Account ID.
|
|
93
|
-
:param currencies: Accept ton and all possible fiat currencies, separated by
|
|
94
|
-
commas.
|
|
93
|
+
:param currencies: Accept ton and all possible fiat currencies, separated by commas.
|
|
95
94
|
:param supported_extensions: Comma separated list supported extensions.
|
|
96
95
|
:param limit: Limit.
|
|
97
96
|
:param offset: Offset.
|
|
@@ -122,8 +121,7 @@ class AccountsResource(BaseResource):
|
|
|
122
121
|
|
|
123
122
|
:param account_id: Account ID.
|
|
124
123
|
:param jetton_id: Jetton ID.
|
|
125
|
-
:param currencies: Accept ton and all possible fiat currencies, separated by
|
|
126
|
-
commas.
|
|
124
|
+
:param currencies: Accept ton and all possible fiat currencies, separated by commas.
|
|
127
125
|
:param supported_extensions: Comma separated list supported extensions.
|
|
128
126
|
:return: JettonBalance
|
|
129
127
|
"""
|
|
@@ -215,9 +213,8 @@ class AccountsResource(BaseResource):
|
|
|
215
213
|
:param collection: Nft collection.
|
|
216
214
|
:param limit: Limit.
|
|
217
215
|
:param offset: Offset.
|
|
218
|
-
:param indirect_ownership: Selling nft items in ton implemented usually via
|
|
219
|
-
|
|
220
|
-
items which owned not directly.
|
|
216
|
+
:param indirect_ownership: Selling nft items in ton implemented usually via transfer items to special selling
|
|
217
|
+
account. This option enables including items which owned not directly.
|
|
221
218
|
:return: NftItems
|
|
222
219
|
"""
|
|
223
220
|
path = f"/v2/accounts/{account_id}/nfts"
|
|
@@ -247,12 +244,16 @@ class AccountsResource(BaseResource):
|
|
|
247
244
|
sort_order: str = "desc",
|
|
248
245
|
accept_language: str | None = None,
|
|
249
246
|
) -> AccountEvents:
|
|
250
|
-
"""Get events for an account. Each event is built on top of a trace which is a series of transactions
|
|
247
|
+
"""Get events for an account. Each event is built on top of a trace which is a series of transactions
|
|
248
|
+
caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace
|
|
249
|
+
into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer
|
|
250
|
+
or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on
|
|
251
|
+
top of actions because actions can be changed at any time.
|
|
251
252
|
|
|
252
253
|
:param account_id: Account ID.
|
|
253
254
|
:param initiator: Show only events that are initiated by this account.
|
|
254
|
-
:param subject_only: Filter actions where requested account is not real subject
|
|
255
|
-
|
|
255
|
+
:param subject_only: Filter actions where requested account is not real subject (for example sender or receiver
|
|
256
|
+
jettons).
|
|
256
257
|
:param after_lt: Omit this parameter to get last events.
|
|
257
258
|
:param before_lt: Omit this parameter to get last events.
|
|
258
259
|
:param limit: Limit.
|
|
@@ -292,10 +293,9 @@ class AccountsResource(BaseResource):
|
|
|
292
293
|
"""Get event for an account by event_id.
|
|
293
294
|
|
|
294
295
|
:param account_id: Account ID.
|
|
295
|
-
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
(for example sender or receiver jettons).
|
|
296
|
+
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url format.
|
|
297
|
+
:param subject_only: Filter actions where requested account is not real subject (for example sender or receiver
|
|
298
|
+
jettons).
|
|
299
299
|
:param accept_language: Accept language.
|
|
300
300
|
:return: AccountEvent
|
|
301
301
|
"""
|
|
@@ -100,7 +100,9 @@ class BlockchainResource(BaseResource):
|
|
|
100
100
|
self,
|
|
101
101
|
masterchain_seqno: int,
|
|
102
102
|
) -> BlockchainBlocks:
|
|
103
|
-
"""Get all blocks in all shards and workchains between target and previous masterchain block according
|
|
103
|
+
"""Get all blocks in all shards and workchains between target and previous masterchain block according
|
|
104
|
+
to shards last blocks snapshot in masterchain. We don't recommend to build your app around this method
|
|
105
|
+
because it has problem with scalability and will work very slow in the future.
|
|
104
106
|
|
|
105
107
|
:param masterchain_seqno: Masterchain block seqno.
|
|
106
108
|
:return: BlockchainBlocks
|
|
@@ -116,7 +118,9 @@ class BlockchainResource(BaseResource):
|
|
|
116
118
|
self,
|
|
117
119
|
masterchain_seqno: int,
|
|
118
120
|
) -> Transactions:
|
|
119
|
-
"""Get all transactions in all shards and workchains between target and previous masterchain block
|
|
121
|
+
"""Get all transactions in all shards and workchains between target and previous masterchain block
|
|
122
|
+
according to shards last blocks snapshot in masterchain. We don't recommend to build your app around
|
|
123
|
+
this method because it has problem with scalability and will work very slow in the future.
|
|
120
124
|
|
|
121
125
|
:param masterchain_seqno: Masterchain block seqno.
|
|
122
126
|
:return: Transactions
|
|
@@ -16,10 +16,13 @@ class EventsResource(BaseResource):
|
|
|
16
16
|
event_id: str,
|
|
17
17
|
accept_language: str | None = None,
|
|
18
18
|
) -> Event:
|
|
19
|
-
"""Get an event either by event ID or a hash of any transaction in a trace. An event is built on top of
|
|
19
|
+
"""Get an event either by event ID or a hash of any transaction in a trace. An event is built on top of
|
|
20
|
+
a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns
|
|
21
|
+
inside the trace and splits the trace into actions, where a single action represents a meaningful high-
|
|
22
|
+
level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It
|
|
23
|
+
is advised not to build any logic on top of actions because actions can be changed at any time.
|
|
20
24
|
|
|
21
|
-
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url
|
|
22
|
-
format.
|
|
25
|
+
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url format.
|
|
23
26
|
:param accept_language: Accept language.
|
|
24
27
|
:return: Event
|
|
25
28
|
"""
|
|
@@ -117,8 +117,7 @@ class JettonsResource(BaseResource):
|
|
|
117
117
|
) -> Event:
|
|
118
118
|
"""Get only jetton transfers in the event.
|
|
119
119
|
|
|
120
|
-
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url
|
|
121
|
-
format.
|
|
120
|
+
:param event_id: Event ID or transaction hash in hex (without 0x) or base64url format.
|
|
122
121
|
:param accept_language: Accept language.
|
|
123
122
|
:return: Event
|
|
124
123
|
"""
|
|
@@ -18,8 +18,7 @@ class RatesResource(BaseResource):
|
|
|
18
18
|
"""Get the token price in the chosen currency for display only. Don't use this for financial transactions.
|
|
19
19
|
|
|
20
20
|
:param tokens: Accept ton and jetton master addresses, separated by commas.
|
|
21
|
-
:param currencies: Accept ton and all possible fiat currencies, separated by
|
|
22
|
-
commas.
|
|
21
|
+
:param currencies: Accept ton and all possible fiat currencies, separated by commas.
|
|
23
22
|
:return: dict[str, t.Any]
|
|
24
23
|
"""
|
|
25
24
|
path = "/v2/rates"
|
|
@@ -79,8 +79,8 @@ class StakingResource(BaseResource):
|
|
|
79
79
|
"""All pools available in network.
|
|
80
80
|
|
|
81
81
|
:param available_for: Account ID.
|
|
82
|
-
:param include_unverified: Return also pools not from white list - just
|
|
83
|
-
|
|
82
|
+
:param include_unverified: Return also pools not from white list - just compatible by interfaces (maybe
|
|
83
|
+
dangerous!).
|
|
84
84
|
:param accept_language: Accept language.
|
|
85
85
|
:return: dict[str, t.Any]
|
|
86
86
|
"""
|
|
@@ -17,8 +17,7 @@ class TracesResource(BaseResource):
|
|
|
17
17
|
) -> Trace:
|
|
18
18
|
"""Get the trace by trace ID or hash of any transaction in trace.
|
|
19
19
|
|
|
20
|
-
:param trace_id: Trace ID or transaction hash in hex (without 0x) or base64url
|
|
21
|
-
format.
|
|
20
|
+
:param trace_id: Trace ID or transaction hash in hex (without 0x) or base64url format.
|
|
22
21
|
:return: Trace
|
|
23
22
|
"""
|
|
24
23
|
path = f"/v2/traces/{trace_id}"
|
|
@@ -12,22 +12,38 @@ __all__ = [
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
_CRC16 = [
|
|
15
|
-
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
|
16
|
+
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
|
17
|
+
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
|
|
18
|
+
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
|
|
19
|
+
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
|
|
20
|
+
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
|
|
21
|
+
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
|
|
22
|
+
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
|
|
23
|
+
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
|
|
24
|
+
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
|
|
25
|
+
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
|
|
26
|
+
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
|
|
27
|
+
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
|
|
28
|
+
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
|
|
29
|
+
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
|
|
30
|
+
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
|
|
31
|
+
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
|
|
32
|
+
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
|
|
33
|
+
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
|
|
34
|
+
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
|
|
35
|
+
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
|
|
36
|
+
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
|
|
37
|
+
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
|
|
38
|
+
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
|
|
39
|
+
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
|
|
40
|
+
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
|
|
41
|
+
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
|
|
42
|
+
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
|
|
43
|
+
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
|
|
44
|
+
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
|
|
45
|
+
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
|
|
46
|
+
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0,
|
|
31
47
|
] # fmt: skip
|
|
32
48
|
|
|
33
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytonapi
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Python SDK for TONAPI — REST API, streaming, and webhooks for TON blockchain.
|
|
5
5
|
Author: nessshon
|
|
6
6
|
Maintainer: nessshon
|
|
@@ -27,7 +27,7 @@ Requires-Dist: aiohttp>=3.9.0
|
|
|
27
27
|
Requires-Dist: pydantic<3.0,>=2.4.1
|
|
28
28
|
Dynamic: license-file
|
|
29
29
|
|
|
30
|
-
# 📦
|
|
30
|
+
# 📦 TON API
|
|
31
31
|
|
|
32
32
|
[](https://ton.org)
|
|
33
33
|

|
|
@@ -41,7 +41,7 @@ Dynamic: license-file
|
|
|
41
41
|

|
|
42
42
|

|
|
43
43
|
|
|
44
|
-
### Python SDK for [
|
|
44
|
+
### Python SDK for [TON API](https://tonapi.io)
|
|
45
45
|
|
|
46
46
|
Access TON blockchain data via REST API, real-time streaming, and webhooks.
|
|
47
47
|
API key required — obtain at [tonconsole.com](https://tonconsole.com/), docs
|
|
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
|
|
@@ -259,6 +259,11 @@ class GasLimitPrices(BaseModel):
|
|
|
259
259
|
flat_gas_price: int | None = Field(default=None)
|
|
260
260
|
|
|
261
261
|
|
|
262
|
+
class Oracle(BaseModel):
|
|
263
|
+
address: str
|
|
264
|
+
secp_pubkey: str
|
|
265
|
+
|
|
266
|
+
|
|
262
267
|
class JettonBridgePrices(BaseModel):
|
|
263
268
|
bridge_burn_fee: int
|
|
264
269
|
bridge_mint_fee: int
|
|
@@ -268,11 +273,6 @@ class JettonBridgePrices(BaseModel):
|
|
|
268
273
|
discover_gas_consumption: int
|
|
269
274
|
|
|
270
275
|
|
|
271
|
-
class Oracle(BaseModel):
|
|
272
|
-
address: str
|
|
273
|
-
secp_pubkey: str
|
|
274
|
-
|
|
275
|
-
|
|
276
276
|
class JettonBridgeParams(BaseModel):
|
|
277
277
|
bridge_address: str
|
|
278
278
|
oracles_address: str
|
|
File without changes
|
|
@@ -24,12 +24,6 @@ class Auctions(BaseModel):
|
|
|
24
24
|
total: int
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class PictureDNS(BaseModel):
|
|
28
|
-
type: str
|
|
29
|
-
url: str | None = Field(default=None)
|
|
30
|
-
bag_id: str | None = Field(default=None)
|
|
31
|
-
|
|
32
|
-
|
|
33
27
|
class WalletDNS(BaseModel):
|
|
34
28
|
address: str
|
|
35
29
|
account: AccountAddress
|
|
@@ -39,6 +33,12 @@ class WalletDNS(BaseModel):
|
|
|
39
33
|
names: list[str]
|
|
40
34
|
|
|
41
35
|
|
|
36
|
+
class PictureDNS(BaseModel):
|
|
37
|
+
type: str
|
|
38
|
+
url: str | None = Field(default=None)
|
|
39
|
+
bag_id: str | None = Field(default=None)
|
|
40
|
+
|
|
41
|
+
|
|
42
42
|
class DnsRecord(BaseModel):
|
|
43
43
|
sites: list[str]
|
|
44
44
|
wallet: WalletDNS | None = Field(default=None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -17,6 +17,11 @@ class JettonHolders(BaseModel):
|
|
|
17
17
|
total: int
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
class ScaledUI(BaseModel):
|
|
21
|
+
numerator: str
|
|
22
|
+
denominator: str
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
class JettonMetadata(BaseModel):
|
|
21
26
|
address: str
|
|
22
27
|
name: str
|
|
@@ -30,11 +35,6 @@ class JettonMetadata(BaseModel):
|
|
|
30
35
|
custom_payload_api_uri: str | None = Field(default=None)
|
|
31
36
|
|
|
32
37
|
|
|
33
|
-
class ScaledUI(BaseModel):
|
|
34
|
-
numerator: str
|
|
35
|
-
denominator: str
|
|
36
|
-
|
|
37
|
-
|
|
38
38
|
class JettonInfo(BaseModel):
|
|
39
39
|
mintable: bool
|
|
40
40
|
total_supply: str
|
|
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
|