Class

Agent

Agent(opts) → {Agent}

The Agent module responsible for loading and running tapes.

Constructor

# new Agent(opts) → {Agent}

Creates an Agent instance.

Parameters:
Name Type Description
opts Object

Configuration options

View Source operate/agent.js, line 20

Agent

Methods

# async loadTape(txid, opts) → {Promise(Tape)}

Loads a tape from the given txid.

Fetches the tape transaction output as well as all of the required functions, and returns a Promise.

Parameters:
Name Type Description
txid String

Transaction id

opts Object

Options

View Source operate/agent.js, line 37

Promise(Tape)

# async loadTapesBy(query, opts) → {Promise(Array)}

Loads a tape from the given query.

The expected format of the query will depend on the Adapter in use. The transactions as well as all required functions are loaded and a Promise is returned resolving in a list of Tapes.

Parameters:
Name Type Description
query Object

Query object

opts Object

Options

View Source operate/agent.js, line 62

Promise(Array)

# async runTape(tape) → {Promise(any)}

Runs the given tape executing each of the tape's cells and returns a tape.

Parameters:
Name Type Description
tape Tape

Tape instance

View Source operate/agent.js, line 80

Promise(any)