
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@holochain/client
Advanced tools
A JavaScript client for the Holochain Conductor API (works with browsers as well as Nodejs).
Holochain's Conductor API is under active development. This client package tracks that development fairly closely but sometimes gets behind.
To install from NPM, run
npm install --save-exact @holochain/client
This code is still under alpha development and npm releases are pre-releases with
dev
tags meaning they will not use full semantic versioning, and you may wish to lock to an exact version of the library for that reason, as shown in the above command.
const admin = await AdminWebsocket.connect(`ws://localhost:8000`, TIMEOUT)
await admin.generateAgentPubKey()
const signalCb = (signal: AppSignal) => {
// impl...
resolve()
}
const TIMEOUT = 12000
// default timeout is set to 12000
const client = await AppWebsocket.connect(`ws://localhost:${appPort}`, 12000, signalCb)
// default timeout set here (30000) will overwrite the defaultTimeout(12000) set above
await client.callZome({
cap: null,
cell_id,
zome_name: "test_zome",
fn_name: 'test_emitter_fn',
provenance: fakeAgentPubKey('TODO'),
payload: null,
}, 30000)
const signalCb = (signal: AppSignal) => {
// impl...
resolve()
}
const TIMEOUT = 12000
// default timeout is set to 12000
const appWs = await AppWebsocket.connect(`ws://localhost:${appPort}`, 12000, signalCb)
const client = new AppAgentWebsocket(appWs, 'installed_app_id')
// default timeout set here (30000) will overwrite the defaultTimeout(12000) set above
await client.callZome({
cap: null,
role_name: 'dnas_role_name', // role_name is unique per app, so you can unambiguously identify your dna with role_name in this client,
zome_name: "test_zome",
fn_name: 'test_emitter_fn',
provenance: fakeAgentPubKey('TODO'),
payload: null,
}, 30000)
See docs/API.md
See default.nix for the Holochain version this package is compatible with.
If updating the Holochain version included in holonix, please use niv update
as explained in the
Holochain Installation Guide.
You need a version (stable
toolchain) of Rust available.
You need holochain
and hc
on your path, best to get them from nix with nix-shell
.
To perform the pre-requisite DNA compilation steps, and run the Nodejs test, run:
nix-shell
./run-test.sh
Holochain is an open source project. We welcome all sorts of participation and are actively working on increasing surface area to accept it. Please see our contribution guidelines for our general practices and protocols on participating in the community, as well as specific expectations around things like code formatting, testing practices, continuous integration, etc.
Copyright (C) 2020-2022, Holochain Foundation
This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2022-12-14: v0.10.4
window.__HC_LAUNCHER_ENV__
.FAQs
A JavaScript client for the Holochain Conductor API
The npm package @holochain/client receives a total of 1,135 weekly downloads. As such, @holochain/client popularity was classified as popular.
We found that @holochain/client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.