TON Blockchain wrappers for wallets contracts
Project description
agton-wallet
import os
from time import time
from agton.ton import ToncenterClient, MessageRelaxed, Address, to_nano, comment
from agton.wallet import WalletV3R2
mnemonic = os.environ["WALLET_MNEMONIC"]
provider = ToncenterClient(net="testnet") # pass api_key=... if you have one
wallet = WalletV3R2.from_mnemonic(provider, mnemonic)
message = MessageRelaxed.internal(
value=to_nano(0.1),
dest=Address.parse('0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACkT'),
body=comment('Hello! Привет! 你好! agton 🚀')
)
wallet.send(message)
# ^ Line above is actually just a shortcut for manual message crafting
# Here is manual crafting
signed_external = wallet.create_signed_external(
messages_with_modes=[(message, 3)],
valid_until=int(time()) + 3 * 60,
seqno=wallet.seqno()
)
# Now you can send it or do whatever with it
# provider.send_external_message(signed_external)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agton_wallet-0.2.1.tar.gz
(12.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agton_wallet-0.2.1.tar.gz.
File metadata
- Download URL: agton_wallet-0.2.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
442c5721f94617b7d58a4337594d8db50eca39f9ec0a8af8e71a03f02437ed97
|
|
| MD5 |
6c2bd1df2e7c4c0a543a69abaa0cab86
|
|
| BLAKE2b-256 |
1e0339aa041c4d77e943b49e12c1c5ad921d398fd9cb14f48ab9473f2fdd36c7
|
File details
Details for the file agton_wallet-0.2.1-py3-none-any.whl.
File metadata
- Download URL: agton_wallet-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c3363142d0097f28726e1e7a74322d35b3dcfb9d04361a4dd56e7a9144dd251
|
|
| MD5 |
d70d0539767ed335759279661b1a209e
|
|
| BLAKE2b-256 |
54ccf6980b8fc90f3d69e24755c767125fa2b12a83a969f5138acde90d959155
|