electron-holochain
Holochain Revision: v0.0.126 Feb 11, 2022
Lair Keystore Revision: v0.0.9 Nov 4, 2021
Expects an HAPP built with HDK v0.0.122
manage holochain processes during an electron application runtime, using holochain-runner binaries.
import {app} from 'electron'
import initAgent, {
StateSignal,
StatusUpdates,
STATUS_EVENT,
APP_PORT_EVENT,
HolochainRunnerOptions,
PathOptions
} from 'electron-holochain'
const runnerOptions: HolochainRunnerOptions = {
happPath: 'pathtomyhapp.happ',
}
const { statusEmitter, shutdown } = await initAgent(app, runnerOptions)
statusEmitter.on(STATUS_EVENT, (status: StateSignal) => {
})
statusEmitter.on(APP_PORT_EVENT, (appPort: string) => {
}
await shutdown()