Skip to main content
MiniKit 2.x consolidates command handling around async MiniKit methods and removes World ID verification from MiniKit.

What Changed

  • World ID verification moved out of MiniKit and into @worldcoin/idkit
  • MiniKit.commands and MiniKit.commandsAsync were removed
  • command results now resolve to { executedWith, data }
  • types and helpers moved to @worldcoin/minikit-js/commands, @worldcoin/minikit-js/siwe, and @worldcoin/minikit-js/address-book
  • walletAuth nonce validation is stricter and expects an alphanumeric nonce without hyphens
  • sendTransaction now takes calldata-style transactions and returns userOpHash

Old To New

// 1.x
MiniKit.commands.signMessage({ message: "hello" });
await MiniKit.commandsAsync.walletAuth({ nonce });
await MiniKit.commandsAsync.sendTransaction({ transaction: [tx] });

// 2.x
await MiniKit.signMessage({ message: "hello" });
await MiniKit.walletAuth({ nonce });
await MiniKit.sendTransaction({
  chainId: 480,
  transactions: [{ to, data, value }],
});

Import Path Changes

import type { MiniKitSendHapticFeedbackOptions } from "@worldcoin/minikit-js/commands";
import { getIsUserVerified } from "@worldcoin/minikit-js/address-book";
import { verifySiweMessage } from "@worldcoin/minikit-js/siwe";

walletAuth Migration

  • generate the nonce on your backend
  • strip hyphens from UUID-based nonces
  • use await MiniKit.walletAuth(...)
  • verify the returned SIWE payload on your backend
const nonce = crypto.randomUUID().replace(/-/g, "");
const result = await MiniKit.walletAuth({ nonce });

sendTransaction Migration

  • move from ABI-driven transaction objects to calldata-driven transactions
  • pass chainId: 480
  • poll transaction progress with userOpHash
const result = await MiniKit.sendTransaction({
  chainId: 480,
  transactions: [
    {
      to: "0x...",
      data: "0x...",
      value: "0x0",
    },
  ],
});

console.log(result.data.userOpHash);

Standalone Apps

If your app already uses wagmi, add MiniKitProvider and the worldApp() connector so the same command calls can adapt to World App automatically. If you use viem or ethers directly, use getWorldAppProvider() when MiniKit.isInWorldApp() is true.
import { MiniKit, getWorldAppProvider } from "@worldcoin/minikit-js";

Verification Migration

Any old MiniKit.verify or MiniKit.commandsAsync.verify flow should be replaced with IDKit. MiniKit 2.x only owns mini app commands.