TON Blockchain jetton wrappers, implementation of TEP-74
Project description
agton-jetton
import os
from agton.ton import ToncenterClient, Address, to_nano, comment
from agton.jetton import JettonMaster
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)
jetton_master = JettonMaster(provider, Address.parse("kQBLdsCM9ksHe22vgPMBN7OScP6z6w8xAsM5AuHldrDT9EwR"))
jetton_wallet = jetton_master.get_jetton_wallet(wallet.address)
message = jetton_wallet.create_jetton_transfer(
value=to_nano(0.5), # native TON to cover forwarding fees
query_id=0,
amount=to_nano(777), # jetton amount
destination=wallet.address,
response_destination=wallet.address,
forward_amount=to_nano(0.1),
forward_payload=comment("agton"),
)
wallet.send(message)
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_jetton-0.2.5.tar.gz
(5.7 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_jetton-0.2.5.tar.gz.
File metadata
- Download URL: agton_jetton-0.2.5.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d82a88e3d28bfd2995a8e1d0d621e53989b05565137c6ec29bd2685f3fe35998
|
|
| MD5 |
64022392e63e75ff30849dd8fcb022a9
|
|
| BLAKE2b-256 |
7ecb1a12873791c1dfd99c04ccb8e8a21221729d2e65abeda3b063a72906282b
|
File details
Details for the file agton_jetton-0.2.5-py3-none-any.whl.
File metadata
- Download URL: agton_jetton-0.2.5-py3-none-any.whl
- Upload date:
- Size: 8.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 |
4c845474dfeef8ef80265d8acce9a2f3c4db00aad6a48b4719a508363171d58a
|
|
| MD5 |
5c7cf99b402b595daf7d2217418d6338
|
|
| BLAKE2b-256 |
e6bc748ba2d4bfba99c132b17e5eaf18285c99390950b76967ed12c4d0ab0352
|