1- import { isValidProvider } from '../../utils/validators.js' ;
1+ import { isValidSigner } from '../../utils/validators.js' ;
22import { IExecDataProtectorModule } from '../IExecDataProtectorModule.js' ;
33import {
44 GetGrantedAccessParams ,
@@ -23,11 +23,14 @@ import {
2323 WaitForTaskCompletionParams ,
2424 PrepareBulkRequestParams ,
2525 PrepareBulkRequestResponse ,
26+ InspectBulkRequestResponse ,
27+ InspectBulkRequestParams ,
2628} from '../types/index.js' ;
2729import { getGrantedAccess } from './getGrantedAccess.js' ;
2830import { getProtectedData } from './getProtectedData.js' ;
2931import { getResultFromCompletedTask } from './getResultFromCompletedTask.js' ;
3032import { grantAccess } from './grantAccess.js' ;
33+ import { inspectBulkRequest } from './inspectBulkRequest.js' ;
3134import { prepareBulkRequest } from './prepareBulkRequest.js' ;
3235import { processBulkRequest } from './processBulkRequest.js' ;
3336import { processProtectedData } from './processProtectedData.js' ;
@@ -42,7 +45,7 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
4245 args : ProtectDataParams
4346 ) : Promise < ProtectedDataWithSecretProps > {
4447 await this . init ( ) ;
45- await isValidProvider ( this . iexec ) ;
48+ await isValidSigner ( this . iexec ) ;
4649 return protectData ( {
4750 ...args ,
4851 dataprotectorContractAddress : this . dataprotectorContractAddress ,
@@ -55,33 +58,33 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
5558
5659 async grantAccess ( args : GrantAccessParams ) : Promise < GrantedAccess > {
5760 await this . init ( ) ;
58- await isValidProvider ( this . iexec ) ;
61+ await isValidSigner ( this . iexec ) ;
5962 return grantAccess ( { ...args , iexec : this . iexec } ) ;
6063 }
6164
6265 async revokeOneAccess ( args : GrantedAccess ) : Promise < RevokedAccess > {
6366 await this . init ( ) ;
64- await isValidProvider ( this . iexec ) ;
67+ await isValidSigner ( this . iexec ) ;
6568 return revokeOneAccess ( { ...args , iexec : this . iexec } ) ;
6669 }
6770
6871 async revokeAllAccess ( args : RevokeAllAccessParams ) : Promise < RevokedAccess [ ] > {
6972 await this . init ( ) ;
70- await isValidProvider ( this . iexec ) ;
73+ await isValidSigner ( this . iexec ) ;
7174 return revokeAllAccess ( { ...args , iexec : this . iexec } ) ;
7275 }
7376
7477 async transferOwnership ( args : TransferParams ) : Promise < TransferResponse > {
7578 await this . init ( ) ;
76- await isValidProvider ( this . iexec ) ;
79+ await isValidSigner ( this . iexec ) ;
7780 return transferOwnership ( { ...args , iexec : this . iexec } ) ;
7881 }
7982
8083 async processProtectedData < Params extends ProcessProtectedDataParams > (
8184 args : Params
8285 ) : Promise < ProcessProtectedDataResponse < Params > > {
8386 await this . init ( ) ;
84- await isValidProvider ( this . iexec ) ;
87+ await isValidSigner ( this . iexec ) ;
8588 return processProtectedData ( {
8689 ...args ,
8790 iexec : this . iexec ,
@@ -93,7 +96,7 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
9396 args : PrepareBulkRequestParams
9497 ) : Promise < PrepareBulkRequestResponse > {
9598 await this . init ( ) ;
96- await isValidProvider ( this . iexec ) ;
99+ await isValidSigner ( this . iexec ) ;
97100 return prepareBulkRequest ( {
98101 ...args ,
99102 iexec : this . iexec ,
@@ -104,7 +107,7 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
104107 args : Params
105108 ) : Promise < ProcessBulkRequestResponse < Params > > {
106109 await this . init ( ) ;
107- await isValidProvider ( this . iexec ) ;
110+ await isValidSigner ( this . iexec ) ;
108111 return processBulkRequest ( {
109112 ...args ,
110113 iexec : this . iexec ,
@@ -131,11 +134,22 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
131134 return getGrantedAccess ( { ...args , iexec : this . iexec } ) ;
132135 }
133136
137+ async inspectBulkRequest < Params extends InspectBulkRequestParams > (
138+ args : Params
139+ ) : Promise < InspectBulkRequestResponse < Params > > {
140+ await this . init ( ) ;
141+ return inspectBulkRequest ( {
142+ ...args ,
143+ iexec : this . iexec ,
144+ pocoSubgraphClient : this . pocoSubgraphClient ,
145+ defaultWorkerpool : this . defaultWorkerpool ,
146+ } ) ;
147+ }
148+
134149 async waitForTaskCompletion (
135150 args : WaitForTaskCompletionParams
136151 ) : Promise < WaitForTaskCompletionResponse > {
137152 await this . init ( ) ;
138- await isValidProvider ( this . iexec ) ;
139153 return waitForTaskCompletion ( {
140154 ...args ,
141155 iexec : this . iexec ,
@@ -146,7 +160,6 @@ class IExecDataProtectorCore extends IExecDataProtectorModule {
146160 args : GetResultFromCompletedTaskParams
147161 ) : Promise < GetResultFromCompletedTaskResponse > {
148162 await this . init ( ) ;
149- await isValidProvider ( this . iexec ) ;
150163 return getResultFromCompletedTask ( {
151164 ...args ,
152165 iexec : this . iexec ,
0 commit comments