UNPKG

@cheqd/ts-proto

Version:

A TypeScript package for all transpiled cheqd ProtoBuf definitions.

1,403 lines 51 kB
// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.11.4 // protoc unknown // source: cheqd/oracle/v2/tx.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { CurrencyDeviationThreshold, CurrencyPairProviders, Denom, Params, ParamUpdatePlan } from "./oracle.js"; function createBaseMsgAggregateExchangeRatePrevote() { return { hash: "", feeder: "", validator: "" }; } export const MsgAggregateExchangeRatePrevote = { encode(message, writer = new BinaryWriter()) { if (message.hash !== "") { writer.uint32(10).string(message.hash); } if (message.feeder !== "") { writer.uint32(18).string(message.feeder); } if (message.validator !== "") { writer.uint32(26).string(message.validator); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAggregateExchangeRatePrevote(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.hash = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.feeder = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.validator = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { hash: isSet(object.hash) ? globalThis.String(object.hash) : "", feeder: isSet(object.feeder) ? globalThis.String(object.feeder) : "", validator: isSet(object.validator) ? globalThis.String(object.validator) : "", }; }, toJSON(message) { const obj = {}; if (message.hash !== "") { obj.hash = message.hash; } if (message.feeder !== "") { obj.feeder = message.feeder; } if (message.validator !== "") { obj.validator = message.validator; } return obj; }, create(base) { return MsgAggregateExchangeRatePrevote.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgAggregateExchangeRatePrevote(); message.hash = object.hash ?? ""; message.feeder = object.feeder ?? ""; message.validator = object.validator ?? ""; return message; }, }; function createBaseMsgAggregateExchangeRatePrevoteResponse() { return {}; } export const MsgAggregateExchangeRatePrevoteResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAggregateExchangeRatePrevoteResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgAggregateExchangeRatePrevoteResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgAggregateExchangeRatePrevoteResponse(); return message; }, }; function createBaseMsgAggregateExchangeRateVote() { return { salt: "", exchangeRates: "", feeder: "", validator: "" }; } export const MsgAggregateExchangeRateVote = { encode(message, writer = new BinaryWriter()) { if (message.salt !== "") { writer.uint32(10).string(message.salt); } if (message.exchangeRates !== "") { writer.uint32(18).string(message.exchangeRates); } if (message.feeder !== "") { writer.uint32(26).string(message.feeder); } if (message.validator !== "") { writer.uint32(34).string(message.validator); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAggregateExchangeRateVote(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.salt = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.exchangeRates = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.feeder = reader.string(); continue; } case 4: { if (tag !== 34) { break; } message.validator = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { salt: isSet(object.salt) ? globalThis.String(object.salt) : "", exchangeRates: isSet(object.exchangeRates) ? globalThis.String(object.exchangeRates) : isSet(object.exchange_rates) ? globalThis.String(object.exchange_rates) : "", feeder: isSet(object.feeder) ? globalThis.String(object.feeder) : "", validator: isSet(object.validator) ? globalThis.String(object.validator) : "", }; }, toJSON(message) { const obj = {}; if (message.salt !== "") { obj.salt = message.salt; } if (message.exchangeRates !== "") { obj.exchangeRates = message.exchangeRates; } if (message.feeder !== "") { obj.feeder = message.feeder; } if (message.validator !== "") { obj.validator = message.validator; } return obj; }, create(base) { return MsgAggregateExchangeRateVote.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgAggregateExchangeRateVote(); message.salt = object.salt ?? ""; message.exchangeRates = object.exchangeRates ?? ""; message.feeder = object.feeder ?? ""; message.validator = object.validator ?? ""; return message; }, }; function createBaseMsgAggregateExchangeRateVoteResponse() { return {}; } export const MsgAggregateExchangeRateVoteResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAggregateExchangeRateVoteResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgAggregateExchangeRateVoteResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgAggregateExchangeRateVoteResponse(); return message; }, }; function createBaseMsgDelegateFeedConsent() { return { operator: "", delegate: "" }; } export const MsgDelegateFeedConsent = { encode(message, writer = new BinaryWriter()) { if (message.operator !== "") { writer.uint32(10).string(message.operator); } if (message.delegate !== "") { writer.uint32(18).string(message.delegate); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDelegateFeedConsent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.operator = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.delegate = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { operator: isSet(object.operator) ? globalThis.String(object.operator) : "", delegate: isSet(object.delegate) ? globalThis.String(object.delegate) : "", }; }, toJSON(message) { const obj = {}; if (message.operator !== "") { obj.operator = message.operator; } if (message.delegate !== "") { obj.delegate = message.delegate; } return obj; }, create(base) { return MsgDelegateFeedConsent.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgDelegateFeedConsent(); message.operator = object.operator ?? ""; message.delegate = object.delegate ?? ""; return message; }, }; function createBaseMsgDelegateFeedConsentResponse() { return {}; } export const MsgDelegateFeedConsentResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDelegateFeedConsentResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgDelegateFeedConsentResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgDelegateFeedConsentResponse(); return message; }, }; function createBaseMsgLegacyGovUpdateParams() { return { authority: "", title: "", description: "", keys: [], changes: undefined }; } export const MsgLegacyGovUpdateParams = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } for (const v of message.keys) { writer.uint32(34).string(v); } if (message.changes !== undefined) { Params.encode(message.changes, writer.uint32(42).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgLegacyGovUpdateParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 34) { break; } message.keys.push(reader.string()); continue; } case 5: { if (tag !== 42) { break; } message.changes = Params.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e) => globalThis.String(e)) : [], changes: isSet(object.changes) ? Params.fromJSON(object.changes) : undefined, }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.keys?.length) { obj.keys = message.keys; } if (message.changes !== undefined) { obj.changes = Params.toJSON(message.changes); } return obj; }, create(base) { return MsgLegacyGovUpdateParams.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgLegacyGovUpdateParams(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.keys = object.keys?.map((e) => e) || []; message.changes = (object.changes !== undefined && object.changes !== null) ? Params.fromPartial(object.changes) : undefined; return message; }, }; function createBaseMsgLegacyGovUpdateParamsResponse() { return {}; } export const MsgLegacyGovUpdateParamsResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgLegacyGovUpdateParamsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgLegacyGovUpdateParamsResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgLegacyGovUpdateParamsResponse(); return message; }, }; function createBaseMsgGovUpdateParams() { return { authority: "", title: "", description: "", plan: undefined }; } export const MsgGovUpdateParams = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } if (message.plan !== undefined) { ParamUpdatePlan.encode(message.plan, writer.uint32(34).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovUpdateParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 34) { break; } message.plan = ParamUpdatePlan.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", plan: isSet(object.plan) ? ParamUpdatePlan.fromJSON(object.plan) : undefined, }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.plan !== undefined) { obj.plan = ParamUpdatePlan.toJSON(message.plan); } return obj; }, create(base) { return MsgGovUpdateParams.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgGovUpdateParams(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.plan = (object.plan !== undefined && object.plan !== null) ? ParamUpdatePlan.fromPartial(object.plan) : undefined; return message; }, }; function createBaseMsgGovUpdateParamsResponse() { return {}; } export const MsgGovUpdateParamsResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovUpdateParamsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgGovUpdateParamsResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgGovUpdateParamsResponse(); return message; }, }; function createBaseMsgGovAddDenoms() { return { authority: "", title: "", description: "", height: 0n, denomList: [], mandatory: false, rewardBand: "", currencyPairProviders: [], currencyDeviationThresholds: [], }; } export const MsgGovAddDenoms = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } if (message.height !== 0n) { if (BigInt.asIntN(64, message.height) !== message.height) { throw new globalThis.Error("value provided for field message.height of type int64 too large"); } writer.uint32(32).int64(message.height); } for (const v of message.denomList) { Denom.encode(v, writer.uint32(42).fork()).join(); } if (message.mandatory !== false) { writer.uint32(48).bool(message.mandatory); } if (message.rewardBand !== "") { writer.uint32(58).string(message.rewardBand); } for (const v of message.currencyPairProviders) { CurrencyPairProviders.encode(v, writer.uint32(66).fork()).join(); } for (const v of message.currencyDeviationThresholds) { CurrencyDeviationThreshold.encode(v, writer.uint32(74).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovAddDenoms(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 32) { break; } message.height = reader.int64(); continue; } case 5: { if (tag !== 42) { break; } message.denomList.push(Denom.decode(reader, reader.uint32())); continue; } case 6: { if (tag !== 48) { break; } message.mandatory = reader.bool(); continue; } case 7: { if (tag !== 58) { break; } message.rewardBand = reader.string(); continue; } case 8: { if (tag !== 66) { break; } message.currencyPairProviders.push(CurrencyPairProviders.decode(reader, reader.uint32())); continue; } case 9: { if (tag !== 74) { break; } message.currencyDeviationThresholds.push(CurrencyDeviationThreshold.decode(reader, reader.uint32())); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", height: isSet(object.height) ? BigInt(object.height) : 0n, denomList: globalThis.Array.isArray(object?.denomList) ? object.denomList.map((e) => Denom.fromJSON(e)) : globalThis.Array.isArray(object?.denom_list) ? object.denom_list.map((e) => Denom.fromJSON(e)) : [], mandatory: isSet(object.mandatory) ? globalThis.Boolean(object.mandatory) : false, rewardBand: isSet(object.rewardBand) ? globalThis.String(object.rewardBand) : isSet(object.reward_band) ? globalThis.String(object.reward_band) : "", currencyPairProviders: globalThis.Array.isArray(object?.currencyPairProviders) ? object.currencyPairProviders.map((e) => CurrencyPairProviders.fromJSON(e)) : globalThis.Array.isArray(object?.currency_pair_providers) ? object.currency_pair_providers.map((e) => CurrencyPairProviders.fromJSON(e)) : [], currencyDeviationThresholds: globalThis.Array.isArray(object?.currencyDeviationThresholds) ? object.currencyDeviationThresholds.map((e) => CurrencyDeviationThreshold.fromJSON(e)) : globalThis.Array.isArray(object?.currency_deviation_thresholds) ? object.currency_deviation_thresholds.map((e) => CurrencyDeviationThreshold.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.height !== 0n) { obj.height = message.height.toString(); } if (message.denomList?.length) { obj.denomList = message.denomList.map((e) => Denom.toJSON(e)); } if (message.mandatory !== false) { obj.mandatory = message.mandatory; } if (message.rewardBand !== "") { obj.rewardBand = message.rewardBand; } if (message.currencyPairProviders?.length) { obj.currencyPairProviders = message.currencyPairProviders.map((e) => CurrencyPairProviders.toJSON(e)); } if (message.currencyDeviationThresholds?.length) { obj.currencyDeviationThresholds = message.currencyDeviationThresholds.map((e) => CurrencyDeviationThreshold.toJSON(e)); } return obj; }, create(base) { return MsgGovAddDenoms.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgGovAddDenoms(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.height = object.height ?? 0n; message.denomList = object.denomList?.map((e) => Denom.fromPartial(e)) || []; message.mandatory = object.mandatory ?? false; message.rewardBand = object.rewardBand ?? ""; message.currencyPairProviders = object.currencyPairProviders?.map((e) => CurrencyPairProviders.fromPartial(e)) || []; message.currencyDeviationThresholds = object.currencyDeviationThresholds?.map((e) => CurrencyDeviationThreshold.fromPartial(e)) || []; return message; }, }; function createBaseMsgGovAddDenomsResponse() { return {}; } export const MsgGovAddDenomsResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovAddDenomsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgGovAddDenomsResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgGovAddDenomsResponse(); return message; }, }; function createBaseMsgGovRemoveCurrencyPairProviders() { return { authority: "", title: "", description: "", height: 0n, currencyPairProviders: [] }; } export const MsgGovRemoveCurrencyPairProviders = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } if (message.height !== 0n) { if (BigInt.asIntN(64, message.height) !== message.height) { throw new globalThis.Error("value provided for field message.height of type int64 too large"); } writer.uint32(32).int64(message.height); } for (const v of message.currencyPairProviders) { CurrencyPairProviders.encode(v, writer.uint32(42).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovRemoveCurrencyPairProviders(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 32) { break; } message.height = reader.int64(); continue; } case 5: { if (tag !== 42) { break; } message.currencyPairProviders.push(CurrencyPairProviders.decode(reader, reader.uint32())); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", height: isSet(object.height) ? BigInt(object.height) : 0n, currencyPairProviders: globalThis.Array.isArray(object?.currencyPairProviders) ? object.currencyPairProviders.map((e) => CurrencyPairProviders.fromJSON(e)) : globalThis.Array.isArray(object?.currency_pair_providers) ? object.currency_pair_providers.map((e) => CurrencyPairProviders.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.height !== 0n) { obj.height = message.height.toString(); } if (message.currencyPairProviders?.length) { obj.currencyPairProviders = message.currencyPairProviders.map((e) => CurrencyPairProviders.toJSON(e)); } return obj; }, create(base) { return MsgGovRemoveCurrencyPairProviders.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgGovRemoveCurrencyPairProviders(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.height = object.height ?? 0n; message.currencyPairProviders = object.currencyPairProviders?.map((e) => CurrencyPairProviders.fromPartial(e)) || []; return message; }, }; function createBaseMsgGovRemoveCurrencyPairProvidersResponse() { return {}; } export const MsgGovRemoveCurrencyPairProvidersResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovRemoveCurrencyPairProvidersResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgGovRemoveCurrencyPairProvidersResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgGovRemoveCurrencyPairProvidersResponse(); return message; }, }; function createBaseMsgGovRemoveCurrencyDeviationThresholds() { return { authority: "", title: "", description: "", height: 0n, currencies: [] }; } export const MsgGovRemoveCurrencyDeviationThresholds = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } if (message.height !== 0n) { if (BigInt.asIntN(64, message.height) !== message.height) { throw new globalThis.Error("value provided for field message.height of type int64 too large"); } writer.uint32(32).int64(message.height); } for (const v of message.currencies) { writer.uint32(42).string(v); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovRemoveCurrencyDeviationThresholds(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 32) { break; } message.height = reader.int64(); continue; } case 5: { if (tag !== 42) { break; } message.currencies.push(reader.string()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", height: isSet(object.height) ? BigInt(object.height) : 0n, currencies: globalThis.Array.isArray(object?.currencies) ? object.currencies.map((e) => globalThis.String(e)) : [], }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.height !== 0n) { obj.height = message.height.toString(); } if (message.currencies?.length) { obj.currencies = message.currencies; } return obj; }, create(base) { return MsgGovRemoveCurrencyDeviationThresholds.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgGovRemoveCurrencyDeviationThresholds(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.height = object.height ?? 0n; message.currencies = object.currencies?.map((e) => e) || []; return message; }, }; function createBaseMsgGovRemoveCurrencyDeviationThresholdsResponse() { return {}; } export const MsgGovRemoveCurrencyDeviationThresholdsResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovRemoveCurrencyDeviationThresholdsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgGovRemoveCurrencyDeviationThresholdsResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgGovRemoveCurrencyDeviationThresholdsResponse(); return message; }, }; function createBaseMsgGovCancelUpdateParamPlan() { return { authority: "", title: "", description: "", height: 0n }; } export const MsgGovCancelUpdateParamPlan = { encode(message, writer = new BinaryWriter()) { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.title !== "") { writer.uint32(18).string(message.title); } if (message.description !== "") { writer.uint32(26).string(message.description); } if (message.height !== 0n) { if (BigInt.asIntN(64, message.height) !== message.height) { throw new globalThis.Error("value provided for field message.height of type int64 too large"); } writer.uint32(32).int64(message.height); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovCancelUpdateParamPlan(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.authority = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.title = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.description = reader.string(); continue; } case 4: { if (tag !== 32) { break; } message.height = reader.int64(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", description: isSet(object.description) ? globalThis.String(object.description) : "", height: isSet(object.height) ? BigInt(object.height) : 0n, }; }, toJSON(message) { const obj = {}; if (message.authority !== "") { obj.authority = message.authority; } if (message.title !== "") { obj.title = message.title; } if (message.description !== "") { obj.description = message.description; } if (message.height !== 0n) { obj.height = message.height.toString(); } return obj; }, create(base) { return MsgGovCancelUpdateParamPlan.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseMsgGovCancelUpdateParamPlan(); message.authority = object.authority ?? ""; message.title = object.title ?? ""; message.description = object.description ?? ""; message.height = object.height ?? 0n; return message; }, }; function createBaseMsgGovCancelUpdateParamPlanResponse() { return {}; } export const MsgGovCancelUpdateParamPlanResponse = { encode(_, writer = new BinaryWriter()) { return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); const end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGovCancelUpdateParamPlanResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(_) { return {}; }, toJSON(_) { const obj = {}; return obj; }, create(base) { return MsgGovCancelUpdateParamPlanResponse.fromPartial(base ?? {}); }, fromPartial(_) { const message = createBaseMsgGovCancelUpdateParamPlanResponse(); return message; }, }; export const MsgServiceName = "cheqd.oracle.v2.Msg"; export class MsgClientImpl { rpc; service; constructor(rpc, opts) { this.service = opts?.service || MsgServiceName; this.rpc = rpc; this.AggregateExchangeRatePrevote = this.AggregateExchangeRatePrevote.bind(this); this.AggregateExchangeRateVote = this.AggregateExchangeRateVote.bind(this); this.DelegateFeedConsent = this.DelegateFeedConsent.bind(this); this.LegacyGovUpdateParams = this.LegacyGovUpdateParams.bind(this); this.GovUpdateParams = this.GovUpdateParams.bind(this); this.GovAddDenoms = this.GovAddDenoms.bind(this); this.GovRemoveCurrencyPairProviders = this.GovRemoveCurrencyPairProviders.bind(this); this.GovRemoveCurrencyDeviationThresholds = this.GovRemoveCurrencyDeviationThresholds.bind(this); this.GovCancelUpdateParamPlan = this.GovCancelUpdateParamPlan.bind(this); } AggregateExchangeRatePrevote(request) { const data = MsgAggregateExchangeRatePrevote.encode(request).finish(); const promise = this.rpc.request(this.service, "AggregateExchangeRatePrevote", data); return promise.then((data) => MsgAggregateExchangeRatePrevoteResponse.decode(new BinaryReader(data))); } AggregateExchangeRateVote(request) { const data = MsgAggregateExchangeRateVote.encode(request).finish(); const promise = this.rpc.request(this.service, "AggregateExchangeRateVote", data); return promise.then((data) => MsgAggregateExchangeRateVoteResponse.decode(new BinaryReader(data))); } DelegateFeedConsent(request) { const data = MsgDelegateFeedConsent.encode(request).finish(); const promise = this.rpc.request(this.service, "DelegateFeedConsent", data); return promise.then((data) => MsgDelegateFeedConsentResponse.decode(new BinaryReader(data))); } LegacyGovUpdateParams(request) { const data = MsgLegacyGovUpdateParams.encode(request).finish(); const promise = this.rpc.request(this.service, "LegacyGovUpdateParams", data); return promise.then((data) => MsgLegacyGovUpdateParamsResponse.decode(new BinaryReader(data))); } GovUpdateParams(request) { const data = MsgGovUpdateParams.encode(request).finish(); const promise = this.rpc.request(this.service, "GovUpdateParams", data); return promise.then((data) => MsgGovUpdateParamsResponse.decode(new BinaryReader(data))); } GovAddDenoms(request) { const data = MsgGovAddDenoms.encode(request).finish(); const promise = this.rpc.request(this.service, "GovAddDenoms", data); return promise.then((data) => MsgGovAddDenomsResponse.decode(new BinaryReader(data))); } GovRemoveCurrencyPairProviders(request) { const data = MsgGovRemoveCurrencyPairProviders.encode(request).finish(); con