Skip to main content
Defined in @coinbase/onchainkit
Primary hook for accessing MiniKit frame context and managing frame readiness. This hook provides essential Mini App state and user context information.

Returns

MiniKitContext
Frame context information provided by the host application.
boolean
Whether the frame has signaled readiness to the host application.
() => void
Function to signal frame readiness to the host application. Call this once your Mini App has finished loading.

Usage Notes

Frame Readiness

Always call setFrameReady() once your Mini App has finished initial loading:
components/FrameReady.tsx

Context Data Security

Context data can be spoofed by malicious actors. Never use context data for authentication or security-critical operations. Use useAuthenticate for verified user identity.

Client Detection

Use client detection to provide platform-specific experiences:
components/ClientDetection.tsx
The useMiniKit hook must be used within a component that’s wrapped by MiniKitProvider. This hook provides the foundation for all Mini App functionality and should be one of the first hooks you use in your application.