Skip to content

Commit 0b75ae9

Browse files
committed
fix: improve formatting and readability in documentation files
1 parent 748b87b commit 0b75ae9

File tree

7 files changed

+230
-118
lines changed

7 files changed

+230
-118
lines changed

src/use-iapp/getting-started.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
---
22
title: Getting Started with iApps
3-
description: Learn the basics of finding and executing iApps on the iExec network
3+
description:
4+
Learn the basics of finding and executing iApps on the iExec network
45
---
56

67
# 🚀 Getting Started with iApps
78

8-
Welcome to the world of secure, privacy-preserving computation! This guide will walk you through the essential steps to start using iApps on the iExec network.
9+
Welcome to the world of secure, privacy-preserving computation! This guide will
10+
walk you through the essential steps to start using iApps on the iExec network.
911

1012
## Prerequisites
1113

1214
Before you begin, make sure you have:
1315

1416
- A Web3 wallet (MetaMask, WalletConnect, etc.)
15-
- Some RLC tokens for paying computation fees (or access to free vouchers through learning programs)
17+
- Some RLC tokens for paying computation fees (or access to free vouchers
18+
through learning programs)
1619
- Basic understanding of blockchain transactions
1720

1821
### 🆓 Use Our Stack for Free!
1922

20-
Good news! You can start using iApps **completely free** through our learning programs:
23+
Good news! You can start using iApps **completely free** through our learning
24+
programs:
2125

22-
- **Learn Web3 Program**: Get free access to our entire stack, including vouchers for iApp executions
23-
- **Free Vouchers**: Pre-funded computation credits provided through learning initiatives
24-
- **No RLC Required**: Start experimenting and building without any upfront costs
26+
- **Learn Web3 Program**: Get free access to our entire stack, including
27+
vouchers for iApp executions
28+
- **Free Vouchers**: Pre-funded computation credits provided through learning
29+
initiatives
30+
- **No RLC Required**: Start experimenting and building without any upfront
31+
costs
2532

2633
### 💰 Getting Started Without RLC
2734

28-
Don't have RLC tokens yet? No problem! Our learning programs provide everything you need:
35+
Don't have RLC tokens yet? No problem! Our learning programs provide everything
36+
you need:
2937

3038
- **Free Vouchers**: Access to pre-funded computation credits
3139
- **Full Stack Access**: Use all iExec tools and infrastructure at no cost
@@ -35,7 +43,8 @@ Ready to dive in? Let's get started with finding and executing your first iApp!
3543

3644
## Step 1: Find Available iApps
3745

38-
The first step is discovering what iApps are available for your use case. You can find iApps through several methods:
46+
The first step is discovering what iApps are available for your use case. You
47+
can find iApps through several methods:
3948

4049
1. Visit the [iExec Explorer](https://explorer.iex.ec)
4150
2. Navigate to the "Apps" section
@@ -55,8 +64,12 @@ Before executing an iApp, understand what it needs:
5564

5665
If the iApp requires protected data:
5766

58-
1. **Protect Your Data**: Use the [Data Protector](/manage-data/dataProtector/dataProtectorCore/protectData) to encrypt your sensitive information
59-
2. **Grant Access**: Ensure the iApp has permission to access your protected data using [grantAccess](/manage-data/dataProtector/dataProtectorCore/grantAccess)
67+
1. **Protect Your Data**: Use the
68+
[Data Protector](/manage-data/dataProtector/dataProtectorCore/protectData) to
69+
encrypt your sensitive information
70+
2. **Grant Access**: Ensure the iApp has permission to access your protected
71+
data using
72+
[grantAccess](/manage-data/dataProtector/dataProtectorCore/grantAccess)
6073

6174
## Step 4: Execute the iApp
6275

@@ -88,7 +101,8 @@ iexec app run 0x456def... --dataset 0x123abc... --args "your arguments"
88101

89102
After submitting your task:
90103

91-
1. **Monitor Progress**: Track your task on the [iExec Explorer](https://explorer.iex.ec)
104+
1. **Monitor Progress**: Track your task on the
105+
[iExec Explorer](https://explorer.iex.ec)
92106
2. **Retrieve Results**: Get your results once the task completes
93107

94108
### Using the DataProtector SDK
@@ -124,9 +138,11 @@ iApp execution costs include:
124138
Now that you understand the basics:
125139

126140
- Explore our [Guides](./guides/) for detailed tutorials
127-
- Learn about [Different Ways to Execute](./guides/different-ways-to-execute.md) iApps
141+
- Learn about [Different Ways to Execute](./guides/different-ways-to-execute.md)
142+
iApps
128143
- Understand [How to Pay for Executions](./guides/how-to-pay-executions.md)
129-
- Discover how to [Use iApps with Protected Data](./guides/use-iapp-with-protected-data.md)
144+
- Discover how to
145+
[Use iApps with Protected Data](./guides/use-iapp-with-protected-data.md)
130146

131147
## Need Help?
132148

src/use-iapp/guides/add-inputs-to-execution.md

Lines changed: 71 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
---
22
title: Add Inputs to iApp Execution
3-
description: Learn how to provide arguments, files, secrets, and other inputs to iApp executions
3+
description:
4+
Learn how to provide arguments, files, secrets, and other inputs to iApp
5+
executions
46
---
57

68
# 📥 Add Inputs to iApp Execution
79

8-
iApps can accept various types of inputs to customize their behavior and provide necessary data for processing. This guide covers all the different ways to add inputs to your iApp executions using various iExec tools and SDKs.
10+
iApps can accept various types of inputs to customize their behavior and provide
11+
necessary data for processing. This guide covers all the different ways to add
12+
inputs to your iApp executions using various iExec tools and SDKs.
913

10-
::: tip ENS Addresses
11-
**ENS (Ethereum Name Service)** is a naming system for Ethereum addresses that allows you to use human-readable names instead of long hexadecimal addresses. For example, instead of using `0x1234567890abcdef...`, you can use `debug-v8-learn.main.pools.iexec.eth`.
14+
::: tip ENS Addresses **ENS (Ethereum Name Service)** is a naming system for
15+
Ethereum addresses that allows you to use human-readable names instead of long
16+
hexadecimal addresses. For example, instead of using `0x1234567890abcdef...`,
17+
you can use `debug-v8-learn.main.pools.iexec.eth`.
1218

13-
In the examples below, we use `debug-v8-learn.main.pools.iexec.eth` which is iExec's official debug workerpool ENS address. This workerpool is specifically designed for testing and development purposes on the Bellecour testnet.
14-
:::
19+
In the examples below, we use `debug-v8-learn.main.pools.iexec.eth` which is
20+
iExec's official debug workerpool ENS address. This workerpool is specifically
21+
designed for testing and development purposes on the Bellecour testnet. :::
1522

1623
## Types of Inputs
1724

@@ -24,12 +31,17 @@ iExec supports several types of inputs for iApp executions:
2431

2532
## Method 1: Adding Command-Line Arguments
2633

27-
Command-line arguments are passed as a string to the iApp and are visible on the blockchain.
34+
Command-line arguments are passed as a string to the iApp and are visible on the
35+
blockchain.
2836

2937
### Using SDK Library
3038

3139
```typescript
32-
import { IExecConfig, IExecOrderModule, IExecOrderbookModule } from '@iexec/sdk';
40+
import {
41+
IExecConfig,
42+
IExecOrderModule,
43+
IExecOrderbookModule,
44+
} from '@iexec/sdk';
3345

3446
// create the configuration
3547
const config = new IExecConfig({ ethProvider: window.ethereum });
@@ -133,18 +145,21 @@ const result = await dataProtector.processProtectedData({
133145
args: '--input-path data/input.csv --output-format json --verbose',
134146
maxPrice: 10,
135147
});
136-
137-
138148
```
139149

140150
## Method 2: Adding Input Files
141151

142-
Input files are URLs to public files that the iApp can download during execution.
152+
Input files are URLs to public files that the iApp can download during
153+
execution.
143154

144155
### Using SDK Library
145156

146157
```typescript
147-
import { IExecConfig, IExecOrderModule, IExecOrderbookModule } from '@iexec/sdk';
158+
import {
159+
IExecConfig,
160+
IExecOrderModule,
161+
IExecOrderbookModule,
162+
} from '@iexec/sdk';
148163

149164
// create the configuration
150165
const config = new IExecConfig({ ethProvider: window.ethereum });
@@ -191,7 +206,7 @@ const taskId = await orderModule.matchOrders({
191206
inputFiles: [
192207
'https://example.com/config.json',
193208
'https://example.com/template.html',
194-
'https://example.com/data.csv'
209+
'https://example.com/data.csv',
195210
],
196211
});
197212

@@ -223,7 +238,7 @@ const taskId = await orderModule.matchOrders({
223238
workerpoolorder: workerpoolOrders[0],
224239
inputFiles: [
225240
'https://raw.githubusercontent.com/user/repo/main/config.json',
226-
'https://example.com/public-data.csv'
241+
'https://example.com/public-data.csv',
227242
],
228243
});
229244
```
@@ -254,22 +269,26 @@ const result = await dataProtector.processProtectedData({
254269
app: '0x456def...',
255270
inputFiles: [
256271
'https://raw.githubusercontent.com/user/repo/main/config.json',
257-
'https://example.com/public-data.csv'
272+
'https://example.com/public-data.csv',
258273
],
259274
maxPrice: 10,
260275
});
261-
262-
263276
```
264277

265278
## Method 3: Adding Secrets
266279

267-
Secrets are sensitive data like API keys, passwords, or tokens that are stored securely and made available to the iApp as environment variables.
280+
Secrets are sensitive data like API keys, passwords, or tokens that are stored
281+
securely and made available to the iApp as environment variables.
268282

269283
### Using SDK Library
270284

271285
```typescript
272-
import { IExecConfig, IExecOrderModule, IExecOrderbookModule, IExecSecretsModule } from '@iexec/sdk';
286+
import {
287+
IExecConfig,
288+
IExecOrderModule,
289+
IExecOrderbookModule,
290+
IExecSecretsModule,
291+
} from '@iexec/sdk';
273292

274293
// create the configuration
275294
const config = new IExecConfig({ ethProvider: window.ethereum });
@@ -387,17 +406,22 @@ const result = await dataProtector.processProtectedData({
387406
},
388407
maxPrice: 10,
389408
});
390-
391409
```
392410

393411
## Method 4: Specifying File Paths in Protected Data
394412

395-
When working with protected data that contains multiple files, you can specify which file to process.
413+
When working with protected data that contains multiple files, you can specify
414+
which file to process.
396415

397416
### Using SDK Library
398417

399418
```typescript
400-
import { IExecConfig, IExecOrderModule, IExecOrderbookModule, IExecResultModule } from '@iexec/sdk';
419+
import {
420+
IExecConfig,
421+
IExecOrderModule,
422+
IExecOrderbookModule,
423+
IExecResultModule,
424+
} from '@iexec/sdk';
401425

402426
// create the configuration
403427
const config = new IExecConfig({ ethProvider: window.ethereum });
@@ -503,7 +527,12 @@ You can combine different types of inputs for complex executions.
503527
### Using SDK Library
504528

505529
```typescript
506-
import { IExecConfig, IExecOrderModule, IExecOrderbookModule, IExecSecretsModule } from '@iexec/sdk';
530+
import {
531+
IExecConfig,
532+
IExecOrderModule,
533+
IExecOrderbookModule,
534+
IExecSecretsModule,
535+
} from '@iexec/sdk';
507536

508537
// create the configuration
509538
const config = new IExecConfig({ ethProvider: window.ethereum });
@@ -542,7 +571,7 @@ const taskId = await orderModule.matchOrders({
542571
workerpoolorder: workerpoolOrders[0],
543572
inputFiles: [
544573
'https://example.com/config.json',
545-
'https://example.com/template.html'
574+
'https://example.com/template.html',
546575
],
547576
secrets: {
548577
1: 'api-key-12345',
@@ -580,7 +609,7 @@ const result = await dataProtector.processProtectedData({
580609
args: '--mode production --output-format json',
581610
inputFiles: [
582611
'https://example.com/config.json',
583-
'https://example.com/template.html'
612+
'https://example.com/template.html',
584613
],
585614
secrets: {
586615
1: 'api-key-12345',
@@ -605,8 +634,8 @@ db_password = os.environ.get('IEXEC_SECRET_2') # 'database-password'
605634

606635
```javascript
607636
// JavaScript iApp example
608-
const apiKey = process.env.IEXEC_SECRET_1; // 'api-key-12345'
609-
const dbPassword = process.env.IEXEC_SECRET_2; // 'database-password'
637+
const apiKey = process.env.IEXEC_SECRET_1; // 'api-key-12345'
638+
const dbPassword = process.env.IEXEC_SECRET_2; // 'database-password'
610639
```
611640

612641
## Input Validation and Error Handling
@@ -616,12 +645,12 @@ const dbPassword = process.env.IEXEC_SECRET_2; // 'database-password'
616645
```typescript
617646
const validateInputs = (params) => {
618647
const errors = [];
619-
648+
620649
// Validate arguments
621650
if (params.args && params.args.length > 1000) {
622651
errors.push('Arguments too long (max 1000 characters)');
623652
}
624-
653+
625654
// Validate input files
626655
if (params.inputFiles) {
627656
params.inputFiles.forEach((url, index) => {
@@ -630,16 +659,16 @@ const validateInputs = (params) => {
630659
}
631660
});
632661
}
633-
662+
634663
// Validate secrets
635664
if (params.secrets) {
636-
Object.keys(params.secrets).forEach(key => {
665+
Object.keys(params.secrets).forEach((key) => {
637666
if (!/^\d+$/.test(key)) {
638667
errors.push('Secret keys must be numeric');
639668
}
640669
});
641670
}
642-
671+
643672
return errors;
644673
};
645674

@@ -706,7 +735,7 @@ const result = await dataProtectorCore.processProtectedData({
706735
// ✅ Ensure input files are accessible
707736
const inputFiles = [
708737
'https://raw.githubusercontent.com/user/repo/main/config.json',
709-
'https://example.com/public-data.csv'
738+
'https://example.com/public-data.csv',
710739
];
711740

712741
// Test file accessibility before execution
@@ -722,13 +751,13 @@ const testFileAccess = async (url) => {
722751
const accessibleFiles = await Promise.all(
723752
inputFiles.map(async (url) => ({
724753
url,
725-
accessible: await testFileAccess(url)
754+
accessible: await testFileAccess(url),
726755
}))
727756
);
728757

729758
const validFiles = accessibleFiles
730-
.filter(file => file.accessible)
731-
.map(file => file.url);
759+
.filter((file) => file.accessible)
760+
.map((file) => file.url);
732761
```
733762

734763
### 3. Use Descriptive Arguments
@@ -751,10 +780,10 @@ const result = await dataProtectorCore.processProtectedData({
751780
protectedData: '0x123abc...',
752781
app: '0x456def...',
753782
secrets: {
754-
1: 'primary-api-key', // Main API key
755-
2: 'backup-api-key', // Backup API key
756-
3: 'database-password', // Database credentials
757-
4: 'encryption-key', // Encryption key
783+
1: 'primary-api-key', // Main API key
784+
2: 'backup-api-key', // Backup API key
785+
3: 'database-password', // Database credentials
786+
4: 'encryption-key', // Encryption key
758787
},
759788
maxPrice: 10,
760789
});
@@ -764,6 +793,7 @@ const result = await dataProtectorCore.processProtectedData({
764793

765794
Now that you understand how to add inputs to iApp executions:
766795

767-
- Learn about [Using iApps with Protected Data](./use-iapp-with-protected-data.md)
796+
- Learn about
797+
[Using iApps with Protected Data](./use-iapp-with-protected-data.md)
768798
- Explore [Different Ways to Execute](./different-ways-to-execute.md) iApps
769799
- Check out our [How to Pay for Executions](./how-to-pay-executions.md) guide

0 commit comments

Comments
 (0)