UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

475 lines (474 loc) 16.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryAnnualProvisionsResponse = exports.QueryAnnualProvisionsRequest = exports.QueryInflationResponse = exports.QueryInflationRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = void 0; const mint_1 = require("./mint"); const binary_1 = require("../../../binary"); const helpers_1 = require("../../../helpers"); const registry_1 = require("../../../registry"); function createBaseQueryParamsRequest() { return {}; } /** * QueryParamsRequest is the request type for the Query/Params RPC method. * @name QueryParamsRequest * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryParamsRequest */ exports.QueryParamsRequest = { typeUrl: "/cosmos.mint.v1beta1.QueryParamsRequest", aminoType: "cosmos-sdk/QueryParamsRequest", is(o) { return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl; }, encode(_, writer = binary_1.BinaryWriter.create()) { return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseQueryParamsRequest(); return message; }, fromAmino(_) { const message = createBaseQueryParamsRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.QueryParamsRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryParamsRequest", value: exports.QueryParamsRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryParamsRequest.decode(message.value); }, toProto(message) { return exports.QueryParamsRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryParamsRequest", value: exports.QueryParamsRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryParamsResponse() { return { params: mint_1.Params.fromPartial({}) }; } /** * QueryParamsResponse is the response type for the Query/Params RPC method. * @name QueryParamsResponse * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryParamsResponse */ exports.QueryParamsResponse = { typeUrl: "/cosmos.mint.v1beta1.QueryParamsResponse", aminoType: "cosmos-sdk/QueryParamsResponse", is(o) { return o && (o.$typeUrl === exports.QueryParamsResponse.typeUrl || mint_1.Params.is(o.params)); }, isAmino(o) { return o && (o.$typeUrl === exports.QueryParamsResponse.typeUrl || mint_1.Params.isAmino(o.params)); }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.params !== undefined) { mint_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.params = mint_1.Params.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? mint_1.Params.fromPartial(object.params) : undefined; return message; }, fromAmino(object) { const message = createBaseQueryParamsResponse(); if (object.params !== undefined && object.params !== null) { message.params = mint_1.Params.fromAmino(object.params); } return message; }, toAmino(message) { const obj = {}; obj.params = message.params ? mint_1.Params.toAmino(message.params) : mint_1.Params.toAmino(mint_1.Params.fromPartial({})); return obj; }, fromAminoMsg(object) { return exports.QueryParamsResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryParamsResponse", value: exports.QueryParamsResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryParamsResponse.decode(message.value); }, toProto(message) { return exports.QueryParamsResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryParamsResponse", value: exports.QueryParamsResponse.encode(message).finish() }; }, registerTypeUrl() { if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.QueryParamsResponse.typeUrl)) { return; } mint_1.Params.registerTypeUrl(); } }; function createBaseQueryInflationRequest() { return {}; } /** * QueryInflationRequest is the request type for the Query/Inflation RPC method. * @name QueryInflationRequest * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryInflationRequest */ exports.QueryInflationRequest = { typeUrl: "/cosmos.mint.v1beta1.QueryInflationRequest", aminoType: "cosmos-sdk/QueryInflationRequest", is(o) { return o && o.$typeUrl === exports.QueryInflationRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryInflationRequest.typeUrl; }, encode(_, writer = binary_1.BinaryWriter.create()) { return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInflationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseQueryInflationRequest(); return message; }, fromAmino(_) { const message = createBaseQueryInflationRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.QueryInflationRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryInflationRequest", value: exports.QueryInflationRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryInflationRequest.decode(message.value); }, toProto(message) { return exports.QueryInflationRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryInflationRequest", value: exports.QueryInflationRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryInflationResponse() { return { inflation: new Uint8Array() }; } /** * QueryInflationResponse is the response type for the Query/Inflation RPC * method. * @name QueryInflationResponse * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryInflationResponse */ exports.QueryInflationResponse = { typeUrl: "/cosmos.mint.v1beta1.QueryInflationResponse", aminoType: "cosmos-sdk/QueryInflationResponse", is(o) { return o && (o.$typeUrl === exports.QueryInflationResponse.typeUrl || o.inflation instanceof Uint8Array || typeof o.inflation === "string"); }, isAmino(o) { return o && (o.$typeUrl === exports.QueryInflationResponse.typeUrl || o.inflation instanceof Uint8Array || typeof o.inflation === "string"); }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.inflation.length !== 0) { writer.uint32(10).bytes(message.inflation); } return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInflationResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.inflation = reader.bytes(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseQueryInflationResponse(); message.inflation = object.inflation ?? new Uint8Array(); return message; }, fromAmino(object) { const message = createBaseQueryInflationResponse(); if (object.inflation !== undefined && object.inflation !== null) { message.inflation = (0, helpers_1.bytesFromBase64)(object.inflation); } return message; }, toAmino(message) { const obj = {}; obj.inflation = message.inflation ? (0, helpers_1.base64FromBytes)(message.inflation) : ""; return obj; }, fromAminoMsg(object) { return exports.QueryInflationResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryInflationResponse", value: exports.QueryInflationResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryInflationResponse.decode(message.value); }, toProto(message) { return exports.QueryInflationResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryInflationResponse", value: exports.QueryInflationResponse.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryAnnualProvisionsRequest() { return {}; } /** * QueryAnnualProvisionsRequest is the request type for the * Query/AnnualProvisions RPC method. * @name QueryAnnualProvisionsRequest * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryAnnualProvisionsRequest */ exports.QueryAnnualProvisionsRequest = { typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", aminoType: "cosmos-sdk/QueryAnnualProvisionsRequest", is(o) { return o && o.$typeUrl === exports.QueryAnnualProvisionsRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryAnnualProvisionsRequest.typeUrl; }, encode(_, writer = binary_1.BinaryWriter.create()) { return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAnnualProvisionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseQueryAnnualProvisionsRequest(); return message; }, fromAmino(_) { const message = createBaseQueryAnnualProvisionsRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.QueryAnnualProvisionsRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryAnnualProvisionsRequest", value: exports.QueryAnnualProvisionsRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryAnnualProvisionsRequest.decode(message.value); }, toProto(message) { return exports.QueryAnnualProvisionsRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", value: exports.QueryAnnualProvisionsRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryAnnualProvisionsResponse() { return { annualProvisions: new Uint8Array() }; } /** * QueryAnnualProvisionsResponse is the response type for the * Query/AnnualProvisions RPC method. * @name QueryAnnualProvisionsResponse * @package cosmos.mint.v1beta1 * @see proto type: cosmos.mint.v1beta1.QueryAnnualProvisionsResponse */ exports.QueryAnnualProvisionsResponse = { typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", aminoType: "cosmos-sdk/QueryAnnualProvisionsResponse", is(o) { return o && (o.$typeUrl === exports.QueryAnnualProvisionsResponse.typeUrl || o.annualProvisions instanceof Uint8Array || typeof o.annualProvisions === "string"); }, isAmino(o) { return o && (o.$typeUrl === exports.QueryAnnualProvisionsResponse.typeUrl || o.annual_provisions instanceof Uint8Array || typeof o.annual_provisions === "string"); }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.annualProvisions.length !== 0) { writer.uint32(10).bytes(message.annualProvisions); } return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAnnualProvisionsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.annualProvisions = reader.bytes(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseQueryAnnualProvisionsResponse(); message.annualProvisions = object.annualProvisions ?? new Uint8Array(); return message; }, fromAmino(object) { const message = createBaseQueryAnnualProvisionsResponse(); if (object.annual_provisions !== undefined && object.annual_provisions !== null) { message.annualProvisions = (0, helpers_1.bytesFromBase64)(object.annual_provisions); } return message; }, toAmino(message) { const obj = {}; obj.annual_provisions = message.annualProvisions ? (0, helpers_1.base64FromBytes)(message.annualProvisions) : ""; return obj; }, fromAminoMsg(object) { return exports.QueryAnnualProvisionsResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryAnnualProvisionsResponse", value: exports.QueryAnnualProvisionsResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryAnnualProvisionsResponse.decode(message.value); }, toProto(message) { return exports.QueryAnnualProvisionsResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", value: exports.QueryAnnualProvisionsResponse.encode(message).finish() }; }, registerTypeUrl() { } };