@avatarsd-llc/libtracer 0.20.0 → 0.22.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/dist/codec.d.mts +8 -8
- package/dist/codec.mjs +9 -9
- package/package.json +1 -1
package/dist/codec.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @brief True for
|
|
3
|
-
* element array rather than a self-describing payload (RFC-0024 §4.2
|
|
4
|
-
*
|
|
5
|
-
* `0x15` sits adjacent to `0x14` so this stays one masked compare on the per-TLV parse path.
|
|
2
|
+
* @brief True for `0x14 PATH_REF` only — the one type whose body is a fixed-stride 8-byte
|
|
3
|
+
* element array rather than a self-describing payload (RFC-0024 §4.2). `0x15` carries a
|
|
4
|
+
* `PATH` body since RFC-0029 §7.1, so no shape rule applies to it here.
|
|
6
5
|
*
|
|
7
6
|
* @param {number} typeB the TLV's type byte
|
|
8
7
|
* @returns {boolean} true when the bound-path body shape rules apply (RFC-0024 §4.2/§4.3)
|
|
@@ -88,10 +87,11 @@ export type TYPE = number;
|
|
|
88
87
|
* 0x0E SPEC is the in-band vertex-creation spec. 0x0F FWD and 0x10 FIELD are the
|
|
89
88
|
* remote-operation frames (RFC-0004 / ADR-0035, the v1 fast-track range
|
|
90
89
|
* 0x0F-0x1F). All are structured (opt.PL=1) and handled generically by the codec.
|
|
91
|
-
* 0x14 PATH_REF is the bound-path
|
|
92
|
-
*
|
|
93
|
-
* (
|
|
94
|
-
*
|
|
90
|
+
* 0x14 PATH_REF is the retired RFC-0024 bound-path form, refused as an address
|
|
91
|
+
* (RFC-0029 S1); it is the one exception: its body is a bare fixed-stride 8-byte
|
|
92
|
+
* record array (opt.PL=0), so the decoder checks its shape by type. 0x15
|
|
93
|
+
* PATH_REF_REVERSE is the reverse-direction list every forwarding hop of a
|
|
94
|
+
* subscribe grows (RFC-0029 §7.1): a `PATH` body of PAIR and NAME records.
|
|
95
95
|
*
|
|
96
96
|
* @readonly
|
|
97
97
|
* @enum {number}
|
package/dist/codec.mjs
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
* 0x0E SPEC is the in-band vertex-creation spec. 0x0F FWD and 0x10 FIELD are the
|
|
23
23
|
* remote-operation frames (RFC-0004 / ADR-0035, the v1 fast-track range
|
|
24
24
|
* 0x0F-0x1F). All are structured (opt.PL=1) and handled generically by the codec.
|
|
25
|
-
* 0x14 PATH_REF is the bound-path
|
|
26
|
-
*
|
|
27
|
-
* (
|
|
28
|
-
*
|
|
25
|
+
* 0x14 PATH_REF is the retired RFC-0024 bound-path form, refused as an address
|
|
26
|
+
* (RFC-0029 S1); it is the one exception: its body is a bare fixed-stride 8-byte
|
|
27
|
+
* record array (opt.PL=0), so the decoder checks its shape by type. 0x15
|
|
28
|
+
* PATH_REF_REVERSE is the reverse-direction list every forwarding hop of a
|
|
29
|
+
* subscribe grows (RFC-0029 §7.1): a `PATH` body of PAIR and NAME records.
|
|
29
30
|
*
|
|
30
31
|
* @readonly
|
|
31
32
|
* @enum {number}
|
|
@@ -50,16 +51,15 @@ export const TYPE = Object.freeze({
|
|
|
50
51
|
PATH_REF_REVERSE: 0x15,
|
|
51
52
|
});
|
|
52
53
|
/**
|
|
53
|
-
* @brief True for
|
|
54
|
-
* element array rather than a self-describing payload (RFC-0024 §4.2
|
|
55
|
-
*
|
|
56
|
-
* `0x15` sits adjacent to `0x14` so this stays one masked compare on the per-TLV parse path.
|
|
54
|
+
* @brief True for `0x14 PATH_REF` only — the one type whose body is a fixed-stride 8-byte
|
|
55
|
+
* element array rather than a self-describing payload (RFC-0024 §4.2). `0x15` carries a
|
|
56
|
+
* `PATH` body since RFC-0029 §7.1, so no shape rule applies to it here.
|
|
57
57
|
*
|
|
58
58
|
* @param {number} typeB the TLV's type byte
|
|
59
59
|
* @returns {boolean} true when the bound-path body shape rules apply (RFC-0024 §4.2/§4.3)
|
|
60
60
|
*/
|
|
61
61
|
export function isPathRefType(typeB) {
|
|
62
|
-
return
|
|
62
|
+
return typeB === TYPE.PATH_REF;
|
|
63
63
|
}
|
|
64
64
|
/** @brief The `PATH_REF` element stride — 8 bytes, `(u32 index, u32 generation)` LE (RFC-0024 §4.4). */
|
|
65
65
|
export const PATH_REF_ELEMENT_BYTES = 8;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avatarsd-llc/libtracer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "TypeScript core for libtracer — a lightweight decentralized graph-based networking protocol. Native pure-TS implementation (in-process codec; no transports), conformance-gated against the shared vectors.",
|
|
5
5
|
"author": "avatarsd LLC",
|
|
6
6
|
"license": "Apache-2.0",
|