generated from cheqd/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
7,389 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KeyValuePair = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
const long_1 = __importDefault(require("long")); | ||
const minimal_1 = __importDefault(require("protobufjs/minimal")); | ||
exports.protobufPackage = "cheqdid.cheqdnode.cheqd.v1"; | ||
const baseKeyValuePair = { key: "", value: "" }; | ||
exports.KeyValuePair = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.key !== "") { | ||
writer.uint32(10).string(message.key); | ||
} | ||
if (message.value !== "") { | ||
writer.uint32(18).string(message.value); | ||
} | ||
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 = { ...baseKeyValuePair }; | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.key = reader.string(); | ||
break; | ||
case 2: | ||
message.value = reader.string(); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
const message = { ...baseKeyValuePair }; | ||
if (object.key !== undefined && object.key !== null) { | ||
message.key = String(object.key); | ||
} | ||
else { | ||
message.key = ""; | ||
} | ||
if (object.value !== undefined && object.value !== null) { | ||
message.value = String(object.value); | ||
} | ||
else { | ||
message.value = ""; | ||
} | ||
return message; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.key !== undefined && (obj.key = message.key); | ||
message.value !== undefined && (obj.value = message.value); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b; | ||
const message = { ...baseKeyValuePair }; | ||
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; | ||
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
}, | ||
}; | ||
if (minimal_1.default.util.Long !== long_1.default) { | ||
minimal_1.default.util.Long = long_1.default; | ||
minimal_1.default.configure(); | ||
} |
Oops, something went wrong.