Skip to content

Latest commit

 

History

History
453 lines (205 loc) · 6.33 KB

File metadata and controls

453 lines (205 loc) · 6.33 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(playerApps, dnaHash)

A utility function to compare conductors' integrated DhtOps.

cleanAllConductors()

Run the hc command to delete all conductor data.

createConductor(signalingServerUrl, options)

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

dhtSync(players, dnaHash, intervalMs, timeoutMs)

A utility function to wait until all conductors' DhtOps have been integrated, and are identical for a given 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.

getPlayerStorageArc(player, dnaHash)

A utility function to get the storage arc for a given player and dna hash.

getZomeCaller(cell, zomeName)

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

integratedOpsCount(player, cellId, targetIntegratedOpsCount, intervalMs, timeoutMs)

A utility function to wait until a player's integrated Ops count equals a desired count for a DNA

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.

storageArc(player, dnaHash, storageArc, intervalMs, timeoutMs)

A utility function to wait until a player's storage arc matches a desired storage arc for a DNA

Interfaces

Interface

Description

AgentApp

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

AppOptions

Optional arguments when installing a hApp.

AppWithOptions

ConductorCell

A Conductor and a CellId

ConductorOptions

Dna

DNA source and additional options.

NetworkConfig

Player

A player consists of a Conductor and an agent pub key.

PlayerApp

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.