//@ts-nocheck
import { BinaryReader, BinaryWriter } from '../../../binary.js';
import { isSet } from '../../../helpers.js';
import {} from '../../../json-safe.js';
function createBaseAttester() {
    return {
        attester: '',
    };
}
export const Attester = {
    typeUrl: '/circle.cctp.v1.Attester',
    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 = createBaseAttester();
        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 = createBaseAttester();
        message.attester = object.attester ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return Attester.decode(message.value);
    },
    toProto(message) {
        return Attester.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/circle.cctp.v1.Attester',
            value: Attester.encode(message).finish(),
        };
    },
};
//# sourceMappingURL=attester.js.map