import { Rpc } from "../../../helpers"; import * as _m0 from "protobufjs/minimal"; import { MsgCreateVestingAccount, MsgCreateVestingAccountResponse, MsgCreatePermanentLockedAccount, MsgCreatePermanentLockedAccountResponse, MsgCreatePeriodicVestingAccount, MsgCreatePeriodicVestingAccountResponse } from "./tx"; /** Msg defines the bank Msg service. */ export interface Msg { /** * CreateVestingAccount defines a method that enables creating a vesting * account. */ createVestingAccount(request: MsgCreateVestingAccount): Promise; /** * CreatePermanentLockedAccount defines a method that enables creating a permanent * locked account. * * Since: cosmos-sdk 0.46 */ createPermanentLockedAccount(request: MsgCreatePermanentLockedAccount): Promise; /** * CreatePeriodicVestingAccount defines a method that enables creating a * periodic vesting account. * * Since: cosmos-sdk 0.46 */ createPeriodicVestingAccount(request: MsgCreatePeriodicVestingAccount): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; this.createVestingAccount = this.createVestingAccount.bind(this); this.createPermanentLockedAccount = this.createPermanentLockedAccount.bind(this); this.createPeriodicVestingAccount = this.createPeriodicVestingAccount.bind(this); } createVestingAccount(request: MsgCreateVestingAccount): Promise { const data = MsgCreateVestingAccount.encode(request).finish(); const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreateVestingAccount", data); return promise.then(data => MsgCreateVestingAccountResponse.decode(new _m0.Reader(data))); } createPermanentLockedAccount(request: MsgCreatePermanentLockedAccount): Promise { const data = MsgCreatePermanentLockedAccount.encode(request).finish(); const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreatePermanentLockedAccount", data); return promise.then(data => MsgCreatePermanentLockedAccountResponse.decode(new _m0.Reader(data))); } createPeriodicVestingAccount(request: MsgCreatePeriodicVestingAccount): Promise { const data = MsgCreatePeriodicVestingAccount.encode(request).finish(); const promise = this.rpc.request("cosmos.vesting.v1beta1.Msg", "CreatePeriodicVestingAccount", data); return promise.then(data => MsgCreatePeriodicVestingAccountResponse.decode(new _m0.Reader(data))); } }