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.5.tar.gz
(18.4 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.5.tar.gz.
File metadata
- Download URL: agton_wallet-0.2.5.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e2f677744fca15343a7f056bc3f1b9a79fd6419cd2a00f5e1440338bb426a78
|
|
| MD5 |
2d9ee3db616b213d9f24c06bd1ad1ce2
|
|
| BLAKE2b-256 |
d89e1d18b26311bd2a3e25062085f17952029c3d79fc236a566091934748c81e
|
File details
Details for the file agton_wallet-0.2.5-py3-none-any.whl.
File metadata
- Download URL: agton_wallet-0.2.5-py3-none-any.whl
- Upload date:
- Size: 24.2 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 |
710d03206e3e6c1711b4f1a9fc6020a4d529a512b152ebc1af0495268406e8ca
|
|
| MD5 |
036d4a39049cf77db97f775c81996891
|
|
| BLAKE2b-256 |
63b0484f6282db2ca9a1086955b483ceecd37a094bb88db94a81475e0907cab4
|