@holochain/client 0.11.12 → 0.11.14
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 +1 -1
- package/lib/api/admin/index.js +0 -1
- package/lib/api/admin/types.d.ts +355 -41
- package/lib/api/admin/types.js +40 -1
- package/lib/api/admin/websocket.d.ts +80 -1
- package/lib/api/admin/websocket.js +82 -4
- package/lib/api/app/index.js +0 -1
- package/lib/api/app/types.d.ts +78 -3
- package/lib/api/app/types.js +3 -1
- package/lib/api/app/websocket.d.ts +54 -0
- package/lib/api/app/websocket.js +48 -1
- package/lib/api/app-agent/index.js +0 -1
- package/lib/api/app-agent/types.d.ts +27 -0
- package/lib/api/app-agent/types.js +0 -1
- package/lib/api/app-agent/websocket.d.ts +57 -0
- package/lib/api/app-agent/websocket.js +57 -1
- package/lib/api/client.d.ts +25 -9
- package/lib/api/client.js +37 -14
- package/lib/api/common.d.ts +30 -1
- package/lib/api/common.js +18 -2
- package/lib/api/index.d.ts +2 -1
- package/lib/api/index.js +1 -1
- package/lib/api/zome-call-signing.d.ts +24 -1
- package/lib/api/zome-call-signing.js +18 -2
- package/lib/environments/launcher.js +0 -1
- package/lib/hdk/action.d.ts +45 -0
- package/lib/hdk/action.js +3 -1
- package/lib/hdk/capabilities.d.ts +21 -0
- package/lib/hdk/capabilities.js +3 -1
- package/lib/hdk/countersigning.d.ts +30 -0
- package/lib/hdk/countersigning.js +0 -1
- package/lib/hdk/dht-ops.d.ts +18 -0
- package/lib/hdk/dht-ops.js +15 -1
- package/lib/hdk/entry.d.ts +15 -0
- package/lib/hdk/entry.js +0 -1
- package/lib/hdk/index.d.ts +1 -0
- package/lib/hdk/index.js +1 -1
- package/lib/hdk/record.d.ts +6 -0
- package/lib/hdk/record.js +0 -1
- package/lib/index.js +0 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/types.d.ts +81 -0
- package/lib/types.js +0 -1
- package/lib/utils/base64.d.ts +16 -0
- package/lib/utils/base64.js +16 -1
- package/lib/utils/fake-hash.d.ts +23 -1
- package/lib/utils/fake-hash.js +23 -2
- package/lib/utils/index.js +0 -1
- package/package.json +5 -2
- package/lib/api/admin/index.js.map +0 -1
- package/lib/api/admin/types.js.map +0 -1
- package/lib/api/admin/websocket.js.map +0 -1
- package/lib/api/app/index.js.map +0 -1
- package/lib/api/app/types.js.map +0 -1
- package/lib/api/app/websocket.js.map +0 -1
- package/lib/api/app-agent/index.js.map +0 -1
- package/lib/api/app-agent/types.js.map +0 -1
- package/lib/api/app-agent/websocket.js.map +0 -1
- package/lib/api/client.js.map +0 -1
- package/lib/api/common.js.map +0 -1
- package/lib/api/index.js.map +0 -1
- package/lib/api/zome-call-signing.js.map +0 -1
- package/lib/environments/launcher.js.map +0 -1
- package/lib/hdk/action.js.map +0 -1
- package/lib/hdk/capabilities.js.map +0 -1
- package/lib/hdk/countersigning.js.map +0 -1
- package/lib/hdk/dht-ops.js.map +0 -1
- package/lib/hdk/entry.js.map +0 -1
- package/lib/hdk/index.js.map +0 -1
- package/lib/hdk/record.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/lib/utils/base64.js.map +0 -1
- package/lib/utils/fake-hash.js.map +0 -1
- package/lib/utils/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
A JavaScript client for the Holochain Conductor API (works with browsers as well as Nodejs).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[Complete API reference](./docs/client.md)
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
package/lib/api/admin/index.js
CHANGED
package/lib/api/admin/types.d.ts
CHANGED
|
@@ -3,19 +3,34 @@ import { Action, DhtOp, Entry, ZomeCallCapGrant } from "../../hdk/index.js";
|
|
|
3
3
|
import { ActionHash, AgentPubKey, CellId, DnaHash, DnaProperties, Duration, HoloHash, HoloHashB64, InstalledAppId, KitsuneAgent, KitsuneSpace, RoleName, Signature, Timestamp, WasmHash } from "../../types.js";
|
|
4
4
|
import { Requester } from "../common.js";
|
|
5
5
|
import { DisableCloneCellRequest } from "../index.js";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
6
9
|
export declare type AttachAppInterfaceRequest = {
|
|
7
10
|
port: number;
|
|
8
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
9
15
|
export declare type AttachAppInterfaceResponse = {
|
|
10
16
|
port: number;
|
|
11
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
12
21
|
export declare type EnableAppRequest = {
|
|
13
22
|
installed_app_id: InstalledAppId;
|
|
14
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
15
27
|
export declare type EnableAppResponse = {
|
|
16
28
|
app: AppInfo;
|
|
17
29
|
errors: Array<[CellId, string]>;
|
|
18
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
19
34
|
export declare type DeactivationReason = {
|
|
20
35
|
never_activated: null;
|
|
21
36
|
} | {
|
|
@@ -25,9 +40,15 @@ export declare type DeactivationReason = {
|
|
|
25
40
|
error: string;
|
|
26
41
|
};
|
|
27
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
28
46
|
export declare type PausedAppReason = {
|
|
29
47
|
error: string;
|
|
30
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
31
52
|
export declare type DisabledAppReason = {
|
|
32
53
|
never_started: null;
|
|
33
54
|
} | {
|
|
@@ -35,6 +56,9 @@ export declare type DisabledAppReason = {
|
|
|
35
56
|
} | {
|
|
36
57
|
error: string;
|
|
37
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
38
62
|
export declare type InstalledAppInfoStatus = {
|
|
39
63
|
paused: {
|
|
40
64
|
reason: PausedAppReason;
|
|
@@ -46,11 +70,17 @@ export declare type InstalledAppInfoStatus = {
|
|
|
46
70
|
} | {
|
|
47
71
|
running: null;
|
|
48
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
49
76
|
export interface StemCell {
|
|
50
77
|
dna: DnaHash;
|
|
51
78
|
name?: string;
|
|
52
79
|
dna_modifiers: DnaModifiers;
|
|
53
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
54
84
|
export interface Cell {
|
|
55
85
|
cell_id: CellId;
|
|
56
86
|
clone_id?: RoleName;
|
|
@@ -58,11 +88,17 @@ export interface Cell {
|
|
|
58
88
|
name: string;
|
|
59
89
|
enabled: boolean;
|
|
60
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
61
94
|
export declare enum CellType {
|
|
62
95
|
Provisioned = "Provisioned",
|
|
63
96
|
Cloned = "Cloned",
|
|
64
97
|
Stem = "Stem"
|
|
65
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
66
102
|
export declare type CellInfo = {
|
|
67
103
|
[CellType.Provisioned]: Cell;
|
|
68
104
|
} | {
|
|
@@ -70,46 +106,100 @@ export declare type CellInfo = {
|
|
|
70
106
|
} | {
|
|
71
107
|
[CellType.Stem]: StemCell;
|
|
72
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
73
112
|
export declare type AppInfo = {
|
|
74
113
|
installed_app_id: InstalledAppId;
|
|
75
114
|
cell_info: Record<RoleName, Array<CellInfo>>;
|
|
76
115
|
status: InstalledAppInfoStatus;
|
|
77
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
78
120
|
export declare type MembraneProof = Buffer;
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
79
124
|
export declare type DisableAppRequest = {
|
|
80
125
|
installed_app_id: InstalledAppId;
|
|
81
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
82
130
|
export declare type DisableAppResponse = null;
|
|
131
|
+
/**
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
83
134
|
export declare type StartAppRequest = {
|
|
84
135
|
installed_app_id: InstalledAppId;
|
|
85
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
86
140
|
export declare type StartAppResponse = boolean;
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
87
144
|
export declare type DumpStateRequest = {
|
|
88
145
|
cell_id: CellId;
|
|
89
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
90
150
|
export declare type DumpStateResponse = any;
|
|
151
|
+
/**
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
91
154
|
export declare type DumpFullStateRequest = {
|
|
92
155
|
cell_id: CellId;
|
|
93
156
|
dht_ops_cursor: number | undefined;
|
|
94
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* @public
|
|
160
|
+
*/
|
|
95
161
|
export declare type DumpFullStateResponse = FullStateDump;
|
|
162
|
+
/**
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
96
165
|
export declare type GenerateAgentPubKeyRequest = void;
|
|
166
|
+
/**
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
97
169
|
export declare type GenerateAgentPubKeyResponse = AgentPubKey;
|
|
170
|
+
/**
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
98
173
|
export declare type RegisterDnaRequest = {
|
|
99
174
|
modifiers?: {
|
|
100
175
|
network_seed?: string;
|
|
101
176
|
properties?: DnaProperties;
|
|
102
177
|
};
|
|
103
178
|
} & DnaSource;
|
|
179
|
+
/**
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
104
182
|
export declare type RegisterDnaResponse = HoloHash;
|
|
183
|
+
/**
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
105
186
|
export declare type DnaModifiers = {
|
|
106
187
|
network_seed: NetworkSeed;
|
|
107
188
|
properties: DnaProperties;
|
|
108
189
|
origin_time: Timestamp;
|
|
109
190
|
quantum_time: Duration;
|
|
110
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
111
195
|
export declare type FunctionName = string;
|
|
196
|
+
/**
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
112
199
|
export declare type ZomeName = string;
|
|
200
|
+
/**
|
|
201
|
+
* @public
|
|
202
|
+
*/
|
|
113
203
|
export declare type ZomeDefinition = [
|
|
114
204
|
ZomeName,
|
|
115
205
|
{
|
|
@@ -117,82 +207,161 @@ export declare type ZomeDefinition = [
|
|
|
117
207
|
dependencies: ZomeName[];
|
|
118
208
|
}
|
|
119
209
|
];
|
|
210
|
+
/**
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
120
213
|
export declare type IntegrityZome = ZomeDefinition;
|
|
214
|
+
/**
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
121
217
|
export declare type CoordinatorZome = ZomeDefinition;
|
|
218
|
+
/**
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
122
221
|
export declare type DnaDefinition = {
|
|
123
222
|
name: string;
|
|
124
223
|
modifiers: DnaModifiers;
|
|
125
224
|
integrity_zomes: IntegrityZome[];
|
|
126
225
|
coordinator_zomes: CoordinatorZome[];
|
|
127
226
|
};
|
|
227
|
+
/**
|
|
228
|
+
* @public
|
|
229
|
+
*/
|
|
128
230
|
export declare type GetDnaDefinitionRequest = DnaHash;
|
|
231
|
+
/**
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
129
234
|
export declare type GetDnaDefinitionResponse = DnaDefinition;
|
|
235
|
+
/**
|
|
236
|
+
* @public
|
|
237
|
+
*/
|
|
130
238
|
export declare type UninstallAppRequest = {
|
|
131
239
|
installed_app_id: InstalledAppId;
|
|
132
240
|
};
|
|
241
|
+
/**
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
133
244
|
export declare type UninstallAppResponse = null;
|
|
245
|
+
/**
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
134
248
|
export declare type ResourceBytes = number[];
|
|
249
|
+
/**
|
|
250
|
+
* @public
|
|
251
|
+
*/
|
|
135
252
|
export declare type ResourceMap = {
|
|
136
253
|
[key: string]: ResourceBytes;
|
|
137
254
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
255
|
+
/**
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
export declare enum CellProvisioningStrategy {
|
|
259
|
+
/**
|
|
260
|
+
* Always create a new Cell when installing this App
|
|
261
|
+
*/
|
|
262
|
+
Create = "create",
|
|
263
|
+
/**
|
|
264
|
+
* Always create a new Cell when installing the App,
|
|
265
|
+
* and use a unique network seed to ensure a distinct DHT network.
|
|
266
|
+
*
|
|
267
|
+
* Not implemented
|
|
268
|
+
*/
|
|
269
|
+
/**
|
|
270
|
+
* Require that a Cell is already installed which matches the DNA version
|
|
271
|
+
* spec, and which has an Agent that's associated with this App's agent
|
|
272
|
+
* via DPKI. If no such Cell exists, *app installation fails*.
|
|
273
|
+
*/
|
|
274
|
+
UseExisting = "use_existing",
|
|
275
|
+
/**
|
|
276
|
+
* Try `UseExisting`, and if that fails, fallback to `Create`
|
|
277
|
+
*/
|
|
278
|
+
CreateIfNoExists = "create_if_no_exists"
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* @public
|
|
282
|
+
*/
|
|
283
|
+
export interface CellProvisioning {
|
|
284
|
+
strategy: CellProvisioningStrategy;
|
|
285
|
+
deferred?: boolean;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
157
290
|
export declare type Location = {
|
|
291
|
+
/**
|
|
292
|
+
* Expect file to be part of this bundle
|
|
293
|
+
*/
|
|
158
294
|
bundled: string;
|
|
159
295
|
} | {
|
|
296
|
+
/**
|
|
297
|
+
* Get file from local filesystem (not bundled)
|
|
298
|
+
*/
|
|
160
299
|
path: string;
|
|
161
300
|
} | {
|
|
301
|
+
/**
|
|
302
|
+
* Get file from URL
|
|
303
|
+
*/
|
|
162
304
|
url: string;
|
|
163
305
|
};
|
|
306
|
+
/**
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
164
309
|
export declare type DnaVersionSpec = Array<HoloHashB64>;
|
|
310
|
+
/**
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
165
313
|
export declare type DnaVersionFlexible = {
|
|
166
314
|
singleton: HoloHashB64;
|
|
167
315
|
} | {
|
|
168
316
|
multiple: DnaVersionSpec;
|
|
169
317
|
};
|
|
318
|
+
/**
|
|
319
|
+
* @public
|
|
320
|
+
*/
|
|
170
321
|
export declare type AppRoleDnaManifest = {
|
|
171
322
|
clone_limit?: number;
|
|
172
323
|
modifiers?: Partial<DnaModifiers>;
|
|
173
324
|
version?: DnaVersionFlexible;
|
|
174
325
|
} & Location;
|
|
326
|
+
/**
|
|
327
|
+
* @public
|
|
328
|
+
*/
|
|
175
329
|
export declare type AppRoleManifest = {
|
|
176
330
|
name: RoleName;
|
|
177
331
|
provisioning?: CellProvisioning;
|
|
178
332
|
dna: AppRoleDnaManifest;
|
|
179
333
|
};
|
|
334
|
+
/**
|
|
335
|
+
* @public
|
|
336
|
+
*/
|
|
180
337
|
export declare type AppManifest = {
|
|
181
338
|
manifest_version: string;
|
|
182
339
|
name: string;
|
|
183
340
|
description?: string;
|
|
184
341
|
roles: Array<AppRoleManifest>;
|
|
185
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* @public
|
|
345
|
+
*/
|
|
186
346
|
export declare type AppBundle = {
|
|
187
347
|
manifest: AppManifest;
|
|
188
348
|
resources: ResourceMap;
|
|
189
349
|
};
|
|
350
|
+
/**
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
190
353
|
export declare type AppBundleSource = {
|
|
191
354
|
bundle: AppBundle;
|
|
192
355
|
} | {
|
|
193
356
|
path: string;
|
|
194
357
|
};
|
|
358
|
+
/**
|
|
359
|
+
* @public
|
|
360
|
+
*/
|
|
195
361
|
export declare type NetworkSeed = string;
|
|
362
|
+
/**
|
|
363
|
+
* @public
|
|
364
|
+
*/
|
|
196
365
|
export declare type InstallAppRequest = {
|
|
197
366
|
agent_key: AgentPubKey;
|
|
198
367
|
installed_app_id?: InstalledAppId;
|
|
@@ -201,13 +370,37 @@ export declare type InstallAppRequest = {
|
|
|
201
370
|
};
|
|
202
371
|
network_seed?: NetworkSeed;
|
|
203
372
|
} & AppBundleSource;
|
|
373
|
+
/**
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
204
376
|
export declare type InstallAppResponse = AppInfo;
|
|
377
|
+
/**
|
|
378
|
+
* @public
|
|
379
|
+
*/
|
|
205
380
|
export declare type ListDnasRequest = void;
|
|
381
|
+
/**
|
|
382
|
+
* @public
|
|
383
|
+
*/
|
|
206
384
|
export declare type ListDnasResponse = Array<string>;
|
|
385
|
+
/**
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
207
388
|
export declare type ListCellIdsRequest = void;
|
|
389
|
+
/**
|
|
390
|
+
* @public
|
|
391
|
+
*/
|
|
208
392
|
export declare type ListCellIdsResponse = Array<CellId>;
|
|
393
|
+
/**
|
|
394
|
+
* @public
|
|
395
|
+
*/
|
|
209
396
|
export declare type ListActiveAppsRequest = void;
|
|
397
|
+
/**
|
|
398
|
+
* @public
|
|
399
|
+
*/
|
|
210
400
|
export declare type ListActiveAppsResponse = Array<InstalledAppId>;
|
|
401
|
+
/**
|
|
402
|
+
* @public
|
|
403
|
+
*/
|
|
211
404
|
export declare enum AppStatusFilter {
|
|
212
405
|
Enabled = "enabled",
|
|
213
406
|
Disabled = "disabled",
|
|
@@ -215,70 +408,131 @@ export declare enum AppStatusFilter {
|
|
|
215
408
|
Stopped = "stopped",
|
|
216
409
|
Paused = "paused"
|
|
217
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* @public
|
|
413
|
+
*/
|
|
218
414
|
export declare type ListAppsRequest = {
|
|
219
415
|
status_filter?: AppStatusFilter;
|
|
220
416
|
};
|
|
417
|
+
/**
|
|
418
|
+
* @public
|
|
419
|
+
*/
|
|
221
420
|
export declare type ListAppsResponse = Array<AppInfo>;
|
|
421
|
+
/**
|
|
422
|
+
* @public
|
|
423
|
+
*/
|
|
222
424
|
export declare type ListAppInterfacesRequest = void;
|
|
425
|
+
/**
|
|
426
|
+
* @public
|
|
427
|
+
*/
|
|
223
428
|
export declare type ListAppInterfacesResponse = Array<number>;
|
|
224
|
-
|
|
429
|
+
/**
|
|
430
|
+
* This type is meant to be opaque
|
|
431
|
+
*
|
|
432
|
+
* @public
|
|
433
|
+
*/
|
|
434
|
+
export declare type AgentInfoSigned = unknown;
|
|
435
|
+
/**
|
|
436
|
+
* @public
|
|
437
|
+
*/
|
|
225
438
|
export declare type AgentInfoRequest = {
|
|
226
439
|
cell_id: CellId | null;
|
|
227
440
|
};
|
|
441
|
+
/**
|
|
442
|
+
* @public
|
|
443
|
+
*/
|
|
228
444
|
export declare type AgentInfoResponse = Array<AgentInfoSigned>;
|
|
445
|
+
/**
|
|
446
|
+
* @public
|
|
447
|
+
*/
|
|
229
448
|
export declare type AddAgentInfoRequest = {
|
|
230
449
|
agent_infos: Array<AgentInfoSigned>;
|
|
231
450
|
};
|
|
451
|
+
/**
|
|
452
|
+
* @public
|
|
453
|
+
*/
|
|
232
454
|
export declare type AddAgentInfoResponse = any;
|
|
455
|
+
/**
|
|
456
|
+
* @public
|
|
457
|
+
*/
|
|
233
458
|
export declare type DeleteCloneCellRequest = DisableCloneCellRequest;
|
|
459
|
+
/**
|
|
460
|
+
* @public
|
|
461
|
+
*/
|
|
234
462
|
export declare type DeleteCloneCellResponse = void;
|
|
463
|
+
/**
|
|
464
|
+
* @public
|
|
465
|
+
*/
|
|
235
466
|
export interface GrantZomeCallCapabilityRequest {
|
|
467
|
+
/**
|
|
468
|
+
* Cell for which to authorize the capability.
|
|
469
|
+
*/
|
|
236
470
|
cell_id: CellId;
|
|
471
|
+
/**
|
|
472
|
+
* Specifies the capability, consisting of zomes and functions to allow
|
|
473
|
+
* signing for as well as access level, secret and assignees.
|
|
474
|
+
*/
|
|
237
475
|
cap_grant: ZomeCallCapGrant;
|
|
238
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
239
480
|
export declare type GrantZomeCallCapabilityResponse = void;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
disableApp: Requester<DisableAppRequest, DisableAppResponse>;
|
|
244
|
-
startApp: Requester<StartAppRequest, StartAppResponse>;
|
|
245
|
-
dumpState: Requester<DumpStateRequest, DumpStateResponse>;
|
|
246
|
-
dumpFullState: Requester<DumpFullStateRequest, DumpFullStateResponse>;
|
|
247
|
-
generateAgentPubKey: Requester<GenerateAgentPubKeyRequest, GenerateAgentPubKeyResponse>;
|
|
248
|
-
registerDna: Requester<RegisterDnaRequest, RegisterDnaResponse>;
|
|
249
|
-
getDnaDefinition: Requester<GetDnaDefinitionRequest, GetDnaDefinitionResponse>;
|
|
250
|
-
uninstallApp: Requester<UninstallAppRequest, UninstallAppResponse>;
|
|
251
|
-
installApp: Requester<InstallAppRequest, InstallAppResponse>;
|
|
252
|
-
listDnas: Requester<ListDnasRequest, ListDnasResponse>;
|
|
253
|
-
listCellIds: Requester<ListCellIdsRequest, ListCellIdsResponse>;
|
|
254
|
-
listApps: Requester<ListAppsRequest, ListAppsResponse>;
|
|
255
|
-
listAppInterfaces: Requester<ListAppInterfacesRequest, ListAppInterfacesResponse>;
|
|
256
|
-
agentInfo: Requester<AgentInfoRequest, AgentInfoResponse>;
|
|
257
|
-
addAgentInfo: Requester<AddAgentInfoRequest, AddAgentInfoResponse>;
|
|
258
|
-
deleteCloneCell: Requester<DeleteCloneCellRequest, DeleteCloneCellResponse>;
|
|
259
|
-
grantZomeCallCapability: Requester<GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse>;
|
|
260
|
-
}
|
|
481
|
+
/**
|
|
482
|
+
* @public
|
|
483
|
+
*/
|
|
261
484
|
export declare type InstallAppDnaPayload = {
|
|
262
485
|
hash: HoloHash;
|
|
263
486
|
role_name: RoleName;
|
|
264
487
|
membrane_proof?: MembraneProof;
|
|
265
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* @public
|
|
491
|
+
*/
|
|
266
492
|
export declare type ZomeLocation = Location;
|
|
493
|
+
/**
|
|
494
|
+
* @public
|
|
495
|
+
*/
|
|
267
496
|
export declare type ZomeManifest = {
|
|
268
497
|
name: string;
|
|
269
498
|
hash?: string;
|
|
270
499
|
} & ZomeLocation;
|
|
500
|
+
/**
|
|
501
|
+
* @public
|
|
502
|
+
*/
|
|
271
503
|
export declare type DnaManifest = {
|
|
504
|
+
/**
|
|
505
|
+
* Currently one "1" is supported
|
|
506
|
+
*/
|
|
272
507
|
manifest_version: string;
|
|
508
|
+
/**
|
|
509
|
+
* The friendly "name" of a Holochain DNA.
|
|
510
|
+
*/
|
|
273
511
|
name: string;
|
|
512
|
+
/**
|
|
513
|
+
* A network seed for uniquifying this DNA.
|
|
514
|
+
*/
|
|
274
515
|
network_seed?: NetworkSeed;
|
|
516
|
+
/**
|
|
517
|
+
* Any arbitrary application properties can be included in this object.
|
|
518
|
+
*/
|
|
275
519
|
properties?: DnaProperties;
|
|
520
|
+
/**
|
|
521
|
+
* An array of zomes associated with your DNA.
|
|
522
|
+
* The order is significant: it determines initialization order.
|
|
523
|
+
*/
|
|
276
524
|
zomes: Array<ZomeManifest>;
|
|
277
525
|
};
|
|
526
|
+
/**
|
|
527
|
+
* @public
|
|
528
|
+
*/
|
|
278
529
|
export declare type DnaBundle = {
|
|
279
530
|
manifest: DnaManifest;
|
|
280
531
|
resources: ResourceMap;
|
|
281
532
|
};
|
|
533
|
+
/**
|
|
534
|
+
* @public
|
|
535
|
+
*/
|
|
282
536
|
export declare type DnaSource = {
|
|
283
537
|
hash: HoloHash;
|
|
284
538
|
} | {
|
|
@@ -286,41 +540,101 @@ export declare type DnaSource = {
|
|
|
286
540
|
} | {
|
|
287
541
|
bundle: DnaBundle;
|
|
288
542
|
};
|
|
543
|
+
/**
|
|
544
|
+
* @public
|
|
545
|
+
*/
|
|
289
546
|
export declare type Zomes = Array<[string, {
|
|
290
547
|
wasm_hash: Array<HoloHash>;
|
|
291
548
|
}]>;
|
|
549
|
+
/**
|
|
550
|
+
* @public
|
|
551
|
+
*/
|
|
292
552
|
export declare type WasmCode = [HoloHash, {
|
|
293
553
|
code: Array<number>;
|
|
294
554
|
}];
|
|
555
|
+
/**
|
|
556
|
+
* @public
|
|
557
|
+
*/
|
|
295
558
|
export interface AgentInfoDump {
|
|
296
559
|
kitsune_agent: KitsuneAgent;
|
|
297
560
|
kitsune_space: KitsuneSpace;
|
|
298
561
|
dump: string;
|
|
299
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* @public
|
|
565
|
+
*/
|
|
300
566
|
export interface P2pAgentsDump {
|
|
567
|
+
/**
|
|
568
|
+
* The info of this agent's cell.
|
|
569
|
+
*/
|
|
301
570
|
this_agent_info: AgentInfoDump | undefined;
|
|
571
|
+
/**
|
|
572
|
+
* The dna as a [`DnaHash`] and [`kitsune_p2p::KitsuneSpace`].
|
|
573
|
+
*/
|
|
302
574
|
this_dna: [DnaHash, KitsuneSpace] | undefined;
|
|
575
|
+
/**
|
|
576
|
+
* The agent as [`AgentPubKey`] and [`kitsune_p2p::KitsuneAgent`].
|
|
577
|
+
*/
|
|
303
578
|
this_agent: [AgentPubKey, KitsuneAgent] | undefined;
|
|
579
|
+
/**
|
|
580
|
+
* All other agent info.
|
|
581
|
+
*/
|
|
304
582
|
peers: Array<AgentInfoDump>;
|
|
305
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* @public
|
|
586
|
+
*/
|
|
306
587
|
export interface FullIntegrationStateDump {
|
|
307
588
|
validation_limbo: Array<DhtOp>;
|
|
308
589
|
integration_limbo: Array<DhtOp>;
|
|
309
590
|
integrated: Array<DhtOp>;
|
|
310
591
|
dht_ops_cursor: number;
|
|
311
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* @public
|
|
595
|
+
*/
|
|
312
596
|
export interface SourceChainJsonRecord {
|
|
313
597
|
signature: Signature;
|
|
314
598
|
action_address: ActionHash;
|
|
315
599
|
action: Action;
|
|
316
600
|
entry: Entry | undefined;
|
|
317
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* @public
|
|
604
|
+
*/
|
|
318
605
|
export interface SourceChainJsonDump {
|
|
319
606
|
records: Array<SourceChainJsonRecord>;
|
|
320
607
|
published_ops_count: number;
|
|
321
608
|
}
|
|
609
|
+
/**
|
|
610
|
+
* @public
|
|
611
|
+
*/
|
|
322
612
|
export interface FullStateDump {
|
|
323
613
|
peer_dump: P2pAgentsDump;
|
|
324
614
|
source_chain_dump: SourceChainJsonDump;
|
|
325
615
|
integration_dump: FullIntegrationStateDump;
|
|
326
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* @public
|
|
619
|
+
*/
|
|
620
|
+
export interface AdminApi {
|
|
621
|
+
attachAppInterface: Requester<AttachAppInterfaceRequest, AttachAppInterfaceResponse>;
|
|
622
|
+
enableApp: Requester<EnableAppRequest, EnableAppResponse>;
|
|
623
|
+
disableApp: Requester<DisableAppRequest, DisableAppResponse>;
|
|
624
|
+
startApp: Requester<StartAppRequest, StartAppResponse>;
|
|
625
|
+
dumpState: Requester<DumpStateRequest, DumpStateResponse>;
|
|
626
|
+
dumpFullState: Requester<DumpFullStateRequest, DumpFullStateResponse>;
|
|
627
|
+
generateAgentPubKey: Requester<GenerateAgentPubKeyRequest, GenerateAgentPubKeyResponse>;
|
|
628
|
+
registerDna: Requester<RegisterDnaRequest, RegisterDnaResponse>;
|
|
629
|
+
getDnaDefinition: Requester<GetDnaDefinitionRequest, GetDnaDefinitionResponse>;
|
|
630
|
+
uninstallApp: Requester<UninstallAppRequest, UninstallAppResponse>;
|
|
631
|
+
installApp: Requester<InstallAppRequest, InstallAppResponse>;
|
|
632
|
+
listDnas: Requester<ListDnasRequest, ListDnasResponse>;
|
|
633
|
+
listCellIds: Requester<ListCellIdsRequest, ListCellIdsResponse>;
|
|
634
|
+
listApps: Requester<ListAppsRequest, ListAppsResponse>;
|
|
635
|
+
listAppInterfaces: Requester<ListAppInterfacesRequest, ListAppInterfacesResponse>;
|
|
636
|
+
agentInfo: Requester<AgentInfoRequest, AgentInfoResponse>;
|
|
637
|
+
addAgentInfo: Requester<AddAgentInfoRequest, AddAgentInfoResponse>;
|
|
638
|
+
deleteCloneCell: Requester<DeleteCloneCellRequest, DeleteCloneCellResponse>;
|
|
639
|
+
grantZomeCallCapability: Requester<GrantZomeCallCapabilityRequest, GrantZomeCallCapabilityResponse>;
|
|
640
|
+
}
|