import { BinaryReader } from '@agoric/cosmic-proto/codegen/binary.js';
import { MsgFundCommunityPool, MsgFundCommunityPoolResponse, MsgCommunityPoolSpend, MsgCommunityPoolSpendResponse, MsgCreateContinuousFund, MsgCreateContinuousFundResponse, MsgCancelContinuousFund, MsgCancelContinuousFundResponse, MsgUpdateParams, MsgUpdateParamsResponse, } from '@agoric/cosmic-proto/codegen/cosmos/protocolpool/v1/tx.js';
export class MsgClientImpl {
    rpc;
    constructor(rpc) {
        this.rpc = rpc;
        this.fundCommunityPool = this.fundCommunityPool.bind(this);
        this.communityPoolSpend = this.communityPoolSpend.bind(this);
        this.createContinuousFund = this.createContinuousFund.bind(this);
        this.cancelContinuousFund = this.cancelContinuousFund.bind(this);
        this.updateParams = this.updateParams.bind(this);
    }
    fundCommunityPool(request) {
        const data = MsgFundCommunityPool.encode(request).finish();
        const promise = this.rpc.request('cosmos.protocolpool.v1.Msg', 'FundCommunityPool', data);
        return promise.then(data => MsgFundCommunityPoolResponse.decode(new BinaryReader(data)));
    }
    communityPoolSpend(request) {
        const data = MsgCommunityPoolSpend.encode(request).finish();
        const promise = this.rpc.request('cosmos.protocolpool.v1.Msg', 'CommunityPoolSpend', data);
        return promise.then(data => MsgCommunityPoolSpendResponse.decode(new BinaryReader(data)));
    }
    createContinuousFund(request) {
        const data = MsgCreateContinuousFund.encode(request).finish();
        const promise = this.rpc.request('cosmos.protocolpool.v1.Msg', 'CreateContinuousFund', data);
        return promise.then(data => MsgCreateContinuousFundResponse.decode(new BinaryReader(data)));
    }
    cancelContinuousFund(request) {
        const data = MsgCancelContinuousFund.encode(request).finish();
        const promise = this.rpc.request('cosmos.protocolpool.v1.Msg', 'CancelContinuousFund', data);
        return promise.then(data => MsgCancelContinuousFundResponse.decode(new BinaryReader(data)));
    }
    updateParams(request) {
        const data = MsgUpdateParams.encode(request).finish();
        const promise = this.rpc.request('cosmos.protocolpool.v1.Msg', 'UpdateParams', data);
        return promise.then(data => MsgUpdateParamsResponse.decode(new BinaryReader(data)));
    }
}
export const createClientImpl = (rpc) => {
    return new MsgClientImpl(rpc);
};
//# sourceMappingURL=tx.rpc.msg.js.map