@holochain/client
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -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 @@ /** |
@@ -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 @@ }); |
{ | ||
"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(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102508
3312
175