UNPKG

@xmtp/proto

Version:

Protobuf client and generated classes for GRPC API

62 lines 2.13 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MlsCredential = exports.protobufPackage = void 0; /* eslint-disable */ const long_1 = __importDefault(require("long")); const minimal_1 = __importDefault(require("protobufjs/minimal")); exports.protobufPackage = "xmtp.identity"; function createBaseMlsCredential() { return { inboxId: "" }; } exports.MlsCredential = { encode(message, writer = minimal_1.default.Writer.create()) { if (message.inboxId !== "") { writer.uint32(10).string(message.inboxId); } return writer; }, decode(input, length) { const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMlsCredential(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.inboxId = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(object) { return { inboxId: isSet(object.inboxId) ? String(object.inboxId) : "", }; }, toJSON(message) { const obj = {}; message.inboxId !== undefined && (obj.inboxId = message.inboxId); return obj; }, fromPartial(object) { var _a; const message = createBaseMlsCredential(); message.inboxId = (_a = object.inboxId) !== null && _a !== void 0 ? _a : ""; return message; }, }; if (minimal_1.default.util.Long !== long_1.default) { minimal_1.default.util.Long = long_1.default; minimal_1.default.configure(); } function isSet(value) { return value !== null && value !== undefined; } //# sourceMappingURL=credential.pb.js.map