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.3.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.3.tar.gz.
File metadata
- Download URL: agton_wallet-0.2.3.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 |
e4b29cc04264b7821cdc17ff1dd6fb7da537478da718953dcd8a31835886fed3
|
|
| MD5 |
486ca62023e498031fc5c8937796dcaf
|
|
| BLAKE2b-256 |
71e81e7d1ba84e853aea3b8f61db08e37cea8ec7307a3adaee55a8c65739236f
|
File details
Details for the file agton_wallet-0.2.3-py3-none-any.whl.
File metadata
- Download URL: agton_wallet-0.2.3-py3-none-any.whl
- Upload date:
- Size: 12.6 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 |
5a9290fbe9db357adddc2fc797a89a139fd1b7322aec24fa3777d3cf997072c6
|
|
| MD5 |
5fe214df91477d360e690af0c5c2fd24
|
|
| BLAKE2b-256 |
84cd86d74962e38f6d601aed0f37b95b151bea30a8760f3a306d340334038791
|