import { protoW } from "../TransactionHelper"; import { Coin } from "./Coin"; export class MsgDelegate{ delegator_address: string; validator_address: string; amount: Coin; constructor(delegator_address: string, validator_address: string, amount: Coin){ this.delegator_address = delegator_address; this.validator_address = validator_address; this.amount = amount; } encode = (encoder) => { if(!encoder){ encoder = protoW.create(); } encoder.uint32(/* id 1, wireType 2 =*/10).string(this.delegator_address); encoder.uint32(/* id 2, wireType 2 =*/18).string(this.validator_address); this.amount.encode(encoder.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim() return encoder; } }