import { AdminWebsocket, AgentPubKey, AppBundleSource, AppSignalCb, AppWebsocket, CallZomeRequest, CapSecret, DnaSource, InstalledCell, MembraneProof, RoleId } from "@holochain/client"; /** * The zome request options adapted to a specific cell. * * @public */ export declare type CellZomeCallRequest = Omit & { cap_secret?: CapSecret; provenance?: AgentPubKey; payload?: unknown; }; /** * The function for calling a zome from a specific cell. * * @public */ export declare type CallZomeFn = (request: CellZomeCallRequest) => Promise; /** * Extends an installed cell by a function to call a zome. * * @public */ export interface CallableCell extends InstalledCell { callZome: CallZomeFn; } /** * Provides direct access to cells of a hApp and the agent key. * * @public */ export interface AgentHapp { happId: string; agentPubKey: Uint8Array; cells: CallableCell[]; namedCells: Map; } /** * Combines an agent hApp with the conductor they belong to. * * @public */ export interface IPlayer extends AgentHapp { conductor: IConductor; } /** * Optional arguments when installing a hApp bundle. * * @public */ export interface HappBundleOptions { agentPubKey?: AgentPubKey; installedAppId?: string; uid?: string; membraneProofs?: Record; } /** * Base interface of a Tryorama conductor. Both {@link Conductor} and * {@link TryCpConductor} implement this interface. * * @public */ export interface IConductor { startUp: () => Promise; shutDown: () => Promise; connectAppInterface(signalHandler?: AppSignalCb): void; adminWs: () => Omit; appWs: () => Pick; installAgentsHapps: (options: { agentsDnas: DnaSource[][]; uid?: string; signalHandler?: AppSignalCb; }) => Promise; } /** * A type that specifies either only the DNAs that the hApp to be installed * consists of, or the DNAs and a signal handler to be registered. * * @public */ export declare type AgentHappOptions = DnaSource[] | { dnas: DnaSource[]; signalHandler?: AppSignalCb; }; /** * Base interface of a Tryorama test scenario. Both {@link Scenario} and * {@link TryCpScenario} implement this interface. * * @public */ export interface IScenario { addConductor(signalHandler?: AppSignalCb): Promise; addPlayerWithHapp(agentHappOptions: AgentHappOptions): Promise; addPlayersWithHapps(agentHappOptions: AgentHappOptions[]): Promise; addPlayerWithHappBundle(appBundleSource: AppBundleSource, options?: HappBundleOptions & { signalHandler?: AppSignalCb; }): Promise; addPlayersWithHappBundles(playersHappBundles: Array<{ appBundleSource: AppBundleSource; options?: HappBundleOptions & { signalHandler?: AppSignalCb; }; }>): Promise; shareAllAgents(conductors: IConductor[]): Promise; shutDown(): Promise; cleanUp(): Promise; }