@holochain/client 0.12.0 → 0.12.2
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/types.d.ts +2 -2
- package/lib/utils/fake-hash.d.ts +9 -1
- package/lib/utils/fake-hash.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[](http://holochain.org/)
|
|
2
|
-
[](https://discord.gg/k55DS5dmPH)
|
|
3
3
|
[](https://github.com/holochain/cryptographic-autonomy-license)
|
|
4
4
|

|
|
5
5
|
[](https://twitter.com/holochain)
|
package/lib/types.d.ts
CHANGED
|
@@ -112,12 +112,12 @@ export interface HoloHashed<T> {
|
|
|
112
112
|
* @public
|
|
113
113
|
*/
|
|
114
114
|
export interface NetworkInfo {
|
|
115
|
-
|
|
115
|
+
fetch_pool_info: FetchPoolInfo;
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* @public
|
|
119
119
|
*/
|
|
120
|
-
export interface
|
|
120
|
+
export interface FetchPoolInfo {
|
|
121
121
|
op_bytes_to_fetch: number;
|
|
122
122
|
num_ops_to_fetch: number;
|
|
123
123
|
}
|
package/lib/utils/fake-hash.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHash, AgentPubKey, EntryHash } from "../types.js";
|
|
1
|
+
import { DnaHash, ActionHash, AgentPubKey, EntryHash } from "../types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Generate a valid hash of a non-existing entry.
|
|
4
4
|
*
|
|
@@ -25,3 +25,11 @@ export declare function fakeAgentPubKey(): Promise<AgentPubKey>;
|
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
27
|
export declare function fakeActionHash(): Promise<ActionHash>;
|
|
28
|
+
/**
|
|
29
|
+
* Generate a valid hash of a non-existing DNA.
|
|
30
|
+
*
|
|
31
|
+
* @returns A {@link DnaHash}.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export declare function fakeDnaHash(): Promise<DnaHash>;
|
package/lib/utils/fake-hash.js
CHANGED
|
@@ -34,3 +34,14 @@ export async function fakeActionHash() {
|
|
|
34
34
|
const randomBytes = await randomByteArray(36);
|
|
35
35
|
return new Uint8Array([0x84, 0x29, 0x24, ...randomBytes]);
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Generate a valid hash of a non-existing DNA.
|
|
39
|
+
*
|
|
40
|
+
* @returns A {@link DnaHash}.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export async function fakeDnaHash() {
|
|
45
|
+
const randomBytes = await randomByteArray(36);
|
|
46
|
+
return new Uint8Array([0x84, 0x2d, 0x24, ...randomBytes]);
|
|
47
|
+
}
|
package/package.json
CHANGED