11/* eslint-disable */
22import Long from 'long' ;
33import _m0 from 'protobufjs/minimal' ;
4- import { Coin } from '../../../cosmos/base/v1beta1/coin' ;
4+ import { Coin } from "../../base/v1beta1/coin" ;
5+ import { Period } from "./vesting" ;
56
67export const protobufPackage = 'cosmos.vesting.v1beta1' ;
78
@@ -20,6 +21,23 @@ export interface MsgCreateVestingAccount {
2021/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */
2122export interface MsgCreateVestingAccountResponse { }
2223
24+ /**
25+ * MsgCreateVestingAccount defines a message that enables creating a vesting
26+ * account.
27+ */
28+ export interface MsgCreatePeriodicVestingAccount {
29+ fromAddress : string ;
30+ toAddress : string ;
31+ startTime : Long ;
32+ vestingPeriods : Period [ ] ;
33+ }
34+
35+ /**
36+ * MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount
37+ * response type.
38+ */
39+ export interface MsgCreatePeriodicVestingAccountResponse { }
40+
2341const baseMsgCreateVestingAccount : object = { fromAddress : '' , toAddress : '' , endTime : Long . ZERO , delayed : false } ;
2442
2543export const MsgCreateVestingAccount = {
@@ -188,26 +206,189 @@ export const MsgCreateVestingAccountResponse = {
188206 } ,
189207} ;
190208
209+ const baseMsgCreatePeriodicVestingAccount : object = { fromAddress : '' , toAddress : '' , startTime : Long . ZERO } ;
210+
211+ export const MsgCreatePeriodicVestingAccount = {
212+ encode ( message : MsgCreatePeriodicVestingAccount , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
213+ if ( message . fromAddress !== '' ) {
214+ writer . uint32 ( 10 ) . string ( message . fromAddress ) ;
215+ }
216+ if ( message . toAddress !== '' ) {
217+ writer . uint32 ( 18 ) . string ( message . toAddress ) ;
218+ }
219+ if ( ! message . startTime . isZero ( ) ) {
220+ writer . uint32 ( 24 ) . int64 ( message . startTime ) ;
221+ }
222+ for ( const v of message . vestingPeriods ) {
223+ Period . encode ( v ! , writer . uint32 ( 34 ) . fork ( ) ) . ldelim ( ) ;
224+ }
225+ return writer ;
226+ } ,
227+
228+ decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : MsgCreatePeriodicVestingAccount {
229+ const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
230+ let end = length === undefined ? reader . len : reader . pos + length ;
231+ const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount ;
232+ message . vestingPeriods = [ ] ;
233+ while ( reader . pos < end ) {
234+ const tag = reader . uint32 ( ) ;
235+ switch ( tag >>> 3 ) {
236+ case 1 :
237+ message . fromAddress = reader . string ( ) ;
238+ break ;
239+ case 2 :
240+ message . toAddress = reader . string ( ) ;
241+ break ;
242+ case 3 :
243+ message . startTime = reader . int64 ( ) as Long ;
244+ break ;
245+ case 4 :
246+ message . vestingPeriods . push ( Period . decode ( reader , reader . uint32 ( ) ) ) ;
247+ break ;
248+ default :
249+ reader . skipType ( tag & 7 ) ;
250+ break ;
251+ }
252+ }
253+ return message ;
254+ } ,
255+
256+ fromJSON ( object : any ) : MsgCreatePeriodicVestingAccount {
257+ const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount ;
258+ message . vestingPeriods = [ ] ;
259+ if ( object . fromAddress !== undefined && object . fromAddress !== null ) {
260+ message . fromAddress = String ( object . fromAddress ) ;
261+ } else {
262+ message . fromAddress = '' ;
263+ }
264+ if ( object . toAddress !== undefined && object . toAddress !== null ) {
265+ message . toAddress = String ( object . toAddress ) ;
266+ } else {
267+ message . toAddress = '' ;
268+ }
269+ if ( object . startTime !== undefined && object . startTime !== null ) {
270+ message . startTime = Long . fromString ( object . startTime ) ;
271+ } else {
272+ message . startTime = Long . ZERO ;
273+ }
274+ if ( object . vestingPeriods !== undefined && object . vestingPeriods !== null ) {
275+ for ( const e of object . vestingPeriods ) {
276+ message . vestingPeriods . push ( Period . fromJSON ( e ) ) ;
277+ }
278+ }
279+ return message ;
280+ } ,
281+
282+ toJSON ( message : MsgCreatePeriodicVestingAccount ) : unknown {
283+ const obj : any = { } ;
284+ message . fromAddress !== undefined && ( obj . fromAddress = message . fromAddress ) ;
285+ message . toAddress !== undefined && ( obj . toAddress = message . toAddress ) ;
286+ message . startTime !== undefined && ( obj . startTime = ( message . startTime || Long . ZERO ) . toString ( ) ) ;
287+ if ( message . vestingPeriods ) {
288+ obj . vestingPeriods = message . vestingPeriods . map ( ( e ) => ( e ? Period . toJSON ( e ) : undefined ) ) ;
289+ } else {
290+ obj . vestingPeriods = [ ] ;
291+ }
292+ return obj ;
293+ } ,
294+
295+ fromPartial ( object : DeepPartial < MsgCreatePeriodicVestingAccount > ) : MsgCreatePeriodicVestingAccount {
296+ const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount ;
297+ message . vestingPeriods = [ ] ;
298+ if ( object . fromAddress !== undefined && object . fromAddress !== null ) {
299+ message . fromAddress = object . fromAddress ;
300+ } else {
301+ message . fromAddress = '' ;
302+ }
303+ if ( object . toAddress !== undefined && object . toAddress !== null ) {
304+ message . toAddress = object . toAddress ;
305+ } else {
306+ message . toAddress = '' ;
307+ }
308+ if ( object . startTime !== undefined && object . startTime !== null ) {
309+ message . startTime = object . startTime as Long ;
310+ } else {
311+ message . startTime = Long . ZERO ;
312+ }
313+ if ( object . vestingPeriods !== undefined && object . vestingPeriods !== null ) {
314+ for ( const e of object . vestingPeriods ) {
315+ message . vestingPeriods . push ( Period . fromPartial ( e ) ) ;
316+ }
317+ }
318+ return message ;
319+ } ,
320+ } ;
321+
322+ const baseMsgCreatePeriodicVestingAccountResponse : object = { } ;
323+
324+ export const MsgCreatePeriodicVestingAccountResponse = {
325+ encode ( _ : MsgCreatePeriodicVestingAccountResponse , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
326+ return writer ;
327+ } ,
328+
329+ decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : MsgCreatePeriodicVestingAccountResponse {
330+ const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
331+ let end = length === undefined ? reader . len : reader . pos + length ;
332+ const message = { ...baseMsgCreatePeriodicVestingAccountResponse } as MsgCreatePeriodicVestingAccountResponse ;
333+ while ( reader . pos < end ) {
334+ const tag = reader . uint32 ( ) ;
335+ switch ( tag >>> 3 ) {
336+ default :
337+ reader . skipType ( tag & 7 ) ;
338+ break ;
339+ }
340+ }
341+ return message ;
342+ } ,
343+
344+ fromJSON ( _ : any ) : MsgCreatePeriodicVestingAccountResponse {
345+ const message = { ...baseMsgCreatePeriodicVestingAccountResponse } as MsgCreatePeriodicVestingAccountResponse ;
346+ return message ;
347+ } ,
348+
349+ toJSON ( _ : MsgCreatePeriodicVestingAccountResponse ) : unknown {
350+ const obj : any = { } ;
351+ return obj ;
352+ } ,
353+
354+ fromPartial ( _ : DeepPartial < MsgCreatePeriodicVestingAccountResponse > ) : MsgCreatePeriodicVestingAccountResponse {
355+ const message = { ...baseMsgCreatePeriodicVestingAccountResponse } as MsgCreatePeriodicVestingAccountResponse ;
356+ return message ;
357+ } ,
358+ } ;
359+
191360/** Msg defines the bank Msg service. */
192361export interface Msg {
193362 /**
194363 * CreateVestingAccount defines a method that enables creating a vesting
195364 * account.
196365 */
197366 CreateVestingAccount ( request : MsgCreateVestingAccount ) : Promise < MsgCreateVestingAccountResponse > ;
367+ /**
368+ * CreatePeriodicVestingAccount defines a method that enables creating a
369+ * periodic vesting account.
370+ */
371+ CreatePeriodicVestingAccount ( request : MsgCreatePeriodicVestingAccount ) : Promise < MsgCreatePeriodicVestingAccountResponse > ;
198372}
199373
200374export class MsgClientImpl implements Msg {
201375 private readonly rpc : Rpc ;
202376 constructor ( rpc : Rpc ) {
203377 this . rpc = rpc ;
204378 this . CreateVestingAccount = this . CreateVestingAccount . bind ( this ) ;
379+ this . CreatePeriodicVestingAccount = this . CreatePeriodicVestingAccount . bind ( this ) ;
205380 }
206381 CreateVestingAccount ( request : MsgCreateVestingAccount ) : Promise < MsgCreateVestingAccountResponse > {
207382 const data = MsgCreateVestingAccount . encode ( request ) . finish ( ) ;
208383 const promise = this . rpc . request ( 'cosmos.vesting.v1beta1.Msg' , 'CreateVestingAccount' , data ) ;
209384 return promise . then ( ( data ) => MsgCreateVestingAccountResponse . decode ( new _m0 . Reader ( data ) ) ) ;
210385 }
386+
387+ CreatePeriodicVestingAccount ( request : MsgCreatePeriodicVestingAccount ) : Promise < MsgCreatePeriodicVestingAccountResponse > {
388+ const data = MsgCreatePeriodicVestingAccount . encode ( request ) . finish ( ) ;
389+ const promise = this . rpc . request ( 'cosmos.vesting.v1beta1.Msg' , 'CreatePeriodicVestingAccount' , data ) ;
390+ return promise . then ( ( data ) => MsgCreatePeriodicVestingAccountResponse . decode ( new _m0 . Reader ( data ) ) ) ;
391+ }
211392}
212393
213394interface Rpc {
0 commit comments