Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@holochain/client

Package Overview
Dependencies
3
Maintainers
12
Versions
3
Issues
File Explorer

Advanced tools

@holochain/client

A Nodejs client for the Holochain conductor API

    0.3.2latest

Version published
Maintainers
12
Yearly downloads
3,744

Weekly downloads

Changelog

Source

2022-01-20: v0.3.2

Added

  • ES module support

Readme

Source

Holochain Client - JavaScript

Project Forum License: CAL 1.0 Test

Twitter Follow

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.

Installation

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.

Sample usage

Use AdminWebsocket

const admin = await AdminWebsocket.connect(`ws://localhost:8000`, TIMEOUT) await admin.generateAgentPubKey()

Use AppWebsocket

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)

API Reference

See docs/API.md

Holochain Compatibility

This version of @holochain/client is currently working with

If updating this code, please make changes to the git rev/sha above. (You can get this from hn-introspect after updating the holonix-hash)

Running tests

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

Contribute

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.

  • Connect with us on our forum

License

License: CAL 1.0

Copyright (C) 2020-2021, 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.

Keywords

FAQs

What is @holochain/client?

A Nodejs client for the Holochain conductor API

Is @holochain/client popular?

The npm package @holochain/client receives a total of 121 weekly downloads. As such, @holochain/client popularity was classified as not popular.

Is @holochain/client well maintained?

We found that @holochain/client demonstrated a healthy version release cadence and project activity. It has 12 open source maintainers collaborating on the project.

Last updated on 20 Jan 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc