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 β
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 β
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';