Serialize() {
        const buf = new util_1.default.Writer();
        // asset_specific_vote (bool)
        {
            bytes_1.write(buf, this.asset_specific_vote, 'bool');
        }
        // asset_type (string)
        if (this.asset_specific_vote) {
            bytes_1.WriteFixedChar(buf, this.asset_type, 3);
        }
        // asset_code (AssetCode)
        if (this.asset_specific_vote) {
            buf.write(this.asset_code.Serialize());
        }
        // specific (bool)
        {
            bytes_1.write(buf, this.specific, 'bool');
        }
        // proposed_amendments ([]Amendment)
        if (this.specific) {
            bytes_1.WriteVariableSize(buf, this.proposed_amendments.length, 8, 8);
            this.proposed_amendments.forEach((value) => {
                buf.write(value.Serialize());
            });
        }
        // vote_tx_id (TxId)
        {
            buf.write(this.vote_tx_id.Serialize());
        }
        // option_tally ([]uint64)
        {
            // IsNativeTypeArray []uint64
            const type = '[]uint64'.slice(2);
            bytes_1.WriteVariableSize(buf, this.option_tally.length, 8, 8);
            this.option_tally.forEach(value => {
                bytes_1.write(buf, value, type); // TODO
            });
        }
        // result (string)
        {
            bytes_1.WriteVarChar(buf, this.result, 8);
        }
        // timestamp (Timestamp)
        {
            buf.write(this.timestamp.Serialize());
        }
        return buf.buf;
    }
// serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes .
Serialize() {
        const buf = new util_1.default.Writer();
        {
            bytes_1.write(buf, this.asset_specific_vote, 'bool');
        }
        if (this.asset_specific_vote) {
            bytes_1.WriteFixedChar(buf, this.asset_type, 3);
        }
        if (this.asset_specific_vote) {
            buf.write(this.asset_code.Serialize());
        }
        {
            bytes_1.write(buf, this.specific, 'bool');
        }
        if (this.specific) {
            bytes_1.WriteVariableSize(buf, this.proposed_amendments.length, 8, 8);
            this.proposed_amendments.forEach((value) => {
                buf.write(value.Serialize());
            });
        }
        {
            buf.write(this.vote_tx_id.Serialize());
        }
        {
            const type = '[]uint64'.slice(2);
            bytes_1.WriteVariableSize(buf, this.option_tally.length, 8, 8);
            this.option_tally.forEach(value => {
                bytes_1.write(buf, value, type); 
            });
        }
        {
            bytes_1.WriteVarChar(buf, this.result, 8);
        }
        {
            buf.write(this.timestamp.Serialize());
        }
        return buf.buf;
    }
Serialize ( ) { const buf = new util_1 . default . Writer ( ) ; { bytes_1 . write ( buf , this . asset_specific_vote , 'bool' ) ; } if ( this . asset_specific_vote ) { bytes_1 . WriteFixedChar ( buf , this . asset_type , 3 ) ; } if ( this . asset_specific_vote ) { buf . write ( this . asset_code . Serialize ( ) ) ; } { bytes_1 . write ( buf , this . specific , 'bool' ) ; } if ( this . specific ) { bytes_1 . WriteVariableSize ( buf , this . proposed_amendments . length , 8 , 8 ) ; this . proposed_amendments . forEach ( ( value ) => { buf . write ( value . Serialize ( ) ) ; } ) ; } { buf . write ( this . vote_tx_id . Serialize ( ) ) ; } { const type = '[]uint64' . slice ( 2 ) ; bytes_1 . WriteVariableSize ( buf , this . option_tally . length , 8 , 8 ) ; this . option_tally . forEach ( value => { bytes_1 . write ( buf , value , type ) ; } ) ; } { bytes_1 . WriteVarChar ( buf , this . result , 8 ) ; } { buf . write ( this . timestamp . Serialize ( ) ) ; } return buf . buf ; }
serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes .
// asset_specific_vote (bool) // asset_type (string) // asset_code (AssetCode) // specific (bool) // proposed_amendments ([]Amendment) // vote_tx_id (TxId) // option_tally ([]uint64) // IsNativeTypeArray []uint64 // TODO // result (string) // timestamp (Timestamp)