//@ts-nocheck
import { VaultType, PausedType, vaultTypeFromJSON, vaultTypeToJSON, pausedTypeFromJSON, pausedTypeToJSON, } from './vaults.js';
import { BinaryReader, BinaryWriter } from '../../../../binary.js';
import { isSet } from '../../../../helpers.js';
import {} from '../../../../json-safe.js';
function createBaseMsgLock() {
    return {
        signer: '',
        vault: 0,
        amount: '',
    };
}
export const MsgLock = {
    typeUrl: '/noble.dollar.vaults.v1.MsgLock',
    encode(message, writer = BinaryWriter.create()) {
        if (message.signer !== '') {
            writer.uint32(10).string(message.signer);
        }
        if (message.vault !== 0) {
            writer.uint32(16).int32(message.vault);
        }
        if (message.amount !== '') {
            writer.uint32(26).string(message.amount);
        }
        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 = createBaseMsgLock();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.signer = reader.string();
                    break;
                case 2:
                    message.vault = reader.int32();
                    break;
                case 3:
                    message.amount = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            signer: isSet(object.signer) ? String(object.signer) : '',
            vault: isSet(object.vault) ? vaultTypeFromJSON(object.vault) : -1,
            amount: isSet(object.amount) ? String(object.amount) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.signer !== undefined && (obj.signer = message.signer);
        message.vault !== undefined && (obj.vault = vaultTypeToJSON(message.vault));
        message.amount !== undefined && (obj.amount = message.amount);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseMsgLock();
        message.signer = object.signer ?? '';
        message.vault = object.vault ?? 0;
        message.amount = object.amount ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return MsgLock.decode(message.value);
    },
    toProto(message) {
        return MsgLock.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgLock',
            value: MsgLock.encode(message).finish(),
        };
    },
};
function createBaseMsgLockResponse() {
    return {};
}
export const MsgLockResponse = {
    typeUrl: '/noble.dollar.vaults.v1.MsgLockResponse',
    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 = createBaseMsgLockResponse();
        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 = createBaseMsgLockResponse();
        return message;
    },
    fromProtoMsg(message) {
        return MsgLockResponse.decode(message.value);
    },
    toProto(message) {
        return MsgLockResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgLockResponse',
            value: MsgLockResponse.encode(message).finish(),
        };
    },
};
function createBaseMsgUnlock() {
    return {
        signer: '',
        vault: 0,
        amount: '',
    };
}
export const MsgUnlock = {
    typeUrl: '/noble.dollar.vaults.v1.MsgUnlock',
    encode(message, writer = BinaryWriter.create()) {
        if (message.signer !== '') {
            writer.uint32(10).string(message.signer);
        }
        if (message.vault !== 0) {
            writer.uint32(16).int32(message.vault);
        }
        if (message.amount !== '') {
            writer.uint32(26).string(message.amount);
        }
        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 = createBaseMsgUnlock();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.signer = reader.string();
                    break;
                case 2:
                    message.vault = reader.int32();
                    break;
                case 3:
                    message.amount = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            signer: isSet(object.signer) ? String(object.signer) : '',
            vault: isSet(object.vault) ? vaultTypeFromJSON(object.vault) : -1,
            amount: isSet(object.amount) ? String(object.amount) : '',
        };
    },
    toJSON(message) {
        const obj = {};
        message.signer !== undefined && (obj.signer = message.signer);
        message.vault !== undefined && (obj.vault = vaultTypeToJSON(message.vault));
        message.amount !== undefined && (obj.amount = message.amount);
        return obj;
    },
    fromPartial(object) {
        const message = createBaseMsgUnlock();
        message.signer = object.signer ?? '';
        message.vault = object.vault ?? 0;
        message.amount = object.amount ?? '';
        return message;
    },
    fromProtoMsg(message) {
        return MsgUnlock.decode(message.value);
    },
    toProto(message) {
        return MsgUnlock.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgUnlock',
            value: MsgUnlock.encode(message).finish(),
        };
    },
};
function createBaseMsgUnlockResponse() {
    return {};
}
export const MsgUnlockResponse = {
    typeUrl: '/noble.dollar.vaults.v1.MsgUnlockResponse',
    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 = createBaseMsgUnlockResponse();
        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 = createBaseMsgUnlockResponse();
        return message;
    },
    fromProtoMsg(message) {
        return MsgUnlockResponse.decode(message.value);
    },
    toProto(message) {
        return MsgUnlockResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgUnlockResponse',
            value: MsgUnlockResponse.encode(message).finish(),
        };
    },
};
function createBaseMsgSetPausedState() {
    return {
        signer: '',
        paused: 0,
    };
}
export const MsgSetPausedState = {
    typeUrl: '/noble.dollar.vaults.v1.MsgSetPausedState',
    encode(message, writer = BinaryWriter.create()) {
        if (message.signer !== '') {
            writer.uint32(10).string(message.signer);
        }
        if (message.paused !== 0) {
            writer.uint32(16).int32(message.paused);
        }
        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 = createBaseMsgSetPausedState();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.signer = reader.string();
                    break;
                case 2:
                    message.paused = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromJSON(object) {
        return {
            signer: isSet(object.signer) ? String(object.signer) : '',
            paused: isSet(object.paused) ? pausedTypeFromJSON(object.paused) : -1,
        };
    },
    toJSON(message) {
        const obj = {};
        message.signer !== undefined && (obj.signer = message.signer);
        message.paused !== undefined &&
            (obj.paused = pausedTypeToJSON(message.paused));
        return obj;
    },
    fromPartial(object) {
        const message = createBaseMsgSetPausedState();
        message.signer = object.signer ?? '';
        message.paused = object.paused ?? 0;
        return message;
    },
    fromProtoMsg(message) {
        return MsgSetPausedState.decode(message.value);
    },
    toProto(message) {
        return MsgSetPausedState.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgSetPausedState',
            value: MsgSetPausedState.encode(message).finish(),
        };
    },
};
function createBaseMsgSetPausedStateResponse() {
    return {};
}
export const MsgSetPausedStateResponse = {
    typeUrl: '/noble.dollar.vaults.v1.MsgSetPausedStateResponse',
    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 = createBaseMsgSetPausedStateResponse();
        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 = createBaseMsgSetPausedStateResponse();
        return message;
    },
    fromProtoMsg(message) {
        return MsgSetPausedStateResponse.decode(message.value);
    },
    toProto(message) {
        return MsgSetPausedStateResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: '/noble.dollar.vaults.v1.MsgSetPausedStateResponse',
            value: MsgSetPausedStateResponse.encode(message).finish(),
        };
    },
};
//# sourceMappingURL=tx.js.map