@@ -10,7 +10,7 @@ hands‑on guides and API details, see the other topics in this documentation se
1010
1111## What is TON SDK?
1212
13- A collection of modular libraries published on Maven Central under the ` org.ton.kotlin ` group. Each module focuses on a
13+ A collection of modular libraries published on Maven Central under the ` org.ton.sdk ` group. Each module focuses on a
1414well‑defined layer of the TON stack, from low‑level binary formats up to ready‑to‑use APIs.
1515
1616### Key features
@@ -43,147 +43,48 @@ README for the latest coordinates and versions.
4343
4444- Indexers and backends that need to parse blocks/transactions and verify proofs.
4545- Wallets and apps that compose and serialize messages and contracts.
46- - Services querying blockchain data via the Lite Client.
46+ - Services querying blockchain data via the Lite Client or TON Center http client .
4747- Tooling and middleware that rely on TL‑B codecs and BOC manipulation.
4848
4949## Installation
5050
51- Add TON SDK modules from Maven Central. Use the coordinates under the org.ton.kotlin group. Keep module versions
52- aligned (e.g., 0.5.0).
53-
54- Gradle (Kotlin DSL):
55-
56- ``` kotlin
57- val tonVersion = " 0.5.0"
58-
59- dependencies {
60- implementation(" org.ton.kotlin:ton-kotlin-tvm:$tonVersion " ) // Cells/BOC
61- implementation(" org.ton.kotlin:ton-kotlin-crypto:$tonVersion " ) // Crypto
62- implementation(" org.ton.kotlin:ton-kotlin-tlb:$tonVersion " ) // TL-B codec
63- implementation(" org.ton.kotlin:ton-kotlin-liteclient:$tonVersion " ) // Lite client API
64- // Optional:
65- implementation(" org.ton.kotlin:ton-kotlin-contract:$tonVersion " ) // Contracts helpers
66- implementation(" org.ton.kotlin:ton-kotlin-adnl:$tonVersion " ) // ADNL transport
67- }
68- ```
69-
70- Gradle (Groovy DSL):
71-
72- ``` groovy
73- def tonVersion = '0.5.0'
74-
75- dependencies {
76- implementation "org.ton.kotlin:ton-kotlin-tvm:$tonVersion"
77- implementation "org.ton.kotlin:ton-kotlin-crypto:$tonVersion"
78- implementation "org.ton.kotlin:ton-kotlin-tlb:$tonVersion"
79- implementation "org.ton.kotlin:ton-kotlin-liteclient:$tonVersion"
80- // Optional:
81- implementation "org.ton.kotlin:ton-kotlin-contract:$tonVersion"
82- implementation "org.ton.kotlin:ton-kotlin-adnl:$tonVersion"
83- }
84- ```
85-
86- Maven:
87-
88- ``` xml
89-
90- <dependencies >
91- <dependency >
92- <groupId >org.ton.kotlin</groupId >
93- <artifactId >ton-kotlin-tvm</artifactId >
94- <version >0.5.0</version >
95- </dependency >
96- <dependency >
97- <groupId >org.ton.kotlin</groupId >
98- <artifactId >ton-kotlin-crypto</artifactId >
99- <version >0.5.0</version >
100- </dependency >
101- <dependency >
102- <groupId >org.ton.kotlin</groupId >
103- <artifactId >ton-kotlin-tlb</artifactId >
104- <version >0.5.0</version >
105- </dependency >
106- <dependency >
107- <groupId >org.ton.kotlin</groupId >
108- <artifactId >ton-kotlin-liteclient</artifactId >
109- <version >0.5.0</version >
110- </dependency >
111- <!-- Optional -->
112- <dependency >
113- <groupId >org.ton.kotlin</groupId >
114- <artifactId >ton-kotlin-contract</artifactId >
115- <version >0.5.0</version >
116- </dependency >
117- <dependency >
118- <groupId >org.ton.kotlin</groupId >
119- <artifactId >ton-kotlin-adnl</artifactId >
120- <version >0.5.0</version >
121- </dependency >
122- </dependencies >
123- ```
51+ Add TON SDK modules from Maven Central. Use the coordinates under the org.ton.sdk group. Keep module versions
52+ aligned (e.g., 0.6.0).
53+
54+ <tabs >
55+ <tab id =" maven " title =" Maven " >
56+ <code-block lang =" xml " src =" ../../examples/java-maven-project/pom.xml " include-symbol =" dependencies " />
57+ </tab >
58+ <tab id =" gradle-kts " title =" build.gradle.kts " >
59+ <code-block lang =" kotlin " src =" ../../examples/build.gradle.kts " include-lines =" 10-12 " />
60+ </tab >
61+ </tabs >
12462
12563## Quick start
12664
12765Add the artifacts you need from Maven Central and start from the level that fits your use case.
12866
129- ### Kotlin (JVM/Android)
130-
131- Creating a Cell and serializing to BOC:
132-
133- ``` kotlin
134- val cell = org.ton.cell.buildCell {
135- storeUInt(0xDEADBEEFu , 32 )
136- }
137- val boc: ByteArray = org.ton.boc.BagOfCells .of(cell).toByteArray()
138- ```
139-
140- Decoding a TL‑B object (schema provided by block‑tlb module):
141-
142- ``` kotlin
143- val block = org.ton.tlb.loadTlb<Block >(boc)
144- ```
145-
146- ### Java (JVM)
147-
148- Creating a Cell and serializing to BOC:
149-
150- ``` java
151- public class Example {
152- static void main (String [] args ) {
153- var builder = org.ton.cell. CellBuilderKt . beginCell();
154- builder. storeUInt(0xDEADBEEF , 32 );
155- org.ton.cell. Cell cell = builder. endCell();
156- byte [] boc = org.ton.boc. BagOfCells . Companion . of(new org.ton.cell.Cell []{cell}). toByteArray();
157- }
158- }
159- ```
67+ <tabs >
68+ <tab id =" java " title =" Java " >
69+ <code-block lang =" Java " src =" ../../examples/java-maven-project/src/main/java/org/ton/sdk/example/GetTransactionExample.java " include-symbol =" main " />
70+ </tab >
71+ <tab id =" kotlin " title =" Kotlin " >
72+ <code-block lang =" kotlin " src =" ../../examples/kotlin-gradle-project/src/jvmMain/kotlin/GetTransactionExample.kt " include-symbol =" main " />
73+ </tab >
74+ </tabs >
16075
16176See examples/ and tests in the repository for more scenarios.
16277
16378## Supported platforms
16479
16580- JVM / Android — Kotlin and Java (first‑class)
16681- iOS — Swift via Kotlin Multiplatform bindings (availability may vary by module)
167- - Desktop / Server — JVM
82+ - Desktop/Server — JVM (JDK 8+)
16883- Other Kotlin targets may be available per‑module; check each module’s README or Gradle metadata.
16984
170- ## Versioning and compatibility
171-
172- - Semantic ‑like versioning across modules. Prefer matching versions (e. g. , 0.5 . x) for best compatibility.
173- - Wire formats (BOC , TL ‑B ) follow TON specifications; backwards compatibility is preserved unless TON protocol changes.
174-
17585## Where to go next
17686
17787- Project README: architecture, badges, and links
17888- Wiki/Docs: deeper guides and API references
17989- Examples directory: runnable samples
18090- Telegram chat: community support and announcements
181-
182- ## Glossary
183-
184- - Cell — The fundamental immutable binary structure in TON used by TVM .
185- - BOC (Bag of Cells ) — A container format for serializing graphs of Cells .
186- - TL ‑B — Type language for describing binary data structures in TON .
187- - ADNL — Abstract Datagram Network Layer , a TON network transport.
188- - RLDP — Reliable Link over Datagram Protocol used over ADNL .
189- - Lite Client — A client that queries TON blockchain data without running a full node.
0 commit comments