addAppToAddOnlyAppWhitelist
Method to add an app (iExec TEE dApp) into the AddOnlyAppWhitelist
.
WARNING
Once added, you can't remove an app from the whitelist.
Why?
This is mainly to protect users who have paid for protected data. Imagine the collection owner could remove all apps from the initial whitelist, users having rented the protected data could no longer consume it.
Usage
ts
const isAddedToAddAppToAddOnlyAppWhitelist =
await dataProtectorSharing.addAppToAddOnlyAppWhitelist({
addOnlyAppWhitelist: '0x123abc...',
app: '0x127ahs...',
});
Parameters
ts
import { type AddAppToAppWhitelistParams } from '@iexec/dataprotector';
addOnlyAppWhitelist Required *
Type: Address
Address of the addOnlyAppWhitelist
in which you want to add an app.
ts
const isAddedToAddAppToAddOnlyAppWhitelist =
await dataProtectorSharing.addAppToAddOnlyAppWhitelist({
addOnlyAppWhitelist: '0x123abc...',
app: '0x127ahs...',
});
app Required *
Type: AddressOrENS
Address of app that you want to add to the addOnlyAppWhitelist
.
ts
const isAddedToAddAppToAddOnlyAppWhitelist =
await dataProtectorSharing.addAppToAddOnlyAppWhitelist({
addOnlyAppWhitelist: '0x123abc...',
app: '0x127ahs...',
});
Return value
ts
import { type SuccessWithTransactionHash } from '@iexec/dataprotector';