Skip to main content
Modern MiniKit commands are async methods on MiniKit. They resolve to a result object shaped like { executedWith, data } and throw if the command fails.

Async Command Results

Use executedWith to understand whether the command ran through World App, Wagmi, or a custom fallback.

What To Expect

  • executedWith tells you which runtime handled the command
  • data contains the success payload for that command
  • command-specific failures are thrown, so use try/catch
  • some commands still require backend verification even after a successful response, such as walletAuth and pay

Event Subscriptions

For new 2.x command integrations, prefer await MiniKit.<command>(); it resolves (or throws) directly, no event listener needed. MiniKit also exposes a lower-level event API with one handler per response event. A new subscription replaces the previous handler. Use it only when managing the low-level response flow yourself:
Commands register their response handlers with the same event manager. Do not use subscriptions to observe a concurrent MiniKit.<command>() call: registrations can replace each other, and unsubscribing can prevent the command promise from resolving. Handle the awaited result instead. MiniKit.trigger(event, payload) invokes the event’s current handler manually, mainly for testing.