@holochain/client 0.18.0-dev.10 → 0.18.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/admin/types.d.ts +5 -2
- package/lib/api/app/types.d.ts +1 -1
- package/lib/utils/cell.d.ts +11 -0
- package/lib/utils/cell.js +17 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/package.json +1 -1
package/lib/api/admin/types.d.ts
CHANGED
|
@@ -398,8 +398,11 @@ export type NetworkSeed = string;
|
|
|
398
398
|
export type InstallAppRequest = {
|
|
399
399
|
/**
|
|
400
400
|
* The agent to use when creating Cells for this App.
|
|
401
|
+
* If not specified, a new agent will be generated by Holochain.
|
|
402
|
+
* If DPKI is enabled (default), and the agent key is not specified here,
|
|
403
|
+
* a new agent key will be derived from the DPKI device seed and registered with DPKI.
|
|
401
404
|
*/
|
|
402
|
-
agent_key
|
|
405
|
+
agent_key?: AgentPubKey;
|
|
403
406
|
/**
|
|
404
407
|
* The unique identifier for an installed app in this conductor.
|
|
405
408
|
* If not specified, it will be derived from the app name in the bundle manifest.
|
|
@@ -523,7 +526,7 @@ export interface DeleteCloneCellRequest {
|
|
|
523
526
|
/**
|
|
524
527
|
* The clone id or cell id of the clone cell
|
|
525
528
|
*/
|
|
526
|
-
clone_cell_id: RoleName |
|
|
529
|
+
clone_cell_id: RoleName | DnaHash;
|
|
527
530
|
}
|
|
528
531
|
/**
|
|
529
532
|
* @public
|
package/lib/api/app/types.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CellId } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Check if two cell ids are identical.
|
|
4
|
+
*
|
|
5
|
+
* @param cellId1 - Cell id 1 to compare.
|
|
6
|
+
* @param cellId2 - Cell id 1 to compare.
|
|
7
|
+
* @returns True if the cell ids are identical.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare const isSameCell: (cellId1: CellId, cellId2: CellId) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { encodeHashToBase64 } from "./base64.js";
|
|
2
|
+
/**
|
|
3
|
+
* Check if two cell ids are identical.
|
|
4
|
+
*
|
|
5
|
+
* @param cellId1 - Cell id 1 to compare.
|
|
6
|
+
* @param cellId2 - Cell id 1 to compare.
|
|
7
|
+
* @returns True if the cell ids are identical.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export const isSameCell = (cellId1, cellId2) => {
|
|
12
|
+
const dnaHashB64_1 = encodeHashToBase64(cellId1[0]);
|
|
13
|
+
const agentPubKeyB64_1 = encodeHashToBase64(cellId1[1]);
|
|
14
|
+
const dnaHashB64_2 = encodeHashToBase64(cellId2[0]);
|
|
15
|
+
const agentPubKeyB64_2 = encodeHashToBase64(cellId2[1]);
|
|
16
|
+
return dnaHashB64_1 === dnaHashB64_2 && agentPubKeyB64_1 === agentPubKeyB64_2;
|
|
17
|
+
};
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holochain/client",
|
|
3
|
-
"version": "0.18.0-dev.
|
|
3
|
+
"version": "0.18.0-dev.11",
|
|
4
4
|
"description": "A JavaScript client for the Holochain Conductor API",
|
|
5
5
|
"author": "Holochain Foundation <info@holochain.org> (https://holochain.org)",
|
|
6
6
|
"license": "CAL-1.0",
|