iexec / IExecSecretsModule
module exposing secrets methods
new IExecSecretsModule(
configOrArgs,options?):IExecSecretsModule
Create an IExecModule instance
IExecSecretsModule
config:
IExecConfig
current IExecConfig
checkRequesterSecretExists(
requesterAddress,secretName,options?):Promise<boolean>
check if a named secret exists for the requester in the Secret Management Service
example:
const isSecretSet = await checkRequesterSecretExists(requesterAddress, "my-password");
console.log('secret "my-password" set:', isSecretSet);string
String
Promise<boolean>
pushRequesterSecret(
secretName,secretValue,options?):Promise<{isPushed:boolean; }>
SIGNER REQUIRED, ONLY REQUESTER
push a named secret to the Secret Management Service
NB:
- pushed secrets can be used in
teetasks by specifyingiexec_secretsin the requestorder params. - once pushed a secret can not be updated
example:
const { isPushed } = await pushRequesterSecret("my-password", "passw0rd");
console.log('pushed secret "my-password":', isPushed);String
String
Promise<{ isPushed: boolean; }>
staticfromConfig(config):IExecSecretsModule
Create an IExecSecretsModule instance using an IExecConfig instance
IExecSecretsModule