OMY SDK
The OMY SDK is one TypeScript file that gives any TON-aware project the
ability to ask questions, post bonds, and react to truth on-chain. It's
framework-agnostic, ships zero runtime dependencies beyond @ton/core, and the
wire format is stable — the same SDK works against every OMY build.
:::tip Five lines to integrate The fastest path from "I have a TON contract" to "I'm consuming truth from OMY" is roughly 5 lines of TypeScript and 6 lines of Tolk. See the Quick Start. :::
What the SDK gives you
import {DocFeatures, DocFeature} from '@site/src/components/docs/DocFeatures';
CreateAssertion, bond payloads,
Phase-2 vote commits) without thinking about cell layout.
OracleResult, OracleDisputed,
AssertionCreated) into typed objects.
What the SDK does NOT do
The SDK is client-side helpers, not a backend. It does not:
- Send transactions for you — you wire it into your wallet /
@ton/tonflow - Track assertion state — you query the chain via TonCenter /
@ton/ton - Run keepers — those are separate bots (we'll ship reference implementations later); the SDK just makes it easy to build one
- Cache prices, manage rate limits, or anything subscription-style
It's intentionally small. The whole file is ~250 lines.
Install
The SDK is currently a single file vendored from the repo. An npm package ships at mainnet launch.
mkdir -p src/omy
curl -L https://raw.githubusercontent.com/Omy-network/omy/main/sdk/index.ts \
-o src/omy/index.ts
npm i @ton/core @ton/ton
:::info Why no npm package yet?
We're pinning the SDK version to the audit-cleared contract opcodes. Once
mainnet contracts are pinned, the SDK ships as @omy/sdk on npm with strict
semver — no breaking changes to opcodes outside of major releases.
:::
Three things to read next
import {DocCards, DocCard} from '@site/src/components/docs/DocCards';
Compatibility
| Version | Notes | |
|---|---|---|
| OMY contracts | Tolk port, current tolk-port branch | Opcodes stable since v1 |
| TON SDK | @ton/core ^0.60, @ton/ton ^15 | Older versions probably work; not tested |
| Node | 18+ | We test on 20 |
| TypeScript | 5+ | The SDK is plain TS, no build step needed |
Wire stability promise
The cross-contract opcodes OMY uses are pinned. The TL-B layout of each message body is stable. The SDK is a thin convenience over those primitives — so it will break only when contracts ship a v2 at new addresses (which itself is a deliberate, signaled event, not a silent change).
If you ever need to talk to OMY contracts without our SDK at all, the reference page lists every opcode and TL-B structure you need.