Socket
Socket
Sign inDemoInstall

@holochain/client

Package Overview
Dependencies
Maintainers
13
Versions
91
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.11.14 to 0.11.15

27

lib/api/admin/types.d.ts

@@ -84,7 +84,16 @@ /// <reference types="node" />

*/
export interface Cell {
export interface ProvisionedCell {
cell_id: CellId;
clone_id?: RoleName;
dna_modifiers: DnaModifiers;
name: string;
}
/**
* @public
*/
export interface ClonedCell {
cell_id: CellId;
clone_id: RoleName;
original_dna_hash: DnaHash;
dna_modifiers: DnaModifiers;
name: string;
enabled: boolean;

@@ -96,5 +105,5 @@ }

export declare enum CellType {
Provisioned = "Provisioned",
Cloned = "Cloned",
Stem = "Stem"
Provisioned = "provisioned",
Cloned = "cloned",
Stem = "stem"
}

@@ -105,5 +114,5 @@ /**

export declare type CellInfo = {
[CellType.Provisioned]: Cell;
[CellType.Provisioned]: ProvisionedCell;
} | {
[CellType.Cloned]: Cell;
[CellType.Cloned]: ClonedCell;
} | {

@@ -116,2 +125,3 @@ [CellType.Stem]: StemCell;

export declare type AppInfo = {
agent_pub_key: AgentPubKey;
installed_app_id: InstalledAppId;

@@ -252,3 +262,3 @@ cell_info: Record<RoleName, Array<CellInfo>>;

*/
export declare type ResourceBytes = number[];
export declare type ResourceBytes = Uint8Array;
/**

@@ -629,3 +639,2 @@ * @public

disableApp: Requester<DisableAppRequest, DisableAppResponse>;
startApp: Requester<StartAppRequest, StartAppResponse>;
dumpState: Requester<DumpStateRequest, DumpStateResponse>;

@@ -632,0 +641,0 @@ dumpFullState: Requester<DumpFullStateRequest, DumpFullStateResponse>;

@@ -6,5 +6,5 @@ /**

(function (CellType) {
CellType["Provisioned"] = "Provisioned";
CellType["Cloned"] = "Cloned";
CellType["Stem"] = "Stem";
CellType["Provisioned"] = "provisioned";
CellType["Cloned"] = "cloned";
CellType["Stem"] = "stem";
})(CellType || (CellType = {}));

@@ -11,0 +11,0 @@ /**

@@ -5,3 +5,3 @@ import { CapSecret, GrantedFunctions } from "../../hdk/capabilities.js";

import { Requester, Transformer } from "../common.js";
import { AddAgentInfoRequest, AddAgentInfoResponse, AdminApi, AgentInfoRequest, AgentInfoResponse, AttachAppInterfaceRequest, AttachAppInterfaceResponse, DeleteCloneCellRequest, DeleteCloneCellResponse, DisableAppRequest, DisableAppResponse, DumpFullStateRequest, DumpFullStateResponse, DumpStateRequest, DumpStateResponse, EnableAppRequest, EnableAppResponse, GenerateAgentPubKeyRequest, GenerateAgentPubKeyResponse, GetDnaDefinitionRequest, GetDnaDefinitionResponse, GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse, InstallAppRequest, InstallAppResponse, ListAppInterfacesRequest, ListAppInterfacesResponse, ListAppsRequest, ListAppsResponse, ListCellIdsRequest, ListCellIdsResponse, ListDnasRequest, ListDnasResponse, RegisterDnaRequest, RegisterDnaResponse, StartAppRequest, StartAppResponse, UninstallAppRequest, UninstallAppResponse } from "./types.js";
import { AddAgentInfoRequest, AddAgentInfoResponse, AdminApi, AgentInfoRequest, AgentInfoResponse, AttachAppInterfaceRequest, AttachAppInterfaceResponse, DeleteCloneCellRequest, DeleteCloneCellResponse, DisableAppRequest, DisableAppResponse, DumpFullStateRequest, DumpFullStateResponse, DumpStateRequest, DumpStateResponse, EnableAppRequest, EnableAppResponse, GenerateAgentPubKeyRequest, GenerateAgentPubKeyResponse, GetDnaDefinitionRequest, GetDnaDefinitionResponse, GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse, InstallAppRequest, InstallAppResponse, ListAppInterfacesRequest, ListAppInterfacesResponse, ListAppsRequest, ListAppsResponse, ListCellIdsRequest, ListCellIdsResponse, ListDnasRequest, ListDnasResponse, RegisterDnaRequest, RegisterDnaResponse, UninstallAppRequest, UninstallAppResponse } from "./types.js";
/**

@@ -44,6 +44,2 @@ * A class for interacting with a conductor's Admin API.

/**
* Start an app.
*/
startApp: Requester<StartAppRequest, StartAppResponse>;
/**
* Dump the state of the specified cell, including its source chain, as JSON.

@@ -50,0 +46,0 @@ */

@@ -58,6 +58,2 @@ import { getLauncherEnvironment } from "../../environments/launcher.js";

/**
* Start an app.
*/
startApp = this._requester("start_app");
/**
* Dump the state of the specified cell, including its source chain, as JSON.

@@ -64,0 +60,0 @@ */

@@ -12,6 +12,6 @@ import Emittery from "emittery";

if (CellType.Provisioned in cell) {
return cell.Provisioned.cell_id[1];
return cell[CellType.Provisioned].cell_id[1];
}
else if (CellType.Cloned in cell) {
return cell.Cloned.cell_id[1];
return cell[CellType.Cloned].cell_id[1];
}

@@ -89,7 +89,7 @@ }

}
const cloneCell = appInfo.cell_info[baseRoleName].find((c) => CellType.Cloned in c && c.Cloned.clone_id === roleName);
const cloneCell = appInfo.cell_info[baseRoleName].find((c) => CellType.Cloned in c && c[CellType.Cloned].clone_id === roleName);
if (!cloneCell || !(CellType.Cloned in cloneCell)) {
throw new Error(`No clone cell found with clone id ${roleName}`);
}
return cloneCell.Cloned.cell_id;
return cloneCell[CellType.Cloned].cell_id;
}

@@ -96,0 +96,0 @@ if (!(roleName in appInfo.cell_info)) {

@@ -1,3 +0,3 @@

import { AgentPubKey, CellId, DnaHash, DnaProperties, InstalledAppId, InstalledCell, NetworkInfo, RoleName, Timestamp } from "../../types.js";
import { AppInfo, FunctionName, MembraneProof, NetworkSeed, ZomeName } from "../admin/index.js";
import { AgentPubKey, CellId, DnaHash, DnaProperties, InstalledAppId, NetworkInfo, RoleName, Timestamp } from "../../types.js";
import { AppInfo, ClonedCell, FunctionName, MembraneProof, NetworkSeed, ZomeName } from "../admin/index.js";
import { Requester } from "../common.js";

@@ -86,3 +86,3 @@ /**

*/
export declare type CreateCloneCellResponse = InstalledCell;
export declare type CreateCloneCellResponse = ClonedCell;
/**

@@ -89,0 +89,0 @@ * @public

{
"name": "@holochain/client",
"version": "0.11.14",
"version": "0.11.15",
"description": "A JavaScript client for the Holochain Conductor API",

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

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

## API Reference
[Complete API reference](./docs/client.md)

@@ -25,8 +27,2 @@

### Use AdminWebsocket
```typescript
const admin = await AdminWebsocket.connect(`ws://127.0.0.1:8000`, TIMEOUT)
const agentPubKey = await admin.generateAgentPubKey()
```
### Use AppAgentWebsocket with implicit zome call signing

@@ -105,7 +101,2 @@ ```typescript

## API Reference
See [docs/API.md](docs/API.md)
# Holochain Compatibility

@@ -116,3 +107,3 @@

If updating the Holochain version included in holonix, please use `niv update` as explained in the
[Holochain Installation Guide](https://developer.holochain.org/install/#upgrading-the-holochain-version).
[Holochain Installation Guide](https://developer.holochain.org/install-advanced/#upgrading-the-holochain-version).

@@ -119,0 +110,0 @@ ## Running tests

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