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

# Quickstart

> Create a passkey-controlled wallet and send your first sponsored transaction on Base Sepolia.

Authenticate a user and mint 1 mUSD, a test token on Base Sepolia. Your application sponsors the transaction, so the user needs no tokens or gas to get started.

## Prerequisites

* A browser application served over HTTPS. The hosted provider does not accept plain `http://localhost`; use [local HTTPS](https://docs.1auth.app/faq#can-i-test-against-1auth-from-localhost) for development.
* An application and its domains registered in the [Dashboard](/home/resources/dashboard).
* A device or browser that supports passkeys.

<Steps>
  <Step title="Install the SDK">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @rhinestone/1auth viem
      ```

      ```bash pnpm theme={null}
      pnpm add @rhinestone/1auth viem
      ```

      ```bash bun theme={null}
      bun add @rhinestone/1auth viem
      ```
    </CodeGroup>
  </Step>

  <Step title="Configure application credentials">
    Create a JWT signing key in the [Dashboard](/home/resources/dashboard), then follow the **Embedded wallet** tab in [Sponsorship setup](/transactions/sponsorship/set-up) to implement two same-origin backend endpoints:

    * `GET /api/sponsorship/access-token` authenticates your app and project.
    * `POST /api/sponsorship/extension-token` authorizes sponsorship for the intent.

    Keep the private signing key on your backend. Authenticate your application session and apply [issuance checks](/transactions/sponsorship/policies-and-security) before minting tokens.

    <Note>
      Application credentials are required for every intent, even when the user
      pays. Without `sponsorship` configured, `sendIntent` returns
      `MISSING_APP_CREDENTIALS`.
    </Note>
  </Step>

  <Step title="Initialize the client">
    Create `oneauth.ts` using the shared [client initialization](/wallets/embedded-wallets/accounts#initialize-the-client). Replace `my-app` with your registered client ID and point `sponsorship` at the endpoints above. Reuse its exported `oneAuth` client in the next step.

    Passkeys are created and used in your page. Each hostname has its own passkey and smart-account namespace by default. See [Passkeys and domains](/wallets/embedded-wallets/passkeys-and-domains) before sharing accounts across subdomains.
  </Step>

  <Step title="Send your first transaction">
    Call `mintTestToken()` from a button in your browser application. Authentication creates a wallet for a new user or signs in to an existing one; the user then authorizes the mint with their passkey.

    ```ts theme={null}
    import { encodeFunctionData, parseAbi, parseUnits } from "viem";
    import { baseSepolia } from "viem/chains";
    import { oneAuth } from "./oneauth";

    const MUSD_BASE_SEPOLIA = "0x2f6fdE5E2AeAB6335d8f978B4d8B2a9c1129AcFb";

    export async function mintTestToken() {
      const auth = await oneAuth.authenticate();
      if (!auth.success) throw new Error(auth.error.message);

      const result = await oneAuth.sendIntent({
        accountAddress: auth.session.accountAddress,
        targetChain: baseSepolia.id,
        calls: [
          {
            to: MUSD_BASE_SEPOLIA,
            data: encodeFunctionData({
              abi: parseAbi(["function mint(address to, uint256 amount)"]),
              functionName: "mint",
              args: [auth.session.accountAddress, parseUnits("1", 6)],
            }),
            label: "Mint",
            sublabel: "1 mUSD",
          },
        ],
        sponsorshipMode: "required",
        closeOn: "completed",
      });

      if (!result.success) {
        throw new Error(result.error?.message ?? "Mint failed");
      }

      console.log("Intent ID:", result.intentId);
      return result;
    }
    ```

    There are no `tokenRequests`: the call mints tokens directly to the account, so nothing needs to be sourced or bridged. Sponsorship covers the fees; `required` fails rather than falling back to a user-paid transaction.
  </Step>
</Steps>

## Expected outcome

After the transaction completes, your account receives 1 mUSD on Base Sepolia. `closeOn: "completed"` keeps the dialog open until completion, and the example logs the intent ID. Inspect your account on [Base Sepolia's explorer](https://sepolia.basescan.org) to verify the mint.

## Next steps

* [Send a transaction](/transactions/multichain/send-a-transaction): deliver tokens to a target chain before executing a call.
* [Sign up and sign in](/wallets/embedded-wallets/sign-up-and-sign-in): restore sessions and handle returning users.
* [Ecosystem](/wallets/embedded-wallets/ecosystem): connect the wallet to viem or wagmi.
