Skip to content

Commit 43a3433

Browse files
committed
fix: update iApp documentation to enhance clarity on user-provided protected data
- Reintroduced the section on how users provide protected data, ensuring clear instructions and code examples for executing iApps. - Improved the formatting and structure of the documentation to align with recent updates, enhancing overall readability and user understanding.
1 parent d531ddf commit 43a3433

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/build-iapp/guides/inputs-and-outputs.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,6 @@ environment.
275275
**When to use:** Processing user's sensitive information like personal data,
276276
financial records, health data.
277277

278-
### How Users Provide Protected Data
279-
280-
Users specify the protected data address when executing your iApp:
281-
282-
```ts twoslash
283-
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';
284-
285-
const web3Provider = getWeb3Provider('PRIVATE_KEY');
286-
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
287-
// ---cut---
288-
// User provides their protected data for processing
289-
const response = await dataProtectorCore.processProtectedData({
290-
protectedData: '0x123abc...', // Address of their protected data
291-
app: '0x456def...', // Your iApp address
292-
});
293-
```
294-
295278
### How to Access Protected Data
296279

297280
Protected data is available in the `IEXEC_IN` directory as decrypted files:
@@ -345,6 +328,23 @@ try {
345328

346329
:::
347330

331+
### How Users Provide Protected Data
332+
333+
Users specify the protected data address when executing your iApp:
334+
335+
```ts twoslash
336+
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';
337+
338+
const web3Provider = getWeb3Provider('PRIVATE_KEY');
339+
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
340+
// ---cut---
341+
// User provides their protected data for processing
342+
const response = await dataProtectorCore.processProtectedData({
343+
protectedData: '0x123abc...', // Address of their protected data
344+
app: '0x456def...', // Your iApp address
345+
});
346+
```
347+
348348
### Working with Multiple Protected Datasets
349349

350350
When multiple datasets are provided, they're available as separate files:

0 commit comments

Comments
 (0)