TON DocsTON Docs
OnboardingNodesApplicationsAPIsSmart contractsTolkTolk languageTVMTON Virtual MachineFoundationsBlockchain foundations

SDKs

For available APIs, see the API overview. When building web dApps, use AppKit.

There are several ways to interact with TON blockchain:

  • HTTP libraries connect through HTTP JSON APIs to read and write to the blockchain. HTTP servers mostly relay these requests to the ADNL network.
  • ADNL libraries connect to liteserver.

Here's a small comparison of these protocols:

HTTPADNL
StandardizedNoYes
Can connect from a web pageYesNo
Has free third-party serversYesYes
Can be self-hostedYesYes
Requires trusting third partiesYes1No
First connection takes time for data synchronizationNoYes2

1 Some HTTP servers do provide proofs, but there is no out-of-the-box library that verifies them.
2 If proofs returned by liteservers are ignored, the first connection skips data synchronization; however, this requires trusting the liteserver.

SDKs might also provide some other functionality:

  • Core libraries implement standard TON data structures (cell, slice), formats (address, mnemonic), cryptography, etc.
  • Wrappers provide high-level APIs for interacting with standard contracts (Wallet, Jetton, NFT).
  • Emulator libraries provide an execution environment similar to a real blockchain for testing purposes.
HTTPADNLCoreWrappersEmulatorLanguage
@ton/tonTypeScriptCodeChat
@ton/coreTypeScriptCodeDocs
@ton/sandboxTypeScriptCode
ton4jJavaCodeChat
tonutils-goGoCodeChat
tonutilsPythonCodeDocsChat
adnlTypeScriptCode
tonutilsTypeScriptCode
tonlib-javaJavaCode
tonlibC++CodeDocs
pytonlibPythonCode
pytoniqPythonCodeDocsChat
pytoniq-corePythonCodeDocsChat
mytonlibPythonCode
tonpyPythonCodeDocs
tvm_valuetypesPythonCode
pytvmPythonCode
tongoGoCode
tonPHPCode
interopPHPCode
ton-rsRustCode
ton-grpcRustCode
tonsdk.netC#CodeChat
tonlib.netC#Code
tonElixirCode
@tetherto/wdk-wallet-tonJavaScriptCodeDocs
@tetherto/wdk-wallet-ton-gaslessJavaScriptCodeDocs
ton-kotlinKotlinCodeDocs
tonlib-goGoCode
tonwebJavaScriptCode
node-tonlibJavaScriptCode
tontoolsPythonCode
swiftytonSwiftCode
tonlib-xcframeworkSwiftCode
tonlib-rsRustCode

See also:

  • WDK Core, JavaScript - Modular library from Tether, which supports wallet management and various swap, bridge, and lending services for many blockchains at once.