= T extends T ? keyof T : never;
+export declare type Exact = P extends Builtin ? P : P & {
+ [K in keyof P]: Exact
;
+} & {
+ [K in Exclude>]: never;
+};
+export {};
+//# sourceMappingURL=messages.d.ts.map
\ No newline at end of file
diff --git a/dist/messages.d.ts.map b/dist/messages.d.ts.map
new file mode 100644
index 0000000..14d686a
--- /dev/null
+++ b/dist/messages.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,aAAa;AACb,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,MAAM;oBACD,MAAM,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAgB/D,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,MAAM;qBA2B9C,GAAG,GAAG,MAAM;oBASb,MAAM,GAAG,OAAO;;;;;;;;;;;uEAWiC,MAAM;CAQxE,CAAC;AA8CF,aAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAC9C,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACnH,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC;AAEf,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AACpD,oBAAY,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACrD,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC"}
\ No newline at end of file
diff --git a/dist/messages.js b/dist/messages.js
new file mode 100644
index 0000000..c443d84
--- /dev/null
+++ b/dist/messages.js
@@ -0,0 +1,144 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Packet = exports.protobufPackage = void 0;
+/* eslint-disable */
+const _m0 = __importStar(require("protobufjs/minimal"));
+exports.protobufPackage = "";
+function createBasePacket() {
+ return { originId: new Uint8Array(), messageNumber: 0, ttl: 0, data: new Uint8Array() };
+}
+exports.Packet = {
+ encode(message, writer = _m0.Writer.create()) {
+ if (message.originId.length !== 0) {
+ writer.uint32(10).bytes(message.originId);
+ }
+ if (message.messageNumber !== 0) {
+ writer.uint32(16).uint32(message.messageNumber);
+ }
+ if (message.ttl !== 0) {
+ writer.uint32(24).uint32(message.ttl);
+ }
+ if (message.data.length !== 0) {
+ writer.uint32(34).bytes(message.data);
+ }
+ return writer;
+ },
+ decode(input, length) {
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePacket();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.originId = reader.bytes();
+ break;
+ case 2:
+ message.messageNumber = reader.uint32();
+ break;
+ case 3:
+ message.ttl = reader.uint32();
+ break;
+ case 4:
+ message.data = reader.bytes();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromJSON(object) {
+ return {
+ originId: isSet(object.originId) ? bytesFromBase64(object.originId) : new Uint8Array(),
+ messageNumber: isSet(object.messageNumber) ? Number(object.messageNumber) : 0,
+ ttl: isSet(object.ttl) ? Number(object.ttl) : 0,
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
+ };
+ },
+ toJSON(message) {
+ const obj = {};
+ message.originId !== undefined &&
+ (obj.originId = base64FromBytes(message.originId !== undefined ? message.originId : new Uint8Array()));
+ message.messageNumber !== undefined && (obj.messageNumber = Math.round(message.messageNumber));
+ message.ttl !== undefined && (obj.ttl = Math.round(message.ttl));
+ message.data !== undefined &&
+ (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
+ return obj;
+ },
+ fromPartial(object) {
+ const message = createBasePacket();
+ message.originId = object.originId ?? new Uint8Array();
+ message.messageNumber = object.messageNumber ?? 0;
+ message.ttl = object.ttl ?? 0;
+ message.data = object.data ?? new Uint8Array();
+ return message;
+ },
+};
+var globalThis = (() => {
+ if (typeof globalThis !== "undefined") {
+ return globalThis;
+ }
+ if (typeof self !== "undefined") {
+ return self;
+ }
+ if (typeof window !== "undefined") {
+ return window;
+ }
+ if (typeof global !== "undefined") {
+ return global;
+ }
+ throw "Unable to locate global object";
+})();
+function bytesFromBase64(b64) {
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
+ }
+ else {
+ const bin = globalThis.atob(b64);
+ const arr = new Uint8Array(bin.length);
+ for (let i = 0; i < bin.length; ++i) {
+ arr[i] = bin.charCodeAt(i);
+ }
+ return arr;
+ }
+}
+function base64FromBytes(arr) {
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
+ }
+ else {
+ const bin = [];
+ arr.forEach((byte) => {
+ bin.push(String.fromCharCode(byte));
+ });
+ return globalThis.btoa(bin.join(""));
+ }
+}
+function isSet(value) {
+ return value !== null && value !== undefined;
+}