diff --git a/manage_data/guides.md b/manage_data/guides.md new file mode 100644 index 00000000..43f4f146 --- /dev/null +++ b/manage_data/guides.md @@ -0,0 +1,105 @@ +--- +title: DataProtector Guides +description: + Step-by-step guides for protecting, managing, and monetizing your data with + iExec DataProtector +--- + +# 📖 DataProtector Guides + +**Master data protection, sharing, and monetization** with these comprehensive +step-by-step guides. Each guide focuses on a specific aspect of building with +DataProtector. + +## Essential Guides + +### 🛡️ [Create and Share Access to Protected Data](/manage_data/guides/create-and-share-access) + +**Start here if you're new to DataProtector.** Learn how to protect your data +and control exactly who can access it. + +- Protect data with client-side encryption +- Grant access to specific users and apps +- Set pricing and usage limits +- Debug mode for development + +--- + +### 🏷️ [Handle Schemas and Dataset Types](/manage_data/guides/handle-schemas-dataset-types) + +**Understand how your data structure works with iApps.** Learn about automatic +schema generation and how to use data types effectively. + +- Auto-generated schemas from your JSON data +- Supported data types and format conversion +- Using schemas in iApp development +- Type safety and error handling + +--- + +### 💰 [Manage Data Monetization](/manage_data/guides/manage-data-monetization) + +**Turn your protected data into revenue.** Explore different monetization +strategies from simple pay-per-use to advanced marketplace distribution. + +- Pay-per-use with DataProtector Core +- DataProtector Sharing with collections +- Rental, subscription, and sale models +- Revenue optimization strategies + +## Quick Navigation + +::: tip What You'll Learn These guides cover the complete journey from +protecting your first dataset to building a sustainable data business with +automated monetization. ::: + +### By Use Case + +- **🚀 Just getting started?** → + [Create and Share Access](/manage_data/guides/create-and-share-access) +- **🔧 Building an iApp?** → + [Handle Schemas and Dataset Types](/manage_data/guides/handle-schemas-dataset-types) +- **💡 Want to monetize data?** → + [Manage Data Monetization](/manage_data/guides/manage-data-monetization) + +### By Experience Level + +**Beginner**: Start with data protection basics +→ [Create and Share Access](/manage_data/guides/create-and-share-access) + +**Intermediate**: Learn about data structures and iApp integration +→ [Handle Schemas and Dataset Types](/manage_data/guides/handle-schemas-dataset-types) + +**Advanced**: Explore monetization strategies and business models +→ [Manage Data Monetization](/manage_data/guides/manage-data-monetization) + +## Additional Resources + +### 📚 **SDK Reference** + +- [DataProtector Core SDK](/manage_data/dataProtector/dataProtectorCore) - + Complete method reference +- [DataProtector Sharing SDK](/manage_data/dataProtector/dataProtectorSharing) - + Advanced distribution features +- [Type Definitions](/manage_data/dataProtector/types) - TypeScript interfaces + and types + +### 🎯 **Real Examples** + +- [Content Creator Demo](/overview/use-case-demo/content-creator) - Live example + of data monetization +- [Hello World Tutorial](/overview/helloWorld) - End-to-end walkthrough + +### 🔧 **Advanced Topics** + +- [Apps Whitelist](/manage_data/dataProtector/advanced/apps-whitelist) - Control + which iApps can access data +- [Smart Contract Details](/manage_data/dataProtector/advanced/dps-smart-contract) - + Blockchain implementation +- [Migration Guide](/manage_data/dataProtector/migrate-from-v1) - Upgrade from + v1 to v2 + +--- + +**Ready to start?** Pick the guide that matches your current goal and dive in! +🚀 diff --git a/manage_data/guides/create-and-share-access.md b/manage_data/guides/create-and-share-access.md index 7bcc81e2..b37be722 100644 --- a/manage_data/guides/create-and-share-access.md +++ b/manage_data/guides/create-and-share-access.md @@ -1,10 +1,192 @@ --- title: Create and Share Access to Protected Data -description: Créer et partager l'accès aux données protégées +description: + Learn how to protect data and grant secure access for specific apps and users --- -# Create and Share Access to Protected Data +# 🛡️ Create and Share Access to Protected Data -Cette page est en cours de développement. +**Want to keep your data private while still using it in applications?** Here's +how DataProtector works: first you encrypt your data, then you control exactly +who can access it and when. - +Once data is protected, it's only accessible inside secure enclaves (TEEs) by +the specific people and iApps you authorize. No exceptions. + +## Quick Start + +First, install DataProtector in your project: + +::: code-group + +```bash [npm] +npm install @iexec/dataprotector +``` + +```bash [yarn] +yarn add @iexec/dataprotector +``` + +```bash [pnpm] +pnpm add @iexec/dataprotector +``` + +::: + +## Protect Your Data + +**Here's what happens:** Your data gets encrypted client-side and stored as an +NFT. Only you control who can decrypt and use it. + +```ts +import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector'; + +const web3Provider = getWeb3Provider('PRIVATE_KEY'); +const dataProtectorCore = new IExecDataProtectorCore(web3Provider); + +const protectedData = await dataProtectorCore.protectData({ + name: 'My Email Contact', + data: { + email: 'alice@example.com', + firstName: 'Alice', + lastName: 'Smith', + }, +}); + +console.log('Protected data address:', protectedData.address); +``` + +### What You Can Protect + +**Data**: Any JSON object with custom keys. Think user profiles, API +credentials, datasets, model parameters - anything you want to keep private but +still use in computations. + +**Supported types**: Strings, numbers, booleans, nested objects, files (convert +to ArrayBuffer first), and arrays (convert to Record format). + +**Limits**: File size depends on your storage choice (IPFS or Arweave). For +large datasets, consider using another IPFS node. + +::: tip Need Help? Check our +[Schema and Dataset Types guide](/manage_data/guides/handle-schemas-dataset-types) +for detailed formatting instructions. ::: + +### Debug Mode Option + +```ts +const protectedData = await dataProtectorCore.protectData({ + data: { email: 'test@example.com' }, + allowDebug: true, // Only for development/testing +}); +``` + +::: warning Debug mode lets you test with debug iApps during development. As +"debug" iApps don't have the same security standards, we recommend using this +mode only during iApp development. ::: + +## Grant Access + +**Here's the key:** The protocol blocks all access to your protected data by +default. You must explicitly grant permission for each app and user combination. + +Once you own protected data, here's how to share access: + +```ts +const grantedAccess = await dataProtectorCore.grantAccess({ + protectedData: '0x123abc...', // Your protected data address + authorizedApp: '0x456def...', // iApp that can process the data + authorizedUser: '0x789cba...', // User who can trigger the processing + pricePerAccess: 0, // Cost per use (in nRLC) + numberOfAccess: 10, // Maximum number of uses +}); +``` + +### Parameters Explained + +#### `protectedData` + +The address of your protected data (returned when you created it). **You must +own this data** to grant access. + +#### `authorizedApp` + +**What it is**: The iApp address that's allowed to process your data inside the +secure enclave. + +**Why needed**: This ensures only specific, audited applications can access your +data. No random code can touch it. + +**Pro tip**: Use app whitelists for production. Instead of a single app address, +you can specify a whitelist contract that contains multiple approved app +versions. Very useful for when you need to upgrade your iApps, without losing +all the granted access. + +```ts +// Single app +authorizedApp: 'web3mail.apps.iexec.eth'; + +// Or use a whitelist (recommended for production) +authorizedApp: '0x781482C39CcE25546583EaC4957Fb7Bf04C277D2'; // Web3Mail whitelist +``` + +#### `authorizedUser` + +**What it is**: The wallet address that can initiate processing of your data. + +**Why needed**: Even with an authorized app, only specific users can trigger the +computation. This gives you granular control over who uses your data. + +**Don't forget**: Even if you are the owner of the data, you need to authorize +yourself! + +**Special case**: Set to `0x0000000000000000000000000000000000000000` to allow +**any user** to trigger processing (useful for public datasets). + +#### `pricePerAccess` + +**Quick explanation**: How much you charge per data usage (in nano RLC - nRLC). + +Set to `0` for free access, or specify a price to monetize your data +automatically. + +**Example**: `pricePerAccess: 1000000000` = 1 RLC per access + +→ **Want to learn more monetization capabilities?** See our detailed +[Manage Data Monetization guide](/manage_data/guides/manage-data-monetization) + +#### `numberOfAccess` + +**Quick explanation**: Maximum number of times this authorization can be used. + +::: warning Important If someone tries to process your data more times than +allowed, they'll get a "no dataset orders" error. Set this high enough for your +use case. ::: + +**Example values**: + +- `1` - Single use (great for one-time data analysis) +- `100` - Limited campaign (email marketing with usage cap) +- `10000` - Effectively unlimited for most use cases + +## What's Next? + +**You now have protected data with controlled access.** Here are your next +steps: + +- **Process the data**: Use + [processProtectedData](/manage_data/dataProtector/dataProtectorCore/processProtectedData) + to run computations +- **Manage access**: + [Revoke](/manage_data/dataProtector/dataProtectorCore/revokeOneAccess) or + [modify permissions](/manage_data/dataProtector/dataProtectorCore/grantAccess) + anytime +- **Learn data types**: Deep dive into + [schemas and dataset types](/manage_data/guides/handle-schemas-dataset-types) +- **Monetize data**: Explore + [data monetization strategies](/manage_data/guides/manage-data-monetization) + +--- + +**TL;DR**: Protect data → Grant access to specific app + user → Data stays +encrypted except inside authorized secure enclaves. You keep full control. 🔒 diff --git a/manage_data/guides/handle-schemas-dataset-types.md b/manage_data/guides/handle-schemas-dataset-types.md index 19abe9fb..fe04780b 100644 --- a/manage_data/guides/handle-schemas-dataset-types.md +++ b/manage_data/guides/handle-schemas-dataset-types.md @@ -1,10 +1,186 @@ --- title: Handle Schemas and Dataset Types -description: Gérer les schémas et types de datasets +description: + Learn how schemas work in DataProtector and how to use them in your iApps --- -# Handle Schemas and Dataset Types +# 🏷️ Handle Schemas and Dataset Types -Cette page est en cours de développement. +**Schemas are like TypeScript for your protected data.** They define the +structure and types of your data automatically when you protect it, making it +easy for iApps to know what they're working with. - +Think of schemas as **data labels** - they tell iApps "this protected data +contains an email address and a phone number" without revealing the actual +values. + +## How Schemas Work + +When you protect data with DataProtector, the SDK automatically analyzes your +JSON object and generates a schema. **No manual schema definition needed** - +it's all handled for you. + +```ts +import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector'; + +const web3Provider = getWeb3Provider('PRIVATE_KEY'); +const dataProtectorCore = new IExecDataProtectorCore(web3Provider); + +const protectedData = await dataProtectorCore.protectData({ + name: 'User Contact', + data: { + email: 'alice@example.com', + phoneNumber: '+1234567890', + preferences: { + newsletter: true, + notifications: false, + }, + }, +}); + +// The schema is automatically generated: +console.log(protectedData.schema); +/* Output: +{ + email: 'string', + phoneNumber: 'string', + preferences: { + newsletter: 'bool', + notifications: 'bool' + } +} +*/ +``` + +## Supported Data Types + +The schema automatically detects these types: + +| Type | Description | Example | +| ------------------------------- | -------------- | --------------------- | +| `string` | Text data | `"alice@example.com"` | +| `bool` | Boolean values | `true`, `false` | +| `f64` | Numbers | `42`, `3.14` | +| `i128` | Big integers | `BigInt(123456789)` | +| `application/octet-stream` | Binary data | File contents | +| `image/jpeg`, `image/png`, etc. | Media files | Images, videos | + +::: tip Auto-Detection The SDK automatically detects file types based on +content. No need to specify MIME types manually. ::: + +## Why Schemas Matter + +### 🎯 **For iApp Development** + +Schemas let your iApps validate and process data safely: + +```js +// Inside your iApp +const email = await deserializer.getValue('email', 'string'); +const preferences = await deserializer.getValue( + 'preferences.newsletter', + 'bool' +); +``` + +### 🔍 **For Data Discovery** + +Users can find relevant protected data without seeing the actual content: + +```ts +// Find all protected data with email addresses +const query = { schema: { email: 'string' } }; +// Returns metadata only, no actual emails revealed +``` + +### 🛡️ **For Type Safety** + +Prevents your iApps from processing incompatible data types. + +## Real Examples + +### Simple User Profile + +```ts +const userData = await dataProtectorCore.protectData({ + data: { + email: 'user@example.com', + age: 25, + isSubscribed: true, + }, +}); +// Schema: { email: 'string', age: 'f64', isSubscribed: 'bool' } +``` + +### Nested Contact Information + +```ts +const contactData = await dataProtectorCore.protectData({ + data: { + personal: { + firstName: 'Alice', + lastName: 'Smith', + }, + contact: { + email: 'alice@example.com', + phone: '+1234567890', + }, + preferences: { + marketing: false, + notifications: true, + }, + }, +}); +// Schema reflects the full nested structure +``` + +### File Data + +```ts +import { createArrayBufferFromFile } from '@iexec/dataprotector'; + +const file = document.getElementById('fileInput').files[0]; +const fileBuffer = await createArrayBufferFromFile(file); + +const fileData = await dataProtectorCore.protectData({ + data: { + fileName: file.name, + fileContent: fileBuffer, + uploadDate: Date.now(), + }, +}); +// Schema: { fileName: 'string', fileContent: 'image/jpeg', uploadDate: 'f64' } +``` + +## Using Schemas in iApps + +Once you have protected data with a schema, you'll want to process it inside an +iApp. + +::: warning Type Matching **Your iApp and frontend must use the same field names +and types.** If they don't match, you'll get runtime errors when processing the +data. ::: + +→ **Ready to build an iApp?** Check out our detailed +[Inputs and Outputs guide](/build_iapp/guides/inputs-and-outputs) to learn how +to access schema fields inside your iApp using the deserializer. + +## Next Steps + +**You now understand how schemas work with protected data.** Here's what to +explore next: + +- **Build an iApp**: Check out the + [iApp Generator guide](/build_iapp/iapp-generator) to create your first data + processor +- **Process data**: Learn about + [processProtectedData](/manage_data/dataProtector/dataProtectorCore/processProtectedData) + for running computations +- **See it in action**: Try our [Hello World tutorial](/overview/helloWorld) for + a complete example + +--- + +**TL;DR**: Schemas = auto-generated data labels. Frontend protects data → Schema +describes structure → iApp uses schema to access fields safely. Match your field +names and types between frontend and iApp! 🏷️ diff --git a/manage_data/guides/index.md b/manage_data/guides/index.md deleted file mode 100644 index 602e3f8a..00000000 --- a/manage_data/guides/index.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: DataProtector Guides -description: Step-by-step guides for using iExec DataProtector ---- - -# 📖 DataProtector Guides - -Discover how to protect, share, and monetize your data using iExec's -DataProtector technology through these comprehensive guides. - -## Getting Started Guides - -### 🚀 [Quick Start Guide](/manage_data/dataProtector/getting-started) - -Learn the basics of protecting your first dataset and granting access to others. - -### 🔐 [Understanding Protected Data](/manage_data/dataProtector/what-is-protected-data) - -Deep dive into the concepts behind data protection and privacy-preserving -computation. - -## Core Features Guides - -### 📊 Data Protection - -- [Protect Your Data](/manage_data/dataProtector/dataProtectorCore/protectData) - - Encrypt and register data -- [Retrieve Protected Data](/manage_data/dataProtector/dataProtectorCore/getProtectedData) - - Access your protected datasets -- [Transfer Ownership](/manage_data/dataProtector/dataProtectorCore/transferOwnership) - - Change data ownership - -### 🔑 Access Management - -- [Grant Access](/manage_data/dataProtector/dataProtectorCore/grantAccess) - - Give permissions to users -- [View Granted Access](/manage_data/dataProtector/dataProtectorCore/getGrantedAccess) - - See who has access -- [Revoke Access](/manage_data/dataProtector/dataProtectorCore/revokeAllAccess) - - Remove permissions - -### ⚡ Data Processing - -- [Process Protected Data](/manage_data/dataProtector/dataProtectorCore/processProtectedData) - - Run computations -- [Get Results](/manage_data/dataProtector/dataProtectorCore/getResultFromCompletedTask) - - Retrieve computation outputs - -## Data Sharing & Monetization - -### 📦 Collections - -- [Create Collections](/manage_data/dataProtector/dataProtectorSharing/collection/createCollection) - - Group related datasets -- [Manage Collections](/manage_data/dataProtector/dataProtectorSharing/collection/addToCollection) - - Add/remove data - -### 💰 Monetization Options - -- [Rent Your Data](/manage_data/dataProtector/dataProtectorSharing/renting) - - Time-based access -- [Sell Your Data](/manage_data/dataProtector/dataProtectorSharing/selling) - - Permanent transfers -- [Subscription Model](/manage_data/dataProtector/dataProtectorSharing/subscription) - - Recurring access - -## Advanced Topics - -### 🔧 [Advanced Configuration](/manage_data/dataProtector/advanced/advanced-configuration) - -Customize DataProtector for your specific needs. - -### 🏗️ [Smart Contracts](/manage_data/dataProtector/advanced/dps-smart-contract) - -Understand the underlying blockchain technology. - -### 📱 [App Whitelisting](/manage_data/dataProtector/advanced/apps-whitelist) - -Control which applications can access your data. - -## Migration Guide - -### 🔄 [Migrate from v1 to v2](/manage_data/dataProtector/migrate-from-v1) - -Upgrade from the previous version of DataProtector. - ---- - -_These guides will help you master data protection and unlock the full potential -of your datasets._ diff --git a/manage_data/guides/manage-data-monetization.md b/manage_data/guides/manage-data-monetization.md index d2fc0ac7..765d2967 100644 --- a/manage_data/guides/manage-data-monetization.md +++ b/manage_data/guides/manage-data-monetization.md @@ -1,10 +1,310 @@ --- title: Manage Data Monetization -description: Gérer la monétisation des données +description: + Explore different ways to monetize your protected data with pay-per-use and + DataProtector Sharing --- -# Manage Data Monetization +# 💰 Manage Data Monetization -Cette page est en cours de développement. +**Your protected data can generate revenue automatically.** iExec offers two +main approaches for monetizing your data: simple pay-per-use access and advanced +DataProtector Sharing with multiple distribution models. - +Each approach serves different use cases, from direct data processing to +autonomous smart contract distribution. + +## Two Monetization Approaches + +### 🎯 **Pay-Per-Use (DataProtector Core)** + +Direct access control with simple pricing. You grant access to specific users +and apps, charging per data usage. + +### 🏪 **DataProtector Sharing** + +Advanced distribution features with collections, subscriptions, rentals, and +sales. Users can purchase access autonomously through smart contracts. + +Let's explore both in detail. + +--- + +## Pay-Per-Use (DataProtector Core) + +**How it works**: When you grant access to your protected data, you set a price +per access. Each time someone processes your data, they pay your specified fee +automatically. + +```ts +import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector'; + +const web3Provider = getWeb3Provider('PRIVATE_KEY'); +const dataProtectorCore = new IExecDataProtectorCore(web3Provider); + +// Grant paid access to your data +const grantedAccess = await dataProtectorCore.grantAccess({ + protectedData: '0x123abc...', // Your data address + authorizedApp: 'email-processor.apps.iexec.eth', + authorizedUser: '0x456def...', // Specific user + pricePerAccess: 5000000000, // 5 RLC per access + numberOfAccess: 100, // Max 100 uses +}); +``` + +### **Use Cases for Pay-Per-Use** + +::: code-group + +```ts [API Access] +// Charge for AI model inference +const grantedAccess = await dataProtectorCore.grantAccess({ + protectedData: myAIModelAddress, + authorizedApp: 'ai-inference.apps.iexec.eth', + authorizedUser: clientAddress, + pricePerAccess: 1000000000, // 1 RLC per inference + numberOfAccess: 1000, +}); +``` + +```ts [Data Processing] +// Charge for data analysis +const grantedAccess = await dataProtectorCore.grantAccess({ + protectedData: healthDataAddress, + authorizedApp: 'health-analyzer.apps.iexec.eth', + authorizedUser: researcherAddress, + pricePerAccess: 10000000000, // 10 RLC per analysis + numberOfAccess: 50, +}); +``` + +```ts [Free Access] +// Grant free access (still controlled) +const grantedAccess = await dataProtectorCore.grantAccess({ + protectedData: publicDatasetAddress, + authorizedApp: 'research.apps.iexec.eth', + authorizedUser: '0x0000000000000000000000000000000000000000', // Any user + pricePerAccess: 0, // Free + numberOfAccess: 10000, +}); +``` + +::: + +### **Pros & Cons of Pay-Per-Use** + +✅ **Advantages**: + +- Simple setup and direct control +- Works with any existing iApp +- You know exactly who has access +- Immediate payment per usage + +❌ **Limitations**: + +- Manual access granting for each user +- Direct relationship required with each consumer +- No automated distribution features + +--- + +## DataProtector Sharing + +**How it works**: Create collections of your protected data and set up +distribution models. Users can discover and purchase access autonomously through +smart contracts. + +::: tip See It Live The +[Content Creator demo](/overview/use-case-demo/content-creator) shows +DataProtector Sharing in action with file monetization. While it uses +content-delivery for file transfers, the same patterns work for any iApp - AI +models, data processing, oracles, etc. ::: + +### **Step 1: Create a Collection** + +```ts +import { + IExecDataProtectorSharing, + getWeb3Provider, +} from '@iexec/dataprotector'; + +const web3Provider = getWeb3Provider('PRIVATE_KEY'); +const dataProtectorSharing = new IExecDataProtectorSharing(web3Provider); + +// Create a collection to group your data +const collection = await dataProtectorSharing.createCollection(); +console.log('Collection address:', collection.collectionId); + +// Add your protected data to the collection +await dataProtectorSharing.addToCollection({ + protectedData: '0x123abc...', // Your protected data address + collectionId: collection.collectionId, + addOnlyAppWhitelist: '0x256bcd881c33bdf9df952f2a0148f27d439f2e64', // iExec apps whitelist +}); +``` + +### **Step 2: Choose Your Distribution Model** + +DataProtector Sharing offers four distribution models: + +### 🆓 **Free Access** + +Perfect for building audience, beta testing, or public datasets. + +```ts +// Make data freely available (but still controlled) +await dataProtectorSharing.setProtectedDataToRenting({ + protectedData: '0x123abc...', + price: 0, // Free access + duration: 86400, // 24 hours access +}); +``` + +### 🏠 **Rental Model** + +Users pay once for temporary access to your data. + +```ts +// Set up rental terms +await dataProtectorSharing.setProtectedDataToRenting({ + protectedData: '0x123abc...', + price: 5000000000, // 5 RLC rental fee + duration: 604800, // 7 days access (in seconds) +}); + +// Users can then rent your data +const rental = await dataProtectorSharing.rentProtectedData({ + protectedData: '0x123abc...', + price: 5000000000, + duration: 604800, +}); +``` + +**Perfect for**: + +- Time-limited datasets (event data, seasonal trends) +- Expensive datasets where users need short-term access +- Content that loses value over time + +### 📅 **Subscription Model** + +Users pay for ongoing access to a bundle of data that you can expand over time. + +```ts +// First, set subscription parameters for the collection +await dataProtectorSharing.setSubscriptionParams({ + collectionId: collection.collectionId, + price: 20000000000, // 20 RLC subscription fee + duration: 2592000, // 30 days access +}); + +// Add protected data to the subscription bundle +await dataProtectorSharing.setProtectedDataToSubscription({ + protectedData: '0x123abc...', +}); + +// Add more data to the same subscription +await dataProtectorSharing.setProtectedDataToSubscription({ + protectedData: '0x456def...', // Additional dataset +}); + +// Users subscribe to access all data in the bundle +const subscription = await dataProtectorSharing.subscribeToCollection({ + collectionId: collection.collectionId, + price: 20000000000, + duration: 2592000, +}); +``` + +**Perfect for**: + +- Growing datasets (daily market data, news feeds) +- Educational content series +- Research datasets that expand over time +- SaaS-style data access + +### 💸 **Sale Model** + +Transfer permanent ownership of your data to the buyer. + +```ts +// List data for sale +await dataProtectorSharing.setProtectedDataForSale({ + protectedData: '0x123abc...', + price: 100000000000, // 100 RLC purchase price +}); + +// Buyers can purchase ownership +const purchase = await dataProtectorSharing.buyProtectedData({ + protectedData: '0x123abc...', + price: 100000000000, +}); +``` + +**Perfect for**: + +- Unique datasets or models +- Digital assets and NFT data +- One-time valuable insights +- When you want to exit data ownership + +## Comparison: When to Use What? + +| Feature | Pay-Per-Use | DataProtector Sharing | +| ------------------------- | ---------------------- | ------------------------------------- | +| **Setup Complexity** | Simple | Moderate | +| **Consumer Relationship** | Direct | Smart contract mediated | +| **Payment** | Per processing | Per access period | +| **User Autonomy** | Requires your approval | Self-service | +| **Distribution Models** | One (pay-per-use) | Four (free, rent, subscription, sale) | +| **Best for** | Direct partnerships | Autonomous distribution | + +### 🎯 **Choose Pay-Per-Use when**: + +- You have direct relationships with data consumers +- You want full control over each access grant +- Your data is processed by specific iApps +- Simple pricing model is sufficient + +### 🏪 **Choose DataProtector Sharing when**: + +- You want automated distribution via smart contracts +- Users should purchase access autonomously without your involvement +- You need flexible pricing models (free, rental, subscription) +- You want to build a data business with recurring revenue + +## Real-World Example + +**Want to see data monetization in action?** Check out our **Content Creator +demo** that showcases DataProtector Sharing with real file transfers: + +**[Content Creator Demo](/overview/use-case-demo/content-creator)** - A complete +app demonstrating collections, rentals, and subscriptions for content +monetization. + +::: tip Live Example The Content Creator demo uses a content-delivery iApp for +file transfers, but the same monetization patterns apply to **any iApp and use +case** - AI model inference, data analysis, oracle feeds, Web3Mail, etc. ::: + +## Next Steps + +**Ready to start monetizing your data?** Here are your next steps: + +- **See it in action**: Try the + [Content Creator demo](/overview/use-case-demo/content-creator) to understand + the full flow +- **Start simple**: Begin with + [pay-per-use via grantAccess](/manage_data/guides/create-and-share-access) +- **Explore sharing**: Try + [DataProtector Sharing](/manage_data/dataProtector/dataProtectorSharing) for + automated distribution +- **Build collections**: Learn about + [collection management](/manage_data/dataProtector/dataProtectorSharing/collection) +- **Set up subscriptions**: Implement + [recurring revenue models](/manage_data/dataProtector/dataProtectorSharing/subscription) + +--- + +**TL;DR**: Pay-per-use = Simple direct control. DataProtector Sharing = Smart +contract automation with free/rent/subscription/sale models. Choose based on +your distribution strategy and technical needs. 💰