iexec / IExecStorageModule
module exposing storage methods
new IExecStorageModule(
configOrArgs,options?):IExecStorageModule
Create an IExecModule instance
IExecStorageModule
config:
IExecConfig
current IExecConfig
checkStorageTokenExists(
beneficiaryAddress,storageProvider):Promise<boolean>
check if a storage access token exists for the beneficiary in the Secret Management Service
NB: currently only 'dropbox' storage provider authentication is supported.
example:
const isStorageInitialized = await checkStorageTokenExists(userAddress, 'dropbox');
console.log('Dropbox storage initialized:', isStorageInitialized);string
string
Promise<boolean>
pushStorageToken(
token,storageProvider,options?):Promise<{isPushed:boolean;isUpdated:boolean; }>
SIGNER REQUIRED, ONLY BENEFICIARY
push a storage access token to the Secret Management Service to allow result archive upload supported storage provider 'dropbox'.
NB:
- currently only 'dropbox' storage provider authentication is supported.
- this method will throw an error if a token already exists for the target storage provider in the Secret Management Service unless the option
forceUpdate: trueis used.
example:
- init Dropbox storage
const { isPushed } = await pushStorageToken(dropboxApiToken, 'dropbox');
console.log('Dropbox storage initialized:', isPushed);string
string
boolean
Promise<{ isPushed: boolean; isUpdated: boolean; }>
staticfromConfig(config):IExecStorageModule
Create an IExecStorageModule instance using an IExecConfig instance
IExecStorageModule