For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick start

Server-side only. This package includes server-native dependencies (@agentkarma/sdk, @celo/attribution-tags) that cannot be bundled for the browser. Import it only from Node.js environments — API routes, background workers (BullMQ / Vercel Cron), or CLI scripts.

1. Create a client

import { createCelinaClient } from "@andrewkimjoseph/celina-sdk";

const celina = createCelinaClient({
  rpcUrl: "https://forno.celo.org",
  ethRpcUrl: "https://ethereum.publicnode.com", // optional, for ENS
});

2. Read on-chain data

// Stablecoin balances for an address
const balances = await celina.token.getStablecoinBalances("0xYourAddress");

// Mento FX quote (no wallet needed)
const quote = await celina.mentoFx.getFxQuote("USDm", "EURm", "100");

// Uniswap v4 quote (no wallet needed)
const swapQuote = await celina.uniswap.getSwapQuote("USDC", "USDT", "100");

// GoodDollar reserve quote — G$ ↔ USDm (no wallet needed)
const reserveQuote = await celina.gooddollar.getReserveQuote("GoodDollar", "USDm", "1000");

3. Prepare an unsigned transaction

4. Simulate and sign with wagmi

Simulate each step immediately before signing to catch reverts before gas is spent. usePublicClient() returns a viem PublicClient — the same type simulatePreparedStep expects.

See Prepared-step simulation and wagmi integration for error handling, multi-step flows, and React patterns.

Next steps

Last updated

Was this helpful?