@freesignal/protocol 0.4.2 → 0.4.3
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/types.d.ts +1 -1
- package/dist/types.js +1 -8
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ export declare class Datagram implements Encodable {
|
|
|
118
118
|
get payload(): Uint8Array | undefined;
|
|
119
119
|
get signature(): string | undefined;
|
|
120
120
|
private get unsigned();
|
|
121
|
-
get header():
|
|
121
|
+
get header(): Uint8Array;
|
|
122
122
|
toBytes(): Uint8Array;
|
|
123
123
|
sign(secretKey: Uint8Array): SignedDatagram;
|
|
124
124
|
toString(): string;
|
package/dist/types.js
CHANGED
|
@@ -260,14 +260,7 @@ class Datagram {
|
|
|
260
260
|
return data.subarray(0, data.length - (this._signature ? crypto_1.default.EdDSA.signatureLength : 0));
|
|
261
261
|
}
|
|
262
262
|
get header() {
|
|
263
|
-
return
|
|
264
|
-
id: this.id,
|
|
265
|
-
version: this.version,
|
|
266
|
-
sender: this.sender,
|
|
267
|
-
receiver: this.receiver,
|
|
268
|
-
protocol: this.protocol,
|
|
269
|
-
createdAt: this.createdAt
|
|
270
|
-
};
|
|
263
|
+
return this.toBytes().slice(0, Datagram.headerOffset);
|
|
271
264
|
}
|
|
272
265
|
toBytes() {
|
|
273
266
|
var _a, _b, _c;
|