revokeOneAccess
This method allows revoking a specific access authorization from a protectedData
entity. The input parameter for this method is sourced from the getGrantedAccess method, which provides a list of all authorizations on single protectedData
entity.
As this will generate a blockchain transaction, expect it to take a least 5sec (a block time).
Usage
The revokeOneAccess
method requires a grantedAccess
object as an input parameter. This object is retrieved from the getGrantedAccess
method.
const revokeAccess = await dataProtectorCore.revokeOneAccess({
apprestrict: '0xea...',
dataset: '0xA0C...',
datasetprice: '0',
requesterrestrict: '0xecb..',
salt: '0x0147...',
sign: '0xc22c1...',
tag: '0x0000000000000000000000000000000000000000000000000000000000000003',
volume: '1',
workerpoolrestrict: '0x000...',
});
Parameters
import { type GrantedAccess } from '@iexec/dataprotector';
grantedAccess Required *
Type: GrantedAccess
This is the complete granted access
object retrieved from an invocation of getGrantedAccess
.
const revokeAccess = await dataProtectorCore.revokeOneAccess({
apprestrict: '0xea...',
dataset: '0xA0C...',
datasetprice: '0',
requesterrestrict: '0xecb..',
salt: '0x0147...',
sign: '0xc22c1...',
tag: '0x0000000000000000000000000000000000000000000000000000000000000003',
volume: '1',
workerpoolrestrict: '0x000...',
});
WARNING
The tag must always be set to 0x0000000000000000000000000000000000000000000000000000000000000003
. This specific value indicates that the order is for a confidential asset (a protected data).
Result value
import { type RevokedAccess } from '@iexec/dataprotector';