@hamradio/meshcore 1.1.1 → 1.1.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 +40 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,18 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript library for MeshCore protocol utilities.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Packet parsing
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Using the library to decode MeshCore packets:
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```
|
|
9
|
+
```ts
|
|
10
|
+
import { Packet } from '@hamradio/meshcore';
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
const raw = new Uint8Array(Buffer.from("050AA50E2CB0336DB67BBF78928A3BB9BF7A8B677C83B6EC0716F9DD10002A06", "hex"));
|
|
13
|
+
const packet = Packet.fromBytes(raw);
|
|
14
|
+
console.log(packet);
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/*
|
|
17
|
+
_Packet {
|
|
18
|
+
header: 5,
|
|
19
|
+
transport: undefined,
|
|
20
|
+
pathLength: 10,
|
|
21
|
+
path: Uint8Array(10) [
|
|
22
|
+
165, 14, 44, 176,
|
|
23
|
+
51, 109, 182, 123,
|
|
24
|
+
191, 120
|
|
25
|
+
],
|
|
26
|
+
payload: Uint8Array(20) [
|
|
27
|
+
146, 138, 59, 185, 191, 122,
|
|
28
|
+
139, 103, 124, 131, 182, 236,
|
|
29
|
+
7, 22, 249, 221, 16, 0,
|
|
30
|
+
42, 6
|
|
31
|
+
],
|
|
32
|
+
routeType: 1,
|
|
33
|
+
payloadVersion: 0,
|
|
34
|
+
payloadType: 1,
|
|
35
|
+
pathHashCount: 1,
|
|
36
|
+
pathHashSize: 10,
|
|
37
|
+
pathHashBytes: 10,
|
|
38
|
+
pathHashes: [ 'a50e2cb0336db67bbf78' ]
|
|
39
|
+
}
|
|
40
|
+
*/
|
|
17
41
|
```
|
|
18
42
|
|
|
19
|
-
|
|
43
|
+
## Identities
|
|
44
|
+
|
|
45
|
+
The package supports:
|
|
46
|
+
- `Identity` for public key management.
|
|
47
|
+
- `LocalIdentity` for private key management.
|
|
48
|
+
- `Contact` for managing named identities.
|
|
49
|
+
- `Group` for managing groups.
|
|
50
|
+
- `KeyManager` for managing all of the above and handling decryption.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hamradio/meshcore",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "MeshCore protocol support for Typescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MeshCore",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "
|
|
12
|
+
"url": "https://git.maze.io/ham/meshcore.js"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Wijnand Modderman-Lenstra",
|