electron-holochain
Holochain Revision: v0.0.149 July 10, 2022
Lair Keystore Revision: v0.2.0 June 20, 2022
Expects an HAPP built with HDK v0.0.142 and HDI v0.0.14
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,
ElectronHolochainOptions,
PathOptions
} from 'electron-holochain'
const runnerOptions: HolochainRunnerOptions = {
happPath: 'pathtomyhapp.happ',
keystorePath: string
passphrase: string
}
const { statusEmitter, shutdown } = await initAgent(app, runnerOptions)
statusEmitter.on(STATUS_EVENT, (status: StateSignal) => {
})
statusEmitter.on(APP_PORT_EVENT, (appPort: string) => {
}
await shutdown()