From a13b2c3f70486522e2166ed987fb711c335be6d3 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 31 Oct 2022 09:06:40 +1100 Subject: [PATCH] chore: remove unneeded file --- packages/core/src/proto/message_topic_only.ts | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 packages/core/src/proto/message_topic_only.ts diff --git a/packages/core/src/proto/message_topic_only.ts b/packages/core/src/proto/message_topic_only.ts deleted file mode 100644 index 9c7b505070..0000000000 --- a/packages/core/src/proto/message_topic_only.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* eslint-disable import/export */ -/* eslint-disable @typescript-eslint/no-namespace */ - -import { encodeMessage, decodeMessage, message } from "protons-runtime"; -import type { Uint8ArrayList } from "uint8arraylist"; -import type { Codec } from "protons-runtime"; - -export interface MessageTopicOnly { - contentTopic?: string; -} - -export namespace MessageTopicOnly { - let _codec: Codec; - - export const codec = (): Codec => { - if (_codec == null) { - _codec = message( - (obj, writer, opts = {}) => { - if (opts.lengthDelimited !== false) { - writer.fork(); - } - - if (obj.contentTopic != null) { - writer.uint32(18); - writer.string(obj.contentTopic); - } - - if (opts.lengthDelimited !== false) { - writer.ldelim(); - } - }, - (reader, length) => { - const obj: any = {}; - - const end = length == null ? reader.len : reader.pos + length; - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 2: - obj.contentTopic = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - - return obj; - } - ); - } - - return _codec; - }; - - export const encode = (obj: MessageTopicOnly): Uint8Array => { - return encodeMessage(obj, MessageTopicOnly.codec()); - }; - - export const decode = ( - buf: Uint8Array | Uint8ArrayList - ): MessageTopicOnly => { - return decodeMessage(buf, MessageTopicOnly.codec()); - }; -}