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

# API Reference

> Complete API documentation for Crefy Connect

# Crefy Connect API Reference

Crefy Connect provides a comprehensive set of React components and hooks for building wallet-enabled applications. Our APIs are designed to be type-safe, chain-agnostic, and developer-friendly.

## Available APIs

<Columns cols={2}>
  <Card title="CrefyConnectProvider" icon="settings" href="/api-reference/provider">
    Root provider component for configuring Crefy Connect in your app.
  </Card>

  <Card title="AuthModal" icon="user" href="/api-reference/auth-modal">
    Pre-built authentication modal component with multiple login methods.
  </Card>

  <Card title="useCrefy Hook" icon="code" href="/api-reference/use-crefy">
    Access authentication state, user details, and wallet information.
  </Card>

  <Card title="useSendEth Hook" icon="send" href="/api-reference/use-send-eth">
    Send native ETH transactions on supported chains.
  </Card>
</Columns>

## SDK Overview

Crefy Connect provides React components and hooks for seamless integration:

```tsx theme={null}
// Provider setup
import { CrefyConnectProvider } from "crefy-connect";

<CrefyConnectProvider
  appId="<YOUR_CREFY_ID>"
  chain="sepolia"
  loginMethods={["google", "wallet", "email"]}
>
  <App />
</CrefyConnectProvider>

// Using hooks
import { useCrefy, useSendEth } from "crefy-connect";

const { user, walletInfo, isAuthenticated } = useCrefy();
const { sendEth, loading } = useSendEth();
```

## TypeScript Support

All APIs are fully typed with TypeScript. Available types include:

* `CrefyConnectProviderProps` - Provider configuration
* `CrefyUser` - Authenticated user information
* `WalletInfo` - Wallet address and chain details
* `SendEthParams` - Transaction parameters
* And many more...

<Note>
  **Type Safety**: Crefy Connect is designed with TypeScript first, ensuring type safety across all operations.
</Note>

## Error Handling

All hooks and components handle errors gracefully:

```tsx theme={null}
const { sendEth, error } = useSendEth();

try {
  await sendEth({
    to: "0x...",
    value: "0.1",
    chain: "sepolia"
  });
} catch (err) {
  console.error("Transaction failed:", error);
}
```
