MiniKit.sendTransaction() to submit one or more World Chain transactions.
These examples assume MiniKit has already been initialized through
MiniKitProvider or MiniKit.install().Availability
- Works natively in World App
- Supports Wagmi execution outside World App
- Batch transactions are only available in World App
Basic Usage
If you used permit2 in MiniKit v1, MiniKit v2 removes that top-level field; Permit2 approvals now need to be sent as explicit transactionsResult
Confirming the User Operation
The command resolves as soon as the user operation is submitted, so the first identifier you receive isuserOpHash.
You can either use @worldcoin/minikit-react hook or poll the Developer Portal
to check when the user operation is mined and get the final transaction_hash.
Fallback Behavior
Ifresult.executedWith === "wagmi", MiniKit used the standard web signer path
outside World App. This path supports only a single transaction, so batched
transactions arrays remain World App-only.
If you need a different non-World-App flow, provide a custom fallback and
handle submission yourself.
Error Codes
| Code | Meaning |
|---|---|
invalid_operation | The requested operation is not allowed |
user_rejected | The user rejected the request |
input_error | The payload is invalid |
simulation_failed | Simulation failed before execution |
transaction_failed | The transaction failed after submission |
generic_error | Unexpected failure |
disallowed_operation | The requested operation is disallowed |
validation_error | Validation failed before execution |
invalid_contract | The contract is not allowed for your app |
malicious_operation | The operation was flagged as malicious |
daily_tx_limit_reached | Daily transaction limit reached |
permitted_amount_exceeds_slippage | Permit2 amount exceeds allowed slippage |
permitted_amount_not_found | Permit2 amount could not be resolved |