Install & Compatibility
Where this runs
tested against v1.0.15 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 25.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 26MB
24MB installed
● package 24MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TonClient
✓ import tonsdk
✗ from tonsdk import TonClient
Initialize client, create wallet, check balance
from tonsdk.client import TonClient
from tonsdk.wallet import Wallet
from tonsdk.utils import to_nano
# Create a custom client (mainnet by default)
client = TonClient(config={'endpoints': ['https://toncenter.com/api/v2/jsonRPC']})
# Generate a new wallet (mnemonic is printed)
wallet, mnemonic, private_key, public_key, wallet_type = Wallet.create(mnemonics=24, randomgen=True)
print('Mnemonic:', mnemonic)
print('Wallet address:', wallet.address.to_string())
# Check balance
balance = client.get_balance(wallet.address.to_string())
print('Balance:', balance)
# Create a transfer message
# message = wallet.create_transfer_message(destination='EQD...', amount=to_nano(0.1))
# result = client.send_boc(message['message'].to_boc())
# print('Transfer sent:', result)
Upgrade
Version history
1.0.15latest on PyPI · released Jul 9, 2024
Audit
Dependencies
No dependency data recorded yet.