iexec / Exports / IExecSecretsModule
module exposing secrets methods
-
↳
IExecSecretsModule
• new IExecSecretsModule(configOrArgs
, options?
): IExecSecretsModule
Create an IExecModule instance
Name | Type |
---|---|
configOrArgs |
IExecConfig | IExecConfigArgs |
options? |
IExecConfigOptions |
• 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);
Name | Type |
---|---|
requesterAddress |
string |
secretName |
String |
options? |
Object |
options.teeFramework? |
TeeFramework |
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
tee
tasks by specifyingiexec_secrets
in 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);
Name | Type |
---|---|
secretName |
String |
secretValue |
String |
options? |
Object |
options.teeFramework? |
TeeFramework |
Promise
<{ isPushed
: boolean
}>
▸ fromConfig(config
): IExecSecretsModule
Create an IExecSecretsModule instance using an IExecConfig instance
Name | Type |
---|---|
config |
IExecConfig |