//@ts-nocheck
import { PageRequest, PageResponse, } from '../../../cosmos/base/query/v1beta1/pagination.js';
import { Attester } from './attester.js';
import { PerMessageBurnLimit, } from './per_message_burn_limit.js';
import { BurningAndMintingPaused, } from './burning_and_minting_paused.js';
import { SendingAndReceivingMessagesPaused, } from './sending_and_receiving_messages_paused.js';
import { MaxMessageBodySize, } from './max_message_body_size.js';
import { Nonce } from './nonce.js';
import { SignatureThreshold, } from './signature_threshold.js';
import { TokenPair } from './token_pair.js';
import { RemoteTokenMessenger, } from './remote_token_messenger.js';
import { BinaryReader, BinaryWriter } from '../../../binary.js';
import {} from '../../../json-safe.js';
import { isSet } from '../../../helpers.js';
function createBaseQueryRolesRequest() {
    return {};
}
export const QueryRolesRequest = {
    typeUrl: '/circle.cctp.v1.QueryRolesRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRolesRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryRolesRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryRolesRequest.decode(message.value);
    },
    toProto(message) {
        return QueryRolesRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRolesRequest',
            value: QueryRolesRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryRolesResponse() {
    return {
        owner: '',
        attesterManager: '',
        pauser: '',
        tokenController: '',
    };
}
export const QueryRolesResponse = {
    typeUrl: '/circle.cctp.v1.QueryRolesResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.owner !== '') {
            writer.uint32(10).string(message.owner);
        }
        if (message.attesterManager !== '') {
            writer.uint32(18).string(message.attesterManager);
        }
        if (message.pauser !== '') {
            writer.uint32(26).string(message.pauser);
        }
        if (message.tokenController !== '') {
            writer.uint32(34).string(message.tokenController);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRolesResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.owner = reader.string();
                    break;
                case 2:
                    message.attesterManager = reader.string();
                    break;
                case 3:
                    message.pauser = reader.string();
                    break;
                case 4:
                    message.tokenController = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            owner: isSet(object.owner) ? String(object.owner) : '',
            attesterManager: isSet(object.attesterManager)
                ? String(object.attesterManager)
                : '',
            pauser: isSet(object.pauser) ? String(object.pauser) : '',
            tokenController: isSet(object.tokenController)
                ? String(object.tokenController)
                : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.owner !== undefined && (obj.owner = message.owner);
        message.attesterManager !== undefined &&
            (obj.attesterManager = message.attesterManager);
        message.pauser !== undefined && (obj.pauser = message.pauser);
        message.tokenController !== undefined &&
            (obj.tokenController = message.tokenController);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryRolesResponse();
        message.owner = object.owner ?? '';
        message.attesterManager = object.attesterManager ?? '';
        message.pauser = object.pauser ?? '';
        message.tokenController = object.tokenController ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return QueryRolesResponse.decode(message.value);
    },
    toProto(message) {
        return QueryRolesResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRolesResponse',
            value: QueryRolesResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetAttesterRequest() {
    return {
        attester: '',
    };
}
export const QueryGetAttesterRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetAttesterRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.attester !== '') {
            writer.uint32(10).string(message.attester);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetAttesterRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.attester = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            attester: isSet(object.attester) ? String(object.attester) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.attester !== undefined && (obj.attester = message.attester);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetAttesterRequest();
        message.attester = object.attester ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetAttesterRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetAttesterRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetAttesterRequest',
            value: QueryGetAttesterRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetAttesterResponse() {
    return {
        attester: Attester.fromPartial({}),
    };
}
export const QueryGetAttesterResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetAttesterResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.attester !== undefined) {
            Attester.encode(message.attester, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetAttesterResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.attester = Attester.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            attester: isSet(object.attester)
                ? Attester.fromJSON(object.attester)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.attester !== undefined &&
            (obj.attester = message.attester
                ? Attester.toJSON(message.attester)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetAttesterResponse();
        message.attester =
            object.attester !== undefined && object.attester !== null
                ? Attester.fromPartial(object.attester)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetAttesterResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetAttesterResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetAttesterResponse',
            value: QueryGetAttesterResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryAllAttestersRequest() {
    return {
        pagination: undefined,
    };
}
export const QueryAllAttestersRequest = {
    typeUrl: '/circle.cctp.v1.QueryAllAttestersRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pagination !== undefined) {
            PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllAttestersRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pagination = PageRequest.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination)
                ? PageRequest.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageRequest.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllAttestersRequest();
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageRequest.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllAttestersRequest.decode(message.value);
    },
    toProto(message) {
        return QueryAllAttestersRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllAttestersRequest',
            value: QueryAllAttestersRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryAllAttestersResponse() {
    return {
        attesters: [],
        pagination: undefined,
    };
}
export const QueryAllAttestersResponse = {
    typeUrl: '/circle.cctp.v1.QueryAllAttestersResponse',
    encode(message, writer = BinaryWriter.create()) {
        for (const v of message.attesters) {
            Attester.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.pagination !== undefined) {
            PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllAttestersResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.attesters.push(Attester.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.pagination = PageResponse.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            attesters: Array.isArray(object?.attesters)
                ? object.attesters.map((e) => Attester.fromJSON(e))
                : [],
            pagination: isSet(object.pagination)
                ? PageResponse.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.attesters) {
            obj.attesters = message.attesters.map(e => e ? Attester.toJSON(e) : undefined);
        }
        else {
            obj.attesters = [];
        }
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageResponse.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllAttestersResponse();
        message.attesters =
            object.attesters?.map(e => Attester.fromPartial(e)) || [];
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageResponse.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllAttestersResponse.decode(message.value);
    },
    toProto(message) {
        return QueryAllAttestersResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllAttestersResponse',
            value: QueryAllAttestersResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetPerMessageBurnLimitRequest() {
    return {
        denom: '',
    };
}
export const QueryGetPerMessageBurnLimitRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetPerMessageBurnLimitRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.denom !== '') {
            writer.uint32(10).string(message.denom);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetPerMessageBurnLimitRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.denom = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            denom: isSet(object.denom) ? String(object.denom) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.denom !== undefined && (obj.denom = message.denom);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetPerMessageBurnLimitRequest();
        message.denom = object.denom ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetPerMessageBurnLimitRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetPerMessageBurnLimitRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetPerMessageBurnLimitRequest',
            value: QueryGetPerMessageBurnLimitRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetPerMessageBurnLimitResponse() {
    return {
        burnLimit: PerMessageBurnLimit.fromPartial({}),
    };
}
export const QueryGetPerMessageBurnLimitResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetPerMessageBurnLimitResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.burnLimit !== undefined) {
            PerMessageBurnLimit.encode(message.burnLimit, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetPerMessageBurnLimitResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.burnLimit = PerMessageBurnLimit.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            burnLimit: isSet(object.burnLimit)
                ? PerMessageBurnLimit.fromJSON(object.burnLimit)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.burnLimit !== undefined &&
            (obj.burnLimit = message.burnLimit
                ? PerMessageBurnLimit.toJSON(message.burnLimit)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetPerMessageBurnLimitResponse();
        message.burnLimit =
            object.burnLimit !== undefined && object.burnLimit !== null
                ? PerMessageBurnLimit.fromPartial(object.burnLimit)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetPerMessageBurnLimitResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetPerMessageBurnLimitResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetPerMessageBurnLimitResponse',
            value: QueryGetPerMessageBurnLimitResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryAllPerMessageBurnLimitsRequest() {
    return {
        pagination: undefined,
    };
}
export const QueryAllPerMessageBurnLimitsRequest = {
    typeUrl: '/circle.cctp.v1.QueryAllPerMessageBurnLimitsRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pagination !== undefined) {
            PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllPerMessageBurnLimitsRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pagination = PageRequest.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination)
                ? PageRequest.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageRequest.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllPerMessageBurnLimitsRequest();
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageRequest.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllPerMessageBurnLimitsRequest.decode(message.value);
    },
    toProto(message) {
        return QueryAllPerMessageBurnLimitsRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllPerMessageBurnLimitsRequest',
            value: QueryAllPerMessageBurnLimitsRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryAllPerMessageBurnLimitsResponse() {
    return {
        burnLimits: [],
        pagination: undefined,
    };
}
export const QueryAllPerMessageBurnLimitsResponse = {
    typeUrl: '/circle.cctp.v1.QueryAllPerMessageBurnLimitsResponse',
    encode(message, writer = BinaryWriter.create()) {
        for (const v of message.burnLimits) {
            PerMessageBurnLimit.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.pagination !== undefined) {
            PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllPerMessageBurnLimitsResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.burnLimits.push(PerMessageBurnLimit.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.pagination = PageResponse.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            burnLimits: Array.isArray(object?.burnLimits)
                ? object.burnLimits.map((e) => PerMessageBurnLimit.fromJSON(e))
                : [],
            pagination: isSet(object.pagination)
                ? PageResponse.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.burnLimits) {
            obj.burnLimits = message.burnLimits.map(e => e ? PerMessageBurnLimit.toJSON(e) : undefined);
        }
        else {
            obj.burnLimits = [];
        }
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageResponse.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllPerMessageBurnLimitsResponse();
        message.burnLimits =
            object.burnLimits?.map(e => PerMessageBurnLimit.fromPartial(e)) || [];
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageResponse.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllPerMessageBurnLimitsResponse.decode(message.value);
    },
    toProto(message) {
        return QueryAllPerMessageBurnLimitsResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllPerMessageBurnLimitsResponse',
            value: QueryAllPerMessageBurnLimitsResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetBurningAndMintingPausedRequest() {
    return {};
}
export const QueryGetBurningAndMintingPausedRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetBurningAndMintingPausedRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetBurningAndMintingPausedRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryGetBurningAndMintingPausedRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetBurningAndMintingPausedRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetBurningAndMintingPausedRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetBurningAndMintingPausedRequest',
            value: QueryGetBurningAndMintingPausedRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetBurningAndMintingPausedResponse() {
    return {
        paused: BurningAndMintingPaused.fromPartial({}),
    };
}
export const QueryGetBurningAndMintingPausedResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetBurningAndMintingPausedResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.paused !== undefined) {
            BurningAndMintingPaused.encode(message.paused, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetBurningAndMintingPausedResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.paused = BurningAndMintingPaused.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            paused: isSet(object.paused)
                ? BurningAndMintingPaused.fromJSON(object.paused)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.paused !== undefined &&
            (obj.paused = message.paused
                ? BurningAndMintingPaused.toJSON(message.paused)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetBurningAndMintingPausedResponse();
        message.paused =
            object.paused !== undefined && object.paused !== null
                ? BurningAndMintingPaused.fromPartial(object.paused)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetBurningAndMintingPausedResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetBurningAndMintingPausedResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetBurningAndMintingPausedResponse',
            value: QueryGetBurningAndMintingPausedResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetSendingAndReceivingMessagesPausedRequest() {
    return {};
}
export const QueryGetSendingAndReceivingMessagesPausedRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetSendingAndReceivingMessagesPausedRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetSendingAndReceivingMessagesPausedRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryGetSendingAndReceivingMessagesPausedRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetSendingAndReceivingMessagesPausedRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetSendingAndReceivingMessagesPausedRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetSendingAndReceivingMessagesPausedRequest',
            value: QueryGetSendingAndReceivingMessagesPausedRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetSendingAndReceivingMessagesPausedResponse() {
    return {
        paused: SendingAndReceivingMessagesPaused.fromPartial({}),
    };
}
export const QueryGetSendingAndReceivingMessagesPausedResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetSendingAndReceivingMessagesPausedResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.paused !== undefined) {
            SendingAndReceivingMessagesPaused.encode(message.paused, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetSendingAndReceivingMessagesPausedResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.paused = SendingAndReceivingMessagesPaused.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            paused: isSet(object.paused)
                ? SendingAndReceivingMessagesPaused.fromJSON(object.paused)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.paused !== undefined &&
            (obj.paused = message.paused
                ? SendingAndReceivingMessagesPaused.toJSON(message.paused)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetSendingAndReceivingMessagesPausedResponse();
        message.paused =
            object.paused !== undefined && object.paused !== null
                ? SendingAndReceivingMessagesPaused.fromPartial(object.paused)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetSendingAndReceivingMessagesPausedResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetSendingAndReceivingMessagesPausedResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetSendingAndReceivingMessagesPausedResponse',
            value: QueryGetSendingAndReceivingMessagesPausedResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetMaxMessageBodySizeRequest() {
    return {};
}
export const QueryGetMaxMessageBodySizeRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetMaxMessageBodySizeRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetMaxMessageBodySizeRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryGetMaxMessageBodySizeRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetMaxMessageBodySizeRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetMaxMessageBodySizeRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetMaxMessageBodySizeRequest',
            value: QueryGetMaxMessageBodySizeRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetMaxMessageBodySizeResponse() {
    return {
        amount: MaxMessageBodySize.fromPartial({}),
    };
}
export const QueryGetMaxMessageBodySizeResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetMaxMessageBodySizeResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.amount !== undefined) {
            MaxMessageBodySize.encode(message.amount, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetMaxMessageBodySizeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.amount = MaxMessageBodySize.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            amount: isSet(object.amount)
                ? MaxMessageBodySize.fromJSON(object.amount)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.amount !== undefined &&
            (obj.amount = message.amount
                ? MaxMessageBodySize.toJSON(message.amount)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetMaxMessageBodySizeResponse();
        message.amount =
            object.amount !== undefined && object.amount !== null
                ? MaxMessageBodySize.fromPartial(object.amount)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetMaxMessageBodySizeResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetMaxMessageBodySizeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetMaxMessageBodySizeResponse',
            value: QueryGetMaxMessageBodySizeResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetNextAvailableNonceRequest() {
    return {};
}
export const QueryGetNextAvailableNonceRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetNextAvailableNonceRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetNextAvailableNonceRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryGetNextAvailableNonceRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetNextAvailableNonceRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetNextAvailableNonceRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetNextAvailableNonceRequest',
            value: QueryGetNextAvailableNonceRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetNextAvailableNonceResponse() {
    return {
        nonce: Nonce.fromPartial({}),
    };
}
export const QueryGetNextAvailableNonceResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetNextAvailableNonceResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.nonce !== undefined) {
            Nonce.encode(message.nonce, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetNextAvailableNonceResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.nonce = Nonce.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            nonce: isSet(object.nonce) ? Nonce.fromJSON(object.nonce) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.nonce !== undefined &&
            (obj.nonce = message.nonce ? Nonce.toJSON(message.nonce) : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetNextAvailableNonceResponse();
        message.nonce =
            object.nonce !== undefined && object.nonce !== null
                ? Nonce.fromPartial(object.nonce)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetNextAvailableNonceResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetNextAvailableNonceResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetNextAvailableNonceResponse',
            value: QueryGetNextAvailableNonceResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetSignatureThresholdRequest() {
    return {};
}
export const QueryGetSignatureThresholdRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetSignatureThresholdRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetSignatureThresholdRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryGetSignatureThresholdRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetSignatureThresholdRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetSignatureThresholdRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetSignatureThresholdRequest',
            value: QueryGetSignatureThresholdRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetSignatureThresholdResponse() {
    return {
        amount: SignatureThreshold.fromPartial({}),
    };
}
export const QueryGetSignatureThresholdResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetSignatureThresholdResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.amount !== undefined) {
            SignatureThreshold.encode(message.amount, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetSignatureThresholdResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.amount = SignatureThreshold.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            amount: isSet(object.amount)
                ? SignatureThreshold.fromJSON(object.amount)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.amount !== undefined &&
            (obj.amount = message.amount
                ? SignatureThreshold.toJSON(message.amount)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetSignatureThresholdResponse();
        message.amount =
            object.amount !== undefined && object.amount !== null
                ? SignatureThreshold.fromPartial(object.amount)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetSignatureThresholdResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetSignatureThresholdResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetSignatureThresholdResponse',
            value: QueryGetSignatureThresholdResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetTokenPairRequest() {
    return {
        remoteDomain: 0,
        remoteToken: '',
    };
}
export const QueryGetTokenPairRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetTokenPairRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.remoteDomain !== 0) {
            writer.uint32(8).uint32(message.remoteDomain);
        }
        if (message.remoteToken !== '') {
            writer.uint32(18).string(message.remoteToken);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetTokenPairRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.remoteDomain = reader.uint32();
                    break;
                case 2:
                    message.remoteToken = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            remoteDomain: isSet(object.remoteDomain)
                ? Number(object.remoteDomain)
                : 0,
            remoteToken: isSet(object.remoteToken) ? String(object.remoteToken) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.remoteDomain !== undefined &&
            (obj.remoteDomain = Math.round(message.remoteDomain));
        message.remoteToken !== undefined &&
            (obj.remoteToken = message.remoteToken);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetTokenPairRequest();
        message.remoteDomain = object.remoteDomain ?? 0;
        message.remoteToken = object.remoteToken ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetTokenPairRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetTokenPairRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetTokenPairRequest',
            value: QueryGetTokenPairRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetTokenPairResponse() {
    return {
        pair: TokenPair.fromPartial({}),
    };
}
export const QueryGetTokenPairResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetTokenPairResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pair !== undefined) {
            TokenPair.encode(message.pair, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetTokenPairResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pair = TokenPair.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pair: isSet(object.pair) ? TokenPair.fromJSON(object.pair) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pair !== undefined &&
            (obj.pair = message.pair ? TokenPair.toJSON(message.pair) : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetTokenPairResponse();
        message.pair =
            object.pair !== undefined && object.pair !== null
                ? TokenPair.fromPartial(object.pair)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetTokenPairResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetTokenPairResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetTokenPairResponse',
            value: QueryGetTokenPairResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryAllTokenPairsRequest() {
    return {
        pagination: undefined,
    };
}
export const QueryAllTokenPairsRequest = {
    typeUrl: '/circle.cctp.v1.QueryAllTokenPairsRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pagination !== undefined) {
            PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllTokenPairsRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pagination = PageRequest.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination)
                ? PageRequest.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageRequest.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllTokenPairsRequest();
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageRequest.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllTokenPairsRequest.decode(message.value);
    },
    toProto(message) {
        return QueryAllTokenPairsRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllTokenPairsRequest',
            value: QueryAllTokenPairsRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryAllTokenPairsResponse() {
    return {
        tokenPairs: [],
        pagination: undefined,
    };
}
export const QueryAllTokenPairsResponse = {
    typeUrl: '/circle.cctp.v1.QueryAllTokenPairsResponse',
    encode(message, writer = BinaryWriter.create()) {
        for (const v of message.tokenPairs) {
            TokenPair.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.pagination !== undefined) {
            PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllTokenPairsResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.tokenPairs.push(TokenPair.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.pagination = PageResponse.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            tokenPairs: Array.isArray(object?.tokenPairs)
                ? object.tokenPairs.map((e) => TokenPair.fromJSON(e))
                : [],
            pagination: isSet(object.pagination)
                ? PageResponse.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.tokenPairs) {
            obj.tokenPairs = message.tokenPairs.map(e => e ? TokenPair.toJSON(e) : undefined);
        }
        else {
            obj.tokenPairs = [];
        }
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageResponse.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllTokenPairsResponse();
        message.tokenPairs =
            object.tokenPairs?.map(e => TokenPair.fromPartial(e)) || [];
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageResponse.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllTokenPairsResponse.decode(message.value);
    },
    toProto(message) {
        return QueryAllTokenPairsResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllTokenPairsResponse',
            value: QueryAllTokenPairsResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryGetUsedNonceRequest() {
    return {
        sourceDomain: 0,
        nonce: BigInt(0),
    };
}
export const QueryGetUsedNonceRequest = {
    typeUrl: '/circle.cctp.v1.QueryGetUsedNonceRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.sourceDomain !== 0) {
            writer.uint32(8).uint32(message.sourceDomain);
        }
        if (message.nonce !== BigInt(0)) {
            writer.uint32(16).uint64(message.nonce);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetUsedNonceRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.sourceDomain = reader.uint32();
                    break;
                case 2:
                    message.nonce = reader.uint64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            sourceDomain: isSet(object.sourceDomain)
                ? Number(object.sourceDomain)
                : 0,
            nonce: isSet(object.nonce) ? BigInt(object.nonce.toString()) : BigInt(0),
        };
    },
    toJSON(message) {
        const obj = {};
        message.sourceDomain !== undefined &&
            (obj.sourceDomain = Math.round(message.sourceDomain));
        message.nonce !== undefined &&
            (obj.nonce = (message.nonce || BigInt(0)).toString());
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetUsedNonceRequest();
        message.sourceDomain = object.sourceDomain ?? 0;
        message.nonce =
            object.nonce !== undefined && object.nonce !== null
                ? BigInt(object.nonce.toString())
                : BigInt(0);
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetUsedNonceRequest.decode(message.value);
    },
    toProto(message) {
        return QueryGetUsedNonceRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetUsedNonceRequest',
            value: QueryGetUsedNonceRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryGetUsedNonceResponse() {
    return {
        nonce: Nonce.fromPartial({}),
    };
}
export const QueryGetUsedNonceResponse = {
    typeUrl: '/circle.cctp.v1.QueryGetUsedNonceResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.nonce !== undefined) {
            Nonce.encode(message.nonce, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryGetUsedNonceResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.nonce = Nonce.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            nonce: isSet(object.nonce) ? Nonce.fromJSON(object.nonce) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.nonce !== undefined &&
            (obj.nonce = message.nonce ? Nonce.toJSON(message.nonce) : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryGetUsedNonceResponse();
        message.nonce =
            object.nonce !== undefined && object.nonce !== null
                ? Nonce.fromPartial(object.nonce)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryGetUsedNonceResponse.decode(message.value);
    },
    toProto(message) {
        return QueryGetUsedNonceResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryGetUsedNonceResponse',
            value: QueryGetUsedNonceResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryAllUsedNoncesRequest() {
    return {
        pagination: undefined,
    };
}
export const QueryAllUsedNoncesRequest = {
    typeUrl: '/circle.cctp.v1.QueryAllUsedNoncesRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pagination !== undefined) {
            PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllUsedNoncesRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pagination = PageRequest.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination)
                ? PageRequest.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageRequest.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllUsedNoncesRequest();
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageRequest.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllUsedNoncesRequest.decode(message.value);
    },
    toProto(message) {
        return QueryAllUsedNoncesRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllUsedNoncesRequest',
            value: QueryAllUsedNoncesRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryAllUsedNoncesResponse() {
    return {
        usedNonces: [],
        pagination: undefined,
    };
}
export const QueryAllUsedNoncesResponse = {
    typeUrl: '/circle.cctp.v1.QueryAllUsedNoncesResponse',
    encode(message, writer = BinaryWriter.create()) {
        for (const v of message.usedNonces) {
            Nonce.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.pagination !== undefined) {
            PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryAllUsedNoncesResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.usedNonces.push(Nonce.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.pagination = PageResponse.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            usedNonces: Array.isArray(object?.usedNonces)
                ? object.usedNonces.map((e) => Nonce.fromJSON(e))
                : [],
            pagination: isSet(object.pagination)
                ? PageResponse.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.usedNonces) {
            obj.usedNonces = message.usedNonces.map(e => e ? Nonce.toJSON(e) : undefined);
        }
        else {
            obj.usedNonces = [];
        }
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageResponse.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryAllUsedNoncesResponse();
        message.usedNonces =
            object.usedNonces?.map(e => Nonce.fromPartial(e)) || [];
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageResponse.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryAllUsedNoncesResponse.decode(message.value);
    },
    toProto(message) {
        return QueryAllUsedNoncesResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryAllUsedNoncesResponse',
            value: QueryAllUsedNoncesResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryRemoteTokenMessengerRequest() {
    return {
        domainId: 0,
    };
}
export const QueryRemoteTokenMessengerRequest = {
    typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengerRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.domainId !== 0) {
            writer.uint32(8).uint32(message.domainId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRemoteTokenMessengerRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.domainId = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            domainId: isSet(object.domainId) ? Number(object.domainId) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.domainId !== undefined &&
            (obj.domainId = Math.round(message.domainId));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryRemoteTokenMessengerRequest();
        message.domainId = object.domainId ?? 0;
        return message;
    },
    fromProtoMsg(message) {
        return QueryRemoteTokenMessengerRequest.decode(message.value);
    },
    toProto(message) {
        return QueryRemoteTokenMessengerRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengerRequest',
            value: QueryRemoteTokenMessengerRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryRemoteTokenMessengerResponse() {
    return {
        remoteTokenMessenger: RemoteTokenMessenger.fromPartial({}),
    };
}
export const QueryRemoteTokenMessengerResponse = {
    typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengerResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.remoteTokenMessenger !== undefined) {
            RemoteTokenMessenger.encode(message.remoteTokenMessenger, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRemoteTokenMessengerResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.remoteTokenMessenger = RemoteTokenMessenger.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            remoteTokenMessenger: isSet(object.remoteTokenMessenger)
                ? RemoteTokenMessenger.fromJSON(object.remoteTokenMessenger)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.remoteTokenMessenger !== undefined &&
            (obj.remoteTokenMessenger = message.remoteTokenMessenger
                ? RemoteTokenMessenger.toJSON(message.remoteTokenMessenger)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryRemoteTokenMessengerResponse();
        message.remoteTokenMessenger =
            object.remoteTokenMessenger !== undefined &&
                object.remoteTokenMessenger !== null
                ? RemoteTokenMessenger.fromPartial(object.remoteTokenMessenger)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryRemoteTokenMessengerResponse.decode(message.value);
    },
    toProto(message) {
        return QueryRemoteTokenMessengerResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengerResponse',
            value: QueryRemoteTokenMessengerResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryRemoteTokenMessengersRequest() {
    return {
        pagination: undefined,
    };
}
export const QueryRemoteTokenMessengersRequest = {
    typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengersRequest',
    encode(message, writer = BinaryWriter.create()) {
        if (message.pagination !== undefined) {
            PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRemoteTokenMessengersRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.pagination = PageRequest.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            pagination: isSet(object.pagination)
                ? PageRequest.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageRequest.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryRemoteTokenMessengersRequest();
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageRequest.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryRemoteTokenMessengersRequest.decode(message.value);
    },
    toProto(message) {
        return QueryRemoteTokenMessengersRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengersRequest',
            value: QueryRemoteTokenMessengersRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryRemoteTokenMessengersResponse() {
    return {
        remoteTokenMessengers: [],
        pagination: undefined,
    };
}
export const QueryRemoteTokenMessengersResponse = {
    typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengersResponse',
    encode(message, writer = BinaryWriter.create()) {
        for (const v of message.remoteTokenMessengers) {
            RemoteTokenMessenger.encode(v, writer.uint32(10).fork()).ldelim();
        }
        if (message.pagination !== undefined) {
            PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryRemoteTokenMessengersResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.remoteTokenMessengers.push(RemoteTokenMessenger.decode(reader, reader.uint32()));
                    break;
                case 2:
                    message.pagination = PageResponse.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            remoteTokenMessengers: Array.isArray(object?.remoteTokenMessengers)
                ? object.remoteTokenMessengers.map((e) => RemoteTokenMessenger.fromJSON(e))
                : [],
            pagination: isSet(object.pagination)
                ? PageResponse.fromJSON(object.pagination)
                : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.remoteTokenMessengers) {
            obj.remoteTokenMessengers = message.remoteTokenMessengers.map(e => e ? RemoteTokenMessenger.toJSON(e) : undefined);
        }
        else {
            obj.remoteTokenMessengers = [];
        }
        message.pagination !== undefined &&
            (obj.pagination = message.pagination
                ? PageResponse.toJSON(message.pagination)
                : undefined);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryRemoteTokenMessengersResponse();
        message.remoteTokenMessengers =
            object.remoteTokenMessengers?.map(e => RemoteTokenMessenger.fromPartial(e)) || [];
        message.pagination =
            object.pagination !== undefined && object.pagination !== null
                ? PageResponse.fromPartial(object.pagination)
                : undefined;
        return message;
    },
    fromProtoMsg(message) {
        return QueryRemoteTokenMessengersResponse.decode(message.value);
    },
    toProto(message) {
        return QueryRemoteTokenMessengersResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryRemoteTokenMessengersResponse',
            value: QueryRemoteTokenMessengersResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryBurnMessageVersionRequest() {
    return {};
}
export const QueryBurnMessageVersionRequest = {
    typeUrl: '/circle.cctp.v1.QueryBurnMessageVersionRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryBurnMessageVersionRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryBurnMessageVersionRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryBurnMessageVersionRequest.decode(message.value);
    },
    toProto(message) {
        return QueryBurnMessageVersionRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryBurnMessageVersionRequest',
            value: QueryBurnMessageVersionRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryBurnMessageVersionResponse() {
    return {
        version: 0,
    };
}
export const QueryBurnMessageVersionResponse = {
    typeUrl: '/circle.cctp.v1.QueryBurnMessageVersionResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.version !== 0) {
            writer.uint32(8).uint32(message.version);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryBurnMessageVersionResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.version = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            version: isSet(object.version) ? Number(object.version) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.version !== undefined &&
            (obj.version = Math.round(message.version));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryBurnMessageVersionResponse();
        message.version = object.version ?? 0;
        return message;
    },
    fromProtoMsg(message) {
        return QueryBurnMessageVersionResponse.decode(message.value);
    },
    toProto(message) {
        return QueryBurnMessageVersionResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryBurnMessageVersionResponse',
            value: QueryBurnMessageVersionResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryLocalMessageVersionRequest() {
    return {};
}
export const QueryLocalMessageVersionRequest = {
    typeUrl: '/circle.cctp.v1.QueryLocalMessageVersionRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryLocalMessageVersionRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryLocalMessageVersionRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryLocalMessageVersionRequest.decode(message.value);
    },
    toProto(message) {
        return QueryLocalMessageVersionRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryLocalMessageVersionRequest',
            value: QueryLocalMessageVersionRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryLocalMessageVersionResponse() {
    return {
        version: 0,
    };
}
export const QueryLocalMessageVersionResponse = {
    typeUrl: '/circle.cctp.v1.QueryLocalMessageVersionResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.version !== 0) {
            writer.uint32(8).uint32(message.version);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryLocalMessageVersionResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.version = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            version: isSet(object.version) ? Number(object.version) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.version !== undefined &&
            (obj.version = Math.round(message.version));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryLocalMessageVersionResponse();
        message.version = object.version ?? 0;
        return message;
    },
    fromProtoMsg(message) {
        return QueryLocalMessageVersionResponse.decode(message.value);
    },
    toProto(message) {
        return QueryLocalMessageVersionResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryLocalMessageVersionResponse',
            value: QueryLocalMessageVersionResponse.encode(message).finish(),
        };
    },
};
function createBaseQueryLocalDomainRequest() {
    return {};
}
export const QueryLocalDomainRequest = {
    typeUrl: '/circle.cctp.v1.QueryLocalDomainRequest',
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryLocalDomainRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(_) {
        return {};
    },
    toJSON(_) {
        const obj = {};
        return obj;
    },
    fromPartial(_) {
        const message = createBaseQueryLocalDomainRequest();
        return message;
    },
    fromProtoMsg(message) {
        return QueryLocalDomainRequest.decode(message.value);
    },
    toProto(message) {
        return QueryLocalDomainRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryLocalDomainRequest',
            value: QueryLocalDomainRequest.encode(message).finish(),
        };
    },
};
function createBaseQueryLocalDomainResponse() {
    return {
        domainId: 0,
    };
}
export const QueryLocalDomainResponse = {
    typeUrl: '/circle.cctp.v1.QueryLocalDomainResponse',
    encode(message, writer = BinaryWriter.create()) {
        if (message.domainId !== 0) {
            writer.uint32(8).uint32(message.domainId);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseQueryLocalDomainResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.domainId = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            domainId: isSet(object.domainId) ? Number(object.domainId) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        message.domainId !== undefined &&
            (obj.domainId = Math.round(message.domainId));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseQueryLocalDomainResponse();
        message.domainId = object.domainId ?? 0;
        return message;
    },
    fromProtoMsg(message) {
        return QueryLocalDomainResponse.decode(message.value);
    },
    toProto(message) {
        return QueryLocalDomainResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.QueryLocalDomainResponse',
            value: QueryLocalDomainResponse.encode(message).finish(),
        };
    },
};
//# sourceMappingURL=query.js.map