@holochain/client 0.12.5 → 0.14.0

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/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  [![Project](https://img.shields.io/badge/Project-Holochain-blue.svg?style=flat-square)](http://holochain.org/)
2
2
  [![Discord](https://img.shields.io/badge/Discord-DEV.HC-blue.svg?style=flat-square)](https://discord.gg/k55DS5dmPH)
3
3
  [![License: CAL 1.0](https://img.shields.io/badge/License-CAL%201.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license)
4
- ![Test](https://github.com/holochain/holochain-client-js/actions/workflows/test.yml/badge.svg?branch=main)
4
+ ![Integration Tests](https://github.com/holochain/holochain-client-js/actions/workflows/integration-test.yml/badge.svg?branch=main)
5
+ ![Bundling Tests](https://github.com/holochain/holochain-client-js/actions/workflows/bundling-test.yml/badge.svg?branch=main)
5
6
  [![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain)
6
7
 
7
8
  # Holochain Client - JavaScript
@@ -12,6 +13,11 @@ A JavaScript client for the Holochain Conductor API (works with browsers as well
12
13
 
13
14
  [Complete API reference](./docs/client.md)
14
15
 
16
+ ## Compatibility
17
+
18
+ **JS client v0.12.x** is compatible with **Holochain v0.1.x**.
19
+ **JS client v0.13.x** is compatible with **Holochain v0.2.x**.
20
+
15
21
  ## Installation
16
22
 
17
23
  To install from NPM, run
@@ -6,32 +6,32 @@ import { DisableCloneCellRequest } from "../index.js";
6
6
  /**
7
7
  * @public
8
8
  */
9
- export declare type AttachAppInterfaceRequest = {
9
+ export type AttachAppInterfaceRequest = {
10
10
  port: number;
11
11
  };
12
12
  /**
13
13
  * @public
14
14
  */
15
- export declare type AttachAppInterfaceResponse = {
15
+ export type AttachAppInterfaceResponse = {
16
16
  port: number;
17
17
  };
18
18
  /**
19
19
  * @public
20
20
  */
21
- export declare type EnableAppRequest = {
21
+ export type EnableAppRequest = {
22
22
  installed_app_id: InstalledAppId;
23
23
  };
24
24
  /**
25
25
  * @public
26
26
  */
27
- export declare type EnableAppResponse = {
27
+ export type EnableAppResponse = {
28
28
  app: AppInfo;
29
29
  errors: Array<[CellId, string]>;
30
30
  };
31
31
  /**
32
32
  * @public
33
33
  */
34
- export declare type DeactivationReason = {
34
+ export type DeactivationReason = {
35
35
  never_activated: null;
36
36
  } | {
37
37
  normal: null;
@@ -43,13 +43,13 @@ export declare type DeactivationReason = {
43
43
  /**
44
44
  * @public
45
45
  */
46
- export declare type PausedAppReason = {
46
+ export type PausedAppReason = {
47
47
  error: string;
48
48
  };
49
49
  /**
50
50
  * @public
51
51
  */
52
- export declare type DisabledAppReason = {
52
+ export type DisabledAppReason = {
53
53
  never_started: null;
54
54
  } | {
55
55
  user: null;
@@ -59,7 +59,7 @@ export declare type DisabledAppReason = {
59
59
  /**
60
60
  * @public
61
61
  */
62
- export declare type InstalledAppInfoStatus = {
62
+ export type InstalledAppInfoStatus = {
63
63
  paused: {
64
64
  reason: PausedAppReason;
65
65
  };
@@ -108,7 +108,7 @@ export declare enum CellType {
108
108
  /**
109
109
  * @public
110
110
  */
111
- export declare type CellInfo = {
111
+ export type CellInfo = {
112
112
  [CellType.Provisioned]: ProvisionedCell;
113
113
  } | {
114
114
  [CellType.Cloned]: ClonedCell;
@@ -118,7 +118,7 @@ export declare type CellInfo = {
118
118
  /**
119
119
  * @public
120
120
  */
121
- export declare type AppInfo = {
121
+ export type AppInfo = {
122
122
  agent_pub_key: AgentPubKey;
123
123
  installed_app_id: InstalledAppId;
124
124
  cell_info: Record<RoleName, Array<CellInfo>>;
@@ -127,60 +127,60 @@ export declare type AppInfo = {
127
127
  /**
128
128
  * @public
129
129
  */
130
- export declare type MembraneProof = Buffer;
130
+ export type MembraneProof = Buffer;
131
131
  /**
132
132
  * @public
133
133
  */
134
- export declare type DisableAppRequest = {
134
+ export type DisableAppRequest = {
135
135
  installed_app_id: InstalledAppId;
136
136
  };
137
137
  /**
138
138
  * @public
139
139
  */
140
- export declare type DisableAppResponse = null;
140
+ export type DisableAppResponse = null;
141
141
  /**
142
142
  * @public
143
143
  */
144
- export declare type StartAppRequest = {
144
+ export type StartAppRequest = {
145
145
  installed_app_id: InstalledAppId;
146
146
  };
147
147
  /**
148
148
  * @public
149
149
  */
150
- export declare type StartAppResponse = boolean;
150
+ export type StartAppResponse = boolean;
151
151
  /**
152
152
  * @public
153
153
  */
154
- export declare type DumpStateRequest = {
154
+ export type DumpStateRequest = {
155
155
  cell_id: CellId;
156
156
  };
157
157
  /**
158
158
  * @public
159
159
  */
160
- export declare type DumpStateResponse = any;
160
+ export type DumpStateResponse = any;
161
161
  /**
162
162
  * @public
163
163
  */
164
- export declare type DumpFullStateRequest = {
164
+ export type DumpFullStateRequest = {
165
165
  cell_id: CellId;
166
166
  dht_ops_cursor: number | undefined;
167
167
  };
168
168
  /**
169
169
  * @public
170
170
  */
171
- export declare type DumpFullStateResponse = FullStateDump;
171
+ export type DumpFullStateResponse = FullStateDump;
172
172
  /**
173
173
  * @public
174
174
  */
175
- export declare type GenerateAgentPubKeyRequest = void;
175
+ export type GenerateAgentPubKeyRequest = void;
176
176
  /**
177
177
  * @public
178
178
  */
179
- export declare type GenerateAgentPubKeyResponse = AgentPubKey;
179
+ export type GenerateAgentPubKeyResponse = AgentPubKey;
180
180
  /**
181
181
  * @public
182
182
  */
183
- export declare type RegisterDnaRequest = {
183
+ export type RegisterDnaRequest = {
184
184
  modifiers?: {
185
185
  network_seed?: string;
186
186
  properties?: DnaProperties;
@@ -189,11 +189,11 @@ export declare type RegisterDnaRequest = {
189
189
  /**
190
190
  * @public
191
191
  */
192
- export declare type RegisterDnaResponse = HoloHash;
192
+ export type RegisterDnaResponse = HoloHash;
193
193
  /**
194
194
  * @public
195
195
  */
196
- export declare type DnaModifiers = {
196
+ export type DnaModifiers = {
197
197
  network_seed: NetworkSeed;
198
198
  properties: DnaProperties;
199
199
  origin_time: Timestamp;
@@ -202,15 +202,15 @@ export declare type DnaModifiers = {
202
202
  /**
203
203
  * @public
204
204
  */
205
- export declare type FunctionName = string;
205
+ export type FunctionName = string;
206
206
  /**
207
207
  * @public
208
208
  */
209
- export declare type ZomeName = string;
209
+ export type ZomeName = string;
210
210
  /**
211
211
  * @public
212
212
  */
213
- export declare type ZomeDefinition = [
213
+ export type ZomeDefinition = [
214
214
  ZomeName,
215
215
  {
216
216
  wasm_hash: WasmHash;
@@ -220,15 +220,15 @@ export declare type ZomeDefinition = [
220
220
  /**
221
221
  * @public
222
222
  */
223
- export declare type IntegrityZome = ZomeDefinition;
223
+ export type IntegrityZome = ZomeDefinition;
224
224
  /**
225
225
  * @public
226
226
  */
227
- export declare type CoordinatorZome = ZomeDefinition;
227
+ export type CoordinatorZome = ZomeDefinition;
228
228
  /**
229
229
  * @public
230
230
  */
231
- export declare type DnaDefinition = {
231
+ export type DnaDefinition = {
232
232
  name: string;
233
233
  modifiers: DnaModifiers;
234
234
  integrity_zomes: IntegrityZome[];
@@ -237,29 +237,39 @@ export declare type DnaDefinition = {
237
237
  /**
238
238
  * @public
239
239
  */
240
- export declare type GetDnaDefinitionRequest = DnaHash;
240
+ export type GetDnaDefinitionRequest = DnaHash;
241
241
  /**
242
242
  * @public
243
243
  */
244
- export declare type GetDnaDefinitionResponse = DnaDefinition;
244
+ export type GetDnaDefinitionResponse = DnaDefinition;
245
245
  /**
246
246
  * @public
247
247
  */
248
- export declare type UninstallAppRequest = {
248
+ export type UninstallAppRequest = {
249
249
  installed_app_id: InstalledAppId;
250
250
  };
251
251
  /**
252
252
  * @public
253
253
  */
254
- export declare type UninstallAppResponse = null;
254
+ export type UninstallAppResponse = null;
255
255
  /**
256
256
  * @public
257
257
  */
258
- export declare type ResourceBytes = Uint8Array;
258
+ export type UpdateCoordinatorsRequest = {
259
+ dna_hash: DnaHash;
260
+ } & CoordinatorSource;
259
261
  /**
260
262
  * @public
261
263
  */
262
- export declare type ResourceMap = {
264
+ export type UpdateCoordinatorsResponse = void;
265
+ /**
266
+ * @public
267
+ */
268
+ export type ResourceBytes = Uint8Array;
269
+ /**
270
+ * @public
271
+ */
272
+ export type ResourceMap = {
263
273
  [key: string]: ResourceBytes;
264
274
  };
265
275
  /**
@@ -297,7 +307,7 @@ export interface CellProvisioning {
297
307
  /**
298
308
  * @public
299
309
  */
300
- export declare type Location = {
310
+ export type Location = {
301
311
  /**
302
312
  * Expect file to be part of this bundle
303
313
  */
@@ -316,11 +326,11 @@ export declare type Location = {
316
326
  /**
317
327
  * @public
318
328
  */
319
- export declare type DnaVersionSpec = Array<HoloHashB64>;
329
+ export type DnaVersionSpec = Array<HoloHashB64>;
320
330
  /**
321
331
  * @public
322
332
  */
323
- export declare type DnaVersionFlexible = {
333
+ export type DnaVersionFlexible = {
324
334
  singleton: HoloHashB64;
325
335
  } | {
326
336
  multiple: DnaVersionSpec;
@@ -328,7 +338,7 @@ export declare type DnaVersionFlexible = {
328
338
  /**
329
339
  * @public
330
340
  */
331
- export declare type AppRoleDnaManifest = {
341
+ export type AppRoleDnaManifest = {
332
342
  clone_limit?: number;
333
343
  modifiers?: Partial<DnaModifiers>;
334
344
  version?: DnaVersionFlexible;
@@ -336,7 +346,7 @@ export declare type AppRoleDnaManifest = {
336
346
  /**
337
347
  * @public
338
348
  */
339
- export declare type AppRoleManifest = {
349
+ export type AppRoleManifest = {
340
350
  name: RoleName;
341
351
  provisioning?: CellProvisioning;
342
352
  dna: AppRoleDnaManifest;
@@ -344,7 +354,7 @@ export declare type AppRoleManifest = {
344
354
  /**
345
355
  * @public
346
356
  */
347
- export declare type AppManifest = {
357
+ export type AppManifest = {
348
358
  manifest_version: string;
349
359
  name: string;
350
360
  description?: string;
@@ -353,14 +363,14 @@ export declare type AppManifest = {
353
363
  /**
354
364
  * @public
355
365
  */
356
- export declare type AppBundle = {
366
+ export type AppBundle = {
357
367
  manifest: AppManifest;
358
368
  resources: ResourceMap;
359
369
  };
360
370
  /**
361
371
  * @public
362
372
  */
363
- export declare type AppBundleSource = {
373
+ export type AppBundleSource = {
364
374
  bundle: AppBundle;
365
375
  } | {
366
376
  path: string;
@@ -368,11 +378,11 @@ export declare type AppBundleSource = {
368
378
  /**
369
379
  * @public
370
380
  */
371
- export declare type NetworkSeed = string;
381
+ export type NetworkSeed = string;
372
382
  /**
373
383
  * @public
374
384
  */
375
- export declare type InstallAppRequest = {
385
+ export type InstallAppRequest = {
376
386
  agent_key: AgentPubKey;
377
387
  installed_app_id?: InstalledAppId;
378
388
  membrane_proofs: {
@@ -383,31 +393,31 @@ export declare type InstallAppRequest = {
383
393
  /**
384
394
  * @public
385
395
  */
386
- export declare type InstallAppResponse = AppInfo;
396
+ export type InstallAppResponse = AppInfo;
387
397
  /**
388
398
  * @public
389
399
  */
390
- export declare type ListDnasRequest = void;
400
+ export type ListDnasRequest = void;
391
401
  /**
392
402
  * @public
393
403
  */
394
- export declare type ListDnasResponse = Array<string>;
404
+ export type ListDnasResponse = Array<string>;
395
405
  /**
396
406
  * @public
397
407
  */
398
- export declare type ListCellIdsRequest = void;
408
+ export type ListCellIdsRequest = void;
399
409
  /**
400
410
  * @public
401
411
  */
402
- export declare type ListCellIdsResponse = Array<CellId>;
412
+ export type ListCellIdsResponse = Array<CellId>;
403
413
  /**
404
414
  * @public
405
415
  */
406
- export declare type ListActiveAppsRequest = void;
416
+ export type ListActiveAppsRequest = void;
407
417
  /**
408
418
  * @public
409
419
  */
410
- export declare type ListActiveAppsResponse = Array<InstalledAppId>;
420
+ export type ListActiveAppsResponse = Array<InstalledAppId>;
411
421
  /**
412
422
  * @public
413
423
  */
@@ -421,55 +431,55 @@ export declare enum AppStatusFilter {
421
431
  /**
422
432
  * @public
423
433
  */
424
- export declare type ListAppsRequest = {
434
+ export type ListAppsRequest = {
425
435
  status_filter?: AppStatusFilter;
426
436
  };
427
437
  /**
428
438
  * @public
429
439
  */
430
- export declare type ListAppsResponse = Array<AppInfo>;
440
+ export type ListAppsResponse = Array<AppInfo>;
431
441
  /**
432
442
  * @public
433
443
  */
434
- export declare type ListAppInterfacesRequest = void;
444
+ export type ListAppInterfacesRequest = void;
435
445
  /**
436
446
  * @public
437
447
  */
438
- export declare type ListAppInterfacesResponse = Array<number>;
448
+ export type ListAppInterfacesResponse = Array<number>;
439
449
  /**
440
450
  * This type is meant to be opaque
441
451
  *
442
452
  * @public
443
453
  */
444
- export declare type AgentInfoSigned = unknown;
454
+ export type AgentInfoSigned = unknown;
445
455
  /**
446
456
  * @public
447
457
  */
448
- export declare type AgentInfoRequest = {
458
+ export type AgentInfoRequest = {
449
459
  cell_id: CellId | null;
450
460
  };
451
461
  /**
452
462
  * @public
453
463
  */
454
- export declare type AgentInfoResponse = Array<AgentInfoSigned>;
464
+ export type AgentInfoResponse = Array<AgentInfoSigned>;
455
465
  /**
456
466
  * @public
457
467
  */
458
- export declare type AddAgentInfoRequest = {
468
+ export type AddAgentInfoRequest = {
459
469
  agent_infos: Array<AgentInfoSigned>;
460
470
  };
461
471
  /**
462
472
  * @public
463
473
  */
464
- export declare type AddAgentInfoResponse = any;
474
+ export type AddAgentInfoResponse = any;
465
475
  /**
466
476
  * @public
467
477
  */
468
- export declare type DeleteCloneCellRequest = DisableCloneCellRequest;
478
+ export type DeleteCloneCellRequest = DisableCloneCellRequest;
469
479
  /**
470
480
  * @public
471
481
  */
472
- export declare type DeleteCloneCellResponse = void;
482
+ export type DeleteCloneCellResponse = void;
473
483
  /**
474
484
  * @public
475
485
  */
@@ -487,11 +497,11 @@ export interface GrantZomeCallCapabilityRequest {
487
497
  /**
488
498
  * @public
489
499
  */
490
- export declare type GrantZomeCallCapabilityResponse = void;
500
+ export type GrantZomeCallCapabilityResponse = void;
491
501
  /**
492
502
  * @public
493
503
  */
494
- export declare type InstallAppDnaPayload = {
504
+ export type InstallAppDnaPayload = {
495
505
  hash: HoloHash;
496
506
  role_name: RoleName;
497
507
  membrane_proof?: MembraneProof;
@@ -499,18 +509,46 @@ export declare type InstallAppDnaPayload = {
499
509
  /**
500
510
  * @public
501
511
  */
502
- export declare type ZomeLocation = Location;
512
+ export type ZomeLocation = Location;
503
513
  /**
504
514
  * @public
505
515
  */
506
- export declare type ZomeManifest = {
516
+ export interface ZomeDependency {
517
+ name: ZomeName;
518
+ }
519
+ /**
520
+ * @public
521
+ */
522
+ export type ZomeManifest = {
507
523
  name: string;
508
524
  hash?: string;
525
+ dependencies?: ZomeDependency[];
509
526
  } & ZomeLocation;
510
527
  /**
511
528
  * @public
512
529
  */
513
- export declare type DnaManifest = {
530
+ export interface CoordinatorManifest {
531
+ zomes: Array<ZomeManifest>;
532
+ }
533
+ /**
534
+ * @public
535
+ */
536
+ export interface CoordinatorBundle {
537
+ manifest: CoordinatorManifest;
538
+ resources: ResourceMap;
539
+ }
540
+ /**
541
+ * @public
542
+ */
543
+ export type CoordinatorSource = {
544
+ path: string;
545
+ } | {
546
+ bundle: CoordinatorBundle;
547
+ };
548
+ /**
549
+ * @public
550
+ */
551
+ export type DnaManifest = {
514
552
  /**
515
553
  * Currently one "1" is supported
516
554
  */
@@ -536,14 +574,14 @@ export declare type DnaManifest = {
536
574
  /**
537
575
  * @public
538
576
  */
539
- export declare type DnaBundle = {
577
+ export type DnaBundle = {
540
578
  manifest: DnaManifest;
541
579
  resources: ResourceMap;
542
580
  };
543
581
  /**
544
582
  * @public
545
583
  */
546
- export declare type DnaSource = {
584
+ export type DnaSource = {
547
585
  hash: HoloHash;
548
586
  } | {
549
587
  path: string;
@@ -553,13 +591,13 @@ export declare type DnaSource = {
553
591
  /**
554
592
  * @public
555
593
  */
556
- export declare type Zomes = Array<[string, {
594
+ export type Zomes = Array<[string, {
557
595
  wasm_hash: Array<HoloHash>;
558
596
  }]>;
559
597
  /**
560
598
  * @public
561
599
  */
562
- export declare type WasmCode = [HoloHash, {
600
+ export type WasmCode = [HoloHash, {
563
601
  code: Array<number>;
564
602
  }];
565
603
  /**
@@ -624,6 +662,46 @@ export interface FullStateDump {
624
662
  source_chain_dump: SourceChainJsonDump;
625
663
  integration_dump: FullIntegrationStateDump;
626
664
  }
665
+ /**
666
+ * @public
667
+ */
668
+ export interface DnaStorageInfo {
669
+ authored_data_size: number;
670
+ authored_data_size_on_disk: number;
671
+ dht_data_size: number;
672
+ dht_data_size_on_disk: number;
673
+ cache_data_size: number;
674
+ cache_data_size_on_disk: number;
675
+ used_by: Array<InstalledAppId>;
676
+ }
677
+ /**
678
+ * @public
679
+ */
680
+ export interface DnaStorageBlob {
681
+ dna: DnaStorageInfo;
682
+ }
683
+ /**
684
+ * @public
685
+ */
686
+ export interface StorageInfo {
687
+ blobs: Array<DnaStorageBlob>;
688
+ }
689
+ /**
690
+ * @public
691
+ */
692
+ export type StorageInfoRequest = void;
693
+ /**
694
+ * @public
695
+ */
696
+ export type StorageInfoResponse = StorageInfo;
697
+ /**
698
+ * @public
699
+ */
700
+ export type DumpNetworkStatsRequest = void;
701
+ /**
702
+ * @public
703
+ */
704
+ export type DumpNetworkStatsResponse = string;
627
705
  /**
628
706
  * @public
629
707
  */
@@ -646,4 +724,6 @@ export interface AdminApi {
646
724
  addAgentInfo: Requester<AddAgentInfoRequest, AddAgentInfoResponse>;
647
725
  deleteCloneCell: Requester<DeleteCloneCellRequest, DeleteCloneCellResponse>;
648
726
  grantZomeCallCapability: Requester<GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse>;
727
+ storageInfo: Requester<StorageInfoRequest, StorageInfoResponse>;
728
+ dumpNetworkStats: Requester<DumpNetworkStatsRequest, DumpNetworkStatsResponse>;
649
729
  }
@@ -2,7 +2,7 @@ import { CapSecret, GrantedFunctions } from "../../hdk/capabilities.js";
2
2
  import type { AgentPubKey, CellId } from "../../types.js";
3
3
  import { WsClient } from "../client.js";
4
4
  import { Requester, Transformer } from "../common.js";
5
- 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";
5
+ import { AddAgentInfoRequest, AddAgentInfoResponse, AdminApi, AgentInfoRequest, AgentInfoResponse, AttachAppInterfaceRequest, AttachAppInterfaceResponse, DeleteCloneCellRequest, DeleteCloneCellResponse, DisableAppRequest, DisableAppResponse, DumpFullStateRequest, DumpFullStateResponse, DumpNetworkStatsRequest, DumpNetworkStatsResponse, DumpStateRequest, DumpStateResponse, EnableAppRequest, EnableAppResponse, GenerateAgentPubKeyRequest, GenerateAgentPubKeyResponse, GetDnaDefinitionRequest, GetDnaDefinitionResponse, GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse, InstallAppRequest, InstallAppResponse, ListAppInterfacesRequest, ListAppInterfacesResponse, ListAppsRequest, ListAppsResponse, ListCellIdsRequest, ListCellIdsResponse, ListDnasRequest, ListDnasResponse, RegisterDnaRequest, RegisterDnaResponse, StorageInfoRequest, StorageInfoResponse, UninstallAppRequest, UninstallAppResponse, UpdateCoordinatorsRequest, UpdateCoordinatorsResponse } from "./types.js";
6
6
  /**
7
7
  * A class for interacting with a conductor's Admin API.
8
8
  *
@@ -70,6 +70,10 @@ export declare class AdminWebsocket implements AdminApi {
70
70
  * Install the specified app into Holochain.
71
71
  */
72
72
  installApp: Requester<InstallAppRequest, InstallAppResponse>;
73
+ /**
74
+ * Update coordinators for an installed app.
75
+ */
76
+ updateCoordinators: Requester<UpdateCoordinatorsRequest, UpdateCoordinatorsResponse>;
73
77
  /**
74
78
  * List all registered DNAs.
75
79
  */
@@ -103,6 +107,8 @@ export declare class AdminWebsocket implements AdminApi {
103
107
  * calls.
104
108
  */
105
109
  grantZomeCallCapability: Requester<GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse>;
110
+ storageInfo: Requester<StorageInfoRequest, StorageInfoResponse>;
111
+ dumpNetworkStats: Requester<DumpNetworkStatsRequest, DumpNetworkStatsResponse>;
106
112
  /**
107
113
  * Grant a capability for signing zome calls.
108
114
  *
@@ -85,6 +85,10 @@ export class AdminWebsocket {
85
85
  * Install the specified app into Holochain.
86
86
  */
87
87
  installApp = this._requester("install_app");
88
+ /**
89
+ * Update coordinators for an installed app.
90
+ */
91
+ updateCoordinators = this._requester("update_coordinators");
88
92
  /**
89
93
  * List all registered DNAs.
90
94
  */
@@ -118,6 +122,8 @@ export class AdminWebsocket {
118
122
  * calls.
119
123
  */
120
124
  grantZomeCallCapability = this._requester("grant_zome_call_capability");
125
+ storageInfo = this._requester("storage_info");
126
+ dumpNetworkStats = this._requester("dump_network_stats");
121
127
  // zome call signing related methods
122
128
  /**
123
129
  * Grant a capability for signing zome calls.
@@ -128,7 +134,7 @@ export class AdminWebsocket {
128
134
  * @returns The cap secret of the created capability.
129
135
  */
130
136
  grantSigningKey = async (cellId, functions, signingKey) => {
131
- const capSecret = await randomCapSecret();
137
+ const capSecret = randomCapSecret();
132
138
  await this.grantZomeCallCapability({
133
139
  cell_id: cellId,
134
140
  cap_grant: {
@@ -153,7 +159,7 @@ export class AdminWebsocket {
153
159
  * granted for all zomes and functions.
154
160
  */
155
161
  authorizeSigningCredentials = async (cellId, functions) => {
156
- const [keyPair, signingKey] = generateSigningKeyPair();
162
+ const [keyPair, signingKey] = await generateSigningKeyPair();
157
163
  const capSecret = await this.grantSigningKey(cellId, functions || { [GrantedFunctionsType.All]: null }, signingKey);
158
164
  setSigningCredentials(cellId, { capSecret, keyPair, signingKey });
159
165
  };