revokeOneAccess
This method allows revoking a specific access authorization from an iApp
entity. The input parameter for this method is sourced from the getGrantedAccess method, which provides a list of all authorizations on single iApp
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 iapp.revokeOneAccess({
app: '0xea...',
appprice: '0',
volume: '1',
tag: '0x0000000000000000000000000000000000000000000000000000000000000003',
datasetrestrict: '0xA0C...',
workerpoolrestrict: '0x000...',
requesterrestrict: '0xecb..',
salt: '0x0147...',
sign: '0xc22c1...',
remainingAccess: 1,
});
Parameters
import { type GrantedAccess } from '@mage-sombre/iapp';
grantedAccess Required *
Type: GrantedAccess
This is the complete granted access
object retrieved from an invocation of getGrantedAccess
for an iApp.
const revokeAccess = await iapp.revokeOneAccess({
app: '0xea...',
appprice: '0',
volume: '1',
tag: '0x0000000000000000000000000000000000000000000000000000000000000003',
datasetrestrict: '0xA0C...',
workerpoolrestrict: '0x000...',
requesterrestrict: '0xecb..',
salt: '0x0147...',
sign: '0xc22c1...',
remainingAccess: 1,
});
WARNING
The tag must always be set to 0x0000000000000000000000000000000000000000000000000000000000000003
. This specific value indicates that the order is for a confidential asset (an iApp).
Result Value
import { type RevokedAccess } from '@mage-sombre/iapp';