Use this file to discover all available pages before exploring further.
You can interact with Continuum from any Solana-compatible client - TypeScript / Anchor is the most-trodden path. This page sets up a minimal project end-to-end.
import { Connection, Keypair, PublicKey } from "@solana/web3.js";import { AnchorProvider, Program, Wallet } from "@coral-xyz/anchor";import fs from "fs";import path from "path";import mintRedeemIdl from "./idl/mint_redeem.json";import oracleIdl from "./idl/oracle.json";import clpIdl from "./idl/clp.json";const RPC_URL = process.env.RPC_URL ?? "https://api.devnet.solana.com";export function makeProvider(): AnchorProvider { const conn = new Connection(RPC_URL, "confirmed"); const secretKey = JSON.parse( fs.readFileSync( process.env.WALLET_PATH ?? path.join(process.env.HOME!, ".config/solana/id.json"), "utf8", ), ); const kp = Keypair.fromSecretKey(new Uint8Array(secretKey)); const wallet = new Wallet(kp); return new AnchorProvider(conn, wallet, { commitment: "confirmed" });}export function loadPrograms(provider: AnchorProvider) { return { mintRedeem: new Program(mintRedeemIdl as any, provider), oracle: new Program(oracleIdl as any, provider), clp: new Program(clpIdl as any, provider), };}
Anchor v0.32 derives types from the IDL automatically - no separate codegen step. The as any casts are for IDL types that don’t perfectly satisfy the strict Anchor 0.32 IDL schema; they’re a no-op at runtime.
Public devnet (https://api.devnet.solana.com) is fine for one-off scripts. For anything that polls or runs continuously, use a private RPC. Helius, Triton, QuickNode all work. Examples:
For browser apps use Solana Wallet Adapter. For scripts, use a file-loaded keypair as above.If you’re testing as the keeper authority on devnet, the relevant keypairs are:
KEEPER_KEYPAIR - payer + arb signer.
CLP_AUTHORITY_KEYPAIR - separate keypair that signs CLP CPI instructions.
These should be different from the admin authority for mainnet operation.
Wrong IDL for the cluster. If the IDL’s embedded program ID doesn’t match the deployed program, every method call will fail with ProgramId mismatch or similar. Re-fetch IDLs after switching clusters.Missing ATAs. Mint and redeem instructions assume the user’s L, S, and cUSDC ATAs exist. Pre-create them with createAssociatedTokenAccountIdempotentInstruction to avoid AccountNotFound on first interaction.Anchor 0.32 type issues. Some IDLs need as any casts on new Program() due to strict typing introduced in 0.32. Runtime behavior is unaffected.Decimal mismatch. cUSDC and L/S all use 6 decimals. When computing display values, divide by 10**6. When constructing BN arguments to instructions, multiply by 10**6.