//@ts-nocheck
import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet } from "../../../helpers";
import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
/**
* MsgSetWithdrawAddress sets the withdraw address for
* a delegator (or validator self-delegation).
*/
export interface MsgSetWithdrawAddress {
delegatorAddress: string;
withdrawAddress: string;
}
export interface MsgSetWithdrawAddressProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress";
value: Uint8Array;
}
/**
* MsgSetWithdrawAddress sets the withdraw address for
* a delegator (or validator self-delegation).
*/
export interface MsgSetWithdrawAddressAmino {
delegator_address?: string;
withdraw_address?: string;
}
export interface MsgSetWithdrawAddressAminoMsg {
type: "cosmos-sdk/MsgModifyWithdrawAddress";
value: MsgSetWithdrawAddressAmino;
}
/**
* MsgSetWithdrawAddress sets the withdraw address for
* a delegator (or validator self-delegation).
*/
export interface MsgSetWithdrawAddressSDKType {
delegator_address: string;
withdraw_address: string;
}
/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */
export interface MsgSetWithdrawAddressResponse {}
export interface MsgSetWithdrawAddressResponseProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse";
value: Uint8Array;
}
/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */
export interface MsgSetWithdrawAddressResponseAmino {}
export interface MsgSetWithdrawAddressResponseAminoMsg {
type: "cosmos-sdk/MsgSetWithdrawAddressResponse";
value: MsgSetWithdrawAddressResponseAmino;
}
/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */
export interface MsgSetWithdrawAddressResponseSDKType {}
/**
* MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
* from a single validator.
*/
export interface MsgWithdrawDelegatorReward {
delegatorAddress: string;
validatorAddress: string;
}
export interface MsgWithdrawDelegatorRewardProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward";
value: Uint8Array;
}
/**
* MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
* from a single validator.
*/
export interface MsgWithdrawDelegatorRewardAmino {
delegator_address?: string;
validator_address?: string;
}
export interface MsgWithdrawDelegatorRewardAminoMsg {
type: "cosmos-sdk/MsgWithdrawDelegationReward";
value: MsgWithdrawDelegatorRewardAmino;
}
/**
* MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
* from a single validator.
*/
export interface MsgWithdrawDelegatorRewardSDKType {
delegator_address: string;
validator_address: string;
}
/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */
export interface MsgWithdrawDelegatorRewardResponse {
amount: Coin[];
}
export interface MsgWithdrawDelegatorRewardResponseProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse";
value: Uint8Array;
}
/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */
export interface MsgWithdrawDelegatorRewardResponseAmino {
amount?: CoinAmino[];
}
export interface MsgWithdrawDelegatorRewardResponseAminoMsg {
type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse";
value: MsgWithdrawDelegatorRewardResponseAmino;
}
/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */
export interface MsgWithdrawDelegatorRewardResponseSDKType {
amount: CoinSDKType[];
}
/**
* MsgWithdrawValidatorCommission withdraws the full commission to the validator
* address.
*/
export interface MsgWithdrawValidatorCommission {
validatorAddress: string;
}
export interface MsgWithdrawValidatorCommissionProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission";
value: Uint8Array;
}
/**
* MsgWithdrawValidatorCommission withdraws the full commission to the validator
* address.
*/
export interface MsgWithdrawValidatorCommissionAmino {
validator_address?: string;
}
export interface MsgWithdrawValidatorCommissionAminoMsg {
type: "cosmos-sdk/MsgWithdrawValidatorCommission";
value: MsgWithdrawValidatorCommissionAmino;
}
/**
* MsgWithdrawValidatorCommission withdraws the full commission to the validator
* address.
*/
export interface MsgWithdrawValidatorCommissionSDKType {
validator_address: string;
}
/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */
export interface MsgWithdrawValidatorCommissionResponse {
amount: Coin[];
}
export interface MsgWithdrawValidatorCommissionResponseProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse";
value: Uint8Array;
}
/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */
export interface MsgWithdrawValidatorCommissionResponseAmino {
amount?: CoinAmino[];
}
export interface MsgWithdrawValidatorCommissionResponseAminoMsg {
type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse";
value: MsgWithdrawValidatorCommissionResponseAmino;
}
/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */
export interface MsgWithdrawValidatorCommissionResponseSDKType {
amount: CoinSDKType[];
}
/**
* MsgFundCommunityPool allows an account to directly
* fund the community pool.
*/
export interface MsgFundCommunityPool {
amount: Coin[];
depositor: string;
}
export interface MsgFundCommunityPoolProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool";
value: Uint8Array;
}
/**
* MsgFundCommunityPool allows an account to directly
* fund the community pool.
*/
export interface MsgFundCommunityPoolAmino {
amount?: CoinAmino[];
depositor?: string;
}
export interface MsgFundCommunityPoolAminoMsg {
type: "cosmos-sdk/MsgFundCommunityPool";
value: MsgFundCommunityPoolAmino;
}
/**
* MsgFundCommunityPool allows an account to directly
* fund the community pool.
*/
export interface MsgFundCommunityPoolSDKType {
amount: CoinSDKType[];
depositor: string;
}
/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */
export interface MsgFundCommunityPoolResponse {}
export interface MsgFundCommunityPoolResponseProtoMsg {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse";
value: Uint8Array;
}
/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */
export interface MsgFundCommunityPoolResponseAmino {}
export interface MsgFundCommunityPoolResponseAminoMsg {
type: "cosmos-sdk/MsgFundCommunityPoolResponse";
value: MsgFundCommunityPoolResponseAmino;
}
/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */
export interface MsgFundCommunityPoolResponseSDKType {}
function createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress {
return {
delegatorAddress: "",
withdrawAddress: ""
};
}
export const MsgSetWithdrawAddress = {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
aminoType: "cosmos-sdk/MsgModifyWithdrawAddress",
is(o: any): o is MsgSetWithdrawAddress {
return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegatorAddress === "string" && typeof o.withdrawAddress === "string");
},
isSDK(o: any): o is MsgSetWithdrawAddressSDKType {
return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegator_address === "string" && typeof o.withdraw_address === "string");
},
isAmino(o: any): o is MsgSetWithdrawAddressAmino {
return o && (o.$typeUrl === MsgSetWithdrawAddress.typeUrl || typeof o.delegator_address === "string" && typeof o.withdraw_address === "string");
},
encode(message: MsgSetWithdrawAddress, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.delegatorAddress !== "") {
writer.uint32(10).string(message.delegatorAddress);
}
if (message.withdrawAddress !== "") {
writer.uint32(18).string(message.withdrawAddress);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddress {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgSetWithdrawAddress();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.delegatorAddress = reader.string();
break;
case 2:
message.withdrawAddress = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgSetWithdrawAddress {
return {
delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "",
withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : ""
};
},
toJSON(message: MsgSetWithdrawAddress): JsonSafe<MsgSetWithdrawAddress> {
const obj: any = {};
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
return obj;
},
fromPartial(object: Partial<MsgSetWithdrawAddress>): MsgSetWithdrawAddress {
const message = createBaseMsgSetWithdrawAddress();
message.delegatorAddress = object.delegatorAddress ?? "";
message.withdrawAddress = object.withdrawAddress ?? "";
return message;
},
fromAmino(object: MsgSetWithdrawAddressAmino): MsgSetWithdrawAddress {
const message = createBaseMsgSetWithdrawAddress();
if (object.delegator_address !== undefined && object.delegator_address !== null) {
message.delegatorAddress = object.delegator_address;
}
if (object.withdraw_address !== undefined && object.withdraw_address !== null) {
message.withdrawAddress = object.withdraw_address;
}
return message;
},
toAmino(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAmino {
const obj: any = {};
obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress;
return obj;
},
fromAminoMsg(object: MsgSetWithdrawAddressAminoMsg): MsgSetWithdrawAddress {
return MsgSetWithdrawAddress.fromAmino(object.value);
},
toAminoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAminoMsg {
return {
type: "cosmos-sdk/MsgModifyWithdrawAddress",
value: MsgSetWithdrawAddress.toAmino(message)
};
},
fromProtoMsg(message: MsgSetWithdrawAddressProtoMsg): MsgSetWithdrawAddress {
return MsgSetWithdrawAddress.decode(message.value);
},
toProto(message: MsgSetWithdrawAddress): Uint8Array {
return MsgSetWithdrawAddress.encode(message).finish();
},
toProtoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
value: MsgSetWithdrawAddress.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgSetWithdrawAddress.typeUrl, MsgSetWithdrawAddress);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddress.aminoType, MsgSetWithdrawAddress.typeUrl);
function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse {
return {};
}
export const MsgSetWithdrawAddressResponse = {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse",
aminoType: "cosmos-sdk/MsgSetWithdrawAddressResponse",
is(o: any): o is MsgSetWithdrawAddressResponse {
return o && o.$typeUrl === MsgSetWithdrawAddressResponse.typeUrl;
},
isSDK(o: any): o is MsgSetWithdrawAddressResponseSDKType {
return o && o.$typeUrl === MsgSetWithdrawAddressResponse.typeUrl;
},
isAmino(o: any): o is MsgSetWithdrawAddressResponseAmino {
return o && o.$typeUrl === MsgSetWithdrawAddressResponse.typeUrl;
},
encode(_: MsgSetWithdrawAddressResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddressResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgSetWithdrawAddressResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(_: any): MsgSetWithdrawAddressResponse {
return {};
},
toJSON(_: MsgSetWithdrawAddressResponse): JsonSafe<MsgSetWithdrawAddressResponse> {
const obj: any = {};
return obj;
},
fromPartial(_: Partial<MsgSetWithdrawAddressResponse>): MsgSetWithdrawAddressResponse {
const message = createBaseMsgSetWithdrawAddressResponse();
return message;
},
fromAmino(_: MsgSetWithdrawAddressResponseAmino): MsgSetWithdrawAddressResponse {
const message = createBaseMsgSetWithdrawAddressResponse();
return message;
},
toAmino(_: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAmino {
const obj: any = {};
return obj;
},
fromAminoMsg(object: MsgSetWithdrawAddressResponseAminoMsg): MsgSetWithdrawAddressResponse {
return MsgSetWithdrawAddressResponse.fromAmino(object.value);
},
toAminoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAminoMsg {
return {
type: "cosmos-sdk/MsgSetWithdrawAddressResponse",
value: MsgSetWithdrawAddressResponse.toAmino(message)
};
},
fromProtoMsg(message: MsgSetWithdrawAddressResponseProtoMsg): MsgSetWithdrawAddressResponse {
return MsgSetWithdrawAddressResponse.decode(message.value);
},
toProto(message: MsgSetWithdrawAddressResponse): Uint8Array {
return MsgSetWithdrawAddressResponse.encode(message).finish();
},
toProtoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse",
value: MsgSetWithdrawAddressResponse.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgSetWithdrawAddressResponse.typeUrl, MsgSetWithdrawAddressResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgSetWithdrawAddressResponse.aminoType, MsgSetWithdrawAddressResponse.typeUrl);
function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward {
return {
delegatorAddress: "",
validatorAddress: ""
};
}
export const MsgWithdrawDelegatorReward = {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
aminoType: "cosmos-sdk/MsgWithdrawDelegationReward",
is(o: any): o is MsgWithdrawDelegatorReward {
return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegatorAddress === "string" && typeof o.validatorAddress === "string");
},
isSDK(o: any): o is MsgWithdrawDelegatorRewardSDKType {
return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string");
},
isAmino(o: any): o is MsgWithdrawDelegatorRewardAmino {
return o && (o.$typeUrl === MsgWithdrawDelegatorReward.typeUrl || typeof o.delegator_address === "string" && typeof o.validator_address === "string");
},
encode(message: MsgWithdrawDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.delegatorAddress !== "") {
writer.uint32(10).string(message.delegatorAddress);
}
if (message.validatorAddress !== "") {
writer.uint32(18).string(message.validatorAddress);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorReward {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgWithdrawDelegatorReward();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.delegatorAddress = reader.string();
break;
case 2:
message.validatorAddress = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgWithdrawDelegatorReward {
return {
delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "",
validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : ""
};
},
toJSON(message: MsgWithdrawDelegatorReward): JsonSafe<MsgWithdrawDelegatorReward> {
const obj: any = {};
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
return obj;
},
fromPartial(object: Partial<MsgWithdrawDelegatorReward>): MsgWithdrawDelegatorReward {
const message = createBaseMsgWithdrawDelegatorReward();
message.delegatorAddress = object.delegatorAddress ?? "";
message.validatorAddress = object.validatorAddress ?? "";
return message;
},
fromAmino(object: MsgWithdrawDelegatorRewardAmino): MsgWithdrawDelegatorReward {
const message = createBaseMsgWithdrawDelegatorReward();
if (object.delegator_address !== undefined && object.delegator_address !== null) {
message.delegatorAddress = object.delegator_address;
}
if (object.validator_address !== undefined && object.validator_address !== null) {
message.validatorAddress = object.validator_address;
}
return message;
},
toAmino(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAmino {
const obj: any = {};
obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
return obj;
},
fromAminoMsg(object: MsgWithdrawDelegatorRewardAminoMsg): MsgWithdrawDelegatorReward {
return MsgWithdrawDelegatorReward.fromAmino(object.value);
},
toAminoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAminoMsg {
return {
type: "cosmos-sdk/MsgWithdrawDelegationReward",
value: MsgWithdrawDelegatorReward.toAmino(message)
};
},
fromProtoMsg(message: MsgWithdrawDelegatorRewardProtoMsg): MsgWithdrawDelegatorReward {
return MsgWithdrawDelegatorReward.decode(message.value);
},
toProto(message: MsgWithdrawDelegatorReward): Uint8Array {
return MsgWithdrawDelegatorReward.encode(message).finish();
},
toProtoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
value: MsgWithdrawDelegatorReward.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgWithdrawDelegatorReward.typeUrl, MsgWithdrawDelegatorReward);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorReward.aminoType, MsgWithdrawDelegatorReward.typeUrl);
function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse {
return {
amount: []
};
}
export const MsgWithdrawDelegatorRewardResponse = {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse",
aminoType: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse",
is(o: any): o is MsgWithdrawDelegatorRewardResponse {
return o && (o.$typeUrl === MsgWithdrawDelegatorRewardResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])));
},
isSDK(o: any): o is MsgWithdrawDelegatorRewardResponseSDKType {
return o && (o.$typeUrl === MsgWithdrawDelegatorRewardResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isSDK(o.amount[0])));
},
isAmino(o: any): o is MsgWithdrawDelegatorRewardResponseAmino {
return o && (o.$typeUrl === MsgWithdrawDelegatorRewardResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])));
},
encode(message: MsgWithdrawDelegatorRewardResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.amount) {
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorRewardResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgWithdrawDelegatorRewardResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.amount.push(Coin.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgWithdrawDelegatorRewardResponse {
return {
amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : []
};
},
toJSON(message: MsgWithdrawDelegatorRewardResponse): JsonSafe<MsgWithdrawDelegatorRewardResponse> {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined);
} else {
obj.amount = [];
}
return obj;
},
fromPartial(object: Partial<MsgWithdrawDelegatorRewardResponse>): MsgWithdrawDelegatorRewardResponse {
const message = createBaseMsgWithdrawDelegatorRewardResponse();
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
return message;
},
fromAmino(object: MsgWithdrawDelegatorRewardResponseAmino): MsgWithdrawDelegatorRewardResponse {
const message = createBaseMsgWithdrawDelegatorRewardResponse();
message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
return message;
},
toAmino(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAmino {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
} else {
obj.amount = message.amount;
}
return obj;
},
fromAminoMsg(object: MsgWithdrawDelegatorRewardResponseAminoMsg): MsgWithdrawDelegatorRewardResponse {
return MsgWithdrawDelegatorRewardResponse.fromAmino(object.value);
},
toAminoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAminoMsg {
return {
type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse",
value: MsgWithdrawDelegatorRewardResponse.toAmino(message)
};
},
fromProtoMsg(message: MsgWithdrawDelegatorRewardResponseProtoMsg): MsgWithdrawDelegatorRewardResponse {
return MsgWithdrawDelegatorRewardResponse.decode(message.value);
},
toProto(message: MsgWithdrawDelegatorRewardResponse): Uint8Array {
return MsgWithdrawDelegatorRewardResponse.encode(message).finish();
},
toProtoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse",
value: MsgWithdrawDelegatorRewardResponse.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgWithdrawDelegatorRewardResponse.typeUrl, MsgWithdrawDelegatorRewardResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawDelegatorRewardResponse.aminoType, MsgWithdrawDelegatorRewardResponse.typeUrl);
function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission {
return {
validatorAddress: ""
};
}
export const MsgWithdrawValidatorCommission = {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission",
is(o: any): o is MsgWithdrawValidatorCommission {
return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validatorAddress === "string");
},
isSDK(o: any): o is MsgWithdrawValidatorCommissionSDKType {
return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validator_address === "string");
},
isAmino(o: any): o is MsgWithdrawValidatorCommissionAmino {
return o && (o.$typeUrl === MsgWithdrawValidatorCommission.typeUrl || typeof o.validator_address === "string");
},
encode(message: MsgWithdrawValidatorCommission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.validatorAddress !== "") {
writer.uint32(10).string(message.validatorAddress);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommission {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgWithdrawValidatorCommission();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.validatorAddress = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgWithdrawValidatorCommission {
return {
validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : ""
};
},
toJSON(message: MsgWithdrawValidatorCommission): JsonSafe<MsgWithdrawValidatorCommission> {
const obj: any = {};
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
return obj;
},
fromPartial(object: Partial<MsgWithdrawValidatorCommission>): MsgWithdrawValidatorCommission {
const message = createBaseMsgWithdrawValidatorCommission();
message.validatorAddress = object.validatorAddress ?? "";
return message;
},
fromAmino(object: MsgWithdrawValidatorCommissionAmino): MsgWithdrawValidatorCommission {
const message = createBaseMsgWithdrawValidatorCommission();
if (object.validator_address !== undefined && object.validator_address !== null) {
message.validatorAddress = object.validator_address;
}
return message;
},
toAmino(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAmino {
const obj: any = {};
obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
return obj;
},
fromAminoMsg(object: MsgWithdrawValidatorCommissionAminoMsg): MsgWithdrawValidatorCommission {
return MsgWithdrawValidatorCommission.fromAmino(object.value);
},
toAminoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAminoMsg {
return {
type: "cosmos-sdk/MsgWithdrawValidatorCommission",
value: MsgWithdrawValidatorCommission.toAmino(message)
};
},
fromProtoMsg(message: MsgWithdrawValidatorCommissionProtoMsg): MsgWithdrawValidatorCommission {
return MsgWithdrawValidatorCommission.decode(message.value);
},
toProto(message: MsgWithdrawValidatorCommission): Uint8Array {
return MsgWithdrawValidatorCommission.encode(message).finish();
},
toProtoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
value: MsgWithdrawValidatorCommission.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgWithdrawValidatorCommission.typeUrl, MsgWithdrawValidatorCommission);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommission.aminoType, MsgWithdrawValidatorCommission.typeUrl);
function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse {
return {
amount: []
};
}
export const MsgWithdrawValidatorCommissionResponse = {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse",
aminoType: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse",
is(o: any): o is MsgWithdrawValidatorCommissionResponse {
return o && (o.$typeUrl === MsgWithdrawValidatorCommissionResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])));
},
isSDK(o: any): o is MsgWithdrawValidatorCommissionResponseSDKType {
return o && (o.$typeUrl === MsgWithdrawValidatorCommissionResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isSDK(o.amount[0])));
},
isAmino(o: any): o is MsgWithdrawValidatorCommissionResponseAmino {
return o && (o.$typeUrl === MsgWithdrawValidatorCommissionResponse.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])));
},
encode(message: MsgWithdrawValidatorCommissionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.amount) {
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommissionResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgWithdrawValidatorCommissionResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.amount.push(Coin.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgWithdrawValidatorCommissionResponse {
return {
amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : []
};
},
toJSON(message: MsgWithdrawValidatorCommissionResponse): JsonSafe<MsgWithdrawValidatorCommissionResponse> {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined);
} else {
obj.amount = [];
}
return obj;
},
fromPartial(object: Partial<MsgWithdrawValidatorCommissionResponse>): MsgWithdrawValidatorCommissionResponse {
const message = createBaseMsgWithdrawValidatorCommissionResponse();
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
return message;
},
fromAmino(object: MsgWithdrawValidatorCommissionResponseAmino): MsgWithdrawValidatorCommissionResponse {
const message = createBaseMsgWithdrawValidatorCommissionResponse();
message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
return message;
},
toAmino(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAmino {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
} else {
obj.amount = message.amount;
}
return obj;
},
fromAminoMsg(object: MsgWithdrawValidatorCommissionResponseAminoMsg): MsgWithdrawValidatorCommissionResponse {
return MsgWithdrawValidatorCommissionResponse.fromAmino(object.value);
},
toAminoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAminoMsg {
return {
type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse",
value: MsgWithdrawValidatorCommissionResponse.toAmino(message)
};
},
fromProtoMsg(message: MsgWithdrawValidatorCommissionResponseProtoMsg): MsgWithdrawValidatorCommissionResponse {
return MsgWithdrawValidatorCommissionResponse.decode(message.value);
},
toProto(message: MsgWithdrawValidatorCommissionResponse): Uint8Array {
return MsgWithdrawValidatorCommissionResponse.encode(message).finish();
},
toProtoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse",
value: MsgWithdrawValidatorCommissionResponse.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgWithdrawValidatorCommissionResponse.typeUrl, MsgWithdrawValidatorCommissionResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgWithdrawValidatorCommissionResponse.aminoType, MsgWithdrawValidatorCommissionResponse.typeUrl);
function createBaseMsgFundCommunityPool(): MsgFundCommunityPool {
return {
amount: [],
depositor: ""
};
}
export const MsgFundCommunityPool = {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
aminoType: "cosmos-sdk/MsgFundCommunityPool",
is(o: any): o is MsgFundCommunityPool {
return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.is(o.amount[0])) && typeof o.depositor === "string");
},
isSDK(o: any): o is MsgFundCommunityPoolSDKType {
return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isSDK(o.amount[0])) && typeof o.depositor === "string");
},
isAmino(o: any): o is MsgFundCommunityPoolAmino {
return o && (o.$typeUrl === MsgFundCommunityPool.typeUrl || Array.isArray(o.amount) && (!o.amount.length || Coin.isAmino(o.amount[0])) && typeof o.depositor === "string");
},
encode(message: MsgFundCommunityPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.amount) {
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.depositor !== "") {
writer.uint32(18).string(message.depositor);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPool {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgFundCommunityPool();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.amount.push(Coin.decode(reader, reader.uint32()));
break;
case 2:
message.depositor = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): MsgFundCommunityPool {
return {
amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
depositor: isSet(object.depositor) ? String(object.depositor) : ""
};
},
toJSON(message: MsgFundCommunityPool): JsonSafe<MsgFundCommunityPool> {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toJSON(e) : undefined);
} else {
obj.amount = [];
}
message.depositor !== undefined && (obj.depositor = message.depositor);
return obj;
},
fromPartial(object: Partial<MsgFundCommunityPool>): MsgFundCommunityPool {
const message = createBaseMsgFundCommunityPool();
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
message.depositor = object.depositor ?? "";
return message;
},
fromAmino(object: MsgFundCommunityPoolAmino): MsgFundCommunityPool {
const message = createBaseMsgFundCommunityPool();
message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
if (object.depositor !== undefined && object.depositor !== null) {
message.depositor = object.depositor;
}
return message;
},
toAmino(message: MsgFundCommunityPool): MsgFundCommunityPoolAmino {
const obj: any = {};
if (message.amount) {
obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
} else {
obj.amount = message.amount;
}
obj.depositor = message.depositor === "" ? undefined : message.depositor;
return obj;
},
fromAminoMsg(object: MsgFundCommunityPoolAminoMsg): MsgFundCommunityPool {
return MsgFundCommunityPool.fromAmino(object.value);
},
toAminoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolAminoMsg {
return {
type: "cosmos-sdk/MsgFundCommunityPool",
value: MsgFundCommunityPool.toAmino(message)
};
},
fromProtoMsg(message: MsgFundCommunityPoolProtoMsg): MsgFundCommunityPool {
return MsgFundCommunityPool.decode(message.value);
},
toProto(message: MsgFundCommunityPool): Uint8Array {
return MsgFundCommunityPool.encode(message).finish();
},
toProtoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
value: MsgFundCommunityPool.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgFundCommunityPool.typeUrl, MsgFundCommunityPool);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPool.aminoType, MsgFundCommunityPool.typeUrl);
function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse {
return {};
}
export const MsgFundCommunityPoolResponse = {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse",
aminoType: "cosmos-sdk/MsgFundCommunityPoolResponse",
is(o: any): o is MsgFundCommunityPoolResponse {
return o && o.$typeUrl === MsgFundCommunityPoolResponse.typeUrl;
},
isSDK(o: any): o is MsgFundCommunityPoolResponseSDKType {
return o && o.$typeUrl === MsgFundCommunityPoolResponse.typeUrl;
},
isAmino(o: any): o is MsgFundCommunityPoolResponseAmino {
return o && o.$typeUrl === MsgFundCommunityPoolResponse.typeUrl;
},
encode(_: MsgFundCommunityPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPoolResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseMsgFundCommunityPoolResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(_: any): MsgFundCommunityPoolResponse {
return {};
},
toJSON(_: MsgFundCommunityPoolResponse): JsonSafe<MsgFundCommunityPoolResponse> {
const obj: any = {};
return obj;
},
fromPartial(_: Partial<MsgFundCommunityPoolResponse>): MsgFundCommunityPoolResponse {
const message = createBaseMsgFundCommunityPoolResponse();
return message;
},
fromAmino(_: MsgFundCommunityPoolResponseAmino): MsgFundCommunityPoolResponse {
const message = createBaseMsgFundCommunityPoolResponse();
return message;
},
toAmino(_: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAmino {
const obj: any = {};
return obj;
},
fromAminoMsg(object: MsgFundCommunityPoolResponseAminoMsg): MsgFundCommunityPoolResponse {
return MsgFundCommunityPoolResponse.fromAmino(object.value);
},
toAminoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAminoMsg {
return {
type: "cosmos-sdk/MsgFundCommunityPoolResponse",
value: MsgFundCommunityPoolResponse.toAmino(message)
};
},
fromProtoMsg(message: MsgFundCommunityPoolResponseProtoMsg): MsgFundCommunityPoolResponse {
return MsgFundCommunityPoolResponse.decode(message.value);
},
toProto(message: MsgFundCommunityPoolResponse): Uint8Array {
return MsgFundCommunityPoolResponse.encode(message).finish();
},
toProtoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseProtoMsg {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse",
value: MsgFundCommunityPoolResponse.encode(message).finish()
};
}
};
GlobalDecoderRegistry.register(MsgFundCommunityPoolResponse.typeUrl, MsgFundCommunityPoolResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgFundCommunityPoolResponse.aminoType, MsgFundCommunityPoolResponse.typeUrl);