From 27c505a233b323a6616fdf98668f14be7b190e91 Mon Sep 17 00:00:00 2001 From: Mathis Debuire <68806646+64ix@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:38:34 +0200 Subject: [PATCH 1/3] speedrun iexec content replaced what we do by "speedrun iexec" and added some content. Goal of the content : introduce the protocol, but simply. Add some important keywords and explain them Also introduces the devtools and link to them --- .gitignore | 1 + .vitepress/config.mts | 2 +- .vitepress/sidebar.ts | 5 +- overview/speedrun-iexec.md | 119 +++++++++++++++++++++++++++++++++++++ overview/what-we-do.md | 45 -------------- 5 files changed, 125 insertions(+), 47 deletions(-) create mode 100644 overview/speedrun-iexec.md delete mode 100644 overview/what-we-do.md diff --git a/.gitignore b/.gitignore index 4ba87273..f8a2fd0e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ node_modules auto-imports.d.ts components.d.ts +.cursor #mac .DS_Store diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 89cd94f5..865786b5 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -77,7 +77,7 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config nav: [ { text: 'Home', link: '/' }, - { text: 'Overview', link: '/overview/what-we-do' }, + { text: 'Overview', link: '/overview/speedrun-iexec' }, { text: 'Protect Data', link: '/manage_data/guides' }, { text: 'Build iApp', link: '/build_iapp/iapp-generator/what-is-iapp' }, { text: 'Use iApp', link: '/use_iapp/introduction' }, diff --git a/.vitepress/sidebar.ts b/.vitepress/sidebar.ts index cc4605ef..aa134dcc 100644 --- a/.vitepress/sidebar.ts +++ b/.vitepress/sidebar.ts @@ -6,7 +6,10 @@ export function getSidebar() { { text: 'OVERVIEW', items: [ - { text: '๐Ÿ’ก  What We Do', link: '/overview/what-we-do' }, + { + text: 'โšก  Speedrun iExec', + link: '/overview/speedrun-iexec', + }, { text: '๐Ÿ‘‹   Hello World', link: '/overview/helloWorld', diff --git a/overview/speedrun-iexec.md b/overview/speedrun-iexec.md new file mode 100644 index 00000000..d0175e6c --- /dev/null +++ b/overview/speedrun-iexec.md @@ -0,0 +1,119 @@ +--- +title: Speedrun iExec +description: + Understand iExec protocol in 3 minutes - privacy-first computing for Web3 +--- + +# โšก Speedrun iExec + +**Privacy-first computing protocol.** Your data stays protected, your code runs +in secure enclaves, results come back encrypted. Here's how it works. + +## The Protocol (Simple Version) + +### ๐Ÿ”’ Step 1: Protect Data + +Your sensitive data gets encrypted and stored online. Only you control who can +access it. + +โ†’ **Devtool**: [DataProtector](/manage_data/dataProtector) handles this for you + +### โš™๏ธ Step 2: Secure Computing (Workers) + +Code runs inside **secure enclaves** (TEEs) on iExec workers. The worker can +access your data to process it, but only within the privacy-safe TEE +environment - your data never leaves the secure bubble. + +### ๐Ÿš€ Step 3: Run iApps + +You submit a **Task** = "Run this iApp on this protected data". The protocol +finds available workers and executes everything confidentially. + +โ†’ **Devtool**: [iApp Generator](/build_iapp/iapp-generator) helps you create and +deploy iApps + +### ๐Ÿ“ฆ Step 4: Get Results + +Results come back **encrypted to you**. Workers never see raw data, you never +lose control. + +``` +Protected Data + iApp + Worker = Task โ†’ Encrypted Result +``` + +## What Each Piece Does + +### ๐Ÿ›ก๏ธ **Protected Data** + +Your data, encrypted. You set the rules: "Only these apps can use it, only for +these purposes." + +### ๐Ÿš€ **iApps** + +Your code, packaged to run on workers. Can be AI models, data processing +scripts, any computation. + +### ๐Ÿญ **Workers (Secure Enclaves)** + +Computers that process your data inside privacy-safe TEE environments. They can +access your data to work with it, but the TEE ensures it stays confidential and +tamper-proof. + +### โšก **Deals** + +A job request: "Execute iApp X on protected data Y, send results to Z." The +protocol handles the rest. + +## Real Example Walkthrough + +**AI Model Training (Private)** + +1. **Protect**: Medical researchers upload patient data โ†’ becomes Protected Data +2. **Deploy**: AI company packages their model โ†’ becomes iApp +3. **Execute**: Someone submits Task โ†’ "Train model on this data" +4. **Result**: Model gets trained, researcher gets insights, raw data never + leaves enclave + +**Web3 Email** + +1. **Protect**: Users upload email contacts โ†’ Protected Data +2. **Execute**: App submits Task โ†’ "Send email via Web3Mail iApp" +3. **Result**: Email sent, addresses stay private, sender/receiver authenticated + +## Why This Architecture Rocks + +### โœ… **True Privacy** + +Data processing happens in secure enclaves. Workers can't peek, hackers can't +break in. + +### โœ… **User Ownership** + +Data owners control access programmatically. Revoke permissions anytime. + +### โœ… **Composable** + +Any iApp can use any Protected Data (if authorized). Build once, use everywhere. + +### โœ… **Monetizable** + +Data owners get paid automatically when their data gets used in tasks. + +## Start Building + +Now that you get the protocol, pick your devtools: + +- **๐Ÿ“ง Quick Win**: Add [Web3Mail](/use_iapp/web3mail) or + [Web3Telegram](/use_iapp/web3telegram.md) to your project ! (uses the protocol + under the hood) +- **๐Ÿ›ก๏ธ Protect Data**: Try [DataProtector](/manage_data/dataProtector) to + encrypt your first dataset +- **๐Ÿš€ Build iApps**: Create confidential compute with + [iApp Generator](/build_iapp/iapp-generator) +- **๐Ÿ‘‹ Hands-On**: Follow our [Hello World](/overview/helloWorld) to see all + devtools working together + +--- + +**TL;DR**: iExec = Encrypted data + Secure computing + Your code โ†’ Private +results. Privacy made easy. diff --git a/overview/what-we-do.md b/overview/what-we-do.md deleted file mode 100644 index 224ef9f4..00000000 --- a/overview/what-we-do.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: What We Do -description: Discover iExec's decentralized computing platform ---- - -# ๐Ÿ’ก What We Do - -iExec is a decentralized marketplace for computing resources. We enable -developers to build applications that combine **ownership**, **privacy**, and -**monetization**. - -## Our Mission - -We believe in a future where: - -- Data owners maintain control over their information -- Developers can access powerful computing resources on-demand -- Privacy is preserved through trusted execution environments -- Anyone can monetize their data and computing power - -## Key Technologies - -### Protected Data - -Secure your data while maintaining control over who can access and use it. - -### iApps (iExec Applications) - -Decentralized applications that run on the iExec network, ensuring privacy and -verifiability. - -### Trusted Execution Environments (TEE) - -Computing in secure enclaves that guarantee privacy and integrity. - -## Get Started - -Ready to build with iExec? Check out our -[Hello World guide](/overview/helloWorld) or explore our -[use cases](/overview/use-cases). - ---- - -_This documentation will help you understand and implement iExec's decentralized -computing solutions._ From d4eb78fc19373d7c0d50828ba1f109d818ae57df Mon Sep 17 00:00:00 2001 From: Mathis Debuire <68806646+64ix@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:38:50 +0200 Subject: [PATCH 2/3] What is iapp, protected data pages Content for the two explanation pages --- build_iapp/iapp-generator/what-is-iapp.md | 175 ++++++++++++++++++ .../dataProtector/what-is-protected-data.md | 151 +++++++++++---- 2 files changed, 290 insertions(+), 36 deletions(-) create mode 100644 build_iapp/iapp-generator/what-is-iapp.md diff --git a/build_iapp/iapp-generator/what-is-iapp.md b/build_iapp/iapp-generator/what-is-iapp.md new file mode 100644 index 00000000..dde224cf --- /dev/null +++ b/build_iapp/iapp-generator/what-is-iapp.md @@ -0,0 +1,175 @@ +--- +title: What Is an iApp? +description: Privacy-first applications that run on decentralized infrastructure +--- + +# ๐Ÿš€ What Is an iApp? + +**Think about code, but it runs in a privacy-safe environment.** An iApp is just your regular application code (Python script, AI model, data processor) packaged to run inside secure enclaves. + +## Why Would You Want This? + +Simple: **to process sensitive data that users won't normally share.** + +Imagine you want to build: +- An AI that analyzes personal health data +- An email tool that needs access to contact lists +- A financial advisor that processes bank statements +- A content filter that reads private messages + +Users have this data, but they won't give it to your regular app. **With iApps, they will.** + +## How It Works + +Your code runs in a **trusted execution environment** (TEE) - think of it as a "privacy bubble" that even iExec workers can't peek into. + +Users run your iApp when they want to **use** their Protected Data for something. Your code gets access to their protected data, performs actions with it - all without you ever seeing the raw data. + +## iApp Generator: Your Development Tool + +Creating iApps used to be complex. **iApp Generator** simplifies this by: + +- **Simulating TEE environment locally** - Test your code in conditions close to real execution +- **Handling deployment** - Package and deploy with simple commands +- **Managing dependencies** - Docker containers, environment setup, etc. + +```bash +# Create your iApp (Python or Node.js supported) +iapp init my-sentiment-analyzer +cd my-sentiment-analyzer + +# Develop and test locally (simulates TEE environment) +iapp test +# Deploy to the network +iapp deploy +``` + +*Note: iApp Generator currently supports Python and Node.js, but iApps can be built in any language that runs in Docker.* + +## Real Examples + +**Email Notification iApp** +```python +# User runs: "Send updates to my contacts about my project" +contacts = load_protecteddata() # User's protected contact list +for contact in contacts: + send_email(contact, project_update_message) +# โ†’ Emails sent directly, you never see the addresses +``` + +**Oracle Update iApp** +```python +# User runs: "Update price oracle with my private trading data" +trading_data = load_protecteddata() # User's protected trading history +average_price = calculate_weighted_average(trading_data) +update_oracle_contract(average_price) +# โ†’ Oracle updated with real data, trading history stays private +``` + +**Automated Transactions iApp** +```python +# User runs: "Buy tokens when my portfolio meets certain conditions" +portfolio = load_protecteddata() # User's protected portfolio data +if should_buy_tokens(portfolio): + execute_trade(token_address, amount) +# โ†’ Trade executed based on private data, portfolio details stay hidden +``` + +## The Trust Model + +Here's why users will actually use your iApp with their private data: + +### What Users See +- โœ… "This code runs in a secure enclave, not on the developer's servers" +- โœ… "My data gets used privately for actions I want" +- โœ… "Even iExec workers can't see my data during execution" +- โœ… "I can revoke access anytime" + +### What You Get +- โœ… Users willing to use your services with their sensitive data +- โœ… New business models around privacy-preserving analytics +- โœ… Competitive advantage through privacy guarantees + +### The Technical Reality + +``` +User's Private Data โ†’ Encrypted โ†’ TEE Environment โ†’ Your iApp uses it โ†’ Actions Performed +``` + +**Nobody sees the raw data except your code running inside the secure enclave.** + +Your iApp can send emails, update contracts, make transactions, trigger notifications - anything your code needs to do with the protected data. This isn't about trust - it's about **mathematical guarantees** that privacy is preserved. + +## What This Enables + +### ๐Ÿ“ง **Private Communication** +Users send emails, notifications, or messages using their protected contact lists without exposing recipient information. + +### ๐Ÿ”ฎ **Trustworthy Oracles** +Users contribute real data to oracles while keeping their private information confidential. + +### ๐Ÿค– **Personal AI Assistants** +Users let AI models perform actions based on their private data - trading, scheduling, recommendations. + +### โšก **Automated Actions** +Users set up automated workflows that use their private data to trigger actions, transactions, or updates. + +## โ“ Frequently Asked Questions + + +::: details ๐Ÿ“ฆ What can I build with iApps? +Anything that runs in Docker! AI models, data processing scripts, web scrapers, image processing, financial calculations, etc. If it runs in a container, it can be an iApp. +::: + +::: details โšก How fast are iApps? +Initial task scheduling takes ~30 seconds (depending on the resources the worker download, congestion etc), then your code runs at normal speed depending on complexity. +::: + +::: details ๐Ÿ›ก๏ธ Are iApps really secure? +Yes! Code runs in Intel SGX or TDX secure enclaves. Even the worker running your iApp can't see what's happening inside the enclave. +::: + +::: details ๐Ÿš€ How do I deploy my first iApp? +Try our [Hello World](/overview/helloWorld) for a quick start, or check the [iApp Generator](/build_iapp/iapp-generator) section for detailed instructions. +::: + +::: details ๐Ÿ”ง What programming languages are supported? +iApps can be built in any language that runs in Docker (Python, JavaScript, R, Java, Go, etc.). However, **iApp Generator** currently supports only Python and Node.js for simplified development. +::: + +## Why This Changes Everything + +### โœ… **True Privacy** +Users never expose their raw data. Your app processes it privately inside secure enclaves. + +### โœ… **Verifiable Execution** +Cryptographic proof that your code ran exactly as intended. No black box execution. + +### โœ… **Decentralized Infrastructure** +No single point of failure. Your app runs across a distributed network of workers. + +### โœ… **Zero Trust Architecture** +Users don't need to trust you with their data. The protocol guarantees privacy. + +## Start Building + +Ready to build privacy-first applications? + +### ๐Ÿš€ **Try iApp Generator** +- [Getting Started](/build_iapp/iapp-generator/getting-started) - Deploy your first iApp in 15 minutes +- [Building Your iExec App](/build_iapp/iapp-generator/building-your-iexec-app) - Complete development guide + +### ๐Ÿ“– **Learn with Guides** +- [Orders](/build_iapp/guides/orders) - How iApp execution works +- [Inputs and Outputs](/build_iapp/guides/inputs-and-outputs) - Handle data flow +- [Debugging Your iApp](/build_iapp/guides/debugging-your-iapp) - Troubleshoot issues + +### ๐ŸŽฏ **See iApps in Action** +Real iApps you can use today: +- [Web3Mail](/use_iapp/web3mail) - Private emailing iApp SDK +- [Web3Telegram](/use_iapp/web3telegram) Private messaging iApp SDK +- [Oracle Factory](/use_iapp/oracle-factory) - Decentralized oracles + +--- + +**TL;DR**: iApps = Your code + Secure execution + User privacy + Verifiable results. Cloud computing, but nobody can spy on your stuff. ๐Ÿ”’ \ No newline at end of file diff --git a/manage_data/dataProtector/what-is-protected-data.md b/manage_data/dataProtector/what-is-protected-data.md index 53bcdd32..bc66d137 100644 --- a/manage_data/dataProtector/what-is-protected-data.md +++ b/manage_data/dataProtector/what-is-protected-data.md @@ -1,58 +1,137 @@ --- title: What Is Protected Data? -description: Understanding iExec's data protection mechanisms +description: Data ownership meets privacy - understand how iExec gives you control --- -# โ“ What Is Protected Data? +# ๐Ÿ›ก๏ธ What Is Protected Data? -Protected Data is iExec's revolutionary approach to data privacy and ownership. -It allows you to maintain control over your data while enabling computation on -it without exposing the raw information. +**Your data, but with superpowers.** Protected Data is how iExec gives you blockchain-verified ownership over your information. You control who uses it, for what purpose, and you can get paid when it creates value. -## Key Concepts +## The Problem -### Data Ownership +Traditional apps treat your data like their property. You upload it, they own it. You lose control, they make money from it. -- **You own your data**: The original data never leaves your control -- **Granular permissions**: Decide who can access and use your data -- **Revocable access**: Grant and revoke permissions at any time +## The Solution: Blockchain-Verified Ownership -### Privacy-Preserving Computation +Protected Data flips this model. Here's how you protect data: -- **Encrypted processing**: Data is encrypted during computation -- **TEE (Trusted Execution Environment)**: Secure enclaves protect data during - processing -- **Zero-knowledge**: Compute on data without revealing it +```javascript +const protectedData = await dataprotector.protectData({ + name: 'my-contacts.json', + data: { emails: ['user@example.com', ...] } +}); +``` -### Monetization +Now you have **blockchain-verified ownership** of this data. No one can access it without your explicit permission. -- **Data marketplaces**: Sell access to your protected data -- **Usage tracking**: Monitor how your data is being used -- **Fair compensation**: Get paid for data usage +## Access Control That Actually Works -## How It Works +Traditional permissions: "This app can access your contacts" *(forever, for anything)* -1. **Protect**: Encrypt and register your data on the iExec network -2. **Share**: Grant access permissions to specific users or applications -3. **Monitor**: Track usage and maintain control -4. **Monetize**: Earn from your data while keeping it private +Protected Data permissions: "This newsletter app can use my contacts to send marketing emails, but only during weekdays, and I get 2โ‚ฌ per campaign." -## Use Cases +```javascript +await dataprotector.grantAccess({ + protectedData: protectedData.address, + authorizedApp: '0x123...', // Specific app + authorizedUser: '0xabc...', // Specific user + // Plus pricing, time limits, usage rules... +}); +``` -- **Personal Data**: Health records, financial data, personal preferences -- **Business Intelligence**: Market research, customer analytics, proprietary - datasets -- **AI Training**: Training models without exposing sensitive data -- **Research**: Collaborative research with privacy guarantees +## Privacy-Safe Processing -## Next Steps +When apps use your Protected Data, they process it inside **secure enclaves** (TEEs). They get the results they need, but your raw data never leaves the privacy bubble. -Ready to protect your data? Check out: +### How the Technical Magic Works -- [Getting Started with DataProtector](/manage_data/dataProtector/getting-started) -- [DataProtector Guides](/manage_data/guides) +Here's what actually happens under the hood: + +1. **Your data gets encrypted** and stored online (IPFS,Arweave..) +2. **The decryption key** is stored in a secure TEE database +3. **Only authorized TEE workers** can retrieve this key to process your data +4. **Apps run inside these TEE workers** - they can decrypt and use your data, but only within the secure enclave +5. **Results come back encrypted** to you - the raw data never leaves the TEE environment + +``` +Your Data (encrypted, online) + Decryption Key (in TEE database) = Processing (only in authorized TEEs) +``` + +This architecture ensures that even iExec workers can't access your raw data - only the TEE environment can decrypt it for processing, and only when you've authorized it. + +## What This Enables + +### ๐Ÿ“ง **Privacy-First Email Marketing** +Your users upload their contact lists as Protected Data. Your newsletter app can send personalized emails without ever seeing the actual email addresses. Users stay private, you get engagement. + +### ๐Ÿค– **Ethical AI Training** +People contribute personal data (health records, preferences) as Protected Data. AI models can learn from this data without seeing individual information. Better AI, fair compensation, zero privacy trade-offs. + +### ๐Ÿข **Confidential Business Intelligence** +Companies protect their datasets but still collaborate on insights. Research partners get aggregate results without accessing raw competitive data. Innovation without information leaks. + +### ๐Ÿ’ฐ **Data Monetization** +Create marketplaces where data owners set their own terms. "Use my fitness data for $5/month, health insights only, no advertising." Automatic payments, programmable rules. + + + +## โ“ Frequently Asked Questions + +::: details ๐Ÿ’ฐ How much does it cost? +It's **free**! No gas fees on iExec's Bellecour network. You just need a Web3 wallet to sign transactions. +::: + +::: details ๐Ÿ“ What's the maximum dataset size? +It depends on your use case context. For standard cases (contacts, small datasets), no problem. For large volumes, [contact us](https://iex.ec/contact/) so we can assess if it fits your needs. +::: + +::: details ๐Ÿ’ธ Can I monetize my data? +Yes! You can sell access to your Protected Data with flexible pricing, subscriptions, etc. See the [Manage Data Monetization](/manage_data/guides/manage-data-monetization) guide for all details. +::: + +::: details ๐Ÿš€ How do I get started? +You need a Web3 wallet (MetaMask, WalletConnect) and Node.js 16+. Follow [DataProtector Core](/manage_data/dataProtector/dataProtectorCore) for installation and first examples. +::: + + + +::: details ๐Ÿ”’ Is my data really secure? +Yes! Your data is encrypted and keys are stored in secure TEE environments. Even iExec workers can't see your raw data - only the authorized TEE environment can decrypt it for processing. +::: + +## Why This Changes Everything + +### โœ… **True Ownership** +Your data is blockchain-verified yours. Not "terms & conditions" yours, actually yours. + +### โœ… **Privacy by Design** +Apps get utility without compromising privacy. No more "privacy vs functionality" trade-offs. + +### โœ… **Programmable Control** +Set complex rules: "Use my data only for health insights, only on weekdays, only if I get paid 5โ‚ฌ." + +### โœ… **Composable Privacy** +Any iApp can use your Protected Data (if authorized). Build privacy-first ecosystems. + +## Start Building + +Ready to give your users data ownership? + +### ๐Ÿš€ **Try DataProtector** +- [Getting Started](/manage_data/dataProtector/getting-started) - Protect your first dataset +- [DataProtector Core](/manage_data/dataProtector/dataProtectorCore) - Full SDK reference +- [DataProtector Sharing](/manage_data/dataProtector/dataProtectorSharing) - Monetization features + +### ๐Ÿ“– **Learn with Guides** +- [Create and Share Access](/manage_data/guides/create-and-share-access) - Basic workflow +- [Handle Schemas & Dataset Types](/manage_data/guides/handle-schemas-dataset-types) - Advanced data types +- [Manage Data Monetization](/manage_data/guides/manage-data-monetization) - Get paid for your data + +### ๐ŸŽฏ **Use in iApps** +Protected Data works with any iApp: +- [Web3Mail](/use_iapp/web3mail) - Private email with contact protection +- [Build your own iApp](/build_iapp/iapp-generator) - Custom privacy-first apps --- -_Protect your data, maintain control, and unlock its value with iExec's -DataProtector._ +**TL;DR**: Protected Data = Your data + Your rules + Privacy guarantees. Finally, data ownership that actually works. ๐Ÿ”’ \ No newline at end of file From a4616482448996d324fe62df7831d35268eb124f Mon Sep 17 00:00:00 2001 From: Mathis Debuire <68806646+64ix@users.noreply.github.com> Date: Thu, 24 Jul 2025 17:27:08 +0200 Subject: [PATCH 3/3] Getting started iapp content of getting start to use iapp --- .vitepress/sidebar.ts | 6 +- build_iapp/iapp-generator/what-is-iapp.md | 119 ++++++++---- .../dataProtector/what-is-protected-data.md | 134 +++++++++----- use_iapp/getting-started.md | 10 - use_iapp/introduction.md | 174 +++++++++++++++++- 5 files changed, 338 insertions(+), 105 deletions(-) delete mode 100644 use_iapp/getting-started.md diff --git a/.vitepress/sidebar.ts b/.vitepress/sidebar.ts index aa134dcc..c027833c 100644 --- a/.vitepress/sidebar.ts +++ b/.vitepress/sidebar.ts @@ -429,13 +429,9 @@ export function getSidebar() { { text: 'USE AN iAPP', items: [ - { - text: '๐Ÿ“  Introduction', - link: '/use_iapp/introduction', - }, { text: '๐Ÿš€  Getting Started', - link: '/use_iapp/getting-started', + link: '/use_iapp/introduction', }, { text: '๐Ÿ“–  Guides', diff --git a/build_iapp/iapp-generator/what-is-iapp.md b/build_iapp/iapp-generator/what-is-iapp.md index dde224cf..40b2bfff 100644 --- a/build_iapp/iapp-generator/what-is-iapp.md +++ b/build_iapp/iapp-generator/what-is-iapp.md @@ -5,31 +5,39 @@ description: Privacy-first applications that run on decentralized infrastructure # ๐Ÿš€ What Is an iApp? -**Think about code, but it runs in a privacy-safe environment.** An iApp is just your regular application code (Python script, AI model, data processor) packaged to run inside secure enclaves. +**Think about code, but it runs in a privacy-safe environment.** An iApp is just +your regular application code (Python script, AI model, data processor) packaged +to run inside secure enclaves. ## Why Would You Want This? Simple: **to process sensitive data that users won't normally share.** Imagine you want to build: + - An AI that analyzes personal health data -- An email tool that needs access to contact lists +- An email tool that needs access to contact lists - A financial advisor that processes bank statements - A content filter that reads private messages -Users have this data, but they won't give it to your regular app. **With iApps, they will.** +Users have this data, but they won't give it to your regular app. **With iApps, +they will.** ## How It Works -Your code runs in a **trusted execution environment** (TEE) - think of it as a "privacy bubble" that even iExec workers can't peek into. +Your code runs in a **trusted execution environment** (TEE) - think of it as a +"privacy bubble" that even iExec workers can't peek into. -Users run your iApp when they want to **use** their Protected Data for something. Your code gets access to their protected data, performs actions with it - all without you ever seeing the raw data. +Users run your iApp when they want to **use** their Protected Data for +something. Your code gets access to their protected data, performs actions with +it - all without you ever seeing the raw data. ## iApp Generator: Your Development Tool Creating iApps used to be complex. **iApp Generator** simplifies this by: -- **Simulating TEE environment locally** - Test your code in conditions close to real execution +- **Simulating TEE environment locally** - Test your code in conditions close to + real execution - **Handling deployment** - Package and deploy with simple commands - **Managing dependencies** - Docker containers, environment setup, etc. @@ -44,11 +52,13 @@ iapp test iapp deploy ``` -*Note: iApp Generator currently supports Python and Node.js, but iApps can be built in any language that runs in Docker.* +_Note: iApp Generator currently supports Python and Node.js, but iApps can be +built in any language that runs in Docker._ ## Real Examples **Email Notification iApp** + ```python # User runs: "Send updates to my contacts about my project" contacts = load_protecteddata() # User's protected contact list @@ -57,7 +67,8 @@ for contact in contacts: # โ†’ Emails sent directly, you never see the addresses ``` -**Oracle Update iApp** +**Oracle Update iApp** + ```python # User runs: "Update price oracle with my private trading data" trading_data = load_protecteddata() # User's protected trading history @@ -67,6 +78,7 @@ update_oracle_contract(average_price) ``` **Automated Transactions iApp** + ```python # User runs: "Buy tokens when my portfolio meets certain conditions" portfolio = load_protecteddata() # User's protected portfolio data @@ -80,12 +92,14 @@ if should_buy_tokens(portfolio): Here's why users will actually use your iApp with their private data: ### What Users See + - โœ… "This code runs in a secure enclave, not on the developer's servers" -- โœ… "My data gets used privately for actions I want" +- โœ… "My data gets used privately for actions I want" - โœ… "Even iExec workers can't see my data during execution" - โœ… "I can revoke access anytime" -### What You Get +### What You Get + - โœ… Users willing to use your services with their sensitive data - โœ… New business models around privacy-preserving analytics - โœ… Competitive advantage through privacy guarantees @@ -98,57 +112,76 @@ User's Private Data โ†’ Encrypted โ†’ TEE Environment โ†’ Your iApp uses it โ†’ **Nobody sees the raw data except your code running inside the secure enclave.** -Your iApp can send emails, update contracts, make transactions, trigger notifications - anything your code needs to do with the protected data. This isn't about trust - it's about **mathematical guarantees** that privacy is preserved. +Your iApp can send emails, update contracts, make transactions, trigger +notifications - anything your code needs to do with the protected data. This +isn't about trust - it's about **mathematical guarantees** that privacy is +preserved. ## What This Enables ### ๐Ÿ“ง **Private Communication** -Users send emails, notifications, or messages using their protected contact lists without exposing recipient information. -### ๐Ÿ”ฎ **Trustworthy Oracles** -Users contribute real data to oracles while keeping their private information confidential. +Users send emails, notifications, or messages using their protected contact +lists without exposing recipient information. + +### ๐Ÿ”ฎ **Trustworthy Oracles** + +Users contribute real data to oracles while keeping their private information +confidential. ### ๐Ÿค– **Personal AI Assistants** -Users let AI models perform actions based on their private data - trading, scheduling, recommendations. + +Users let AI models perform actions based on their private data - trading, +scheduling, recommendations. ### โšก **Automated Actions** -Users set up automated workflows that use their private data to trigger actions, transactions, or updates. + +Users set up automated workflows that use their private data to trigger actions, +transactions, or updates. ## โ“ Frequently Asked Questions +::: details ๐Ÿ“ฆ What can I build with iApps? Anything that runs in Docker! AI +models, data processing scripts, web scrapers, image processing, financial +calculations, etc. If it runs in a container, it can be an iApp. ::: -::: details ๐Ÿ“ฆ What can I build with iApps? -Anything that runs in Docker! AI models, data processing scripts, web scrapers, image processing, financial calculations, etc. If it runs in a container, it can be an iApp. -::: +::: details โšก How fast are iApps? Initial task scheduling takes ~30 seconds +(depending on the resources the worker download, congestion etc), then your code +runs at normal speed depending on complexity. ::: -::: details โšก How fast are iApps? -Initial task scheduling takes ~30 seconds (depending on the resources the worker download, congestion etc), then your code runs at normal speed depending on complexity. -::: +::: details ๐Ÿ›ก๏ธ Are iApps really secure? Yes! Code runs in Intel SGX or TDX +secure enclaves. Even the worker running your iApp can't see what's happening +inside the enclave. ::: -::: details ๐Ÿ›ก๏ธ Are iApps really secure? -Yes! Code runs in Intel SGX or TDX secure enclaves. Even the worker running your iApp can't see what's happening inside the enclave. +::: details ๐Ÿš€ How do I deploy my first iApp? Try our +[Hello World](/overview/helloWorld) for a quick start, or check the +[iApp Generator](/build_iapp/iapp-generator) section for detailed instructions. ::: -::: details ๐Ÿš€ How do I deploy my first iApp? -Try our [Hello World](/overview/helloWorld) for a quick start, or check the [iApp Generator](/build_iapp/iapp-generator) section for detailed instructions. -::: - -::: details ๐Ÿ”ง What programming languages are supported? -iApps can be built in any language that runs in Docker (Python, JavaScript, R, Java, Go, etc.). However, **iApp Generator** currently supports only Python and Node.js for simplified development. -::: +::: details ๐Ÿ”ง What programming languages are supported? iApps can be built in +any language that runs in Docker (Python, JavaScript, R, Java, Go, etc.). +However, **iApp Generator** currently supports only Python and Node.js for +simplified development. ::: ## Why This Changes Everything ### โœ… **True Privacy** -Users never expose their raw data. Your app processes it privately inside secure enclaves. + +Users never expose their raw data. Your app processes it privately inside secure +enclaves. ### โœ… **Verifiable Execution** -Cryptographic proof that your code ran exactly as intended. No black box execution. + +Cryptographic proof that your code ran exactly as intended. No black box +execution. ### โœ… **Decentralized Infrastructure** -No single point of failure. Your app runs across a distributed network of workers. + +No single point of failure. Your app runs across a distributed network of +workers. ### โœ… **Zero Trust Architecture** + Users don't need to trust you with their data. The protocol guarantees privacy. ## Start Building @@ -156,20 +189,28 @@ Users don't need to trust you with their data. The protocol guarantees privacy. Ready to build privacy-first applications? ### ๐Ÿš€ **Try iApp Generator** -- [Getting Started](/build_iapp/iapp-generator/getting-started) - Deploy your first iApp in 15 minutes -- [Building Your iExec App](/build_iapp/iapp-generator/building-your-iexec-app) - Complete development guide + +- [Getting Started](/build_iapp/iapp-generator/getting-started) - Deploy your + first iApp in 15 minutes +- [Building Your iExec App](/build_iapp/iapp-generator/building-your-iexec-app) - + Complete development guide ### ๐Ÿ“– **Learn with Guides** + - [Orders](/build_iapp/guides/orders) - How iApp execution works - [Inputs and Outputs](/build_iapp/guides/inputs-and-outputs) - Handle data flow -- [Debugging Your iApp](/build_iapp/guides/debugging-your-iapp) - Troubleshoot issues +- [Debugging Your iApp](/build_iapp/guides/debugging-your-iapp) - Troubleshoot + issues ### ๐ŸŽฏ **See iApps in Action** + Real iApps you can use today: + - [Web3Mail](/use_iapp/web3mail) - Private emailing iApp SDK -- [Web3Telegram](/use_iapp/web3telegram) Private messaging iApp SDK +- [Web3Telegram](/use_iapp/web3telegram) Private messaging iApp SDK - [Oracle Factory](/use_iapp/oracle-factory) - Decentralized oracles --- -**TL;DR**: iApps = Your code + Secure execution + User privacy + Verifiable results. Cloud computing, but nobody can spy on your stuff. ๐Ÿ”’ \ No newline at end of file +**TL;DR**: iApps = Your code + Secure execution + User privacy + Verifiable +results. Cloud computing, but nobody can spy on your stuff. ๐Ÿ”’ diff --git a/manage_data/dataProtector/what-is-protected-data.md b/manage_data/dataProtector/what-is-protected-data.md index bc66d137..8bae4672 100644 --- a/manage_data/dataProtector/what-is-protected-data.md +++ b/manage_data/dataProtector/what-is-protected-data.md @@ -1,15 +1,19 @@ --- title: What Is Protected Data? -description: Data ownership meets privacy - understand how iExec gives you control +description: + Data ownership meets privacy - understand how iExec gives you control --- # ๐Ÿ›ก๏ธ What Is Protected Data? -**Your data, but with superpowers.** Protected Data is how iExec gives you blockchain-verified ownership over your information. You control who uses it, for what purpose, and you can get paid when it creates value. +**Your data, but with superpowers.** Protected Data is how iExec gives you +blockchain-verified ownership over your information. You control who uses it, +for what purpose, and you can get paid when it creates value. ## The Problem -Traditional apps treat your data like their property. You upload it, they own it. You lose control, they make money from it. +Traditional apps treat your data like their property. You upload it, they own +it. You lose control, they make money from it. ## The Solution: Blockchain-Verified Ownership @@ -17,18 +21,21 @@ Protected Data flips this model. Here's how you protect data: ```javascript const protectedData = await dataprotector.protectData({ - name: 'my-contacts.json', + name: 'my-contacts.json', data: { emails: ['user@example.com', ...] } }); ``` -Now you have **blockchain-verified ownership** of this data. No one can access it without your explicit permission. +Now you have **blockchain-verified ownership** of this data. No one can access +it without your explicit permission. ## Access Control That Actually Works -Traditional permissions: "This app can access your contacts" *(forever, for anything)* +Traditional permissions: "This app can access your contacts" _(forever, for +anything)_ -Protected Data permissions: "This newsletter app can use my contacts to send marketing emails, but only during weekdays, and I get 2โ‚ฌ per campaign." +Protected Data permissions: "This newsletter app can use my contacts to send +marketing emails, but only during weekdays, and I get 2โ‚ฌ per campaign." ```javascript await dataprotector.grantAccess({ @@ -41,97 +48,132 @@ await dataprotector.grantAccess({ ## Privacy-Safe Processing -When apps use your Protected Data, they process it inside **secure enclaves** (TEEs). They get the results they need, but your raw data never leaves the privacy bubble. +When apps use your Protected Data, they process it inside **secure enclaves** +(TEEs). They get the results they need, but your raw data never leaves the +privacy bubble. ### How the Technical Magic Works Here's what actually happens under the hood: 1. **Your data gets encrypted** and stored online (IPFS,Arweave..) -2. **The decryption key** is stored in a secure TEE database +2. **The decryption key** is stored in a secure TEE database 3. **Only authorized TEE workers** can retrieve this key to process your data -4. **Apps run inside these TEE workers** - they can decrypt and use your data, but only within the secure enclave -5. **Results come back encrypted** to you - the raw data never leaves the TEE environment +4. **Apps run inside these TEE workers** - they can decrypt and use your data, + but only within the secure enclave +5. **Results come back encrypted** to you - the raw data never leaves the TEE + environment ``` Your Data (encrypted, online) + Decryption Key (in TEE database) = Processing (only in authorized TEEs) ``` -This architecture ensures that even iExec workers can't access your raw data - only the TEE environment can decrypt it for processing, and only when you've authorized it. +This architecture ensures that even iExec workers can't access your raw data - +only the TEE environment can decrypt it for processing, and only when you've +authorized it. ## What This Enables ### ๐Ÿ“ง **Privacy-First Email Marketing** -Your users upload their contact lists as Protected Data. Your newsletter app can send personalized emails without ever seeing the actual email addresses. Users stay private, you get engagement. -### ๐Ÿค– **Ethical AI Training** -People contribute personal data (health records, preferences) as Protected Data. AI models can learn from this data without seeing individual information. Better AI, fair compensation, zero privacy trade-offs. +Your users upload their contact lists as Protected Data. Your newsletter app can +send personalized emails without ever seeing the actual email addresses. Users +stay private, you get engagement. -### ๐Ÿข **Confidential Business Intelligence** -Companies protect their datasets but still collaborate on insights. Research partners get aggregate results without accessing raw competitive data. Innovation without information leaks. +### ๐Ÿค– **Ethical AI Training** -### ๐Ÿ’ฐ **Data Monetization** -Create marketplaces where data owners set their own terms. "Use my fitness data for $5/month, health insights only, no advertising." Automatic payments, programmable rules. +People contribute personal data (health records, preferences) as Protected Data. +AI models can learn from this data without seeing individual information. Better +AI, fair compensation, zero privacy trade-offs. +### ๐Ÿข **Confidential Business Intelligence** +Companies protect their datasets but still collaborate on insights. Research +partners get aggregate results without accessing raw competitive data. +Innovation without information leaks. -## โ“ Frequently Asked Questions +### ๐Ÿ’ฐ **Data Monetization** -::: details ๐Ÿ’ฐ How much does it cost? -It's **free**! No gas fees on iExec's Bellecour network. You just need a Web3 wallet to sign transactions. -::: +Create marketplaces where data owners set their own terms. "Use my fitness data +for $5/month, health insights only, no advertising." Automatic payments, +programmable rules. -::: details ๐Ÿ“ What's the maximum dataset size? -It depends on your use case context. For standard cases (contacts, small datasets), no problem. For large volumes, [contact us](https://iex.ec/contact/) so we can assess if it fits your needs. -::: +## โ“ Frequently Asked Questions -::: details ๐Ÿ’ธ Can I monetize my data? -Yes! You can sell access to your Protected Data with flexible pricing, subscriptions, etc. See the [Manage Data Monetization](/manage_data/guides/manage-data-monetization) guide for all details. -::: +::: details ๐Ÿ’ฐ How much does it cost? It's **free**! No gas fees on iExec's +Bellecour network. You just need a Web3 wallet to sign transactions. ::: -::: details ๐Ÿš€ How do I get started? -You need a Web3 wallet (MetaMask, WalletConnect) and Node.js 16+. Follow [DataProtector Core](/manage_data/dataProtector/dataProtectorCore) for installation and first examples. -::: +::: details ๐Ÿ“ What's the maximum dataset size? It depends on your use case +context. For standard cases (contacts, small datasets), no problem. For large +volumes, [contact us](https://iex.ec/contact/) so we can assess if it fits your +needs. ::: +::: details ๐Ÿ’ธ Can I monetize my data? Yes! You can sell access to your +Protected Data with flexible pricing, subscriptions, etc. See the +[Manage Data Monetization](/manage_data/guides/manage-data-monetization) guide +for all details. ::: +::: details ๐Ÿš€ How do I get started? You need a Web3 wallet (MetaMask, +WalletConnect) and Node.js 16+. Follow +[DataProtector Core](/manage_data/dataProtector/dataProtectorCore) for +installation and first examples. ::: -::: details ๐Ÿ”’ Is my data really secure? -Yes! Your data is encrypted and keys are stored in secure TEE environments. Even iExec workers can't see your raw data - only the authorized TEE environment can decrypt it for processing. -::: +::: details ๐Ÿ”’ Is my data really secure? Yes! Your data is encrypted and keys +are stored in secure TEE environments. Even iExec workers can't see your raw +data - only the authorized TEE environment can decrypt it for processing. ::: ## Why This Changes Everything ### โœ… **True Ownership** -Your data is blockchain-verified yours. Not "terms & conditions" yours, actually yours. + +Your data is blockchain-verified yours. Not "terms & conditions" yours, actually +yours. ### โœ… **Privacy by Design** -Apps get utility without compromising privacy. No more "privacy vs functionality" trade-offs. + +Apps get utility without compromising privacy. No more "privacy vs +functionality" trade-offs. ### โœ… **Programmable Control** -Set complex rules: "Use my data only for health insights, only on weekdays, only if I get paid 5โ‚ฌ." + +Set complex rules: "Use my data only for health insights, only on weekdays, only +if I get paid 5โ‚ฌ." ### โœ… **Composable Privacy** -Any iApp can use your Protected Data (if authorized). Build privacy-first ecosystems. + +Any iApp can use your Protected Data (if authorized). Build privacy-first +ecosystems. ## Start Building Ready to give your users data ownership? ### ๐Ÿš€ **Try DataProtector** -- [Getting Started](/manage_data/dataProtector/getting-started) - Protect your first dataset -- [DataProtector Core](/manage_data/dataProtector/dataProtectorCore) - Full SDK reference -- [DataProtector Sharing](/manage_data/dataProtector/dataProtectorSharing) - Monetization features + +- [Getting Started](/manage_data/dataProtector/getting-started) - Protect your + first dataset +- [DataProtector Core](/manage_data/dataProtector/dataProtectorCore) - Full SDK + reference +- [DataProtector Sharing](/manage_data/dataProtector/dataProtectorSharing) - + Monetization features ### ๐Ÿ“– **Learn with Guides** -- [Create and Share Access](/manage_data/guides/create-and-share-access) - Basic workflow -- [Handle Schemas & Dataset Types](/manage_data/guides/handle-schemas-dataset-types) - Advanced data types -- [Manage Data Monetization](/manage_data/guides/manage-data-monetization) - Get paid for your data + +- [Create and Share Access](/manage_data/guides/create-and-share-access) - Basic + workflow +- [Handle Schemas & Dataset Types](/manage_data/guides/handle-schemas-dataset-types) - + Advanced data types +- [Manage Data Monetization](/manage_data/guides/manage-data-monetization) - Get + paid for your data ### ๐ŸŽฏ **Use in iApps** + Protected Data works with any iApp: + - [Web3Mail](/use_iapp/web3mail) - Private email with contact protection - [Build your own iApp](/build_iapp/iapp-generator) - Custom privacy-first apps --- -**TL;DR**: Protected Data = Your data + Your rules + Privacy guarantees. Finally, data ownership that actually works. ๐Ÿ”’ \ No newline at end of file +**TL;DR**: Protected Data = Your data + Your rules + Privacy guarantees. +Finally, data ownership that actually works. ๐Ÿ”’ diff --git a/use_iapp/getting-started.md b/use_iapp/getting-started.md deleted file mode 100644 index 4fc88bcd..00000000 --- a/use_iapp/getting-started.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Getting Started with iApps -description: Dรฉmarrage avec les iApps ---- - -# ๐Ÿš€ Getting Started - -Cette page est en cours de dรฉveloppement. - - diff --git a/use_iapp/introduction.md b/use_iapp/introduction.md index 29d3ae97..21ac9430 100644 --- a/use_iapp/introduction.md +++ b/use_iapp/introduction.md @@ -1,10 +1,174 @@ --- -title: Introduction to Using iApps -description: Introduction ร  l'utilisation des iApps +title: Getting Started with iApps +description: + From iApp to integration - understand tools vs custom iApps and choose your + path --- -# ๐Ÿ“ Introduction +# ๐Ÿš€ Getting Started with iApps -Cette page est en cours de dรฉveloppement. +**iApps are applications that run inside secure enclaves (TEEs) on the iExec +network.** They can access and process Protected Data while keeping everything +private and verifiable. - +_New to iApps? Check out +[What Is an iApp?](/build_iapp/iapp-generator/what-is-iapp) to understand the +concept first._ + +## How iApp Execution Works + +When someone runs an iApp, here's what happens: + +1. **Task is submitted** to the iExec network with the iApp address and any + input data +2. **TEE worker picks up the task** - only workers with secure enclaves can + execute iApps +3. **iApp runs inside the TEE** - code executes in an isolated, tamper-proof + environment +4. **Results are encrypted** and sent back to the user who initiated the task + +This execution model ensures that even the worker running your iApp can't see +the data being processed. + +## Integration Challenge + +**You want to add privacy-first services to your application.** Whether you need +email functionality, oracle data, or custom privacy-preserving logic, iApps can +power your features without compromising user privacy. + +The question is: **how do you integrate them?** + +## Tools vs Other iApps + +Not all iApps are integrated the same way. There are three main categories: + +### ๐Ÿ› ๏ธ **Tools (Ready-to-Use SDKs)** + +These are our **developer-friendly services** with polished SDKs: + +- **[Web3Mail](/use_iapp/web3mail)** - Private email functionality +- **[Web3Telegram](/use_iapp/web3telegram)** - Secure messaging via Telegram +- **[Oracle Factory](/use_iapp/oracle-factory)** - Decentralized oracle services + +**Why use these?** They come with: + +- โœ… Clean APIs and comprehensive documentation +- โœ… Built-in user flows and UX patterns +- โœ… Payment handling and error management +- โœ… Ready-to-use examples and quick setup + +### ๐Ÿ›ก๏ธ **DataProtector (Process Protected Data)** + +If your goal is to **process Protected Data** specifically: + +- **[DataProtector](/manage_data/dataProtector)** - SDK for processing Protected + Data in TEE environments +- Use `processProtectedData()` to run computation on encrypted datasets +- Built-in privacy guarantees and access control + +**Why use this?** When you need to: + +- โœ… Process users' Protected Data with your custom logic +- โœ… Combine multiple Protected Datasets securely +- โœ… Get privacy-preserving analytics results +- โœ… Keep data encrypted throughout the entire process + +### ๐Ÿš€ **Custom iApps** + +These are **any other iApps** in the ecosystem: + +- Your own iApp that you built and deployed +- Third-party iApps created by other developers +- Specialized services for specific use cases + +**Integration is more manual** - you handle the execution flow, payments, and +user experience yourself. + +## Three Integration Paths + +### Path 1: Using Tool SDKs (Recommended for Tools) + +```javascript +// Clean, purpose-built APIs +import { IExecWeb3mail } from '@iexec/web3mail'; + +const web3mail = new IExecWeb3mail(web3Provider); +await web3mail.sendEmail({ + emailSubject: 'Welcome!', + emailContent: 'Thanks for signing up', + protectedData: userContactData, + contentType: 'text/html', +}); +``` + +### Path 2: Using DataProtector (For Processing Protected Data) + +```javascript +// Process Protected Data directly +import { IExecDataProtector } from '@iexec/dataprotector'; + +const dataprotector = new IExecDataProtector(web3Provider); +const result = await dataprotector.processProtectedData({ + protectedData: userHealthData, + app: 'health-risk-analyzer.eth', + maxPrice: 100, // RLC +}); +``` + +### Path 3: Using iExec SDK (For Custom iApps) + +```javascript +// General-purpose iApp execution +import { IExec } from 'iexec'; + +const iexec = new IExec({ ethProvider: web3Provider }); +const task = await iexec.task.run({ + app: 'your-sentiment-analysis-iapp.eth', + dataset: protectedTweetData, + params: { model: 'bert-sentiment' }, +}); +``` + +## Choose Your Path + +### โœ… **Use Tool SDKs if:** + +- You need email, messaging, or oracle functionality +- You want quick integration with minimal setup +- You prefer polished APIs and documentation +- You want UX patterns already figured out + +**โ†’ Start with [Web3Mail](/use_iapp/web3mail), +[Web3Telegram](/use_iapp/web3telegram), or +[Oracle Factory](/use_iapp/oracle-factory)** + +### โœ… **Use DataProtector if:** + +- You need to process users' Protected Data +- You want built-in privacy guarantees for data processing +- You're building analytics or AI services on encrypted datasets +- You need to combine multiple Protected Datasets securely + +**โ†’ Start with +[DataProtector Core](/manage_data/dataProtector/dataProtectorCore) and +[Protected Data Guide](/manage_data/dataProtector/what-is-protected-data)** + +### โœ… **Use iExec SDK if:** + +- You have a custom iApp (yours or third-party) +- You need specialized functionality not covered by our tools +- You want full control over the integration +- You're building advanced privacy-preserving workflows + +**โ†’ Start with [General iApp Integration](/use_iapp/guides) and +[Payment Handling](/use_iapp/payment)** + +### ๐Ÿ’ก **Not sure what you need?** + +Check out our [Hello World](/overview/helloWorld) tutorial to see all approaches +in action. + +--- + +**TL;DR**: Tools = Easy SDKs for common use cases. Custom iApps = Full +flexibility with more integration work. Choose based on your needs! ๐ŸŽฏ