# Getting started

This walks through the fastest path from zero to a signed transaction:
create an account, create an app, install the SDK, sign a user in, and
create a wallet they can sign with.

## 1. Create your account

Sign in to the [MoonX Dashboard](https://dashboard.moonx-dev.com): login is
passwordless via a magic link emailed to you. Your first login auto-provisions
a personal organization.

<WalkthroughVideo src="/videos/dashboard-magic-link-example-1080p-60.mp4" caption="Signing in to the MoonX Dashboard with an emailed magic link" />

## 2. Create an app and grab your keys

In the dashboard, [create an app](/get-started/dashboard/create-new-app). Each
app has two kinds of API keys:

* a **publishable key** (`moon_pk_test_...` / `moon_pk_live_...`): safe to ship
  in your frontend; identifies your app to the SDK.
* a **secret key** (`moon_sk_test_...` / `moon_sk_live_...`): server-side only,
  revealed exactly once at creation. Store it in your secret manager.

See [REST API setup](/get-started/rest-api/setup) for header conventions and
key management.

## 3. Install the React SDK

```bash
npm install @moon-x/react-sdk@latest
```

Wrap your app with the provider, using your publishable key:

```tsx
import { MoonXProvider } from '@moon-x/react-sdk';

export default function App({ children }) {
  return (
    <MoonXProvider publishableKey="moon_pk_test_your_publishable_key">
      {children}
    </MoonXProvider>
  );
}
```

Full details (Solana and Tron deps, Next.js config): [Installation](/get-started/frontend-sdks/react/installation).

## 4. Sign in a user

Users authenticate with **email OTP** or **Google/Apple OAuth**. The built-in
login modal handles both:

```tsx
import { useMoonX } from '@moon-x/react-sdk';

function LoginButton() {
  const { start } = useMoonX();
  return <button onClick={() => start()}>Sign in</button>;
}
```

A successful login yields MoonX-issued access and identity tokens your backend
can [verify statelessly against your app's JWKS](/authentication/user-authentication/sessions/backend-verification).

## 5. Create a wallet and sign

Wallets are created explicitly: one SDK call, gated by a **passkey** the user
enrolls on first use (the passkey encrypts the wallet's key material; MoonX
never holds it):

```tsx
import { useCreateWallet } from '@moon-x/react-sdk/ethereum';
import { useSignMessage } from '@moon-x/react-sdk/ethereum';

function WalletDemo() {
  const { createWallet } = useCreateWallet();
  const { signMessage } = useSignMessage();

  return (
    <>
      <button onClick={() => createWallet()}>
        Create wallet
      </button>
      <button onClick={() => signMessage({ message: 'hello moonx' })}>
        Sign message
      </button>
    </>
  );
}
```

From here you can [send transactions](/wallets/using-wallets/ethereum/send-transaction),
[sign typed data](/wallets/using-wallets/ethereum/sign-typed-data), and more,
on Ethereum (and all EVM chains), Solana, and Tron.

## Stay in control

* **Sessions are revocable server-side**: logout kills the session immediately,
  even for unexpired tokens. See [Signing users out](/authentication/user-authentication/signing-users-out).
* **Sensitive wallet operations require step-up**: signing, key export, and
  passkey removal demand a fresh passkey assertion that mints a short-lived
  [presence token](/authentication/user-authentication/presence-tokens).
* **Users can export their keys at any time** via the
  [secure export flow](/wallets/embedded-wallets/export-a-wallet):
  self-custody with an exit door.

<Tip>
  New to the model? Read the [Authentication overview](/authentication/overview)
  next. It explains login methods, sessions, tokens, and passkeys in one place.
</Tip>
