> For the complete documentation index, see [llms.txt](https://andrewkimjoseph.gitbook.io/celina-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andrewkimjoseph.gitbook.io/celina-sdk/getting-started/quick-start.md).

# Quick start

## 1. Create a client

```ts
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

```ts
// 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

```ts
const flow = await celina.transaction.prepareSend(
  "0xFromAddress",
  "0xToAddress",
  "USDm",
  "10",
);

console.log(flow.summary);
// "Send 10 USDm to 0xToAddress"

console.log(flow.steps.length);
// 1 (single ERC-20 transfer)
```

## 4. Simulate and sign with wagmi

Simulate each step immediately before signing to catch reverts before gas is spent:

```ts
import { simulatePreparedStep } from "@andrewkimjoseph/celina-sdk/simulation";
import { useSendTransaction, usePublicClient } from "wagmi";
import { waitForTransactionReceipt } from "wagmi/actions";
import { config } from "./wagmi-config";

const { sendTransactionAsync } = useSendTransaction();
const publicClient = usePublicClient();

for (const step of flow.steps) {
  await simulatePreparedStep(publicClient!, {
    account: fromAddress,
    step,
  });

  const hash = await sendTransactionAsync({
    to: step.to,
    data: step.data,
    value: step.value ? BigInt(step.value) : undefined,
  });

  const receipt = await waitForTransactionReceipt(config, { hash });
  if (receipt.status === "reverted") {
    throw new Error(`Transaction reverted: ${hash}`);
  }
}
```

See [Prepared-step simulation](/celina-sdk/guides/prepared-step-simulation.md) and [wagmi integration](/celina-sdk/guides/wagmi-integration.md) for error handling, multi-step flows, and React patterns.

## Next steps

* [Configuration](/celina-sdk/getting-started/configuration.md) — RPC URLs and client options
* [Prepared flows](/celina-sdk/concepts/prepared-flows.md) — flow shape and step fields
* [Send tokens](/celina-sdk/guides/send-tokens.md) — CELO vs ERC-20 sends


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://andrewkimjoseph.gitbook.io/celina-sdk/getting-started/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
