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

# Commands

> Overview of current MiniKit commands for mini apps.

export const QRCodeGenerator = props => {
  const {appId: initialAppId = "", hideInput = false, baseUrl = "https://worldcoin.org/mini-app", hideDetails = false} = props || ({});
  const [appId, setAppId] = useState(initialAppId);
  const trimmed = useMemo(() => appId.trim(), [appId]);
  const isValid = useMemo(() => (/^app_[a-f0-9]+$/).test(trimmed), [trimmed]);
  const payload = useMemo(() => {
    if (!trimmed || !isValid) return "";
    return `${baseUrl}?app_id=${trimmed}`;
  }, [trimmed, isValid, baseUrl]);
  const qrSrc = useMemo(() => {
    const size = "200x200";
    const data = encodeURIComponent(payload);
    return `https://api.qrserver.com/v1/create-qr-code/?size=${size}&data=${data}`;
  }, [payload]);
  const containerGridClass = hideDetails ? "" : "grid gap-4 md:grid-cols-[200px_1fr] items-start";
  return <div className="not-prose p-4 border rounded-xl space-y-4">
      {!hideInput && <label className="block text-sm font-medium">
          App ID
          <input type="text" placeholder="Enter App Id (eg. app_f88bb2a....)" value={appId} onChange={e => setAppId(e.target.value)} className="mt-1 w-full rounded-lg border px-3 py-2" aria-label="App ID" />
        </label>}

      {trimmed && !isValid && <p className="text-sm text-red-600">
          Invalid App Id. Eg. app_xxxxxxxxxxx
        </p>}

      <div className={containerGridClass}>
        <div className="flex items-center justify-center border rounded-xl p-2 bg-white">
          {isValid && payload ? <img src={qrSrc} alt={`QR for ${payload}`} width="200" height="200" loading="eager" /> : <div className="w-[200px] h-[200px] grid place-items-center text-sm text-gray-500">
              {hideInput ? "Provide an App ID via props" : "Enter a valid App ID"}
            </div>}
        </div>

        {!hideDetails && <div className="space-y-2 text-sm">
            <div className="text-gray-700">
              Encoded value:
              <code className="ml-2 px-2 py-1 rounded bg-gray-100">
                {payload || "(empty)"}
              </code>
            </div>
            <ol className="list-decimal pl-5 space-y-1">
              <li>Enter your App ID {hideInput ? "via props" : "above"}.</li>
              <li>Scan the QR with your phone’s camera.</li>
              <li>Confirm the prompt in World App.</li>
            </ol>
          </div>}
      </div>
    </div>;
};

Commands are async methods on `MiniKit`. Use `await MiniKit.<command>()` and handle the returned `{ executedWith, data }` result.

<Note>
  World ID verification is no longer a MiniKit command. Use
  [`@worldcoin/idkit`](/world-id/idkit/mini-apps) for new verification flows.
</Note>

Try our preview mini app to get a sense of how commands work. Scan the QR code below with your phone (you must have World App installed).

<div className="flex justify-center my-4">
  <QRCodeGenerator hideInput={true} hideDetails={true} appId="app_dfbe55706a640c82dce839bb0ecae74d" baseUrl="https://world.org/mini-app" />
</div>

<table>
  <thead>
    <tr>
      <th className="p-2 text-left align-middle">Command</th>
      <th className="p-2 text-left align-middle">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td className="p-2 align-middle">Pay</td>
      <td className="p-2 align-middle">Request a payment inside World App</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Wallet Auth</td>
      <td className="p-2 align-middle">Authenticate with Sign-In with Ethereum</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Send Transaction</td>
      <td className="p-2 align-middle">Submit one or more World Chain transactions</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Sign Message</td>
      <td className="p-2 align-middle">Sign an EIP-191 personal message</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Sign Typed Data</td>
      <td className="p-2 align-middle">Sign an EIP-712 typed payload</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Share Contacts</td>
      <td className="p-2 align-middle">Open the World App contact picker</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Request Permission</td>
      <td className="p-2 align-middle">Request notifications or microphone access</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Get Permissions</td>
      <td className="p-2 align-middle">Read current mini app permission state</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Send Haptic Feedback</td>
      <td className="p-2 align-middle">Trigger native haptic feedback</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Share</td>
      <td className="p-2 align-middle">Open the native share sheet</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">World Chat</td>
      <td className="p-2 align-middle">Open World Chat with a prefilled message</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Attestation</td>
      <td className="p-2 align-middle">Request an app attestation token</td>
    </tr>

    <tr>
      <td className="p-2 align-middle">Close Mini App</td>
      <td className="p-2 align-middle">Programmatically close the mini app</td>
    </tr>
  </tbody>
</table>

Push notifications are documented separately in [Send Notifications](/mini-apps/commands/how-to-send-notifications), since they combine permission handling with Developer Portal setup.
