> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sorokit.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Go from a fresh React app to a working Stellar integration in minutes.

Sorokit requires no code generation and no complex configuration. This guide will help you set up the SDK and make your first contract call.

#### 1. Install Dependencies

Sorokit is split into modular packages. You will also need to install the peer dependencies that power our validation and data fetching.

```bash theme={null}
pnpm add @sorokit/core @sorokit/provider @sorokit/wallet-adapter @sorokit/contract @sorokit/hooks @stellar/stellar-sdk @tanstack/react-query zod react-hook-form @hookform/resolvers @creit.tech/stellar-wallets-kit
```

#### 2. Wrap your application

The `SorokitProvider` is the single entry point. It manages your network settings, handles wallet connections, and injects the DevTools.

```tsx theme={null}
import { SorokitProvider } from "@sorokit/provider";
import { stellarWalletsKit } from "@sorokit/wallet-adapter/stellar-wallets-kit";

// Setup the community wallet connector
const wallet = stellarWalletsKit();

export function App({ children }) {
  return (
    <SorokitProvider network="TESTNET" wallet={wallet} devtools={true}>
      {children}
    </SorokitProvider>
  );
}
```

#### 3. Read from a contract

Use `useContractCall` to fetch data. You do not need a connected wallet for this since it uses a network simulation.

```tsx theme={null}
import { useContractCall } from "@sorokit/contract";

function TokenName({ contractId }) {
  const { data, isLoading } = useContractCall<string>({
    contractId,
    method: "name",
  });

  if (isLoading) return <div>Loading...</div>;
  return <div>Contract Name: {data}</div>;
}
```

#### 4. Submit a transaction

Use `useContractSend` for state-changing operations. Ensure you connect a wallet using the `ConnectWalletButton` or the `useWallet` hook first.

```tsx theme={null}
import { useContractSend } from "@sorokit/contract";

function MintAction({ contractId }) {
  const { sendAsync, status } = useContractSend({
    contractId,
    method: "mint",
  });

  return (
    <button onClick={() => sendAsync({ to: "G...", amount: 100n })}>
      {status === "IDLE" ? "Mint Tokens" : status}
    </button>
  );
}
```
