TON Library Documentation
Introduction
Getting Started
# ❌ Don't use imports
# import TonLib # This will cause an error
# ✅ Instead, use the library directly
wallet = libs.TonLib.generateWallet()Core Functions
Wallet Management
generateWallet()
setKeys(mnemonics)
getWalletAddress(mnemonics=None)
TON Operations
getBalance(address, api_key=None, endpoint=None)
sendTON(to_address, amount, comment=None, mnemonics=None, api_key=None, endpoint=None, is_testnet=False)
checkTONTransaction(address, api_key=None, endpoint=None, limit=10)
TON Connect Integration
create_ton_connect_session(user_id, expiry_seconds=86400)
verify_ton_connect_session(session_id)
request_ton_transaction(to_address, amount, comment=None, callback_url="", return_url=None)
Jetton Operations
get_jetton_metadata(jetton_master_address, api_key=None, endpoint=None)
get_jetton_balance(owner_address, jetton_master_address, api_key=None, endpoint=None)
request_jetton_transfer(to_address, jetton_master_address, amount, comment=None, callback_url="", return_url=None)
Examples
Creating a Simple TON Wallet Bot
TON Connect Integration Example
Best Practices
Limitations
Further Resources
Last updated