Skip to content

Latest commit

 

History

History
144 lines (86 loc) · 3.12 KB

IExecSecretsModule.md

File metadata and controls

144 lines (86 loc) · 3.12 KB

iexec / Exports / IExecSecretsModule

Class: IExecSecretsModule

module exposing secrets methods

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IExecSecretsModule(configOrArgs, options?): IExecSecretsModule

Create an IExecModule instance

Parameters

Name Type
configOrArgs IExecConfig | IExecConfigArgs
options? IExecConfigOptions

Returns

IExecSecretsModule

Inherited from

IExecModule.constructor

Properties

config

config: IExecConfig

current IExecConfig

Inherited from

IExecModule.config

Methods

checkRequesterSecretExists

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);

Parameters

Name Type
requesterAddress string
secretName String
options? Object
options.teeFramework? TeeFramework

Returns

Promise<boolean>


pushRequesterSecret

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 specifying iexec_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);

Parameters

Name Type
secretName String
secretValue String
options? Object
options.teeFramework? TeeFramework

Returns

Promise<{ isPushed: boolean }>


fromConfig

fromConfig(config): IExecSecretsModule

Create an IExecSecretsModule instance using an IExecConfig instance

Parameters

Name Type
config IExecConfig

Returns

IExecSecretsModule

Overrides

IExecModule.fromConfig