SDKs
Easily navigate to your preferred programming language using the right sidebar.
Overview
There are different ways to connect to the blockchain:
- RPC data provider or other API – Requires stability and security from a third-party service.
- ADNL connection - Connects to a liteserver. While it may be inaccessible at times, it cannot provide false data due to built-in validation.
- Tonlib binary - Also connects to a liteserver, inheriting the same advantages and limitations. However, your application includes a dynamically loaded library compiled externally.
- Offchain-only - These SDKs allow you to create and serialize cells, which can then be sent to APIs.
TypeScript / JavaScript
Library | Blockchain connection | Description |
---|---|---|
ton | via RPC (Orbs / Toncenter / etc) | Convenient client library with wallet wrappers for developing dApps on TON Blockchain. |
tonweb | via RPC (Orbs / Toncenter / etc) | Old-style TON JS SDK, with minimal external dependencies, extensively tested in production. |
tonkite/adnl | ADNL natively / via WebSocket | ADNL TypeScript implementation. |
tonutils | Native ADNL | TypeScript-based interface for TON application development. Due to native ADNL dependency, it cannot be used in browsers. |
foton | via RPC (Orbs / Toncenter / etc) | TypeScript toolkit for interacting with TON wallets and blockchain. Wraps existing solutions (Blueprint and TON Connect) into one API. |
Java
Library | Blockchain connection | Description |
---|---|---|
ton4j | Tonlib binary | Java SDK for The Open Network (TON) |
Python
Library | Blockchain connection | Description |
---|---|---|
pytoniq | Native ADNL | Python SDK with native LiteClient and other ADNL-based protocols. |
pytoniq-core | offchain-only | Transport-free, powerful SDK. |
tonutils | via RPC (TONAPI / Toncenter) / Native ADNL (pytoniq) | High-level OOP library for interacting with TON Blockchain. |
pytonlib | Tonlib binary | Standalone Python library based on libtonlibjson. |
mytonlib | Native ADNL | Native Python SDK library for working with The Open Network |
TonTools | via RPC (Orbs / Toncenter / etc) | High-level OOP Python library for interacting with TON. |
tonpy | Native ADNL | PPython package providing TON Blockchain interaction. |
tvm_valuetypes | offchain-only | Utilities for handling TVM types. |
pytvm | offchain | Python TVM emulator using C++ bindings. |
C#
Library | Blockchain connection | Description |
---|---|---|
TonSdk.NET | Native ADNL or RPC | Native C# SDK for The Open Network. |
justdmitry/TonLib.NET | Tonlib binary | .NET SDK for The Open Network, connecting via libtonlibjson. |
Rust
Library | Blockchain connection | Description |
---|---|---|
tonlib-rs | Tonlib binary | Rust SDK for TON, using binary dependency from TON monorepo. |
getgems-io/ton-grpc | Tonlib binary | Rust bindings for tonlibjson with additional services. |
Go
Library | Blockchain connection | Description |
---|---|---|
tonutils-go | Native ADNL | Golang library for interacting with TON. |
tongo | Native ADNL | Go implementation of TON Blockchain libraries. |
tonlib-go | Tonlib binary | Official bindings for libtonlibjson. |
SDKs for other languages
Library | Language | Blockchain connection | Description |
---|---|---|---|
ton-kotlin | Kotlin | Native ADNL | Kotlin/Multiplatform SDK for The Open Network. |
tonlib-java | Java | Tonlib bin | JVM wrapper for TonLib, usable with Java, Scala, Kotlin, etc. |
ayrat555/ton | Elixir | offchain-only | TON SDK for Elixir. |
C++ Tonlib | C++ | Tonlib binary | Official examples on smart contract interaction from the TON monorepo. |
Java Tonlib | Java | Tonlib binary | Official Java-based 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 | NodeJS | Tonlib binary | C++ addon for NodeJS to work with tonlibjson. |
olifanton/ton | PHP | via RPC (Orbs / Toncenter / etc) | PHP SDK with TON primitives and smart contract tools. |