import { ScenarioApi } from "./api"; import * as t from "io-ts"; import { Conductor } from "./conductor"; import { Player } from "./player"; export declare const decodeOrThrow: (validator: any, value: any) => any; export declare type ObjectN = { [name: number]: V; }; export declare type ObjectS = { [name: string]: V; }; export declare type SpawnConductorFn = (player: Player, args: any) => Promise; export declare type ScenarioFn = (s: ScenarioApi) => Promise; export declare type IntermediateConfig = RawConductorConfig; export declare type ConfigSeed = (args: ConfigSeedArgs) => Promise; export declare type ConfigSeedArgs = { playerName: string; uuid: string; configDir: string; adminPort: number; zomePort: number; }; export declare type AnyConfigBuilder = ConfigSeed | EitherInstancesConfig; export declare type PlayerConfigs = ObjectS; export declare type MachineConfigs = ObjectS; export declare const adminWsUrl: ({ urlBase, adminPort }: { urlBase: any; adminPort: any; }) => string; export declare const zomeWsUrl: ({ urlBase, zomePort }: { urlBase: any; zomePort: any; }) => string; /** "F or T" */ export declare type Fort = T | ((ConfigSeedArgs: any) => T); export declare const collapseFort: (fort: Fort, args: ConfigSeedArgs) => T; export declare const AgentConfigV: t.IntersectionC<[t.TypeC<{ id: t.StringC; name: t.StringC; keystore_file: t.StringC; public_address: t.StringC; }>, t.PartialC<{ test_agent: t.BooleanC; }>]>; export declare type AgentConfig = t.TypeOf; export declare const DnaConfigV: t.IntersectionC<[t.TypeC<{ id: t.StringC; file: t.StringC; }>, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>; export declare type DnaConfig = t.TypeOf; export declare const RawInstanceConfigV: t.TypeC<{ id: t.StringC; agent: t.StringC; dna: t.StringC; }>; export declare type RawInstanceConfig = t.TypeOf; export declare const DryInstanceConfigV: t.TypeC<{ id: t.StringC; agent: t.IntersectionC<[t.TypeC<{ id: t.StringC; name: t.StringC; keystore_file: t.StringC; public_address: t.StringC; }>, t.PartialC<{ test_agent: t.BooleanC; }>]>; dna: t.IntersectionC<[t.TypeC<{ id: t.StringC; file: t.StringC; }>, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>; }>; export declare type DryInstanceConfig = t.TypeOf; export declare const BridgeConfigV: t.TypeC<{ handle: t.StringC; caller_id: t.StringC; callee_id: t.StringC; }>; export declare type BridgeConfig = t.TypeOf; export declare const DpkiConfigV: t.TypeC<{ instance_id: t.StringC; init_params: t.StringC; }>; export declare type DpkiConfig = t.TypeOf; export declare const NetworkModeV: t.UnionC<[t.LiteralC<"n3h">, t.LiteralC<"memory">, t.LiteralC<"websocket">]>; export declare type NetworkMode = t.TypeOf; export declare const RawNetworkConfigV: t.RecordC; export declare type RawNetworkConfig = t.TypeOf; export declare const NetworkConfigV: t.UnionC<[t.UnionC<[t.LiteralC<"n3h">, t.LiteralC<"memory">, t.LiteralC<"websocket">]>, t.RecordC]>; export declare type NetworkConfig = t.TypeOf; export declare const RawLoggerConfigV: t.RecordC; export declare type RawLoggerConfig = t.TypeOf; export declare const LoggerConfigV: t.UnionC<[t.BooleanC, t.RecordC]>; export declare type LoggerConfig = t.TypeOf; export declare const ConductorConfigCommonV: t.PartialC<{ bridges: t.ArrayC>; dpki: t.TypeC<{ instance_id: t.StringC; init_params: t.StringC; }>; network: t.RecordC; logger: t.RecordC; }>; export declare type ConductorConfigCommon = t.TypeOf; /** Base representation of a Conductor */ export declare const DryInstancesConfigV: t.ArrayC, t.PartialC<{ test_agent: t.BooleanC; }>]>; dna: t.IntersectionC<[t.TypeC<{ id: t.StringC; file: t.StringC; }>, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>; }>>; export declare type DryInstancesConfig = t.TypeOf; /** Shorthand representation of a Conductor, * where keys of `instance` are used as instance IDs as well as agent IDs */ export declare const SugaredInstancesConfigV: t.RecordC, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>>; export declare type SugaredInstancesConfig = t.TypeOf; /** For situations where we can accept either flavor of config */ export declare const EitherInstancesConfigV: t.UnionC<[t.ArrayC, t.PartialC<{ test_agent: t.BooleanC; }>]>; dna: t.IntersectionC<[t.TypeC<{ id: t.StringC; file: t.StringC; }>, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>; }>>, t.RecordC, t.PartialC<{ hash: t.StringC; uuid: t.StringC; }>]>>]>; export declare type EitherInstancesConfig = t.TypeOf; declare type RawInterfaceConfig = any; export interface RawConductorConfig { agents: Array; dnas: Array; instances: Array; interfaces: Array; bridges: Array; dpki?: DpkiConfig; network?: RawNetworkConfig; logger?: RawLoggerConfig; } export declare type KillFn = (signal?: string) => Promise; export {};