TON Development Documentation
This directory is the internal technical reference for implementing tonutils. It is intentionally more implementation-oriented than general TON documentation: each page connects protocol facts to concrete Rust modules, invariants, tests, and missing work.
Human contributors and AI agents should read this directory before changing
protocol behavior. Public user guides belong in docs/; protocol evidence,
wire formats, invariants, source priorities, and crate mapping belong here.
Reading Order
- Architecture overview
- Feature matrix
- Source tracking
- Crypto primitives
- TL schema language
- LiteAPI schema
- ADNL TCP
- TVM cells
- BoC format
- TL-B data models
- Blockchain data model
- Blockchain TL-B coverage
- Block, config, and proof TL-B slice
- LiteClient request flow
- LiteClient rate limiting
- Smart-contract get-methods
- ABI data model
- Wallet V5R1
- Wallet V4R2 and TON mnemonics
- TEP metadata roadmap
Directory Map
architecture/: crate layers, features, errors, performance policy.api/: public API design, compatibility and ergonomics.blockchain/: blocks, accounts, transactions, messages, config params.crypto/: hashes, checksums, keys, signatures, encryption primitives.tl/: TL syntax, schema maintenance, LiteAPI types and function mapping.network/: ADNL transport, DHT, overlays, global config.tvm/: cells, BoC, addresses, dictionaries, TL-B, TVM stack.liteclient/: request flow, balancer, proof verification.contracts/: get-methods, external messages, high-level contract API.operations/: source tracking, diagnostics, maintenance workflow.research/: mempool scanning notes and future protocol investigations.testing/: fixtures, live tests, benchmarks.
Documentation Contract
Every topic file should answer:
- What TON subsystem does this describe?
- Which wire formats, constructor ids, byte order, limits, and flags matter?
- What invariants must code preserve?
- Which files in this crate implement or will implement it?
- Which tests or fixtures prove compatibility?
- What is still missing?
Repository text must stay English-only.
Source Of Truth Priority
When sources disagree, prefer this order:
- Upstream
ton-blockchain/tonschemas and C++ implementation. - Official TON documentation and specs.
- Behavior observed from public liteservers with recorded fixtures.
- Mature SDK behavior such as
tonutils-go,tongo, pytoniq, and pytoniq-core. - Existing crate behavior.
Use pytoniq and pytoniq-core for capability inspiration or comparison evidence
after upstream TON facts are established. They are not API or structure parity
targets. Record any deliberate protocol compatibility deviation in TODO.md
and in the relevant subsystem document.