OmegaX Protocol SDK
npm install @omegax/protocol-sdkPublic Solana devnet beta
Build on public protocol.
Use this overview to decide whether you need the SDK, which builder lane fits your integration, and which reference page to open next.
- SDK release
- 0.8.8
- Protocol interface
- Public devnet beta
- Integration network
- Solana devnet beta
The SDK is for public Solana devnet beta integrations. OmegaX-built product availability, including Genesis Protect, is documented separately from the protocol integration path.
Oracle and event producers
Register, set policy, and package attestations.
Health, wallet, and app builders
Read member, claim, obligation, and payout state.
Sponsor and capital integrators
Create reserve, plan, pool, class, and allocation flows.
Build today
Start from the public interface, then move into the right lane.
- Oracle services that register profiles, manage policy, and emit attestations.
- Apps, wallets, and agents that read member, claim, obligation, and payout state.
- Sponsor and capital flows for plans, funding lines, pools, classes, and allocations.
Install
npm install @omegax/protocol-sdk
npm install --save-dev tsx
Runtime basics
- Node.js
>=20 - ESM-only package
- Protocol builders are unsigned
- Production and settlement flows should use
createSafeProtocolClient(...) - Custom
programIdoverrides are for devnet, localnet, or test workflows only - Public integrations should target Solana devnet beta
Quickstart
Run the CLI doctor first. It checks Node, ESM imports, package subpaths, network metadata, the canonical program ID, typed errors, and the public instruction/account surface without a funded wallet or private key.
npx @omegax/protocol-sdk doctor
Create clients once, then branch into the workflow that matches your product.
import {
PROTOCOL_PROGRAM_ID,
createConnection,
createSafeProtocolClient,
createRpcClient,
getOmegaXNetworkInfo,
listProtocolInstructionNames,
} from '@omegax/protocol-sdk';
const network = 'devnet' as const;
const networkInfo = getOmegaXNetworkInfo(network);
const connection = createConnection({
network,
rpcUrl: process.env.SOLANA_RPC_URL ?? networkInfo.defaultRpcUrl,
commitment: 'confirmed',
});
const protocol = createSafeProtocolClient(connection, {
programId: PROTOCOL_PROGRAM_ID,
});
const rpc = createRpcClient(connection);
const instructions = listProtocolInstructionNames();
From there:
- oracle and event producers usually move into
buildRegisterOracleTx(...),buildClaimOracleTx(...),buildSetPoolOraclePolicyTx(...),buildAttestClaimCaseTx(...),attestProtocolOutcome(...), andverifyProtocolOracleAttestation(...) - health and wallet builders usually move into member and claim reads plus
buildOpenMemberPositionTx(...),buildOpenClaimCaseTx(...), andvalidateSignedClaimTx(...) - sponsor and capital integrators usually move into safe reserve-domain, reserve-rail, settlement, pool, class, allocation, and redemption builders from SDK Workflows
Public surface coverage
This package exposes the current object model:
- protocol governance and scoped controls
- reserve domains, domain asset vaults, reserve asset rails, and fee vaults
- health plans and policy series
- member positions and membership anchors
- funding lines, obligations, claim cases, reserve-backed payouts, and claim attestations
- liquidity pools, capital classes, LP positions, and allocation positions
- oracle profiles, pool oracle approvals, pool oracle policies, and permission sets
- outcome schemas and schema dependency ledgers
- reserve-aware read models for sponsors, members, and capital providers
- RPC helpers for unsigned transaction submission flows
Release status
- Current SDK release:
0.8.9 - Current protocol interface: public devnet beta
- Public integration network: Solana devnet beta
- Public docs: docs.omegax.health
Latest release note
0.8.9hardensvalidateSignedClaimTx(...)so claim intake must compare signed transactions against the service's trustedexpectedUnsignedTxBase64, not client-submitted intent bytes.0.8.8refreshes generated bindings for the 62-instruction / 31-account local protocol surface, removes the retired commitment-campaign API from current exports, adds governance authority accept/cancel builders, updates reserve-asset rail confidence inputs, and adds direct plus selected-asset claim-case settlement helpers.0.8.7adds the full onboarding DX pass: publicprotocol_models,transactions, anderrorssubpath exports, named safe-client types, theomegax-sdkCLI, shipped node-backend / Next route / oracle-worker templates, runnable no-signature examples, curated top-API and error-catalog docs, a tracked external consumer dogfood fixture, generated API markdown, and packed consumer smokes in CI.
Canonical module map
- Root package: connection helpers, RPC helpers, protocol builders, PDA helpers, reserve-model helpers, shared types
@omegax/protocol-sdk/protocol: IDL-backed builder and reader helpers such ascreateSafeProtocolClient(...),createProtocolClient(...),listProtocolInstructionNames(...),decodeProtocolAccount(...), andcompileTransactionToV0(...)@omegax/protocol-sdk/errors: typed SDK errors such asOmegaXProgramMismatchError,OmegaXAccountNotFoundError, andOmegaXRpcError@omegax/protocol-sdk/protocol_seeds: deterministic PDA helpers such asderiveReserveDomainPda(...),deriveReserveAssetRailPda(...),deriveHealthPlanPda(...),deriveFundingLinePda(...),deriveClaimCasePda(...), andderiveCapitalClassPda(...)@omegax/protocol-sdk/protocol_models: constants and read-model helpers such asrecomputeReserveBalanceSheet(...),buildSponsorReadModel(...),buildCapitalReadModel(...), andbuildMemberReadModel(...)@omegax/protocol-sdk/claims: claim validation and obligation failure helpers such asvalidateSignedClaimTx(...)andnormalizeClaimSimulationFailure(...)@omegax/protocol-sdk/oracle: oracle attestation helpers such ascreateOracleSignerFromEnv(...),createOracleSignerFromKmsAdapter(...),attestOutcome(...),attestProtocolOutcome(...),verifyOracleAttestation(...), andverifyProtocolOracleAttestation(...), alongside the root-levelbuildAttestClaimCaseTx(...)helper for on-chain claim-case attestations@omegax/protocol-sdk/rpc:createConnection(...),createRpcClient(...), and network metadata helpers@omegax/protocol-sdk/transactions: transaction serialization and signer-inspection helpers such asserializeSolanaTransactionBase64(...),decodeSolanaTransaction(...), andsolanaTransactionMessageBase64(...)@omegax/protocol-sdk/utils: hashing, binary encoding, and misc utilities@omegax/protocol-sdk/types: generated protocol contract types plus SDK RPC and failure types
What the SDK is for
- Sponsors, builders, and operators can build reserve-domain, reserve-rail, health-plan, policy-series, funding-line, obligation, and claim-case settlement transactions directly.
- Capital providers can derive capital-class and allocation addresses, inspect ledgers, and build deposit and redemption flows against canonical pool and class objects.
- Wallet apps and members can inspect plan participation, obligations, claim state, and payout history with the read-model helpers.
- Oracle services can register profiles, configure pool policy, attest claim cases on-chain, and use a narrower attestation helper surface for outcome packaging.
- External integrators can enumerate the current instruction and account surface with
listProtocolInstructionNames(...)andlistProtocolAccountNames(...). - Production flows should use
createSafeProtocolClient(...)or checked convenience builders for sponsor funding, premium intake, LP deposits, redemptions, settlement, and fee/treasury withdrawals. - Safe settlement calls require
recipientOwnerAddressalongside custody accounts so payout token-account mint and owner can be preflighted before users sign.
What the SDK does not do
- It exposes the current reserve-domain-first protocol interface.
- It does not hide settlement-critical accounting in offchain helpers.
- It does not invent a second protocol interface for wrappers or regulated participation.
- It does not sign transactions on your behalf.