tonsdk
Python SDK for TON
What it is and what it does
tonsdk is a low-level Python library for working with the TON blockchain. It provides tools to create wallets from mnemonics, construct blockchain messages for deployment and token transfers (NFTs and Jettons), and serialize those messages into BOC (Bag of Cells) format for transmission. The library depends on pynacl for cryptographic operations and bitarray for bit-level data manipulation.
The package is designed for developers building TON applications who need direct control over wallet creation, message construction, and blockchain interaction. It includes wallet classes supporting multiple versions (v3r2 and others), address utilities, and contract interfaces for NFT and Jetton operations. The provider layer (for querying blockchain state and sending messages) is noted as incomplete in the documentation, suggesting it may require supplementary libraries or custom implementation for production use.
Use it for:
- Create TON wallets from mnemonics and generate deployment messages for wallet initialization
- Construct and serialize NFT transfer messages to send to the blockchain
- Build Jetton (fungible token) transfer messages with specified amounts and destinations
- Generate raw blockchain messages (BOC format) for custom smart contract interactions
- Manage wallet addresses in multiple formats (raw, bounceable, user-friendly)
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Low-level Python library for interacting with the TON blockchain, including wallet creation, message construction, and token transfers.
Yes, with conditions. The library is suitable for TON blockchain development if you need low-level wallet and message construction. Install friction is low and the Apache 2.0 license is permissive. However, maintenance is dormant (766 days since last release), so verify compatibility with your target TON network version and be prepared to handle the acknowledged 'dirty' provider implementation yourself or use supplementary libraries for blockchain queries and message submission.
Install
tonsdk on PyPI
pip
pip install tonsdkuv
uv add tonsdkpoetry
poetry add tonsdkInstalling tonsdk
Before you install
Low install friction with only two runtime dependencies (pynacl, bitarray). Maintenance is dormant—last commit was 2024-10-06, over 766 days since the latest release, though the repository remains active and not archived.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions, making it safe for most projects.
Quickstart
pip install tonsdk
from tonsdk.contract.wallet import WalletVersionEnum, Wallets
from tonsdk.crypto import mnemonic_new
wallet_mnemonics = mnemonic_new()
_mnemonics, _pub_k, _priv_k, wallet = Wallets.from_mnemonics(
wallet_mnemonics, WalletVersionEnum.v3r2, 0)
Verify before relying
- Whether the dormant maintenance status (766 days since release) affects compatibility with current TON network protocol versions
- Scope and impact of the acknowledged 'dirty' provider implementation on production reliability
- Whether optional dependencies (tvm_valuetypes, aiohttp) are required for core functionality or only for client usage
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pynacl, bitarray |
| Maintenance | dormant — 766 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 93,867/month — #13,361 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tonsdk-1.0.15-py3-none-any.whl
Keywords: TON, TON SDK, TON utils, TON tools
Tags
Similar packages
Provides TON Blockchain SDK primitives for…
unclear · top 15,000 on PyPI
pytoniq-corepytoniq-core provides low-level primitives for…
unclear · top 15,000 on PyPI
cdp-sdkPython client library for the Coinbase…
permissive · top 15,000 on PyPI
fireblocks-sdkOfficial Python SDK for the Fireblocks API that…
permissive · top 15,000 on PyPI
cosmpyCosmPy provides Python bindings to interact…
permissive · top 15,000 on PyPI
bittensor-walletManages cryptographic keys and wallets for the…
permissive · top 15,000 on PyPI
bittensorBittensor is a Python SDK and CLI for…
permissive · top 15,000 on PyPI
vonage-subaccountsProvides Python bindings to Vonage's Subaccount…
permissive · top 15,000 on PyPI
xrpl-pyA pure Python library for building applications…
permissive · top 15,000 on PyPI