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.4.tar.gz
(14.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.4.tar.gz.
File metadata
- Download URL: agton_wallet-0.2.4.tar.gz
- Upload date:
- Size: 14.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 |
8446db1ba70834d202e3eb7e9b39b069e7e3a3f54146b51de2de39419f004315
|
|
| MD5 |
d9394e1b49d3c24ccd5b3c1600cb4610
|
|
| BLAKE2b-256 |
a5bcd9e034ff7ade48fe1a2921a71bfde6311e078f68ffbd83dad08698bad023
|
File details
Details for the file agton_wallet-0.2.4-py3-none-any.whl.
File metadata
- Download URL: agton_wallet-0.2.4-py3-none-any.whl
- Upload date:
- Size: 14.9 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 |
594fc42ce10d854939e85ea9b00fe46b1136bbfa42989f2625e4bbe552685343
|
|
| MD5 |
fd4be8f08a9611e3421941809398093c
|
|
| BLAKE2b-256 |
341d5ce3575a0979c8b9629eb2483647ebc0732cb509aaf10f9623faa5062170
|