๐งโ๐ญ Build your iApp โ
๐งฐ Initialize your iApp โ
The iApp (iExec Application) Generator CLI simplifies the setup of your iApp by guiding you through a step-by-step initialization process. This ensures your iApp is correctly configured and compatible with iExec's confidential computing environment.
๐ Define your Project โ
_ _ (_) / \ _ __ _ __ | | / _ \ | '_ \| '_ \ | |/ ___ \| |_) | |_) | |_/_/ \_\ .__/| .__/ |_| |_|
Follow the prompts to specify:
- Project name โ Creates a folder for your project files.
- Language โ Choose between JavaScript, Python, etc.
- Project mode โ Choose Basic (Hello-World setup) or Advanced mode.
โ Configure โ
You'll set up:
- Arguments (Args) โ Public parameters for your iApp.
- Input Files โ Files dynamically downloaded during execution. These can come from a specific URL.
- Requester Secrets โ Confidential authentication strings.
- Protected Data โ Encrypted data accessible only inside the TEE.
- App Secret โ Immutable secret provisioned by the iApp owner.
๐ก
The Secret Management Service (SMS) securely stores application developer secrets. Once set, the App Secret is immutable and cannot be updated. Use with caution.
For more information on App Secrets, refer to Access confidential assets from your app
For more details and to learn how to use them in your application, refer here Application I/O
๐ Launch your iApp โ
After initialization, the following essential files and directories are generated:
iapp.config.json
src/app.js
(JavaScript) orsrc/app.py
(Python)Dockerfile
- Directories:
input/
output/
cache/
๐ Update your iApp โ
To modify your main application logic open:
src/app.js # For JavaScript
src/app.py # For Python
INFO
๐ก The src/
directory contains the core logic of your iApp. Implement your algorithms and data processing here.
๐ ๏ธ CLI Commands Reference โ
Core Commands โ
iapp init
โ
Purpose: Initialize a new iApp project
Usage: iapp init
Options: Interactive prompts for project configuration
What it does: Creates project structure, configuration files, and basic templates
iapp test
โ
Purpose: Test your iApp locally before deployment
Usage: iapp test
Options: None
What it does: Runs a basic test locally to validate your application logic
iapp deploy
โ
Purpose: Deploy your iApp to the iExec network
Usage: iapp deploy
Options: None
What it does: Turns your code into a TEE app and registers the iApp on iExec
iapp run <iAppAddress>
โ
Purpose: Execute your deployed iApp on a worker node
Usage: iapp run <iAppAddress>
Options: None
What it does: Sends your iApp for execution on the iExec network
iapp debug <taskId>
โ
Purpose: Retrieve detailed execution logs from worker nodes
Usage: iapp debug <taskId>
Options: None
What it does: Provides detailed logs for debugging failed or slow executions
iapp mock <inputType>
โ
Purpose: Create mocked input for testing purposes
Usage: iapp mock <inputType>
Options: None
What it does: Generates sample input data to test your iApp locally
iapp --help
โ
Purpose: Display all available commands and options
Usage: iapp --help
Options: None
What it does: Shows comprehensive help information for all CLI commands
Advanced Options โ
Environment Variables โ
EXPERIMENTAL_TDX_APP=true
โ
Purpose: Enable experimental Intel TDX support
Usage: Set as environment variable before running commands
Example: EXPERIMENTAL_TDX_APP=true iapp test
What it does: Enables TDX mode for testing, deployment, and execution
Available with:
iapp test
iapp deploy
iapp run <app-address>
TDX Chain Not Supported
๐งช While TEE iApp are based on intel SGX technology by default, iApp has an experimental support for intel TDX applications.
TDX mode is enabled by setting the environment variable EXPERIMENTAL_TDX_APP=true
.
โ ๏ธ Keep in mind: TDX mode is experimental and can be subject to instabilities or discontinuity.
๐ Next Steps โ
Your iApp is now running on iExec!
Once your application is stable and functional, you can learn how to manage orders