@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 +7 -1
- package/lib/api/admin/types.d.ts +153 -73
- package/lib/api/admin/websocket.d.ts +7 -1
- package/lib/api/admin/websocket.js +8 -2
- package/lib/api/app/types.d.ts +25 -17
- package/lib/api/app/websocket.d.ts +1 -1
- package/lib/api/app/websocket.js +7 -7
- package/lib/api/app-agent/types.d.ts +7 -7
- package/lib/api/app-agent/websocket.d.ts +3 -1
- package/lib/api/app-agent/websocket.js +3 -7
- package/lib/api/client.d.ts +6 -5
- package/lib/api/client.js +14 -7
- package/lib/api/common.d.ts +5 -5
- package/lib/api/common.js +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.js +1 -1
- package/lib/api/zome-call-signing.d.ts +15 -9
- package/lib/api/zome-call-signing.js +12 -16
- package/lib/environments/launcher.d.ts +2 -1
- package/lib/environments/launcher.js +5 -5
- package/lib/hdk/action.d.ts +3 -3
- package/lib/hdk/capabilities.d.ts +5 -5
- package/lib/hdk/countersigning.d.ts +4 -4
- package/lib/hdk/dht-ops.d.ts +1 -1
- package/lib/hdk/entry.d.ts +4 -4
- package/lib/hdk/link.d.ts +5 -0
- package/lib/hdk/link.js +1 -0
- package/lib/hdk/record.d.ts +2 -2
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/types.d.ts +32 -23
- package/package.json +10 -11
package/lib/hdk/entry.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { CounterSigningSessionData } from "./countersigning.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type EntryVisibility = {
|
|
8
8
|
Public: null;
|
|
9
9
|
} | {
|
|
10
10
|
Private: null;
|
|
@@ -12,7 +12,7 @@ export declare type EntryVisibility = {
|
|
|
12
12
|
/**
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type AppEntryDef = {
|
|
16
16
|
entry_index: number;
|
|
17
17
|
zome_index: number;
|
|
18
18
|
visibility: EntryVisibility;
|
|
@@ -20,7 +20,7 @@ export declare type AppEntryDef = {
|
|
|
20
20
|
/**
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type EntryType = "Agent" | {
|
|
24
24
|
App: AppEntryDef;
|
|
25
25
|
} | "CapClaim" | "CapGrant";
|
|
26
26
|
/**
|
|
@@ -33,4 +33,4 @@ export interface EntryContent<E extends string, C> {
|
|
|
33
33
|
/**
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
36
|
+
export type Entry = EntryContent<"Agent", AgentPubKey> | EntryContent<"App", Uint8Array> | EntryContent<"CounterSign", [CounterSigningSessionData, Uint8Array]> | EntryContent<"CapGrant", ZomeCallCapGrant> | EntryContent<"CapClaim", CapClaim>;
|
package/lib/hdk/link.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/hdk/record.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { Entry } from "./entry.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type Record = {
|
|
7
7
|
signed_action: SignedActionHashed;
|
|
8
8
|
entry: RecordEntry;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type RecordEntry = {
|
|
14
14
|
Present: Entry;
|
|
15
15
|
} | {
|
|
16
16
|
Hidden: void;
|
package/lib/tsdoc-metadata.json
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -1,99 +1,103 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @public
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type HoloHash = Uint8Array;
|
|
5
5
|
/**
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type AgentPubKey = HoloHash;
|
|
9
9
|
/**
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type DnaHash = HoloHash;
|
|
13
13
|
/**
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type WasmHash = HoloHash;
|
|
17
17
|
/**
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type EntryHash = HoloHash;
|
|
21
21
|
/**
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type ActionHash = HoloHash;
|
|
25
25
|
/**
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
28
|
+
export type AnyDhtHash = HoloHash;
|
|
29
29
|
/**
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
|
-
export
|
|
32
|
+
export type ExternalHash = HoloHash;
|
|
33
33
|
/**
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
36
|
+
export type KitsuneAgent = Uint8Array;
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export type KitsuneSpace = Uint8Array;
|
|
37
41
|
/** Base64 hash types */
|
|
38
42
|
/**
|
|
39
43
|
* @public
|
|
40
44
|
*/
|
|
41
|
-
export
|
|
45
|
+
export type HoloHashB64 = string;
|
|
42
46
|
/**
|
|
43
47
|
* @public
|
|
44
48
|
*/
|
|
45
|
-
export
|
|
49
|
+
export type AgentPubKeyB64 = HoloHashB64;
|
|
46
50
|
/**
|
|
47
51
|
* @public
|
|
48
52
|
*/
|
|
49
|
-
export
|
|
53
|
+
export type DnaHashB64 = HoloHashB64;
|
|
50
54
|
/**
|
|
51
55
|
* @public
|
|
52
56
|
*/
|
|
53
|
-
export
|
|
57
|
+
export type WasmHashB64 = HoloHashB64;
|
|
54
58
|
/**
|
|
55
59
|
* @public
|
|
56
60
|
*/
|
|
57
|
-
export
|
|
61
|
+
export type EntryHashB64 = HoloHashB64;
|
|
58
62
|
/**
|
|
59
63
|
* @public
|
|
60
64
|
*/
|
|
61
|
-
export
|
|
65
|
+
export type ActionHashB64 = HoloHashB64;
|
|
62
66
|
/**
|
|
63
67
|
* @public
|
|
64
68
|
*/
|
|
65
|
-
export
|
|
69
|
+
export type AnyDhtHashB64 = HoloHashB64;
|
|
66
70
|
/**
|
|
67
71
|
* @public
|
|
68
72
|
*/
|
|
69
|
-
export
|
|
73
|
+
export type InstalledAppId = string;
|
|
70
74
|
/**
|
|
71
75
|
* @public
|
|
72
76
|
*/
|
|
73
|
-
export
|
|
77
|
+
export type Signature = Uint8Array;
|
|
74
78
|
/**
|
|
75
79
|
* @public
|
|
76
80
|
*/
|
|
77
|
-
export
|
|
81
|
+
export type CellId = [DnaHash, AgentPubKey];
|
|
78
82
|
/**
|
|
79
83
|
* @public
|
|
80
84
|
*/
|
|
81
|
-
export
|
|
85
|
+
export type DnaProperties = unknown;
|
|
82
86
|
/**
|
|
83
87
|
* @public
|
|
84
88
|
*/
|
|
85
|
-
export
|
|
89
|
+
export type RoleName = string;
|
|
86
90
|
/**
|
|
87
91
|
* @public
|
|
88
92
|
*/
|
|
89
|
-
export
|
|
93
|
+
export type InstalledCell = {
|
|
90
94
|
cell_id: CellId;
|
|
91
95
|
role_name: RoleName;
|
|
92
96
|
};
|
|
93
97
|
/**
|
|
94
98
|
* @public
|
|
95
99
|
*/
|
|
96
|
-
export
|
|
100
|
+
export type Timestamp = number;
|
|
97
101
|
/**
|
|
98
102
|
* @public
|
|
99
103
|
*/
|
|
@@ -113,6 +117,11 @@ export interface HoloHashed<T> {
|
|
|
113
117
|
*/
|
|
114
118
|
export interface NetworkInfo {
|
|
115
119
|
fetch_pool_info: FetchPoolInfo;
|
|
120
|
+
current_number_of_peers: number;
|
|
121
|
+
arc_size: number;
|
|
122
|
+
total_network_peers: number;
|
|
123
|
+
bytes_since_last_time_queried: number;
|
|
124
|
+
completed_rounds_since_last_time_queried: number;
|
|
116
125
|
}
|
|
117
126
|
/**
|
|
118
127
|
* @public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holochain/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "A JavaScript client for the Holochain Conductor API",
|
|
5
5
|
"author": "Holochain Foundation <info@holochain.org> (http://holochain.org)",
|
|
6
6
|
"license": "CAL-1.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/holochain/holochain-client-js#readme",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": "
|
|
21
|
+
"node": ">=16.0.0 || >=18.0.0"
|
|
22
22
|
},
|
|
23
23
|
"main": "lib/index.js",
|
|
24
24
|
"module": "lib/index.js",
|
|
@@ -30,29 +30,28 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"lib"
|
|
32
32
|
],
|
|
33
|
-
"browser": {
|
|
34
|
-
"crypto": false
|
|
35
|
-
},
|
|
36
33
|
"scripts": {
|
|
37
34
|
"lint": "eslint --fix --ext .ts src test .eslintrc.cjs",
|
|
38
35
|
"test:app-agent": "RUST_LOG=error RUST_BACKTRACE=1 node --loader ts-node/esm test/e2e/app-agent-websocket.ts",
|
|
39
36
|
"test": "RUST_LOG=error RUST_BACKTRACE=1 node --loader ts-node/esm test/index.ts",
|
|
37
|
+
"build:lib": "rimraf ./lib && tsc -p tsconfig.build.json",
|
|
40
38
|
"build:docs": "api-extractor run --local && api-documenter markdown -i docs/temp -o docs",
|
|
41
|
-
"build": "
|
|
39
|
+
"build": "npm run build:lib && npm run build:docs"
|
|
42
40
|
},
|
|
43
41
|
"dependencies": {
|
|
44
42
|
"@holochain/serialization": "^0.1.0-beta-rc.3",
|
|
45
43
|
"@msgpack/msgpack": "^2.7.2",
|
|
44
|
+
"@noble/ed25519": "^2.0.0",
|
|
46
45
|
"@tauri-apps/api": "^1.2.0",
|
|
47
46
|
"emittery": "^1.0.1",
|
|
48
47
|
"isomorphic-ws": "^5.0.0",
|
|
49
48
|
"js-base64": "^3.7.3",
|
|
50
49
|
"lodash-es": "^4.17.21",
|
|
51
|
-
"
|
|
50
|
+
"ws": "^8.13.0"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
|
-
"@microsoft/api-documenter": "^7.
|
|
55
|
-
"@microsoft/api-extractor": "^7.
|
|
53
|
+
"@microsoft/api-documenter": "^7.21.7",
|
|
54
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
56
55
|
"@types/js-yaml": "^3.12.7",
|
|
57
56
|
"@types/lodash-es": "^4.17.6",
|
|
58
57
|
"@types/tape": "^4.13.2",
|
|
@@ -67,7 +66,7 @@
|
|
|
67
66
|
"prettier": "^2.6.2",
|
|
68
67
|
"rimraf": "^3.0.2",
|
|
69
68
|
"tape": "^5.5.3",
|
|
70
|
-
"ts-node": "^10.
|
|
71
|
-
"typescript": "^4.
|
|
69
|
+
"ts-node": "^10.9.1",
|
|
70
|
+
"typescript": "^4.9.5"
|
|
72
71
|
}
|
|
73
72
|
}
|