Typed RPC client
RpcClient is the published TypeScript wrapper for Monolythium JSON-RPC. The examples below are type-checked against exact package version 0.6.8; the read methods are also exercised against https://rpc.monolythium.com during documentation verification.
import { RpcClient } from "@monolythium/core-sdk";
const client = new RpcClient("https://rpc.monolythium.com");const [round, stats, peers, provenance] = await Promise.all([ client.lythCurrentRound(), client.lythChainStats(), client.lythPeerSummary(), client.lythRuntimeProvenance(),]);
console.log({ round, stats, peers, provenance });TypeScript wrapper methods are camelCase; the wire methods remain underscore-separated (lyth_chainStats, lyth_currentRound, and so on). Response fields are also camelCase in the current wire contract, including chainId, genesisHash, latestHeight, and releaseTag.
Identity check
Section titled “Identity check”An endpoint is acceptable only when all identity fields agree with the current registered chain profile:
import { RpcClient } from "@monolythium/core-sdk";
const client = new RpcClient("https://rpc.monolythium.com");const stats = await client.lythChainStats();const expectedGenesis = "0xe22733f4d7e013b93f0f825667fcf852cbf7ad1ca31a42a1bfcf1ab6d79c89a3";
if (stats.chainId !== 69420 || stats.genesisHash !== expectedGenesis) { throw new Error("unexpected Monolythium network identity");}Chain ID alone is not sufficient because testnet may be wiped and re-genesis without notice. Use safe read-only probes for public verification; do not benchmark submission or create transactions from a documentation check.
Capability boundary
Section titled “Capability boundary”The SDK contains types and helpers for more surfaces than the active product supports. An exported bridge, agent, escrow, spending-policy, or submission symbol is not activation evidence. Those economic paths remain unavailable unless the active runtime, genesis, product release, and end-to-end gates all agree.
Rust examples are omitted here because this repository does not claim a crates.io release or continuously compile a Rust snippet. Pin and test an audited source revision before documenting Rust behavior.