Skip to main content
API reference for the @enclave-vm/react package - React hooks and components for EnclaveJS.

Installation

EnclaveProvider

Provider component for the EnclaveJS context.

Props

useEnclave

Main hook for code execution.

Return Value

Example

useExecutionStream

Process stream events with state management.

Return Value

Example

useToolHandler

Handle tool calls with a callback.

Parameters

Example

useEnclaveClient

Get direct access to the client instance.

Example

Components

Console

Pre-built console output component.

Props

ToolCallList

Display tool call history.

Props

ExecutionStatus

Show execution status with stats.

Props

Complete Example

TypeScript

All hooks and components are fully typed.