Skip to content

Files

Latest commit

0847cb5 · Apr 9, 2025

History

History
411 lines (187 loc) · 5.67 KB

tryorama.md

File metadata and controls

411 lines (187 loc) · 5.67 KB

Home > @holochain/tryorama

tryorama package

Tryorama

Tools for managing Holochain Conductors.

Classes

Class

Description

Conductor

A class to manage a conductor running on localhost.

Scenario

An abstraction of a test scenario to write tests against Holochain hApps, running on a local conductor.

Functions

Function

Description

addAllAgentsToAllConductors(conductors)

Add all agents of all conductors to each other. Shortcuts peer discovery through a bootstrap server or gossiping.

areConductorCellsDhtsSynced(conductorCells)

A utility function to compare conductors' integrated DhtOps.

areDhtsSynced(players, dnaHash)

A utility function to compare conductors' integrated DhtOps.

cleanAllConductors()

Run the hc command to delete all conductor data.

conductorCellsDhtSync(conductorCells, interval, timeout)

A utility function to wait until all conductors' integrated DhtOps are identical for a DNA.

createConductor(signalingServerUrl, options)

The function to create a conductor. It starts a sandbox conductor via the Holochain CLI.

dhtSync(players, dnaHash, interval, timeout)

A utility function to wait until all conductors' integrated DhtOps are identical for a DNA.

enableAndGetAgentApp(adminWs, appWs, appInfo)

Enable an app and build an agent app object.

getCallableCell(appWs, cell)

Create curried version of callZome function for a specific cell.

getZomeCaller(cell, zomeName)

Get a shorthand function to call a cell's zome.

pause(milliseconds)

A utility function to wait the given amount of time.

runLocalServices()

Spawn bootstrap and signalling server to enable peer discovery and connections between peers.

runScenario(testScenario, cleanUp, options)

A wrapper function to create and run a scenario. A scenario is created and all involved conductors are shut down and cleaned up after running.

stopLocalServices(localServicesProcess)

Shutdown signalling server process.

Interfaces

Interface

Description

AgentApp

Provides direct access to cells of an app and the agent key.

AppOptions

Optional arguments when installing a hApp.

ConductorCell

A Conductor and a CellId

ConductorOptions

Dna

DNA source and additional options.

NetworkConfig

Player

A player tied to a Conductor.

ScenarioOptions

Options when creating a scenario.

Variables

Variable

Description

CONDUCTOR_CONFIG

Type Aliases

Type Alias

Description

AgentsAppsOptions

An app and an optional agent pub key for each agent. Optionally a network seed to be used for DNA installation.

CallableCell

Extends an installed cell by a function to call a zome.

CallZomeFn

The function for calling a zome from a specific cell.

CellZomeCallRequest

The zome request options adapted to a specific cell.

CreateConductorOptions

Options for using the conductor factory.