JS API Reference

Class: Script

activity/script/script.Script

Represents a series of Commands that can be sent to exe-unit via yagna's API

Table of contents

Constructors

Methods

Constructors

constructor

new Script(commands?): Script

Parameters

NameTypeDefault value
commandsCommand<unknown>[][]

Returns

Script

Defined in

src/activity/script/script.ts:10

Methods

create

create(commands?): Script

Parameters

NameType
commands?Command<unknown>[]

Returns

Script

Defined in

src/activity/script/script.ts:12


add

add(command): void

Parameters

NameType
commandCommand<unknown>

Returns

void

Defined in

src/activity/script/script.ts:16


before

before(): Promise<void>

Returns

Promise<void>

Defined in

src/activity/script/script.ts:20


after

after(results): Promise<Result<any>[]>

Parameters

NameType
resultsResult<any>[]

Returns

Promise<Result<any>[]>

Defined in

src/activity/script/script.ts:24


getExeScriptRequest

getExeScriptRequest(): ExeScriptRequest

Returns

ExeScriptRequest

Defined in

src/activity/script/script.ts:29