import { Amino } from "@chainapsis/ts-amino" ; const { Field , DefineStruct } = Amino ; import { Msg } from "../../core/tx" ; import { AccAddress , ValAddress } from "../../common/address" ; @ DefineStruct ( ) export class MsgSetWithdrawAddress extends Msg { @ Field . Defined ( 0 , { jsonName : "delegator_address" } ) public delegatorAddress : AccAddress ; @ Field . Defined ( 1 , { jsonName : "withdraw_address" } ) public withdrawAddress : AccAddress ; constructor ( delegatorAddress , withdrawAddress ) { super ( ) ; this . delegatorAddress = delegatorAddress ; this . withdrawAddress = withdrawAddress ; } public validateBasic ( ) { } public getSigners ( ) { return [ this . delegatorAddress ] ; } } @ DefineStruct ( ) export class MsgWithdrawDelegatorReward extends Msg { @ Field . Defined ( 0 , { jsonName : "delegator_address" } ) public delegatorAddress : AccAddress ; @ Field . Defined ( 1 , { jsonName : "validator_address" } ) public validatorAddress : ValAddress ; constructor ( delegatorAddress , validatorAddress ) { super ( ) ; this . delegatorAddress = delegatorAddress ; this . validatorAddress = validatorAddress ; } public validateBasic ( ) { } public getSigners ( ) { return [ this . delegatorAddress ] ; } } @ DefineStruct ( ) export class MsgWithdrawValidatorCommission extends Msg { @ Field . Defined ( 0 , { jsonName : "validator_address" } ) public validatorAddress : ValAddress ; public bech32PrefixAccAddr : string ; constructor ( validatorAddress , bech32PrefixAccAddr ) { super ( ) ; this . validatorAddress = validatorAddress ; this . bech32PrefixAccAddr = bech32PrefixAccAddr ; } public validateBasic ( ) { } public getSigners ( ) { return [ new AccAddress ( this . validatorAddress . toBytes ( ) , this . bech32PrefixAccAddr ) ] ; } }