Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@holochain/client

Package Overview
Dependencies
Maintainers
13
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holochain/client - npm Package Compare versions

Comparing version 0.16.0 to 0.16.1

21

lib/api/admin/types.d.ts

@@ -385,8 +385,29 @@ import { Action, DhtOp, Entry, ZomeCallCapGrant } from "../../hdk/index.js";

export type InstallAppRequest = {
/**
* The agent to use when creating Cells for this App.
*/
agent_key: AgentPubKey;
/**
* The unique identifier for an installed app in this conductor.
* If not specified, it will be derived from the app name in the bundle manifest.
*/
installed_app_id?: InstalledAppId;
/**
* Include proof-of-membrane-membership data for cells that require it,
* keyed by the CellNick specified in the app bundle manifest.
*/
membrane_proofs: {
[key: string]: MembraneProof;
};
/**
* Optional global network seed override. If set will override the network seed value for all
* DNAs in the bundle.
*/
network_seed?: NetworkSeed;
/**
* Optional: If app installation fails due to genesis failure, normally the app will be immediately uninstalled.
* When this flag is set, the app is left installed with empty cells intact. This can be useful for
* using graft_records_onto_source_chain, or for diagnostics.
*/
ignore_genesis_failure?: boolean;
} & AppBundleSource;

@@ -393,0 +414,0 @@ /**

5

lib/api/app-agent/websocket.js

@@ -26,4 +26,5 @@ import Emittery from "emittery";

const to_bind = this.emitter[name];
if (typeof to_bind === 'function') {
this.emitter[name] = to_bind.bind(this.emitter);
if (typeof to_bind === "function") {
this.emitter[name] =
to_bind.bind(this.emitter);
}

@@ -30,0 +31,0 @@ });

2

package.json
{
"name": "@holochain/client",
"version": "0.16.0",
"version": "0.16.1",
"description": "A JavaScript client for the Holochain Conductor API",

@@ -5,0 +5,0 @@ "author": "Holochain Foundation <info@holochain.org> (http://holochain.org)",

@@ -33,3 +33,3 @@ [![Project](https://img.shields.io/badge/Project-Holochain-blue.svg?style=flat-square)](http://holochain.org/)

```typescript
import { AdminWebsocket, AppAgentWebsocket, CellType } from "@holochain/client";
import { ActionHash, AdminWebsocket, AppAgentWebsocket, CellType } from "@holochain/client";

@@ -58,22 +58,12 @@ const adminWs = await AdminWebsocket.connect("ws://127.0.0.1:65000");

let signalCb;
const signalReceived = new Promise<void>((resolve) => {
signalCb = (signal) => {
console.log("signal received", signal);
// act on signal
resolve();
};
});
const zomeCallPayload: CallZomeRequest = {
cell_id,
zome_name: "zome_name",
fn_name: "create_entry",
provenance: agent_key,
payload: "some_content",
};
appAgentWs.on("signal", signalCb);
const response: ActionHash = await appAgentWs.callZome(zomeCallPayload, 30000);
// trigger an emit_signal
await appAgentWs.callZome({
role_name,
zome_name: "zome",
fn_name: "emitter",
payload: null,
});
await signalReceived;
await appAgentWs.appWebsocket.client.close();

@@ -80,0 +70,0 @@ await adminWs.client.close();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc