SDKs
This page lists SDKs for interacting with TON Blockchain, organized by programming language. Use the right sidebar to jump to your preferred language.
Overview
You can connect to the TON Blockchain in four main ways:
- RPC data provider or other API – relies on a third-party service for stability and security. If you run a self-hosted RPC, however, stability and security are entirely under your control.
- ADNL connection – connects to a liteserver. You can operate your liteserver or rent one for direct use. Public liteservers are often unreliable due to limited resources and high demand. However, built-in validation prevents them from serving false data.
- Tonlib binary – connects to a liteserver and shares the same advantages and limitations. Your application includes a dynamically loaded externally compiled library. Initial synchronization is required on the first use and may take some time to complete.
- Off-chain only – these SDKs enable creation and serialization of cells locally, which can then be sent to APIs.
TypeScript / JavaScript
Library | Blockchain connection | Description |
---|---|---|
ton | RPC through Orbs, TON Center | Client library providing wallet wrappers for building DApps on TON Blockchain. |
Java
Library | Blockchain connection | Description |
---|---|---|
ton4j | Tonlib binary | Java SDK for interacting with TON Blockchain. |
Python
Library | Blockchain connection | Description |
---|---|---|
pytoniq | Native ADNL | Python SDK with native lite-client and other ADNL-based protocols. |
tonutils | via HTTP indexer APIs (TonAPI / TON Center v3) or Native ADNL (pytoniq) | High-level, object-oriented library for interacting with TON Blockchain. |
pytonlib | Tonlib binary | Standalone Python library built on libtonlibjson . |
C#
Library | Blockchain connection | Description |
---|---|---|
TonSdk.NET | Native ADNL or RPC | Native C# SDK for TON Blockchain. |
justdmitry/TonLib.NET | Tonlib binary | .NET SDK for TON Blockchain, connecting via libtonlibjson . |
Rust
Library | Blockchain connection | Description |
---|---|---|
tonlib-rs | Tonlib binary | Rust SDK for TON, using the binary dependency from the TON monorepo. |
getgems-io/ton-grpc | Tonlib binary | Rust bindings for libtonlibjson with additional services. |
Go
Library | Blockchain connection | Description |
---|---|---|
tonutils-go | Native ADNL | Go library for interacting with TON Blockchain. |
tongo | Native ADNL | Go implementation of TON Blockchain libraries. |
Other SDKs for reference
Library | Language | Blockchain connection | Description |
---|---|---|---|
ton-kotlin | Kotlin | Native ADNL | Kotlin / Multiplatform SDK for TON. |
ayrat555/ton | Elixir | off-chain only | Elixir SDK for interacting with TON. |
C++ Tonlib | C++ | Tonlib binary | Official C++ examples for smart contract from the TON monorepo. |
Java Tonlib | Java | Tonlib binary | Official Java examples from the TON monorepo. |
labraburn/SwiftyTON | Swift | Tonlib binary | Native Swift wrapper for tonlib with async/await support. |
tonlib-xcframework | Swift | Tonlib binary | Tonlib build helper for iOS, supporting all architectures. |
labraburn/node-tonlib | Node.js | Tonlib binary | Node.js C++ addon for working with libtonlibjson . |
olifanton/ton | PHP | RPC through (Orbs / TON Center) | PHP SDK with TON primitives and smart contract tools. |
mytonlib | Python | Native ADNL | Python SDK for interacting with TON. |
TonTools | Python | RPC through (Orbs / TON Center) | High-level, object-oriented Python library for interacting with TON. |
tonpy | Python | Native ADNL | Python package for interacting with TON. |
tvm_valuetypes | Python | off-chain only | Utilities for handling TVM types. |
pytvm | Python | off-chain | Python TVM emulator using C++ bindings. |
pytoniq-core | Python | off-chain only | Transport-free, powerful SDK. |
tonkite/adnl | TypeScript | Native ADNL / WebSocket | ADNL TypeScript implementation. |
tonutils-js | TypeScript | Native ADNL | TypeScript interface for TON development. Not browser-compatible due to native ADNL dependency. |
tonweb | JS | RPC through (Orbs / TON Center) | JavaScript SDK with minimal external dependencies, extensively tested in production. |
foton | TypeScript | RPC through (Orbs / TON Center) | TypeScript toolkit for TON wallets and blockchain. Wraps existing solutions (Blueprint and TON Connect) into a single API. |
tonlib-go | Go | Tonlib binary | Official bindings for libtonlibjson . |
Was this article useful?