Skip to main content

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';

Compose the on-chain message bodies (CreateAssertion, bond payloads, Phase-2 vote commits) without thinking about cell layout. Decode inbound callbacks (OracleResult, OracleDisputed, AssertionCreated) into typed objects. Every cross-contract opcode exported as a typed constant. No magic numbers in your code. Read assertion lifecycle, decode market state, normalize jetton math — so your code matches what the contract actually does.

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/ton flow
  • 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. :::

import {DocCards, DocCard} from '@site/src/components/docs/DocCards';

Compatibility

VersionNotes
OMY contractsTolk port, current tolk-port branchOpcodes stable since v1
TON SDK@ton/core ^0.60, @ton/ton ^15Older versions probably work; not tested
Node18+We test on 20
TypeScript5+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.