@reticulum/dacar 1.2.2 → 1.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reticulum/dacar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "JavaScript implementation of Dacar, a Decentralized Access Control system for Reticulum",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"node": ">=20"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@reticulum/core": "^0.
|
|
48
|
-
"@reticulum/node": "^0.
|
|
47
|
+
"@reticulum/core": "^0.7.0",
|
|
48
|
+
"@reticulum/node": "^0.7.0",
|
|
49
49
|
"@types/node": "^26.2.0"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
@@ -46,12 +46,11 @@
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
|
-
import { Destination } from "@reticulum/core
|
|
49
|
+
import { Destination, MsgPack } from "@reticulum/core";
|
|
50
50
|
import {
|
|
51
51
|
deriveChannel,
|
|
52
52
|
unwrapRawChannelMessage,
|
|
53
53
|
} from "@reticulum/core/src/rfed/index.js";
|
|
54
|
-
import { MicroMsgPack } from "@reticulum/core/src/utils/msgpack.js";
|
|
55
54
|
import { RFED_TOPIC } from "../naming.js";
|
|
56
55
|
|
|
57
56
|
/**
|
|
@@ -82,7 +81,7 @@ import { RFED_TOPIC } from "../naming.js";
|
|
|
82
81
|
* @typedef {Object} RfedDecodedRaw
|
|
83
82
|
* @property {"raw"|"lxmf"} kind
|
|
84
83
|
* @property {Uint8Array} [payload] Raw application payload (`kind === "raw"`).
|
|
85
|
-
* @property {import("@reticulum/core
|
|
84
|
+
* @property {import("@reticulum/core").Identity} [senderIdentity]
|
|
86
85
|
* @property {Uint8Array} [senderPub]
|
|
87
86
|
* @property {Uint8Array} [channelHash]
|
|
88
87
|
* @property {string} [channelName]
|
|
@@ -191,7 +190,7 @@ export class RfedDeltaSync {
|
|
|
191
190
|
// needing an announce. Best-effort: decode must still succeed without it.
|
|
192
191
|
try {
|
|
193
192
|
// Extract issuer_hash (field [0]) from the delta to map identity.
|
|
194
|
-
const decodedDelta =
|
|
193
|
+
const decodedDelta = MsgPack.decode(decoded.payload);
|
|
195
194
|
if (Array.isArray(decodedDelta) && decodedDelta.length > 0) {
|
|
196
195
|
const issuerHash = decodedDelta[0];
|
|
197
196
|
if (issuerHash instanceof Uint8Array && issuerHash.length === 16) {
|
|
@@ -252,7 +251,7 @@ export class RfedDeltaSync {
|
|
|
252
251
|
// needing an announce. Best-effort: decode must still succeed without it.
|
|
253
252
|
try {
|
|
254
253
|
// Extract issuer_hash (field [0]) from the delta to map identity.
|
|
255
|
-
const decodedDelta =
|
|
254
|
+
const decodedDelta = MsgPack.decode(decoded.payload);
|
|
256
255
|
if (Array.isArray(decodedDelta) && decodedDelta.length > 0) {
|
|
257
256
|
const issuerHash = decodedDelta[0];
|
|
258
257
|
if (issuerHash instanceof Uint8Array && issuerHash.length === 16) {
|