@naylence/runtime 0.3.5-test.953 → 0.3.5-test.954
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/browser/index.cjs +32 -514
- package/dist/browser/index.mjs +32 -514
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector-factory.js +2 -14
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector.browser.js +1 -108
- package/dist/cjs/naylence/fame/connector/broadcast-channel-listener.js +10 -76
- package/dist/cjs/naylence/fame/connector/inpage-connector-factory.js +0 -12
- package/dist/cjs/naylence/fame/connector/inpage-connector.js +1 -105
- package/dist/cjs/naylence/fame/connector/inpage-listener.js +2 -49
- package/dist/cjs/naylence/fame/grants/broadcast-channel-connection-grant.js +12 -23
- package/dist/cjs/naylence/fame/grants/inpage-connection-grant.js +0 -28
- package/dist/cjs/naylence/fame/node/admission/default-node-attach-client.js +0 -14
- package/dist/cjs/naylence/fame/node/upstream-session-manager.js +0 -6
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector-factory.js +2 -14
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector.browser.js +1 -108
- package/dist/esm/naylence/fame/connector/broadcast-channel-listener.js +10 -76
- package/dist/esm/naylence/fame/connector/inpage-connector-factory.js +0 -12
- package/dist/esm/naylence/fame/connector/inpage-connector.js +1 -105
- package/dist/esm/naylence/fame/connector/inpage-listener.js +2 -49
- package/dist/esm/naylence/fame/grants/broadcast-channel-connection-grant.js +12 -23
- package/dist/esm/naylence/fame/grants/inpage-connection-grant.js +0 -28
- package/dist/esm/naylence/fame/node/admission/default-node-attach-client.js +0 -14
- package/dist/esm/naylence/fame/node/upstream-session-manager.js +0 -6
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +32 -514
- package/dist/node/index.mjs +32 -514
- package/dist/node/node.cjs +32 -530
- package/dist/node/node.mjs +32 -530
- package/dist/types/naylence/fame/connector/broadcast-channel-connector-factory.d.ts +0 -2
- package/dist/types/naylence/fame/connector/broadcast-channel-connector.browser.d.ts +1 -9
- package/dist/types/naylence/fame/connector/inpage-connector-factory.d.ts +0 -2
- package/dist/types/naylence/fame/connector/inpage-connector.d.ts +0 -9
- package/dist/types/naylence/fame/connector/inpage-listener.d.ts +0 -1
- package/dist/types/naylence/fame/grants/broadcast-channel-connection-grant.d.ts +3 -6
- package/dist/types/naylence/fame/grants/inpage-connection-grant.d.ts +0 -8
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/naylence/fame/connector/transport-frame.js +0 -100
- package/dist/esm/naylence/fame/connector/transport-frame.js +0 -93
- package/dist/types/naylence/fame/connector/transport-frame.d.ts +0 -56
|
@@ -7,8 +7,6 @@ export interface BroadcastChannelConnectorFactoryConfig extends ConnectorConfig,
|
|
|
7
7
|
type: typeof BROADCAST_CHANNEL_CONNECTOR_TYPE;
|
|
8
8
|
channelName?: string;
|
|
9
9
|
inboxCapacity?: number;
|
|
10
|
-
localNodeId?: string;
|
|
11
|
-
remoteNodeId?: string;
|
|
12
10
|
}
|
|
13
11
|
export interface CreateBroadcastChannelConnectorOptions {
|
|
14
12
|
authorization?: AuthorizationContext;
|
|
@@ -6,8 +6,7 @@ export interface BroadcastChannelConnectorConfig extends ConnectorConfig {
|
|
|
6
6
|
type: typeof BROADCAST_CHANNEL_CONNECTOR_TYPE;
|
|
7
7
|
channelName?: string;
|
|
8
8
|
inboxCapacity?: number;
|
|
9
|
-
|
|
10
|
-
remoteNodeId?: string;
|
|
9
|
+
initialWindow?: number;
|
|
11
10
|
}
|
|
12
11
|
type BroadcastChannelInboxItem = Uint8Array | FameEnvelope | FameChannelMessage;
|
|
13
12
|
export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
@@ -24,8 +23,6 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
24
23
|
private readonly textDecoder;
|
|
25
24
|
private visibilityChangeListenerRegistered;
|
|
26
25
|
private visibilityChangeHandler?;
|
|
27
|
-
private readonly localNodeId;
|
|
28
|
-
private remoteNodeId;
|
|
29
26
|
private static generateConnectorId;
|
|
30
27
|
private static coercePayload;
|
|
31
28
|
constructor(config: BroadcastChannelConnectorConfig, baseConfig?: BaseAsyncConnectorConfig);
|
|
@@ -43,11 +40,6 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
43
40
|
* Override start() to check initial visibility state
|
|
44
41
|
*/
|
|
45
42
|
start(inboundHandler: FameEnvelopeHandler): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Update the remote node ID after learning it from NodeAttachAck
|
|
48
|
-
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
49
|
-
*/
|
|
50
|
-
updateRemoteNodeId(newRemoteNodeId: string): void;
|
|
51
43
|
private _trimSeenAcks;
|
|
52
44
|
private _extractAckDedupKey;
|
|
53
45
|
}
|
|
@@ -9,8 +9,6 @@ export interface InPageConnectorFactoryConfig extends ConnectorConfig, Partial<B
|
|
|
9
9
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
10
10
|
channelName?: string;
|
|
11
11
|
inboxCapacity?: number;
|
|
12
|
-
localNodeId?: string;
|
|
13
|
-
remoteNodeId?: string;
|
|
14
12
|
}
|
|
15
13
|
export interface CreateInPageConnectorOptions {
|
|
16
14
|
systemId?: string;
|
|
@@ -10,8 +10,6 @@ export interface InPageConnectorConfig extends ConnectorConfig {
|
|
|
10
10
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
11
11
|
channelName?: string;
|
|
12
12
|
inboxCapacity?: number;
|
|
13
|
-
localNodeId?: string;
|
|
14
|
-
remoteNodeId?: string;
|
|
15
13
|
}
|
|
16
14
|
type InPageInboxItem = Uint8Array | FameEnvelope | FameChannelMessage;
|
|
17
15
|
export declare class InPageConnector extends BaseAsyncConnector {
|
|
@@ -22,8 +20,6 @@ export declare class InPageConnector extends BaseAsyncConnector {
|
|
|
22
20
|
private readonly onMsg;
|
|
23
21
|
private visibilityChangeListenerRegistered;
|
|
24
22
|
private visibilityChangeHandler?;
|
|
25
|
-
private readonly localNodeId;
|
|
26
|
-
private remoteNodeId;
|
|
27
23
|
private static generateConnectorId;
|
|
28
24
|
private static coercePayload;
|
|
29
25
|
constructor(config: InPageConnectorConfig, baseConfig?: BaseAsyncConnectorConfig);
|
|
@@ -36,10 +32,5 @@ export declare class InPageConnector extends BaseAsyncConnector {
|
|
|
36
32
|
protected _transportReceive(): Promise<InPageInboxItem>;
|
|
37
33
|
protected _transportClose(code: number, reason: string): Promise<void>;
|
|
38
34
|
private _normalizeInboxItem;
|
|
39
|
-
/**
|
|
40
|
-
* Update the remote node ID after learning it from NodeAttachAck
|
|
41
|
-
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
42
|
-
*/
|
|
43
|
-
updateRemoteNodeId(newRemoteNodeId: string): void;
|
|
44
35
|
}
|
|
45
36
|
export {};
|
|
@@ -14,7 +14,6 @@ export declare class InPageListener extends TransportListener {
|
|
|
14
14
|
private _busHandler;
|
|
15
15
|
private readonly _senderRegistry;
|
|
16
16
|
private readonly _systemToSender;
|
|
17
|
-
private readonly _flowIdToSender;
|
|
18
17
|
private readonly _pendingAttachments;
|
|
19
18
|
constructor(options?: InPageListenerOptions);
|
|
20
19
|
get channelName(): string;
|
|
@@ -6,8 +6,7 @@ export interface BroadcastChannelConnectionGrant extends ConnectionGrant {
|
|
|
6
6
|
type: typeof BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE;
|
|
7
7
|
channelName?: string;
|
|
8
8
|
inboxCapacity?: number;
|
|
9
|
-
|
|
10
|
-
remoteNodeId?: string;
|
|
9
|
+
initialWindow?: number;
|
|
11
10
|
}
|
|
12
11
|
export type BroadcastChannelConnectionGrantLike = ConnectionGrantLike & {
|
|
13
12
|
type?: string;
|
|
@@ -15,10 +14,8 @@ export type BroadcastChannelConnectionGrantLike = ConnectionGrantLike & {
|
|
|
15
14
|
channel_name?: unknown;
|
|
16
15
|
inboxCapacity?: unknown;
|
|
17
16
|
inbox_capacity?: unknown;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
remoteNodeId?: unknown;
|
|
21
|
-
remote_node_id?: unknown;
|
|
17
|
+
initialWindow?: unknown;
|
|
18
|
+
initial_window?: unknown;
|
|
22
19
|
};
|
|
23
20
|
export type BroadcastChannelConnectorConfigLike = ConnectorConfig & BroadcastChannelConnectorConfig;
|
|
24
21
|
export declare function isBroadcastChannelConnectionGrant(candidate: unknown): candidate is BroadcastChannelConnectionGrant;
|
|
@@ -6,8 +6,6 @@ export interface InPageConnectionGrant extends ConnectionGrant {
|
|
|
6
6
|
type: typeof INPAGE_CONNECTION_GRANT_TYPE;
|
|
7
7
|
channelName?: string;
|
|
8
8
|
inboxCapacity?: number;
|
|
9
|
-
localNodeId?: string;
|
|
10
|
-
remoteNodeId?: string;
|
|
11
9
|
}
|
|
12
10
|
export type InPageConnectionGrantLike = ConnectionGrantLike & {
|
|
13
11
|
type?: string;
|
|
@@ -15,17 +13,11 @@ export type InPageConnectionGrantLike = ConnectionGrantLike & {
|
|
|
15
13
|
channel_name?: unknown;
|
|
16
14
|
inboxCapacity?: unknown;
|
|
17
15
|
inbox_capacity?: unknown;
|
|
18
|
-
localNodeId?: unknown;
|
|
19
|
-
local_node_id?: unknown;
|
|
20
|
-
remoteNodeId?: unknown;
|
|
21
|
-
remote_node_id?: unknown;
|
|
22
16
|
};
|
|
23
17
|
export type InPageConnectorConfigLike = ConnectorConfig & {
|
|
24
18
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
25
19
|
channelName?: string;
|
|
26
20
|
inboxCapacity?: number;
|
|
27
|
-
localNodeId?: string;
|
|
28
|
-
remoteNodeId?: string;
|
|
29
21
|
};
|
|
30
22
|
export declare function isInPageConnectionGrant(candidate: unknown): candidate is InPageConnectionGrant;
|
|
31
23
|
export declare function normalizeInPageConnectionGrant(candidate: InPageConnectionGrantLike): InPageConnectionGrant;
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Transport frame layer for multiplexing logical links on physical channels.
|
|
4
|
-
*
|
|
5
|
-
* This lightweight framing layer wraps raw FAME payloads to enable multiple
|
|
6
|
-
* logical connections over a single physical channel (BroadcastChannel or InPage bus).
|
|
7
|
-
*
|
|
8
|
-
* The transport frame does NOT modify FAME envelopes - it only wraps the raw
|
|
9
|
-
* Uint8Array payload at the connector level.
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TRANSPORT_FRAME_VERSION = void 0;
|
|
13
|
-
exports.wrapTransportFrame = wrapTransportFrame;
|
|
14
|
-
exports.serializeTransportFrame = serializeTransportFrame;
|
|
15
|
-
exports.unwrapTransportFrame = unwrapTransportFrame;
|
|
16
|
-
exports.isTransportFrame = isTransportFrame;
|
|
17
|
-
/**
|
|
18
|
-
* Transport frame version for future compatibility
|
|
19
|
-
*/
|
|
20
|
-
exports.TRANSPORT_FRAME_VERSION = 1;
|
|
21
|
-
/**
|
|
22
|
-
* Wrap a raw payload in a transport frame
|
|
23
|
-
*
|
|
24
|
-
* @param payload - Raw FAME envelope bytes
|
|
25
|
-
* @param srcNodeId - Local node ID (this connector)
|
|
26
|
-
* @param dstNodeId - Remote node ID (target connector)
|
|
27
|
-
* @returns Transport frame ready for transmission
|
|
28
|
-
*/
|
|
29
|
-
function wrapTransportFrame(payload, srcNodeId, dstNodeId) {
|
|
30
|
-
return {
|
|
31
|
-
v: exports.TRANSPORT_FRAME_VERSION,
|
|
32
|
-
src: srcNodeId,
|
|
33
|
-
dst: dstNodeId,
|
|
34
|
-
payload,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Serialize a transport frame for transmission over the bus
|
|
39
|
-
*
|
|
40
|
-
* @param frame - Transport frame to serialize
|
|
41
|
-
* @returns Serialized frame data ready for postMessage/dispatchEvent
|
|
42
|
-
*/
|
|
43
|
-
function serializeTransportFrame(frame) {
|
|
44
|
-
// Convert Uint8Array to regular array for JSON serialization
|
|
45
|
-
const serializable = {
|
|
46
|
-
v: frame.v,
|
|
47
|
-
src: frame.src,
|
|
48
|
-
dst: frame.dst,
|
|
49
|
-
payload: Array.from(frame.payload),
|
|
50
|
-
};
|
|
51
|
-
return serializable;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Unwrap a transport frame (pure deserializer - no filtering)
|
|
55
|
-
*
|
|
56
|
-
* @param raw - Raw data from the bus
|
|
57
|
-
* @returns Unwrapped frame with payload as Uint8Array, or null if invalid structure
|
|
58
|
-
*/
|
|
59
|
-
function unwrapTransportFrame(raw) {
|
|
60
|
-
// Validate basic structure
|
|
61
|
-
if (!raw || typeof raw !== 'object') {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
const frame = raw;
|
|
65
|
-
// Check version
|
|
66
|
-
if (frame.v !== exports.TRANSPORT_FRAME_VERSION) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
// Check src and dst
|
|
70
|
-
if (typeof frame.src !== 'string' || typeof frame.dst !== 'string') {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
// Extract payload
|
|
74
|
-
if (!frame.payload || !Array.isArray(frame.payload)) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
// Convert array back to Uint8Array and return full frame
|
|
78
|
-
return {
|
|
79
|
-
v: frame.v,
|
|
80
|
-
src: frame.src,
|
|
81
|
-
dst: frame.dst,
|
|
82
|
-
payload: Uint8Array.from(frame.payload),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Check if raw data looks like a transport frame
|
|
87
|
-
*
|
|
88
|
-
* @param raw - Raw data from the bus
|
|
89
|
-
* @returns True if this appears to be a transport frame
|
|
90
|
-
*/
|
|
91
|
-
function isTransportFrame(raw) {
|
|
92
|
-
if (!raw || typeof raw !== 'object') {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
const frame = raw;
|
|
96
|
-
return (typeof frame.v === 'number' &&
|
|
97
|
-
typeof frame.src === 'string' &&
|
|
98
|
-
typeof frame.dst === 'string' &&
|
|
99
|
-
Array.isArray(frame.payload));
|
|
100
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transport frame layer for multiplexing logical links on physical channels.
|
|
3
|
-
*
|
|
4
|
-
* This lightweight framing layer wraps raw FAME payloads to enable multiple
|
|
5
|
-
* logical connections over a single physical channel (BroadcastChannel or InPage bus).
|
|
6
|
-
*
|
|
7
|
-
* The transport frame does NOT modify FAME envelopes - it only wraps the raw
|
|
8
|
-
* Uint8Array payload at the connector level.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Transport frame version for future compatibility
|
|
12
|
-
*/
|
|
13
|
-
export const TRANSPORT_FRAME_VERSION = 1;
|
|
14
|
-
/**
|
|
15
|
-
* Wrap a raw payload in a transport frame
|
|
16
|
-
*
|
|
17
|
-
* @param payload - Raw FAME envelope bytes
|
|
18
|
-
* @param srcNodeId - Local node ID (this connector)
|
|
19
|
-
* @param dstNodeId - Remote node ID (target connector)
|
|
20
|
-
* @returns Transport frame ready for transmission
|
|
21
|
-
*/
|
|
22
|
-
export function wrapTransportFrame(payload, srcNodeId, dstNodeId) {
|
|
23
|
-
return {
|
|
24
|
-
v: TRANSPORT_FRAME_VERSION,
|
|
25
|
-
src: srcNodeId,
|
|
26
|
-
dst: dstNodeId,
|
|
27
|
-
payload,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Serialize a transport frame for transmission over the bus
|
|
32
|
-
*
|
|
33
|
-
* @param frame - Transport frame to serialize
|
|
34
|
-
* @returns Serialized frame data ready for postMessage/dispatchEvent
|
|
35
|
-
*/
|
|
36
|
-
export function serializeTransportFrame(frame) {
|
|
37
|
-
// Convert Uint8Array to regular array for JSON serialization
|
|
38
|
-
const serializable = {
|
|
39
|
-
v: frame.v,
|
|
40
|
-
src: frame.src,
|
|
41
|
-
dst: frame.dst,
|
|
42
|
-
payload: Array.from(frame.payload),
|
|
43
|
-
};
|
|
44
|
-
return serializable;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Unwrap a transport frame (pure deserializer - no filtering)
|
|
48
|
-
*
|
|
49
|
-
* @param raw - Raw data from the bus
|
|
50
|
-
* @returns Unwrapped frame with payload as Uint8Array, or null if invalid structure
|
|
51
|
-
*/
|
|
52
|
-
export function unwrapTransportFrame(raw) {
|
|
53
|
-
// Validate basic structure
|
|
54
|
-
if (!raw || typeof raw !== 'object') {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const frame = raw;
|
|
58
|
-
// Check version
|
|
59
|
-
if (frame.v !== TRANSPORT_FRAME_VERSION) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
// Check src and dst
|
|
63
|
-
if (typeof frame.src !== 'string' || typeof frame.dst !== 'string') {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
// Extract payload
|
|
67
|
-
if (!frame.payload || !Array.isArray(frame.payload)) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
// Convert array back to Uint8Array and return full frame
|
|
71
|
-
return {
|
|
72
|
-
v: frame.v,
|
|
73
|
-
src: frame.src,
|
|
74
|
-
dst: frame.dst,
|
|
75
|
-
payload: Uint8Array.from(frame.payload),
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Check if raw data looks like a transport frame
|
|
80
|
-
*
|
|
81
|
-
* @param raw - Raw data from the bus
|
|
82
|
-
* @returns True if this appears to be a transport frame
|
|
83
|
-
*/
|
|
84
|
-
export function isTransportFrame(raw) {
|
|
85
|
-
if (!raw || typeof raw !== 'object') {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
const frame = raw;
|
|
89
|
-
return (typeof frame.v === 'number' &&
|
|
90
|
-
typeof frame.src === 'string' &&
|
|
91
|
-
typeof frame.dst === 'string' &&
|
|
92
|
-
Array.isArray(frame.payload));
|
|
93
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transport frame layer for multiplexing logical links on physical channels.
|
|
3
|
-
*
|
|
4
|
-
* This lightweight framing layer wraps raw FAME payloads to enable multiple
|
|
5
|
-
* logical connections over a single physical channel (BroadcastChannel or InPage bus).
|
|
6
|
-
*
|
|
7
|
-
* The transport frame does NOT modify FAME envelopes - it only wraps the raw
|
|
8
|
-
* Uint8Array payload at the connector level.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Transport frame version for future compatibility
|
|
12
|
-
*/
|
|
13
|
-
export declare const TRANSPORT_FRAME_VERSION = 1;
|
|
14
|
-
/**
|
|
15
|
-
* Transport frame structure that wraps raw payloads
|
|
16
|
-
*/
|
|
17
|
-
export interface TransportFrame {
|
|
18
|
-
/** Version of the transport frame format */
|
|
19
|
-
v: number;
|
|
20
|
-
/** Source node ID (connector-local) */
|
|
21
|
-
src: string;
|
|
22
|
-
/** Destination node ID (connector-local) */
|
|
23
|
-
dst: string;
|
|
24
|
-
/** Raw payload (FAME envelope as Uint8Array) */
|
|
25
|
-
payload: Uint8Array;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Wrap a raw payload in a transport frame
|
|
29
|
-
*
|
|
30
|
-
* @param payload - Raw FAME envelope bytes
|
|
31
|
-
* @param srcNodeId - Local node ID (this connector)
|
|
32
|
-
* @param dstNodeId - Remote node ID (target connector)
|
|
33
|
-
* @returns Transport frame ready for transmission
|
|
34
|
-
*/
|
|
35
|
-
export declare function wrapTransportFrame(payload: Uint8Array, srcNodeId: string, dstNodeId: string): TransportFrame;
|
|
36
|
-
/**
|
|
37
|
-
* Serialize a transport frame for transmission over the bus
|
|
38
|
-
*
|
|
39
|
-
* @param frame - Transport frame to serialize
|
|
40
|
-
* @returns Serialized frame data ready for postMessage/dispatchEvent
|
|
41
|
-
*/
|
|
42
|
-
export declare function serializeTransportFrame(frame: TransportFrame): unknown;
|
|
43
|
-
/**
|
|
44
|
-
* Unwrap a transport frame (pure deserializer - no filtering)
|
|
45
|
-
*
|
|
46
|
-
* @param raw - Raw data from the bus
|
|
47
|
-
* @returns Unwrapped frame with payload as Uint8Array, or null if invalid structure
|
|
48
|
-
*/
|
|
49
|
-
export declare function unwrapTransportFrame(raw: unknown): TransportFrame | null;
|
|
50
|
-
/**
|
|
51
|
-
* Check if raw data looks like a transport frame
|
|
52
|
-
*
|
|
53
|
-
* @param raw - Raw data from the bus
|
|
54
|
-
* @returns True if this appears to be a transport frame
|
|
55
|
-
*/
|
|
56
|
-
export declare function isTransportFrame(raw: unknown): boolean;
|