@polkadot-apps/statement-store 0.2.7 → 0.2.9
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/dist/topics.js +3 -3
- package/package.json +3 -3
package/dist/topics.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { blake2b256 } from "@polkadot-apps/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Create a 32-byte topic hash from a human-readable string.
|
|
4
4
|
*
|
|
@@ -17,7 +17,7 @@ import { blake2b } from "@noble/hashes/blake2.js";
|
|
|
17
17
|
*/
|
|
18
18
|
export function createTopic(name) {
|
|
19
19
|
const bytes = new TextEncoder().encode(name);
|
|
20
|
-
return
|
|
20
|
+
return blake2b256(bytes);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Create a 32-byte channel hash from a human-readable channel name.
|
|
@@ -35,7 +35,7 @@ export function createTopic(name) {
|
|
|
35
35
|
*/
|
|
36
36
|
export function createChannel(name) {
|
|
37
37
|
const bytes = new TextEncoder().encode(name);
|
|
38
|
-
return
|
|
38
|
+
return blake2b256(bytes);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Convert a topic or channel hash to a hex string (with 0x prefix).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polkadot-apps/statement-store",
|
|
3
3
|
"description": "Publish/subscribe client for the Polkadot Statement Store with topic-based routing and SCALE encoding",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@noble/hashes": "^2.0.1",
|
|
23
22
|
"polkadot-api": "^1.23.3",
|
|
24
|
-
"@polkadot-apps/chain-client": "0.3.
|
|
23
|
+
"@polkadot-apps/chain-client": "0.3.8",
|
|
25
24
|
"@polkadot-apps/logger": "0.1.5",
|
|
25
|
+
"@polkadot-apps/utils": "0.3.0",
|
|
26
26
|
"@polkadot-apps/descriptors": "1.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|