Skip to main content

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:

  1. 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.
  2. 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.
  3. 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.
  4. Off-chain only – these SDKs enable creation and serialization of cells locally, which can then be sent to APIs.

TypeScript / JavaScript

LibraryBlockchain connectionDescription
tonRPC through Orbs, TON CenterClient library providing wallet wrappers for building DApps on TON Blockchain.

Java

LibraryBlockchain connectionDescription
ton4jTonlib binaryJava SDK for interacting with TON Blockchain.

Python

LibraryBlockchain connectionDescription
pytoniqNative ADNLPython SDK with native lite-client and other ADNL-based protocols.
tonutilsvia HTTP indexer APIs (TonAPI / TON Center v3) or Native ADNL (pytoniq)High-level, object-oriented library for interacting with TON Blockchain.
pytonlibTonlib binaryStandalone Python library built on libtonlibjson.

C#

LibraryBlockchain connectionDescription
TonSdk.NETNative ADNL or RPCNative C# SDK for TON Blockchain.
justdmitry/TonLib.NETTonlib binary.NET SDK for TON Blockchain, connecting via libtonlibjson.

Rust

LibraryBlockchain connectionDescription
tonlib-rsTonlib binaryRust SDK for TON, using the binary dependency from the TON monorepo.
getgems-io/ton-grpcTonlib binaryRust bindings for libtonlibjson with additional services.

Go

LibraryBlockchain connectionDescription
tonutils-goNative ADNLGo library for interacting with TON Blockchain.
tongoNative ADNLGo implementation of TON Blockchain libraries.

Other SDKs for reference

LibraryLanguageBlockchain connectionDescription
ton-kotlinKotlinNative ADNLKotlin / Multiplatform SDK for TON.
ayrat555/tonElixiroff-chain onlyElixir SDK for interacting with TON.
C++ TonlibC++Tonlib binaryOfficial C++ examples for smart contract from the TON monorepo.
Java TonlibJavaTonlib binaryOfficial Java examples from the TON monorepo.
labraburn/SwiftyTONSwiftTonlib binaryNative Swift wrapper for tonlib with async/await support.
tonlib-xcframeworkSwiftTonlib binaryTonlib build helper for iOS, supporting all architectures.
labraburn/node-tonlibNode.jsTonlib binaryNode.js C++ addon for working with libtonlibjson.
olifanton/tonPHPRPC through (Orbs / TON Center)PHP SDK with TON primitives and smart contract tools.
mytonlibPythonNative ADNLPython SDK for interacting with TON.
TonToolsPythonRPC through (Orbs / TON Center)High-level, object-oriented Python library for interacting with TON.
tonpyPythonNative ADNLPython package for interacting with TON.
tvm_valuetypesPythonoff-chain onlyUtilities for handling TVM types.
pytvmPythonoff-chainPython TVM emulator using C++ bindings.
pytoniq-corePythonoff-chain onlyTransport-free, powerful SDK.
tonkite/adnlTypeScriptNative ADNL / WebSocketADNL TypeScript implementation.
tonutils-jsTypeScriptNative ADNLTypeScript interface for TON development. Not browser-compatible due to native ADNL dependency.
tonwebJSRPC through (Orbs / TON Center)JavaScript SDK with minimal external dependencies, extensively tested in production.
fotonTypeScriptRPC through (Orbs / TON Center)TypeScript toolkit for TON wallets and blockchain. Wraps existing solutions (Blueprint and TON Connect) into a single API.
tonlib-goGoTonlib binaryOfficial bindings for libtonlibjson.
Was this article useful?