import { BinaryReader } from '@agoric/cosmic-proto/codegen/binary.js';
import { MsgRegisterCounterparty, MsgRegisterCounterpartyResponse, MsgUpdateClientConfig, MsgUpdateClientConfigResponse, } from '@agoric/cosmic-proto/codegen/ibc/core/client/v2/tx.js';
export class MsgClientImpl {
    rpc;
    constructor(rpc) {
        this.rpc = rpc;
        this.registerCounterparty = this.registerCounterparty.bind(this);
        this.updateClientConfig = this.updateClientConfig.bind(this);
    }
    registerCounterparty(request) {
        const data = MsgRegisterCounterparty.encode(request).finish();
        const promise = this.rpc.request('ibc.core.client.v2.Msg', 'RegisterCounterparty', data);
        return promise.then(data => MsgRegisterCounterpartyResponse.decode(new BinaryReader(data)));
    }
    updateClientConfig(request) {
        const data = MsgUpdateClientConfig.encode(request).finish();
        const promise = this.rpc.request('ibc.core.client.v2.Msg', 'UpdateClientConfig', data);
        return promise.then(data => MsgUpdateClientConfigResponse.decode(new BinaryReader(data)));
    }
}
export const createClientImpl = (rpc) => {
    return new MsgClientImpl(rpc);
};
//# sourceMappingURL=tx.rpc.msg.js.map