Holochain / HoloNET
HoloNET is the OASIS .NET library for communicating with a Holochain conductor. The HoloOASIS provider wraps HoloNET to give the OASIS kernel full Holochain storage and retrieval.
HoloNET Overview
HoloNET manages the full lifecycle of a Holochain conductor connection:
- Starts the conductor process automatically on first connection (if configured to do so).
- Maintains a persistent WebSocket connection to the conductor's admin and app interfaces.
- Handles DNA installation, cell provisioning, and agent key management.
- Provides strongly-typed async/await wrappers for all zome calls.
- Shuts the conductor down cleanly on disposal — no manual process management needed.
HoloNET auto-manages conductor start and shutdown. Do not attempt to start or stop the Holochain conductor process manually alongside HoloNET — they will conflict. Use the existing TestHarness project for integration tests.
Configuration
Register the HoloOASIS provider in your ONODE startup, pointing at the conductor WebSocket URI:
var holoProvider = new HoloOASIS( holochainConductorUri: "ws://localhost:8888", holochainVersion: HolochainVersion.RSM ); OASISBootLoader.RegisterProvider(holoProvider);
In OASISDNA.json:
{
"HoloOASIS": {
"HolochainConductorURI": "ws://localhost:8888",
"HolochainVersion": "RSM",
"AutoStartConductor": true,
"HappPath": "./happs/oasis.happ"
}
}
Making Zome Calls
HoloNET exposes zome calls as strongly-typed async methods. You can call zomes directly from C# without going through the OASIS REST API:
var result = await holoNET.CallZomeFunctionAsync( zomeName: "oasis", zomeFunctionName: "save_avatar", paramsObject: avatarEntry ); if (result.IsError) throw new Exception(result.Message);
DNA Configuration
The OASIS Holochain DNA (oasis.happ) ships with the OASIS2 repo under NextGenSoftware.OASIS.API.Providers.HoloOASIS/hApps/. It defines the following zomes:
oasis— avatar, holon, karma CRUDoasis_search— full-text and field index searchoasis_links— holonic parent/child relationship management
Integration Testing
Use the NextGenSoftware.OASIS.API.Providers.HoloOASIS.TestHarness project for live conductor tests. It handles conductor startup, DNA installation, and teardown automatically — no manual setup required.
cd NextGenSoftware.OASIS.API.Providers.HoloOASIS.TestHarness dotnet run