wire-mesh-core 2.0.1 → 2.1.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.
@@ -0,0 +1,20 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_gossip_extensions = require("../gossip-extensions-BBYgMZ2N.cjs");
3
+ //#region src/domain/advert-extension-policy.ts
4
+ /** The extension keys wire-mesh-core itself writes on every self-advert, which a policy never has to list. */
5
+ const CORE_EXTENSION_KEYS = /* @__PURE__ */ new Set([require_gossip_extensions.TOPOLOGY_PEERS_GOSSIP_KEY, require_gossip_extensions.CORE_VERSION_GOSSIP_KEY]);
6
+ /**
7
+ * Checks every extension entry of an advert against a policy. Refuses on the first entry that is not allowed and names its key, so the host can say why.
8
+ */
9
+ function checkAdvertExtensions(advert, policy) {
10
+ for (const [key, value] of Object.entries(advert)) {
11
+ if (require_gossip_extensions.RESERVED_PEER_ADVERT_KEYS.has(key) || CORE_EXTENSION_KEYS.has(key)) continue;
12
+ if ((Object.hasOwn(policy.allowed, key) ? policy.allowed[key] : void 0)?.(value) !== true) return {
13
+ ok: false,
14
+ key
15
+ };
16
+ }
17
+ return { ok: true };
18
+ }
19
+ //#endregion
20
+ exports.checkAdvertExtensions = checkAdvertExtensions;
@@ -0,0 +1,21 @@
1
+ import { et as PeerAdvert } from "../protocol-Bi2fzBCc.cjs";
2
+ //#region src/domain/advert-extension-policy.d.ts
3
+ /** Whether one extension entry's value is one the hub will carry. Must be strict: a value with a field the validator did not expect is refused, since the point is that nothing unexpected is published. */
4
+ export type ExtensionValidator = (value: unknown) => boolean;
5
+ export interface AdvertExtensionPolicy {
6
+ /**
7
+ * The application extensions the hub carries, each with the validator its value must pass. An advert holding any extension key not listed here, or a listed key whose value fails its validator, is refused whole. wire-mesh-core's own extensions (topology and version) are always carried and need no entry.
8
+ */
9
+ readonly allowed: Readonly<Record<string, ExtensionValidator>>;
10
+ }
11
+ export type AdvertExtensionVerdict = {
12
+ readonly ok: true;
13
+ } | {
14
+ readonly ok: false;
15
+ readonly key: string;
16
+ };
17
+ /**
18
+ * Checks every extension entry of an advert against a policy. Refuses on the first entry that is not allowed and names its key, so the host can say why.
19
+ */
20
+ export declare function checkAdvertExtensions(advert: Readonly<PeerAdvert>, policy: Readonly<AdvertExtensionPolicy>): AdvertExtensionVerdict;
21
+ //#endregion
@@ -0,0 +1,21 @@
1
+ import { et as PeerAdvert } from "../protocol-Bi2fzBCc.mjs";
2
+ //#region src/domain/advert-extension-policy.d.ts
3
+ /** Whether one extension entry's value is one the hub will carry. Must be strict: a value with a field the validator did not expect is refused, since the point is that nothing unexpected is published. */
4
+ export type ExtensionValidator = (value: unknown) => boolean;
5
+ export interface AdvertExtensionPolicy {
6
+ /**
7
+ * The application extensions the hub carries, each with the validator its value must pass. An advert holding any extension key not listed here, or a listed key whose value fails its validator, is refused whole. wire-mesh-core's own extensions (topology and version) are always carried and need no entry.
8
+ */
9
+ readonly allowed: Readonly<Record<string, ExtensionValidator>>;
10
+ }
11
+ export type AdvertExtensionVerdict = {
12
+ readonly ok: true;
13
+ } | {
14
+ readonly ok: false;
15
+ readonly key: string;
16
+ };
17
+ /**
18
+ * Checks every extension entry of an advert against a policy. Refuses on the first entry that is not allowed and names its key, so the host can say why.
19
+ */
20
+ export declare function checkAdvertExtensions(advert: Readonly<PeerAdvert>, policy: Readonly<AdvertExtensionPolicy>): AdvertExtensionVerdict;
21
+ //#endregion
@@ -0,0 +1,19 @@
1
+ import { i as CORE_VERSION_GOSSIP_KEY, n as TOPOLOGY_PEERS_GOSSIP_KEY, t as RESERVED_PEER_ADVERT_KEYS } from "../gossip-extensions-B6WJjkAr.mjs";
2
+ //#region src/domain/advert-extension-policy.ts
3
+ /** The extension keys wire-mesh-core itself writes on every self-advert, which a policy never has to list. */
4
+ const CORE_EXTENSION_KEYS = /* @__PURE__ */ new Set([TOPOLOGY_PEERS_GOSSIP_KEY, CORE_VERSION_GOSSIP_KEY]);
5
+ /**
6
+ * Checks every extension entry of an advert against a policy. Refuses on the first entry that is not allowed and names its key, so the host can say why.
7
+ */
8
+ function checkAdvertExtensions(advert, policy) {
9
+ for (const [key, value] of Object.entries(advert)) {
10
+ if (RESERVED_PEER_ADVERT_KEYS.has(key) || CORE_EXTENSION_KEYS.has(key)) continue;
11
+ if ((Object.hasOwn(policy.allowed, key) ? policy.allowed[key] : void 0)?.(value) !== true) return {
12
+ ok: false,
13
+ key
14
+ };
15
+ }
16
+ return { ok: true };
17
+ }
18
+ //#endregion
19
+ export { checkAdvertExtensions };
@@ -13,6 +13,10 @@ function randomTokenId() {
13
13
  crypto.getRandomValues(bytes);
14
14
  return bytes;
15
15
  }
16
+ /** Stops a pending timer from keeping the process alive, where the runtime has that notion. Node's setTimeout returns an object with unref(); a browser's or a Worker's returns a number, which has nothing to unref and must not be called as if it did. */
17
+ function unrefIfSupported(handle) {
18
+ if (typeof handle === "object" && handle !== null && "unref" in handle && typeof handle.unref === "function") Reflect.apply(handle.unref, handle, []);
19
+ }
16
20
  /**
17
21
  * Builds a capability-request command per management.cddl. The outer `manage-command.verb` is the capability string itself -- the same value as this map's own `params.capability` field -- never a generic literal: capability-verb's own CDDL grammar is a closed alternation of colon-delimited `domain:noun` regexes (spec/tokens.cddl), so a bare literal like "capability" could never satisfy it, and routing by capability (the same way room.send/room.join already share the ROOM_MEMBER_CAPABILITY outer verb) is how a receiver's own per-capability handler knows which grant this ask is even for. `params.verb` is the fixed "capability.request" marker that distinguishes this ask from any other verb sharing the same outer capability (mirroring room.send/room.join's own inner `params.verb` split under one shared outer verb). `valid-until`, when given, bounds how long this ask is worth granting (wire-mesh#82) -- a receiver refuses outright once its own clock has passed it, rather than presenting a stale ask to a human for approval.
18
22
  */
@@ -69,7 +73,7 @@ function createCapabilityRequestHandler(options) {
69
73
  message: "no decision within the capability-request timeout"
70
74
  }).catch(() => void 0);
71
75
  }, options.timeoutMs);
72
- timeoutHandle.unref();
76
+ unrefIfSupported(timeoutHandle);
73
77
  options.onRequest({
74
78
  scope: incoming.scope,
75
79
  requesterDevice: options.bearerDevice,
@@ -12,6 +12,10 @@ function randomTokenId() {
12
12
  crypto.getRandomValues(bytes);
13
13
  return bytes;
14
14
  }
15
+ /** Stops a pending timer from keeping the process alive, where the runtime has that notion. Node's setTimeout returns an object with unref(); a browser's or a Worker's returns a number, which has nothing to unref and must not be called as if it did. */
16
+ function unrefIfSupported(handle) {
17
+ if (typeof handle === "object" && handle !== null && "unref" in handle && typeof handle.unref === "function") Reflect.apply(handle.unref, handle, []);
18
+ }
15
19
  /**
16
20
  * Builds a capability-request command per management.cddl. The outer `manage-command.verb` is the capability string itself -- the same value as this map's own `params.capability` field -- never a generic literal: capability-verb's own CDDL grammar is a closed alternation of colon-delimited `domain:noun` regexes (spec/tokens.cddl), so a bare literal like "capability" could never satisfy it, and routing by capability (the same way room.send/room.join already share the ROOM_MEMBER_CAPABILITY outer verb) is how a receiver's own per-capability handler knows which grant this ask is even for. `params.verb` is the fixed "capability.request" marker that distinguishes this ask from any other verb sharing the same outer capability (mirroring room.send/room.join's own inner `params.verb` split under one shared outer verb). `valid-until`, when given, bounds how long this ask is worth granting (wire-mesh#82) -- a receiver refuses outright once its own clock has passed it, rather than presenting a stale ask to a human for approval.
17
21
  */
@@ -68,7 +72,7 @@ function createCapabilityRequestHandler(options) {
68
72
  message: "no decision within the capability-request timeout"
69
73
  }).catch(() => void 0);
70
74
  }, options.timeoutMs);
71
- timeoutHandle.unref();
75
+ unrefIfSupported(timeoutHandle);
72
76
  options.onRequest({
73
77
  scope: incoming.scope,
74
78
  requesterDevice: options.bearerDevice,
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_gossip_extensions = require("../gossip-extensions-DRVTHKnR.cjs");
2
+ const require_gossip_extensions = require("../gossip-extensions-BBYgMZ2N.cjs");
3
+ exports.RESERVED_PEER_ADVERT_KEYS = require_gossip_extensions.RESERVED_PEER_ADVERT_KEYS;
3
4
  exports.TOPOLOGY_PEERS_GOSSIP_KEY = require_gossip_extensions.TOPOLOGY_PEERS_GOSSIP_KEY;
4
5
  exports.validateGossipExtensions = require_gossip_extensions.validateGossipExtensions;
@@ -1,4 +1,6 @@
1
1
  //#region src/domain/gossip-extensions.d.ts
2
+ /** peer-advert's own typed fields, reserved so a `sendGossipUpdate` caller can never override the session's own device-id, address list, freshness timestamp, self-certifying key, or signature by supplying an extension of the same name. The last two matter most: an extension able to shadow them would let a caller replace the very fields wire-mesh#225's authentication rests on. */
3
+ export declare const RESERVED_PEER_ADVERT_KEYS: ReadonlySet<string>;
2
4
  /** The gossip extension key topology self-advertisement (wire-mesh#180) is carried under -- session-managed, computed fresh from this session's own connection/relayPairings state on every self-advert, never a caller-supplied fact. */
3
5
  export declare const TOPOLOGY_PEERS_GOSSIP_KEY = "topology/peers";
4
6
  /** Rejects a `sendGossipUpdate` extension bag that would shadow one of peer-advert's own mandatory fields, shadow topology/peers (a field the session itself already computes and injects automatically, wire-mesh#180), use the key wire-mesh-core itself reserves for its own self-reported version (wire-mesh#179), or use a bare, non-domain-qualified key -- all are caller bugs that must fail loudly at the call site, not silently corrupt or ambiguously merge into the wire frame. */
@@ -1,4 +1,6 @@
1
1
  //#region src/domain/gossip-extensions.d.ts
2
+ /** peer-advert's own typed fields, reserved so a `sendGossipUpdate` caller can never override the session's own device-id, address list, freshness timestamp, self-certifying key, or signature by supplying an extension of the same name. The last two matter most: an extension able to shadow them would let a caller replace the very fields wire-mesh#225's authentication rests on. */
3
+ export declare const RESERVED_PEER_ADVERT_KEYS: ReadonlySet<string>;
2
4
  /** The gossip extension key topology self-advertisement (wire-mesh#180) is carried under -- session-managed, computed fresh from this session's own connection/relayPairings state on every self-advert, never a caller-supplied fact. */
3
5
  export declare const TOPOLOGY_PEERS_GOSSIP_KEY = "topology/peers";
4
6
  /** Rejects a `sendGossipUpdate` extension bag that would shadow one of peer-advert's own mandatory fields, shadow topology/peers (a field the session itself already computes and injects automatically, wire-mesh#180), use the key wire-mesh-core itself reserves for its own self-reported version (wire-mesh#179), or use a bare, non-domain-qualified key -- all are caller bugs that must fail loudly at the call site, not silently corrupt or ambiguously merge into the wire frame. */
@@ -1,2 +1,2 @@
1
- import { n as validateGossipExtensions, t as TOPOLOGY_PEERS_GOSSIP_KEY } from "../gossip-extensions-BNiI44sU.mjs";
2
- export { TOPOLOGY_PEERS_GOSSIP_KEY, validateGossipExtensions };
1
+ import { n as TOPOLOGY_PEERS_GOSSIP_KEY, r as validateGossipExtensions, t as RESERVED_PEER_ADVERT_KEYS } from "../gossip-extensions-B6WJjkAr.mjs";
2
+ export { RESERVED_PEER_ADVERT_KEYS, TOPOLOGY_PEERS_GOSSIP_KEY, validateGossipExtensions };
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_gossip_extensions = require("../gossip-extensions-BBYgMZ2N.cjs");
3
+ const require_domain_peer_advert = require("./peer-advert.cjs");
2
4
  const require_domain_device_id = require("./device-id.cjs");
3
5
  const require_domain_handshake = require("./handshake.cjs");
4
6
  const require_domain_async_queue = require("./async-queue.cjs");
5
7
  const require_domain_ping_round_trips = require("./ping-round-trips.cjs");
6
8
  const require_domain_topology_snapshot = require("./topology-snapshot.cjs");
7
- const require_gossip_extensions = require("../gossip-extensions-DRVTHKnR.cjs");
8
- const require_domain_peer_advert = require("./peer-advert.cjs");
9
9
  const require_adapters_frame_codec = require("../adapters/frame-codec.cjs");
10
10
  //#region src/domain/relay-pairing.ts
11
11
  function createRelayPairings() {
@@ -1,10 +1,10 @@
1
+ import { a as OWN_VERSION, i as CORE_VERSION_GOSSIP_KEY, n as TOPOLOGY_PEERS_GOSSIP_KEY, o as isVersionGetCommand, r as validateGossipExtensions, s as versionGetOutcome } from "../gossip-extensions-B6WJjkAr.mjs";
2
+ import { signPeerAdvert, verifyPeerAdvert } from "./peer-advert.mjs";
1
3
  import { deviceIdToHex } from "./device-id.mjs";
2
4
  import { negotiate } from "./handshake.mjs";
3
5
  import { createAsyncQueue } from "./async-queue.mjs";
4
6
  import { createPingRoundTrips } from "./ping-round-trips.mjs";
5
7
  import { createTopologySnapshotTracker } from "./topology-snapshot.mjs";
6
- import { a as isVersionGetCommand, i as OWN_VERSION, n as validateGossipExtensions, o as versionGetOutcome, r as CORE_VERSION_GOSSIP_KEY, t as TOPOLOGY_PEERS_GOSSIP_KEY } from "../gossip-extensions-BNiI44sU.mjs";
7
- import { signPeerAdvert, verifyPeerAdvert } from "./peer-advert.mjs";
8
8
  import { tryDecodeFrame, wrapRelayData } from "../adapters/frame-codec.mjs";
9
9
  //#region src/domain/relay-pairing.ts
10
10
  function createRelayPairings() {
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_domain_peer_advert = require("./peer-advert.cjs");
3
+ const require_domain_advert_extension_policy = require("./advert-extension-policy.cjs");
3
4
  //#region src/domain/relay-hub.ts
4
5
  const HEX_RADIX = 16;
5
6
  const HEX_DIGITS_PER_BYTE = 2;
@@ -115,6 +116,16 @@ function createRelayHub(options) {
115
116
  const accepted = [];
116
117
  for (const advert of frame.peers) {
117
118
  if (!await require_domain_peer_advert.verifyPeerAdvert(options.identity, advert)) continue;
119
+ if (options.extensionPolicy !== void 0) {
120
+ const verdict = require_domain_advert_extension_policy.checkAdvertExtensions(advert, options.extensionPolicy);
121
+ if (!verdict.ok) {
122
+ options.onAdvertRefused?.({
123
+ device: advert.device,
124
+ key: verdict.key
125
+ });
126
+ continue;
127
+ }
128
+ }
118
129
  const key = deviceKey(advert.device);
119
130
  const previous = devices.get(key);
120
131
  if (previous !== void 0 && !supersedes(previous, advert, connection)) continue;
@@ -1,5 +1,6 @@
1
1
  import { D as DeviceId, N as Frame, et as PeerAdvert } from "../protocol-Bi2fzBCc.cjs";
2
2
  import { t as Connection } from "../transport-Cq_odHy3.cjs";
3
+ import { AdvertExtensionPolicy } from "./advert-extension-policy.cjs";
3
4
  import { PeerAdvertVerifier } from "./peer-advert.cjs";
4
5
  //#region src/domain/relay-hub.d.ts
5
6
  /**
@@ -20,9 +21,21 @@ export interface RelayConnectionRestore {
20
21
  readonly connection: Readonly<Connection>;
21
22
  readonly state: RelayConnectionState;
22
23
  }
24
+ /** An advert the hub refused to carry because of what its extension tail holds. */
25
+ export interface AdvertRefusal {
26
+ readonly device: DeviceId;
27
+ /** The extension key that was not allowed, or whose value failed its validator. */
28
+ readonly key: string;
29
+ }
23
30
  export interface RelayHubOptions {
24
31
  /** The crypto primitives this hub verifies every gossiped advert with (wire-mesh#225). Narrowed to verify/deriveDeviceId rather than a full IdentityPort because an advert is self-certifying: a hub checks one against the key the advert itself carries, and never needs a signing identity of its own to do it. */
25
32
  readonly identity: Readonly<PeerAdvertVerifier>;
33
+ /**
34
+ * Which extension entries of an advert this hub will carry. Absent, every extension is carried, which is right for a hub whose every client belongs to one mesh. A hub open to anyone should set it: an advert is forwarded whole to every client, so this is the only control the hub has over what an application publishes to strangers.
35
+ */
36
+ readonly extensionPolicy?: AdvertExtensionPolicy;
37
+ /** Called with each advert refused by extensionPolicy, so the host can report it; the advert's sender is given no reply, since the transport spec defines none. */
38
+ readonly onAdvertRefused?: (refusal: Readonly<AdvertRefusal>) => void;
26
39
  /** Called whenever the value exportConnection returns for a connection changes: it gossiped an advert, gained or lost a pairing, or had one of its adverts taken over by another connection. A host whose own instance can be torn down while its connections stay open (the Cloudflare hub's hibernating Durable Object) reads the new value back with exportConnection, persists it against the connection, and hands it to a later instance through restoreConnections. */
27
40
  readonly onConnectionStateChanged?: (connection: Readonly<Connection>) => void;
28
41
  }
@@ -1,5 +1,6 @@
1
1
  import { D as DeviceId, N as Frame, et as PeerAdvert } from "../protocol-Bi2fzBCc.mjs";
2
2
  import { t as Connection } from "../transport-GcJ4LYVE.mjs";
3
+ import { AdvertExtensionPolicy } from "./advert-extension-policy.mjs";
3
4
  import { PeerAdvertVerifier } from "./peer-advert.mjs";
4
5
  //#region src/domain/relay-hub.d.ts
5
6
  /**
@@ -20,9 +21,21 @@ export interface RelayConnectionRestore {
20
21
  readonly connection: Readonly<Connection>;
21
22
  readonly state: RelayConnectionState;
22
23
  }
24
+ /** An advert the hub refused to carry because of what its extension tail holds. */
25
+ export interface AdvertRefusal {
26
+ readonly device: DeviceId;
27
+ /** The extension key that was not allowed, or whose value failed its validator. */
28
+ readonly key: string;
29
+ }
23
30
  export interface RelayHubOptions {
24
31
  /** The crypto primitives this hub verifies every gossiped advert with (wire-mesh#225). Narrowed to verify/deriveDeviceId rather than a full IdentityPort because an advert is self-certifying: a hub checks one against the key the advert itself carries, and never needs a signing identity of its own to do it. */
25
32
  readonly identity: Readonly<PeerAdvertVerifier>;
33
+ /**
34
+ * Which extension entries of an advert this hub will carry. Absent, every extension is carried, which is right for a hub whose every client belongs to one mesh. A hub open to anyone should set it: an advert is forwarded whole to every client, so this is the only control the hub has over what an application publishes to strangers.
35
+ */
36
+ readonly extensionPolicy?: AdvertExtensionPolicy;
37
+ /** Called with each advert refused by extensionPolicy, so the host can report it; the advert's sender is given no reply, since the transport spec defines none. */
38
+ readonly onAdvertRefused?: (refusal: Readonly<AdvertRefusal>) => void;
26
39
  /** Called whenever the value exportConnection returns for a connection changes: it gossiped an advert, gained or lost a pairing, or had one of its adverts taken over by another connection. A host whose own instance can be torn down while its connections stay open (the Cloudflare hub's hibernating Durable Object) reads the new value back with exportConnection, persists it against the connection, and hands it to a later instance through restoreConnections. */
27
40
  readonly onConnectionStateChanged?: (connection: Readonly<Connection>) => void;
28
41
  }
@@ -1,4 +1,5 @@
1
1
  import { verifyPeerAdvert } from "./peer-advert.mjs";
2
+ import { checkAdvertExtensions } from "./advert-extension-policy.mjs";
2
3
  //#region src/domain/relay-hub.ts
3
4
  const HEX_RADIX = 16;
4
5
  const HEX_DIGITS_PER_BYTE = 2;
@@ -114,6 +115,16 @@ function createRelayHub(options) {
114
115
  const accepted = [];
115
116
  for (const advert of frame.peers) {
116
117
  if (!await verifyPeerAdvert(options.identity, advert)) continue;
118
+ if (options.extensionPolicy !== void 0) {
119
+ const verdict = checkAdvertExtensions(advert, options.extensionPolicy);
120
+ if (!verdict.ok) {
121
+ options.onAdvertRefused?.({
122
+ device: advert.device,
123
+ key: verdict.key
124
+ });
125
+ continue;
126
+ }
127
+ }
117
128
  const key = deviceKey(advert.device);
118
129
  const previous = devices.get(key);
119
130
  if (previous !== void 0 && !supersedes(previous, advert, connection)) continue;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_generated_protocol = require("../generated/protocol.cjs");
3
- const require_gossip_extensions = require("../gossip-extensions-DRVTHKnR.cjs");
3
+ const require_gossip_extensions = require("../gossip-extensions-BBYgMZ2N.cjs");
4
4
  //#region src/domain/topology.ts
5
5
  /**
6
6
  * Topology introspection (wire-mesh#180): assembling a connection graph out of every device's own self-reported `topology/peers` gossip extension (mesh-session.ts's buildSelfAdvert computes and injects it automatically -- nothing here writes to it), and answering the on-demand `topology.get` manage-command for a live, cache-bust read instead of a possibly-stale gossiped one. `topology:get` is deliberately ungated, per management.cddl's own comment on `topology-get` and this registry entry -- no token/scope check anywhere in this module, mirroring how core/room's room.join/room.invite are ungated in room-client.ts.
@@ -1,5 +1,5 @@
1
1
  import { topologyGetSchema, topologyPeersSchema } from "../generated/protocol.mjs";
2
- import { t as TOPOLOGY_PEERS_GOSSIP_KEY } from "../gossip-extensions-BNiI44sU.mjs";
2
+ import { n as TOPOLOGY_PEERS_GOSSIP_KEY } from "../gossip-extensions-B6WJjkAr.mjs";
3
3
  //#region src/domain/topology.ts
4
4
  /**
5
5
  * Topology introspection (wire-mesh#180): assembling a connection graph out of every device's own self-reported `topology/peers` gossip extension (mesh-session.ts's buildSelfAdvert computes and injects it automatically -- nothing here writes to it), and answering the on-demand `topology.get` manage-command for a live, cache-bust read instead of a possibly-stale gossiped one. `topology:get` is deliberately ungated, per management.cddl's own comment on `topology-get` and this registry entry -- no token/scope check anywhere in this module, mirroring how core/room's room.join/room.invite are ungated in room-client.ts.
@@ -41,4 +41,4 @@ function validateGossipExtensions(extensions) {
41
41
  }
42
42
  }
43
43
  //#endregion
44
- export { isVersionGetCommand as a, OWN_VERSION as i, validateGossipExtensions as n, versionGetOutcome as o, CORE_VERSION_GOSSIP_KEY as r, TOPOLOGY_PEERS_GOSSIP_KEY as t };
44
+ export { OWN_VERSION as a, CORE_VERSION_GOSSIP_KEY as i, TOPOLOGY_PEERS_GOSSIP_KEY as n, isVersionGetCommand as o, validateGossipExtensions as r, versionGetOutcome as s, RESERVED_PEER_ADVERT_KEYS as t };
@@ -55,6 +55,12 @@ Object.defineProperty(exports, "OWN_VERSION", {
55
55
  return OWN_VERSION;
56
56
  }
57
57
  });
58
+ Object.defineProperty(exports, "RESERVED_PEER_ADVERT_KEYS", {
59
+ enumerable: true,
60
+ get: function() {
61
+ return RESERVED_PEER_ADVERT_KEYS;
62
+ }
63
+ });
58
64
  Object.defineProperty(exports, "TOPOLOGY_PEERS_GOSSIP_KEY", {
59
65
  enumerable: true,
60
66
  get: function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wire-mesh-core",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "dependencies": {
5
5
  "cbor2": "2.3.0",
6
6
  "cddl.js": "1.0.1",
@@ -62,6 +62,10 @@
62
62
  "import": "./dist/adapters/tls-transport.mjs",
63
63
  "require": "./dist/adapters/tls-transport.cjs"
64
64
  },
65
+ "./domain/advert-extension-policy": {
66
+ "import": "./dist/domain/advert-extension-policy.mjs",
67
+ "require": "./dist/domain/advert-extension-policy.cjs"
68
+ },
65
69
  "./domain/async-queue": {
66
70
  "import": "./dist/domain/async-queue.mjs",
67
71
  "require": "./dist/domain/async-queue.cjs"