"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Asset = void 0;
const _m0 = __importStar(require("protobufjs/minimal"));
function createBaseAsset() {
    return {
        id: 0,
        symbol: "",
        denom: "",
        denomExponent: 0,
        hasMarket: false,
        marketId: 0,
        atomicResolution: 0
    };
}
exports.Asset = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.id !== 0) {
            writer.uint32(8).uint32(message.id);
        }
        if (message.symbol !== "") {
            writer.uint32(18).string(message.symbol);
        }
        if (message.denom !== "") {
            writer.uint32(26).string(message.denom);
        }
        if (message.denomExponent !== 0) {
            writer.uint32(32).sint32(message.denomExponent);
        }
        if (message.hasMarket === true) {
            writer.uint32(40).bool(message.hasMarket);
        }
        if (message.marketId !== 0) {
            writer.uint32(48).uint32(message.marketId);
        }
        if (message.atomicResolution !== 0) {
            writer.uint32(56).sint32(message.atomicResolution);
        }
        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 = createBaseAsset();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.id = reader.uint32();
                    break;
                case 2:
                    message.symbol = reader.string();
                    break;
                case 3:
                    message.denom = reader.string();
                    break;
                case 4:
                    message.denomExponent = reader.sint32();
                    break;
                case 5:
                    message.hasMarket = reader.bool();
                    break;
                case 6:
                    message.marketId = reader.uint32();
                    break;
                case 7:
                    message.atomicResolution = reader.sint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a, _b, _c, _d, _e, _f, _g;
        const message = createBaseAsset();
        message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
        message.symbol = (_b = object.symbol) !== null && _b !== void 0 ? _b : "";
        message.denom = (_c = object.denom) !== null && _c !== void 0 ? _c : "";
        message.denomExponent = (_d = object.denomExponent) !== null && _d !== void 0 ? _d : 0;
        message.hasMarket = (_e = object.hasMarket) !== null && _e !== void 0 ? _e : false;
        message.marketId = (_f = object.marketId) !== null && _f !== void 0 ? _f : 0;
        message.atomicResolution = (_g = object.atomicResolution) !== null && _g !== void 0 ? _g : 0;
        return message;
    }
};
//# sourceMappingURL=data:application/json;base64, 