Skip to content

Latest commit

 

History

History
147 lines (79 loc) · 2.49 KB

File metadata and controls

147 lines (79 loc) · 2.49 KB

iexec


iexec / IExecSecretsModule

Class: IExecSecretsModule

module exposing secrets methods

Extends

Constructors

Constructor

new IExecSecretsModule(configOrArgs, options?): IExecSecretsModule

Create an IExecModule instance

Parameters

configOrArgs

IExecConfigArgs | IExecConfig

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

requesterAddress

string

secretName

String

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

secretName

String

secretValue

String

options?
teeFramework?

TeeFramework

Returns

Promise<{ isPushed: boolean; }>


fromConfig()

static fromConfig(config): IExecSecretsModule

Create an IExecSecretsModule instance using an IExecConfig instance

Parameters

config

IExecConfig

Returns

IExecSecretsModule

Overrides

IExecModule.fromConfig