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.2.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.2.tar.gz.
File metadata
- Download URL: agton_wallet-0.2.2.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 |
fabc853b27c28f9d19b261ad44ccfaf25574d78b123093e3a2f84d93de0140d1
|
|
| MD5 |
1be57117caf1582a4ca1439f718d17c7
|
|
| BLAKE2b-256 |
d5ce1c506364f21afa394c61e35898be9648ad2930de7c032d14eaee242cc3c1
|
File details
Details for the file agton_wallet-0.2.2-py3-none-any.whl.
File metadata
- Download URL: agton_wallet-0.2.2-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 |
c22ad2ba165f788afab105f4307c4e41d0317e39df01264390e98a9cb16d69df
|
|
| MD5 |
6b6f771fc4720c03e89748b5ab167c1f
|
|
| BLAKE2b-256 |
8a139ee2ba6e36a372b4d3a82bd5a5b3852d07b0e078e9dbda72c3f9d5518ed2
|