Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Documentation
How to install Enclave libraries
npm install @enclave-vm/core
npm install @enclave-vm/ast
# Server-side npm install @enclave-vm/broker # Client-side npm install @enclave-vm/client @enclave-vm/react
npm install @enclave-vm/types
npm install @enclave-vm/stream
npm install @enclave-vm/broker
npm install @enclave-vm/client
npm install @enclave-vm/react
npm install @enclave-vm/runtime
import { Enclave } from '@enclave-vm/core'; const enclave = new Enclave({ securityLevel: 'SECURE' }); const result = await enclave.execute('return 1 + 1'); console.log(result.value); // 2
import { EnclaveProvider, useEnclaveSession } from '@enclave-vm/react'; function App() { return ( <EnclaveProvider brokerUrl="http://localhost:3000"> <CodeRunner /> </EnclaveProvider> ); } function CodeRunner() { const { execute, stdout, result } = useEnclaveSession(); return ( <button onClick={() => execute('console.log("Hello!")')}> Run </button> ); }
# Clone the repository git clone https://github.com/agentfront/enclave.git cd enclave # Install dependencies yarn install # Build all libraries yarn build # Run tests yarn test
Was this page helpful?