Skip to content
GitHub

TypeScript quickstart

Testnet

This quickstart uses @monolythium/[email protected] for a public testnet read and the server-side half of wallet authentication. It does not derive an application-held wallet, prepare a transfer, or broadcast a transaction.

Terminal window
pnpm add --save-exact @monolythium/[email protected]

Requirements: Node 22+ or a modern ESM-capable browser bundler.

Choose an endpoint from the chain registry and verify its genesis identity separately:

import { RpcClient } from "@monolythium/core-sdk";
const client = new RpcClient("https://rpc.monolythium.com");
const [round, stats] = await Promise.all([
client.lythCurrentRound(),
client.lythChainStats(),
]);
console.log({ round, stats });

Chain ID alone is not a trust anchor. Pin the full genesis hash from the registry before treating an endpoint as the intended testnet.

3. Verify wallet authentication on the server

Section titled “3. Verify wallet authentication on the server”

After a compatible browser-wallet release returns a WalletAuthProofV1:

import { verifyWalletAuthProofV1 } from "@monolythium/core-sdk";
export function verifyProof(requestBody: unknown) {
return verifyWalletAuthProofV1(requestBody, {
now: new Date(),
clockSkewSeconds: 5,
});
}

Then compare every signed field with the exact challenge your server issued and atomically consume the nonce. Only after those application checks succeed should you create a session.

See Wallet-auth integration for challenge construction, browser invocation, and the complete relying-party checklist.

This quickstart intentionally stops before signing or submission. The former transaction-plan examples referenced SDK methods and runbook guarantees that are not part of this released Stele integration contract. Authentication does not grant spending authority.