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

# Overview

## Template & Examples

<Card title="Gasless SDK Examples" icon="github" href="https://github.com/gelatodigital/smartwallet/tree/master/examples">
  Check out the full example code for implementing the Gasless SDK.
</Card>

> Note: The examples are pre-configured for `baseSepolia`, but you can easily switch to other supported networks.

### Setup Instructions

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/gelatodigital/smartwallet
    cd smartwallet/examples
    ```
  </Step>

  <Step title="Set Up Environment Variables">
    ```bash theme={null}
    cp .env.example .env
    ```
  </Step>

  <Step title="Generate a API Key">
    Create a API Key using the [Gelato App](https://app.gelato.cloud/).
    Paste the key into your `.env` file. Check out the How-To Guides [here](/smart-wallet-sdk/how-to-guides/create-a-api-key).
  </Step>

  <Step title="Add Your Private Key (Optional)">
    You can either include your private key in the `.env` file, or leave it empty—example files will automatically generate a random private key if none is provided.

    ```bash theme={null}
    PRIVATE_KEY=your_private_key_here
    ```
  </Step>

  <Step title="Install Dependencies">
    ```bash theme={null}
    pnpm install
    ```
  </Step>

  <Step title="Run Example Use Cases">
    **Sponsored Transactions:**

    ```bash theme={null}
    pnpm sponsored
    ```

    **ERC20 Gas Payments:**

    ```bash theme={null}
    pnpm erc20
    ```

    **Native Gas Payments:**

    ```bash theme={null}
    pnpm native
    ```

    **Estimate Gas:**

    ```bash theme={null}
    pnpm estimate
    ```

    **Kernel Smart Account Transactions:**

    ```bash theme={null}
    pnpm kernel-sponsored
    ```

    **Safe Smart Account Transactions:**

    ```bash theme={null}
    pnpm safe-sponsored
    ```
  </Step>
</Steps>

Not using templates? Prefer a step-by-step approach? Up next: How-To Guides for implementing the Gasless SDK use cases step-by-step.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @gelatonetwork/smartwallet viem
  ```

  ```bash yarn theme={null}
  yarn add @gelatonetwork/smartwallet viem
  ```

  ```bash pnpm theme={null}
  pnpm install @gelatonetwork/smartwallet viem
  ```
</CodeGroup>

<Card title="Gelato Smart Wallets SDK" icon="link" href="https://www.npmjs.com/package/@gelatonetwork/smartwallet">
  Check out the NPM package for the Gelato Smart Wallets SDK.
</Card>

Depending on your target use case, choose from the guides below that best match your desired destination or integration flow.

* [Creating API Keys](/smart-wallet-sdk/how-to-guides/create-a-api-key) : Create a API key to kickstart your Smart Wallet journey.
* [Sponsoring gas for users](/smart-wallet-sdk/how-to-guides/sponsor-gas) : A third-party sponsor (Gas Tank) covers the gas fees, allowing users to transact without holding any native tokens.
* [Allowing users to pay gas with their ERC20 tokens](/smart-wallet-sdk/how-to-guides/allow-user-to-pay-with-erc20) : Users can pay gas fees using supported ERC-20 tokens, eliminating the need to acquire native tokens.
* [Allowing users to pay gas with their Native tokens](/smart-wallet-sdk/how-to-guides/allow-user-to-pay-with-native) : Users cover gas fees directly using native tokens like ETH—the default and most widely supported method.
* [Using Dynamic/Privy as wallet providers with React SDK](/smart-wallet-sdk/embedded-wallets/use-dynamic-signers) : Users can interact with applications using email, phone, or social logins through wallet providers like Dynamic and Privy, enjoying full dApp functionality with a seamless Web2-like experience.
* [Estimating Gas before sending transactions on-chain](/smart-wallet-sdk/how-to-guides/estimate-gas) : Developers can simulate transactions to estimate gas costs in advance, improving reliability and user experience.
